]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Move remaining monster/za messages to notifications system
authorMario <mario.mario@y7mail.com>
Thu, 7 Mar 2013 00:55:13 +0000 (11:55 +1100)
committerMario <mario.mario@y7mail.com>
Thu, 7 Mar 2013 00:55:13 +0000 (11:55 +1100)
qcsrc/common/notifications.qh
qcsrc/server/monsters/lib/monsters.qc
qcsrc/server/monsters/lib/spawn.qc
qcsrc/server/mutators/mutator_zombie_apocalypse.qc

index 86a24a4f121f167ae8e00d0879e36f3e5ce64c76..b7f1e9a1a8d50259cdf66cbb68c86ce67b633c00 100644 (file)
@@ -303,6 +303,7 @@ void Send_Notification_WOVA(
        MULTITEAM_INFO(1, INFO_KEYHUNT_PICKUP_, 4,             1, 0, "s1", "",                          "",                     _("^BG%s^BG picked up the ^TC^TT Key\n"), "") \
        MSG_INFO_NOTIF(1, INFO_LMS_FORFEIT,                    1, 0, "s1", "",                          "",                     _("^BG%s^F3 forfeited\n"), "") \
        MSG_INFO_NOTIF(1, INFO_LMS_NOLIVES,                    1, 0, "s1", "",                          "",                     _("^BG%s^F3 has no more lives left\n"), "") \
+       MSG_INFO_NOTIF(1, INFO_MONSTERS_DISABLED,                  0, 0, "", "",                            "",                     _("^BGMonsters are currently disabled\n"), "") \
        MSG_INFO_NOTIF(1, INFO_POWERUP_INVISIBILITY,           1, 0, "s1", "s1",                        "strength",             _("^BG%s^K1 picked up Invisibility\n"), "") \
        MSG_INFO_NOTIF(1, INFO_POWERUP_SHIELD,                 1, 0, "s1", "s1",                        "shield",               _("^BG%s^K1 picked up Shield\n"), "") \
        MSG_INFO_NOTIF(1, INFO_POWERUP_SPEED,                  1, 0, "s1", "s1",                        "shield",               _("^BG%s^K1 picked up Speed\n"), "") \
@@ -527,7 +528,8 @@ void Send_Notification_WOVA(
        MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SPECTATE,         0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Spectating in ^COUNT"), "") \
        MSG_CENTER_NOTIF(1, CENTER_TEAMCHANGE_SUICIDE,          0, 1, "",              CPID_TEAMCHANGE,       "1 f1", _("^K1Suicide in ^COUNT"), "") \
        MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_BEGINNING,           0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout begins in ^COUNT"), "") \
-       MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "")
+       MSG_CENTER_NOTIF(1, CENTER_TIMEOUT_ENDING,              0, 1, "",              CPID_TIMEOUT,          "1 f1", _("^F4Timeout ends in ^COUNT"), "") \
+       MSG_CENTER_NOTIF(1, CENTER_ZA_WIN,                              0, 0, "",              NO_CPID,                   "0 0",  _("^F1All zombies exterminated, prepare for the next round!"), "")
 
 #define MSG_MULTI_NOTIFICATIONS \
        MSG_MULTI_NOTIF(1, DEATH_MURDER_CHEAT,                   INFO_DEATH_MURDER_CHEAT,                   NO_MSG) \
index 5bb995f577cddb89b7b68535b53871f4ae35288e..cc362e7125946d7263d4f9f9c2665f9d8e8bff96 100644 (file)
@@ -23,7 +23,7 @@ void Monster_DropItem (string itype, string itemsize)
                if(itemsize == "large") spawnfunc_item_armor_large();
                else if (itemsize == "small") spawnfunc_item_armor_small();
                else if (itemsize == "medium") spawnfunc_item_armor_medium();
-               else print("Invalid monster drop item selected.\n");
+               else dprint("Invalid monster drop item selected.\n");
        }
        else if (itype == "health")
        {
@@ -31,7 +31,7 @@ void Monster_DropItem (string itype, string itemsize)
                else if (itemsize == "small") spawnfunc_item_health_small();
                else if (itemsize == "medium") spawnfunc_item_health_medium();
                else if (itemsize == "mega") spawnfunc_item_health_mega();
-               else print("Invalid monster drop item selected.\n");
+               else dprint("Invalid monster drop item selected.\n");
        }
        else if (itype == "ammo")
        {
@@ -39,11 +39,11 @@ void Monster_DropItem (string itype, string itemsize)
                else if (itemsize == "cells") spawnfunc_item_cells();
                else if (itemsize == "bullets") spawnfunc_item_bullets();
                else if (itemsize == "rockets") spawnfunc_item_rockets();
-               else print("Invalid monster drop item selected.\n");
+               else dprint("Invalid monster drop item selected.\n");
        }
        else
        {
-               print("Invalid monster drop item selected.\n");
+               dprint("Invalid monster drop item selected.\n");
                self = oldself;
                return;
        }
index bb707b3eaedf801a2b4450df815333046eb78151..467c02a22bdb812903e3ef1421fc019e8719ba63 100644 (file)
@@ -13,7 +13,8 @@ entity spawnmonster (string monster, entity spawnedby, entity own, vector orig,
        if not(autocvar_g_monsters)
        {
                if(spawnedby.flags & FL_CLIENT)
-                       sprint(spawnedby, "Monsters are disabled. Enable g_monsters to spawn monsters\n");
+                       Send_Notification(NOTIF_ONE, spawnedby, MSG_INFO, INFO_MONSTERS_DISABLED);
+                       
                return world;
        }
        
index 5ff50d3f8b1b6ab97569cc53e965776fb3e1767e..3f84465a0afab231c8bc6dba7e7970e05bd9dadd 100644 (file)
@@ -54,15 +54,11 @@ void zombie_spawn_somewhere ()
 void() spawn_zombies;
 void za_roundwon()
 {
-       entity head;
-       FOR_EACH_PLAYER(head)
-       {
-               centerprint(head, "All the zombies have been exterminated! Prepare for round 2!");
-       }
+       Send_Notification(NOTIF_ALL, world, MSG_CENTER, CENTER_ZA_WIN);
        
        roundcnt += 1;
        
-       numzoms = autocvar_g_za_monster_count * roundcnt;
+       numzoms = autocvar_g_za_monster_count;
        
        monsters_total = numzoms;
        totalzombies = numzoms;
@@ -87,7 +83,7 @@ void spawn_zombies ()
                
     entity e;
     
-    print("Them zombies be spawnin'!\n");
+    dprint("Them zombies be spawnin'!\n");
 
        while(numzoms > 0)
        {