An attempt to make the master controller more robust. This shouldn't cause terrible additional lag, given that the master controller doesn't actually fire that often, and can also give us a clue as to what part of the controller has died in case of failure

Modifies do_after to something that fires a lot less, and is hopefully more robust against infinite loops. It is now theoretically possible to run around and then come back to the same place and have it complete, but that's only really valid for extremely long times (like handcuff removal) and if you get lucky and dodge one of the timed checks.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@3421 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
VivianFoxfoot@gmail.com
2012-04-09 18:53:04 +00:00
parent 97ee64f5e9
commit 92fedfe8df
6 changed files with 161 additions and 27 deletions

View File

@@ -215,6 +215,7 @@
//verbs += /proc/togglebuildmode --Merged with view variables
//verbs += /client/proc/cmd_modify_object_variables --Merged with view variables
verbs += /client/proc/togglebuildmodeself
verbs += /client/proc/debug_master_controller
else return
//Game Admin
@@ -413,6 +414,7 @@
//verbs -= /client/proc/cmd_switch_radio --removed because tcommsat is staying
verbs -= /client/proc/togglebuildmodeself
verbs -= /client/proc/kill_airgroup
verbs -= /client/proc/debug_master_controller
return

View File

@@ -7,4 +7,14 @@
master_controller.process()
if("No")
return 0
return
/client/proc/debug_master_controller()
set category = "Debug"
set name = "Debug Master Controller"
switch(alert("Debug Master Controller or Failsafe?" ,, "Master Controller" , "Failsafe"))
if("Master Controller")
debug_variables(master_controller)
if("Failsafe")
debug_variables(Failsafe)
return

View File

@@ -938,8 +938,8 @@ note dizziness decrements automatically in the mob's Life() proc.
stat(null, "([x], [y], [z])")
stat(null, "CPU: [world.cpu]")
stat(null, "Controller: [controllernum]")
//if (master_controller)
// stat(null, "Loop: [master_controller.loop_freq]")
if (master_controller)
stat(null, "Current Iteration: [controller_iteration]")
if (spell_list.len)