From: terencehill Date: Mon, 29 Feb 2016 12:36:04 +0000 (+0100) Subject: Show a centerprint message when you get the jetpack or the fuel regenerator X-Git-Tag: xonotic-v0.8.2~1167^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=209e751ff9f02a1679d2d0ddb408535ffc9873ee;p=xonotic%2Fxonotic-data.pk3dir.git Show a centerprint message when you get the jetpack or the fuel regenerator --- diff --git a/notifications.cfg b/notifications.cfg index 513263b71..7fb6d87a0 100644 --- a/notifications.cfg +++ b/notifications.cfg @@ -102,7 +102,7 @@ seta notification_ANNCE_VOTE_ACCEPT "2" "0 = disabled, 1 = enabled if gentle mod seta notification_ANNCE_VOTE_CALL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled" seta notification_ANNCE_VOTE_FAIL "2" "0 = disabled, 1 = enabled if gentle mode is off, 2 = always enabled" -// MSG_INFO notifications (count = 315): +// MSG_INFO notifications (count = 316): seta notification_INFO_CONNECTING "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_CHAT_NOSPECTATORS "2" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_CTF_CAPTURE_RED "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -363,6 +363,7 @@ seta notification_INFO_WATERMARK "1" "0 = off, 1 = print to console, 2 = print t seta notification_INFO_WEAPON_ACCORDEON_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_ACCORDEON_SUICIDE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_ARC_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" +seta notification_INFO_WEAPON_ARC_MURDER_SPRAY "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_BLASTER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_BLASTER_SUICIDE "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_CRYLINK_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" @@ -419,7 +420,7 @@ seta notification_INFO_WEAPON_TUBA_SUICIDE "1" "0 = off, 1 = print to console, 2 seta notification_INFO_WEAPON_VAPORIZER_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" seta notification_INFO_WEAPON_VORTEX_MURDER "1" "0 = off, 1 = print to console, 2 = print to console and chatbox (if notification_allow_chatboxprint is enabled)" -// MSG_CENTER notifications (count = 222): +// MSG_CENTER notifications (count = 224): seta notification_CENTER_ALONE "1" "0 = off, 1 = centerprint" seta notification_CENTER_ASSAULT_ATTACKING "1" "0 = off, 1 = centerprint" seta notification_CENTER_ASSAULT_DEFENDING "1" "0 = off, 1 = centerprint" @@ -555,6 +556,8 @@ seta notification_CENTER_FREEZETAG_SPAWN_LATE "1" "0 = off, 1 = centerprint" seta notification_CENTER_INVASION_SUPERMONSTER "1" "0 = off, 1 = centerprint" seta notification_CENTER_ITEM_BUFF_DROP "1" "0 = off, 1 = centerprint" seta notification_CENTER_ITEM_BUFF_GOT "1" "0 = off, 1 = centerprint" +seta notification_CENTER_ITEM_FUELREGEN_GOT "1" "0 = off, 1 = centerprint" +seta notification_CENTER_ITEM_JETPACK_GOT "1" "0 = off, 1 = centerprint" seta notification_CENTER_ITEM_WEAPON_DONTHAVE "1" "0 = off, 1 = centerprint" seta notification_CENTER_ITEM_WEAPON_DROP "1" "0 = off, 1 = centerprint" seta notification_CENTER_ITEM_WEAPON_GOT "1" "0 = off, 1 = centerprint" @@ -643,7 +646,7 @@ seta notification_CENTER_VEHICLE_STEAL "1" "0 = off, 1 = centerprint" seta notification_CENTER_VEHICLE_STEAL_SELF "1" "0 = off, 1 = centerprint" seta notification_CENTER_WEAPON_MINELAYER_LIMIT "1" "0 = off, 1 = centerprint" -// MSG_MULTI notifications (count = 152): +// MSG_MULTI notifications (count = 153): seta notification_DEATH_MURDER_BUFF "1" "Enable this multiple notification" seta notification_DEATH_MURDER_CHEAT "1" "Enable this multiple notification" seta notification_DEATH_MURDER_DROWN "1" "Enable this multiple notification" @@ -741,6 +744,7 @@ seta notification_MULTI_INSTAGIB_FINDAMMO "1" "Enable this multiple notification seta notification_WEAPON_ACCORDEON_MURDER "1" "Enable this multiple notification" seta notification_WEAPON_ACCORDEON_SUICIDE "1" "Enable this multiple notification" seta notification_WEAPON_ARC_MURDER "1" "Enable this multiple notification" +seta notification_WEAPON_ARC_MURDER_SPRAY "1" "Enable this multiple notification" seta notification_WEAPON_BLASTER_MURDER "1" "Enable this multiple notification" seta notification_WEAPON_BLASTER_SUICIDE "1" "Enable this multiple notification" seta notification_WEAPON_CRYLINK_MURDER "1" "Enable this multiple notification" @@ -864,4 +868,4 @@ seta notification_show_sprees_info "3" "Show spree information in MSG_INFO messa seta notification_show_sprees_info_newline "1" "Show attacker spree information for MSG_INFO messages on a separate line than the death notification itself" seta notification_show_sprees_info_specialonly "1" "Don't show attacker spree information in MSG_INFO messages if it isn't an achievement" -// Notification counts (total = 802): MSG_ANNCE = 89, MSG_INFO = 315, MSG_CENTER = 222, MSG_MULTI = 152, MSG_CHOICE = 24 +// Notification counts (total = 806): MSG_ANNCE = 89, MSG_INFO = 316, MSG_CENTER = 224, MSG_MULTI = 153, MSG_CHOICE = 24 diff --git a/qcsrc/common/notifications.inc b/qcsrc/common/notifications.inc index 545b8783b..6d7a4fe53 100644 --- a/qcsrc/common/notifications.inc +++ b/qcsrc/common/notifications.inc @@ -578,6 +578,8 @@ MSG_CENTER_NOTIF(1, CENTER_INVASION_SUPERMONSTER, 1, 0, "s1", NO_CPID, "0 0", _("^K1A %s has arrived!"), "") MSG_CENTER_NOTIF(1, CENTER_ITEM_BUFF_DROP, 0, 1, "item_buffname", CPID_ITEM, "item_centime 0", _("^BGYou dropped the %s^BG buff!"), "") MSG_CENTER_NOTIF(1, CENTER_ITEM_BUFF_GOT, 0, 1, "item_buffname", CPID_ITEM, "item_centime 0", _("^BGYou got the %s^BG buff!"), "") + MSG_CENTER_NOTIF(1, CENTER_ITEM_FUELREGEN_GOT, 0, 0, "", CPID_ITEM, "item_centime 0", _("^BGYou got the ^F1Fuel regenerator"), "") + MSG_CENTER_NOTIF(1, CENTER_ITEM_JETPACK_GOT, 0, 0, "", CPID_ITEM, "item_centime 0", _("^BGYou got the ^F1Jet pack"), "") MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_DONTHAVE, 0, 1, "item_wepname", CPID_ITEM, "item_centime 0", _("^BGYou do not have the ^F1%s"), "") MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_DROP, 1, 1, "item_wepname item_wepammo", CPID_ITEM, "item_centime 0", _("^BGYou dropped the ^F1%s^BG%s"), "") MSG_CENTER_NOTIF(1, CENTER_ITEM_WEAPON_GOT, 0, 1, "item_wepname", CPID_ITEM, "item_centime 0", _("^BGYou got the ^F1%s"), "") diff --git a/qcsrc/common/t_items.qc b/qcsrc/common/t_items.qc index 7003dfd7f..9c8c42115 100644 --- a/qcsrc/common/t_items.qc +++ b/qcsrc/common/t_items.qc @@ -707,6 +707,14 @@ float Item_GiveTo(entity item, entity player) } } + if (item.itemdef.instanceOfPowerup) + { + if ((item.itemdef == ITEM_JetpackRegen) && !(player.items & IT_FUEL_REGEN)) + Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_ITEM_FUELREGEN_GOT); + else if ((item.itemdef == ITEM_Jetpack) && !(player.items & IT_JETPACK)) + Send_Notification(NOTIF_ONE, player, MSG_CENTER, CENTER_ITEM_JETPACK_GOT); + } + int its; if((its = (item.items - (item.items & player.items)) & IT_PICKUPMASK)) {