Files
Paradise/code/controllers/subsystem/SSacid.dm
DGamerL bad8b31afa Changes all .len to length() where applicable (#25174)
* Globals work

* Double access works

* All other things

* Revert "All other things"

This reverts commit 6574442eb6.

* More changes that compile and work

* IT WORKS AAAAAA

* Changes even more .len to length()

* Apply suggestions from code review

* Update code/datums/mind.dm

* Update code/__HELPERS/sorts/InsertSort.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

* Update code/__HELPERS/sanitize_values.dm

Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>

---------

Co-authored-by: FunnyMan3595 (Charlie Nolan) <funnyman@google.com>
Co-authored-by: Deniz <66401072+Oyu07@users.noreply.github.com>
2024-04-19 17:32:09 +00:00

43 lines
1.1 KiB
Plaintext

SUBSYSTEM_DEF(acid)
name = "Acid"
priority = FIRE_PRIORITY_ACID
flags = SS_NO_INIT|SS_BACKGROUND
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
cpu_display = SS_CPUDISPLAY_LOW
offline_implications = "Objects will no longer react to acid. No immediate action is needed."
var/list/currentrun = list()
var/list/processing = list()
/datum/controller/subsystem/acid/get_stat_details()
return "P:[length(processing)]"
/datum/controller/subsystem/acid/get_metrics()
. = ..()
var/list/cust = list()
cust["processing"] = length(processing)
.["custom"] = cust
/datum/controller/subsystem/acid/fire(resumed = 0)
if(!resumed)
src.currentrun = processing.Copy()
//cache for sanic speed (lists are references anyways)
var/list/currentrun = src.currentrun
while(length(currentrun))
var/obj/O = currentrun[length(currentrun)]
currentrun.len--
if(!O || QDELETED(O))
processing -= O
if(MC_TICK_CHECK)
return
continue
if(!(O.acid_level && O.acid_processing()))
O.cut_overlay(GLOB.acid_overlay, TRUE)
processing -= O
if(MC_TICK_CHECK)
return