From bb6f030f84feea4c652f88a3e60d18cba118cd0e Mon Sep 17 00:00:00 2001 From: Aryn Date: Sat, 22 Feb 2014 09:09:48 -0700 Subject: [PATCH] Added Reboot ZAS as a debug verb. Replaces the air controller, marks all old zones invalid, and adds every turf to the update list. Results are the same as on a server start. --- code/ZAS/_docs.dm | 2 +- code/modules/admin/verbs/mapping.dm | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/ZAS/_docs.dm b/code/ZAS/_docs.dm index 26bb4d3b215..8d084dc4c95 100644 --- a/code/ZAS/_docs.dm +++ b/code/ZAS/_docs.dm @@ -27,7 +27,7 @@ Notes for people who used ZAS before: */ -#define ZASDBG +//#define ZASDBG //#define ZLEVELS #define AIR_BLOCKED 1 diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index ab7ef30e915..2e092689c3d 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -157,6 +157,7 @@ var/list/debug_verbs = list ( ,/client/proc/Zone_Info ,/client/proc/Test_ZAS_Connection ,/client/proc/ZoneTick + ,/client/proc/rebootAirMaster ,/client/proc/hide_debug_verbs ,/client/proc/testZAScolors ,/client/proc/testZAScolors_remove @@ -266,6 +267,19 @@ var/list/debug_verbs = list ( if(i.icon_state == "zasdebug") images.Remove(i) +/client/proc/rebootAirMaster() + set category = "ZAS" + set name = "Reboot ZAS" + + if(alert("This will destroy and remake all zone geometry on the whole map.","Reboot ZAS","Reboot ZAS","Nevermind") == "Reboot ZAS") + var/datum/controller/air_system/old_air = air_master + for(var/zone/zone in old_air.zones) + zone.c_invalidate() + del old_air + air_master = new + air_master.Setup() + spawn air_master.Start() + /client/proc/count_objects_on_z_level() set category = "Mapping"