mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2026-08-23 05:57:35 +01:00
modifies the hollow metrics API; that'll probably be implemented soon adds init stages changes SSatoms to not abuse its `initialized` variable closes #6858
22 lines
532 B
Plaintext
22 lines
532 B
Plaintext
/**
|
|
* subsystem for ticking automata datums
|
|
*/
|
|
SUBSYSTEM_DEF(automata)
|
|
name = "Automata"
|
|
wait = 1
|
|
subsystem_flags = SS_TICKER | SS_NO_INIT
|
|
|
|
/// all automata in world
|
|
var/static/list/datum/automata/automatons = list()
|
|
/// all active automata
|
|
var/static/list/datum/automata/ticking = list()
|
|
|
|
/datum/controller/subsystem/automata/fire(resumed)
|
|
// we can optimize this for slow tickers later
|
|
for(var/datum/automata/A as anything in ticking)
|
|
if(world.time < A.next_tick)
|
|
continue
|
|
A.tick()
|
|
if(MC_TICK_CHECK)
|
|
return
|