mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-05-19 13:20:47 +01:00
453080616b
* Update supermatter.dm * fix * clamps these * gwah * Stops tesla from zapping unwrenched coils * tesla upgrade * unglobals this * fix these * Update coil.dm * Update coil.dm * Descriptions * Update coil.dm * Update coil.dm * Update coil.dm * Update coil.dm * Update coil.dm * ranges * UGH * Update vorestation.dme * meth * monster math * Update coil.dm * Update coil.dm * Update coil.dm * THEY DID THE MATH * the monster math * egwah * desc * Update coil.dm * Returns * Update coil.dm * Lowers amount gained * this * im dumb * tesy * Update coil.dm * Update coil.dm * fixes initial density on blast doors * dot * fixes these * Mapper Tools * icon * these * Fixes the sound following people * recursive geigers * Make this a proc * Update supermatter.dm * less ear destroying * these * makes canisters not get softlocked * Hotkeys * proper return * Makes shield gen useful. Gets rid of a harddel Adds hydromagnetic trap * math * Makes buttons more clear. * lol * Fixes ancient runtime * Adds craftable mass driver buttons * button * fixes this * Makes misclicks not destroy solar panels * Update solar.dm * fix this * make them both numbers * upports reflectors * Update reflector.dm * Update reflectors.dm * solar panel and climbable * Gets rid of 'as X' * Adds account console * Update vorestation.dme * Craftable message server * Update message_server.dm * These * con struct * Update smartfridge.dm * whoop * edits
46 lines
1.4 KiB
Plaintext
46 lines
1.4 KiB
Plaintext
#define FIRE_PRIORITY_REFLECTOR 20
|
|
|
|
SUBSYSTEM_DEF(reflector)
|
|
name = "Reflectors"
|
|
priority = FIRE_PRIORITY_REFLECTOR
|
|
flags = SS_BACKGROUND | SS_NO_INIT
|
|
wait = 5
|
|
|
|
var/stat_tag = "R" //Used for logging
|
|
var/list/processing = list()
|
|
var/list/currentrun = list()
|
|
var/obj/structure/reflector/current_thing
|
|
|
|
/datum/controller/subsystem/reflector/Recover()
|
|
log_runtime("[name] subsystem Recover().")
|
|
if(SSreflector.current_thing)
|
|
log_runtime("current_thing was: (\ref[SSreflector.current_thing])[SSreflector.current_thing]([SSreflector.current_thing.type]) - currentrun: [SSreflector.currentrun.len] vs total: [length(SSreflector.processing)]")
|
|
var/list/old_processing = SSreflector.processing.Copy()
|
|
for(var/datum/D in old_processing)
|
|
if(CHECK_BITFIELD(D.datum_flags, DF_ISPROCESSING))
|
|
processing |= D
|
|
|
|
/datum/controller/subsystem/reflector/stat_entry(msg)
|
|
msg = "[stat_tag]:[processing.len]"
|
|
return ..()
|
|
|
|
/datum/controller/subsystem/reflector/fire(resumed = 0)
|
|
if (!resumed)
|
|
currentrun = processing.Copy()
|
|
//cache for sanic speed (lists are references anyways)
|
|
var/list/current_run = currentrun
|
|
|
|
while(current_run.len)
|
|
current_thing = current_run[current_run.len]
|
|
current_run.len--
|
|
if(QDELETED(current_thing))
|
|
processing -= current_thing
|
|
current_thing.Fire()
|
|
if (MC_TICK_CHECK)
|
|
current_thing = null
|
|
return
|
|
|
|
current_thing = null
|
|
|
|
#undef FIRE_PRIORITY_REFLECTOR
|