Merge branch 'dev' of https://github.com/Baystation12/Baystation12 into hydroponics

This commit is contained in:
Zuhayr
2014-07-25 22:34:40 +09:30
110 changed files with 2530 additions and 2688 deletions

View File

@@ -16,6 +16,8 @@ datum/controller/lighting
var/list/changed_turfs = list()
var/changed_turfs_workload_max = 0
var/list/changed_areas = list()
datum/controller/lighting/New()
lighting_states = max( 0, length(icon_states(LIGHTING_ICON))-1 )
if(lighting_controller != src)
@@ -53,9 +55,18 @@ datum/controller/lighting/proc/process()
for(var/i=1, i<=changed_turfs.len, i++)
var/turf/T = changed_turfs[i]
if(T && T.lighting_changed)
changed_areas |= T.loc
T.shift_to_subarea()
changed_turfs.Cut() // reset the changed list
for(var/i = 1; i <= changed_areas.len, i++)
var/area/A = changed_areas[i]
if(A.master != A && !A.contents.len)
A.related -= A
active_areas -= A
all_areas -= A
changed_areas.Cut()
process_cost = (world.timeofday - started)
sleep(processing_interval)

View File

@@ -294,7 +294,8 @@ datum/controller/game_controller/proc/process_machines_power()
var/area/A = active_areas[i]
if(A.powerupdate && A.master == A)
A.powerupdate -= 1
for(var/area/SubArea in A.related)
for(var/j = 1; j <= A.related.len; j++)
var/area/SubArea = A.related[j]
for(var/obj/machinery/M in SubArea)
if(M)
if(M.use_power)

View File

@@ -48,7 +48,7 @@
message_admins("Admin [key_name_admin(usr)] has restarted the [controller] controller.")
return
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller"))
/client/proc/debug_controller(controller in list("Master","Failsafe","Ticker","Lighting","Air","Jobs","Sun","Radio","Supply","Shuttles","Emergency Shuttle","Configuration","pAI", "Cameras", "Transfer Controller", "Gas Data"))
set category = "Debug"
set name = "Debug Controller"
set desc = "Debug the various periodic loop controllers for the game (be careful!)"
@@ -100,5 +100,8 @@
if("Transfer Controller")
debug_variables(transfer_controller)
feedback_add_details("admin_verb","DAutovoter")
if("Gas Data")
debug_variables(gas_data)
feedback_add_details("admin_verv","DGasdata")
message_admins("Admin [key_name_admin(usr)] is debugging the [controller] controller.")
return