From: Mario Date: Thu, 7 Mar 2013 00:55:13 +0000 (+1100) Subject: Move remaining monster/za messages to notifications system X-Git-Tag: xonotic-v0.8.0~241^2^2~471 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=dfcb93b60075255c47c13c38cacda1cb651d559c;p=xonotic%2Fxonotic-data.pk3dir.git Move remaining monster/za messages to notifications system --- diff --git a/qcsrc/common/notifications.qh b/qcsrc/common/notifications.qh index 86a24a4f1..b7f1e9a1a 100644 --- a/qcsrc/common/notifications.qh +++ b/qcsrc/common/notifications.qh @@ -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) \ diff --git a/qcsrc/server/monsters/lib/monsters.qc b/qcsrc/server/monsters/lib/monsters.qc index 5bb995f57..cc362e712 100644 --- a/qcsrc/server/monsters/lib/monsters.qc +++ b/qcsrc/server/monsters/lib/monsters.qc @@ -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; } diff --git a/qcsrc/server/monsters/lib/spawn.qc b/qcsrc/server/monsters/lib/spawn.qc index bb707b3ea..467c02a22 100644 --- a/qcsrc/server/monsters/lib/spawn.qc +++ b/qcsrc/server/monsters/lib/spawn.qc @@ -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; } diff --git a/qcsrc/server/mutators/mutator_zombie_apocalypse.qc b/qcsrc/server/mutators/mutator_zombie_apocalypse.qc index 5ff50d3f8..3f84465a0 100644 --- a/qcsrc/server/mutators/mutator_zombie_apocalypse.qc +++ b/qcsrc/server/mutators/mutator_zombie_apocalypse.qc @@ -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) {