mirror of
https://github.com/Citadel-Station-13/Citadel-Station-13-RP.git
synced 2025-12-09 20:43:35 +00:00
* dme and dmb * Heeeere we gooo * fasease * Continued. * AAAAAAAAAAAAAAAAAAAAAAAA * Brain going numb * agh * The suffering will be worth it... right? * Going blank... * Am I done? * AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA * Fixes * Should be everything I care about right now.
42 lines
970 B
Plaintext
42 lines
970 B
Plaintext
#define SSBELLIES_PROCESSED 1
|
|
#define SSBELLIES_IGNORED 2
|
|
|
|
//
|
|
// Bellies subsystem - Process bellies
|
|
//
|
|
|
|
SUBSYSTEM_DEF(bellies)
|
|
name = "Bellies"
|
|
priority = 5
|
|
wait = 1 SECONDS
|
|
subsystem_flags = SS_KEEP_TIMING|SS_NO_INIT
|
|
runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME
|
|
|
|
var/static/list/belly_list = list()
|
|
var/list/currentrun = list()
|
|
var/ignored_bellies = 0
|
|
|
|
/datum/controller/subsystem/bellies/stat_entry()
|
|
..("#: [belly_list.len] | P: [ignored_bellies]")
|
|
|
|
/datum/controller/subsystem/bellies/fire(resumed = 0)
|
|
if (!resumed)
|
|
ignored_bellies = 0
|
|
src.currentrun = belly_list.Copy()
|
|
|
|
//cache for sanic speed (lists are references anyways)
|
|
var/list/currentrun = src.currentrun
|
|
var/times_fired = src.times_fired
|
|
while(currentrun.len)
|
|
var/obj/belly/B = currentrun[currentrun.len]
|
|
currentrun.len--
|
|
|
|
if(QDELETED(B))
|
|
belly_list -= B
|
|
else
|
|
if(B.process_belly(times_fired,wait) == SSBELLIES_IGNORED)
|
|
ignored_bellies++
|
|
|
|
if (MC_TICK_CHECK)
|
|
return
|