Refactor the Open Space controller into MC Subsystem

- Basically just refactor doWork() into fire() with the capablity to return in the middle with MC_TICK_CHECK.
- Move some vars around to be more organized.
- Only functional change is that when a turf is queued twice in one cycle, the second queue moves it to the end of the list instead of it being in the queue twice
This commit is contained in:
Leshana
2020-03-25 15:47:51 -04:00
parent 4c25dc91df
commit 5bf15efcbc
3 changed files with 59 additions and 39 deletions

View File

@@ -56,7 +56,8 @@
below.update_icon() // So the 'ceiling-less' overlay gets added.
for(var/atom/movable/A in src)
A.fall()
OS_controller.add_turf(src, 1)
if(GLOB.open_space_initialised)
SSopen_space.add_turf(src, TRUE)
// override to make sure nothing is hidden
/turf/simulated/open/levelupdate()
@@ -103,7 +104,7 @@
add_overlay(o_img)
if(!below_is_open)
add_overlay(over_OS_darkness)
add_overlay(SSopen_space.over_OS_darkness)
return 0
return PROCESS_KILL