]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Show a centerprint message when you get the jetpack or the fuel regenerator 289/head
authorterencehill <piuntn@gmail.com>
Mon, 29 Feb 2016 12:36:04 +0000 (13:36 +0100)
committerterencehill <piuntn@gmail.com>
Mon, 29 Feb 2016 12:36:04 +0000 (13:36 +0100)
notifications.cfg
qcsrc/common/notifications.inc
qcsrc/common/t_items.qc

index 513263b714b6b3f293019e24afc978ae55168aa7..7fb6d87a00142cfa44c31bb0b3ff86a93433f9bc 100644 (file)
@@ -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
index 545b8783bd676a22d1bc44230004f08f9f818317..6d7a4fe537dff7cd1c371b44b09ba9ead78d7165 100644 (file)
     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"), "")
index 7003dfd7f1dd1a74176eace324b6ecf3317feed2..9c8c42115d642789ae7e05d3a1c4748b466a352f 100644 (file)
@@ -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))
        {