mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Merge pull request #7054 from VOREStation/aro-sscleanup
Clean up some subsystem things
This commit is contained in:
@@ -9,10 +9,10 @@ datum/controller/transfer_controller/New()
|
||||
timerbuffer = config.vote_autotransfer_initial
|
||||
shift_hard_end = config.vote_autotransfer_initial + (config.vote_autotransfer_interval * 0) //VOREStation Edit //Change this "1" to how many extend votes you want there to be.
|
||||
shift_last_vote = shift_hard_end - config.vote_autotransfer_interval //VOREStation Edit
|
||||
START_PROCESSING(SSobj, src)
|
||||
START_PROCESSING(SSprocessing, src)
|
||||
|
||||
datum/controller/transfer_controller/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
STOP_PROCESSING(SSprocessing, src)
|
||||
|
||||
datum/controller/transfer_controller/process()
|
||||
currenttick = currenttick + 1
|
||||
|
||||
@@ -1,55 +0,0 @@
|
||||
#define SSBELLIES_PROCESSED 1
|
||||
#define SSBELLIES_IGNORED 2
|
||||
|
||||
//
|
||||
// Bellies subsystem - Process vore bellies
|
||||
//
|
||||
|
||||
SUBSYSTEM_DEF(bellies)
|
||||
name = "Bellies"
|
||||
priority = 5
|
||||
wait = 1 SECONDS
|
||||
flags = SS_KEEP_TIMING|SS_NO_INIT
|
||||
runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME
|
||||
|
||||
var/list/belly_list = list()
|
||||
var/list/currentrun = list()
|
||||
var/ignored_bellies = 0
|
||||
var/obj/belly/current_belly
|
||||
|
||||
/datum/controller/subsystem/bellies/Recover()
|
||||
log_debug("[name] subsystem Recover().")
|
||||
if(SSbellies.current_belly)
|
||||
log_debug("current_belly was: (\ref[SSbellies.current_belly])[SSbellies.current_belly]([SSbellies.current_belly.type])(SSbellies.current_belly.owner) - currentrun: [SSbellies.currentrun.len] vs total: [SSbellies.belly_list.len]")
|
||||
var/list/old_bellies = SSbellies.belly_list.Copy()
|
||||
for(var/datum/D in old_bellies)
|
||||
if(!isbelly(D))
|
||||
log_debug("[name] subsystem Recover() found inappropriate item in list: [D.type]")
|
||||
belly_list |= D
|
||||
|
||||
/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)
|
||||
current_belly = currentrun[currentrun.len]
|
||||
currentrun.len--
|
||||
|
||||
if(QDELETED(current_belly))
|
||||
belly_list -= current_belly
|
||||
else
|
||||
if(current_belly.process_belly(times_fired,wait) == SSBELLIES_IGNORED)
|
||||
ignored_bellies++
|
||||
|
||||
if (MC_TICK_CHECK)
|
||||
current_belly = null
|
||||
return
|
||||
|
||||
current_belly = null
|
||||
20
code/controllers/subsystems/processing/bellies_vr.dm
Normal file
20
code/controllers/subsystems/processing/bellies_vr.dm
Normal file
@@ -0,0 +1,20 @@
|
||||
//
|
||||
// Bellies subsystem - Process vore bellies
|
||||
//
|
||||
|
||||
PROCESSING_SUBSYSTEM_DEF(bellies)
|
||||
name = "Bellies"
|
||||
wait = 6 SECONDS
|
||||
flags = SS_KEEP_TIMING|SS_NO_INIT
|
||||
runlevels = RUNLEVEL_GAME|RUNLEVEL_POSTGAME
|
||||
|
||||
/datum/controller/subsystem/processing/bellies/Recover()
|
||||
log_debug("[name] subsystem Recover().")
|
||||
if(SSbellies.current_thing)
|
||||
log_debug("current_thing was: (\ref[SSbellies.current_thing])[SSbellies.current_thing]([SSbellies.current_thing.type]) - currentrun: [SSbellies.currentrun.len] vs total: [SSbellies.processing.len]")
|
||||
var/list/old_processing = SSbellies.processing.Copy()
|
||||
for(var/datum/D in old_processing)
|
||||
if(!isbelly(D))
|
||||
log_debug("[name] subsystem Recover() found inappropriate item in list: [D.type]")
|
||||
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
|
||||
processing |= D
|
||||
Reference in New Issue
Block a user