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.
This commit is contained in:
Aryn
2014-02-22 09:09:48 -07:00
parent e3b87b4c4d
commit bb6f030f84
2 changed files with 15 additions and 1 deletions

View File

@@ -27,7 +27,7 @@ Notes for people who used ZAS before:
*/
#define ZASDBG
//#define ZASDBG
//#define ZLEVELS
#define AIR_BLOCKED 1

View File

@@ -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"