Further process tweaks

- Integrates Volundr's btime library and associated process scheduler
changes.
- btime is implemented separately from the process scheduler, as precise
time measurement is also useful elsewhere.
- `TimeOfHour` is no longer internally throttled; throttling is instead
done by `SCHECK`.
- If btime's `gettime` cannot be called at world startup, an error will
be output and the world will stop.
- Retains the change to schedule processes according to game time,
rather than real time.
- Removes the (now unused) update queue files.
- Removes the process scheduler testing files.
- These are standalone tests for the process scheduler, completely
unrelated to its use in the full codebase. We never used them.
- Moves the process scheduler defines into __DEFINES.
- Makes the lighting process run once before the round starts.
- Renames `scheck` to `sleepCheck`, to ensure any code that tries to use
`scheck` will fail to compile.
- Adds `SCHECK` and `SCHECK_EVERY` macros that skip calling `sleepCheck`
entirely until a specified number of `SCHECK`s (50 by default) have been
called.
- Makes most processes iterate using their `last_object` variable,
allowing hang recovery to show the type that caused the hang.
- Makes processes output an error when they filter out a type they
refuse to process.
- Rolls the recently-added alarm subsystem into the alarm process.
- Removes the now unused subsystems code.
This commit is contained in:
Krausus
2015-08-08 09:07:26 -04:00
parent 26d35be764
commit 61edb3eb95
35 changed files with 255 additions and 951 deletions
+6 -6
View File
@@ -54,27 +54,27 @@ var/global/datum/controller/process/air_system/air_master
last_hotspots = hotspots.len
for(var/obj/effect/hotspot/H in hotspots)
H.process()
scheck()
SCHECK
/datum/controller/process/air_system/proc/process_super_conductivity()
last_asc = active_super_conductivity.len
for(var/turf/simulated/T in active_super_conductivity)
T.super_conduct()
scheck()
SCHECK
/datum/controller/process/air_system/proc/process_high_pressure_delta()
last_hpd = high_pressure_delta.len
for(var/turf/T in high_pressure_delta)
T.high_pressure_movements()
T.pressure_difference = 0
scheck()
SCHECK
high_pressure_delta.Cut()
/datum/controller/process/air_system/proc/process_active_turfs()
last_active = active_turfs.len
for(var/turf/simulated/T in active_turfs)
T.process_cell()
scheck()
SCHECK
/datum/controller/process/air_system/proc/remove_from_active(var/turf/simulated/T)
if(istype(T))
@@ -123,11 +123,11 @@ var/global/datum/controller/process/air_system/air_master
EG.breakdown_cooldown ++
if(EG.breakdown_cooldown == 10)
EG.self_breakdown()
scheck()
SCHECK
return
if(EG.breakdown_cooldown > 20)
EG.dismantle()
scheck()
SCHECK
/datum/controller/process/air_system/proc/setup_overlays()
plmaster = new /obj/effect/overlay()