Kill Gas Tank Processing (#22810)

This PR nukes the single largest and most common source of unnecessary
Process() calls, the Air Tanks. Air tanks now dynamically add and remove
themselves from processing only when actually required (such as by being
actively used) or they contain a "reactive" gas mixture.

Gas tanks made up the overwhelming majority of all process calls, and
without them always being on, the Processing subsystem becomes extremely
cheap.

<img width="394" height="33" alt="image"
src="https://github.com/user-attachments/assets/a973b863-56ad-46f6-ac34-e3cd479dd76d"
/>

I have also tested gas tanks to make sure that they still work, being
chargable, dischargable, able to breathe from them, and that opening the
valve works. All 4 actions add the gas tank to processing. When the
actions are finished, the tank exits processing.

<img width="686" height="388" alt="image"
src="https://github.com/user-attachments/assets/e91c96d3-9031-4720-8e21-aa4d4afa84fc"
/>
This commit is contained in:
VMSolidus
2026-07-11 14:32:59 +00:00
committed by GitHub
parent 2122b216ab
commit 5627e02e93
3 changed files with 40 additions and 7 deletions
@@ -105,6 +105,15 @@
if (network)
network.update = 1
// This exists because for stupid reasons these machines touch air directly instead of respecting an air tank's procs.
/obj/structure/machinery/portable_atmospherics/Exited(atom/movable/gone, direction)
. = ..()
if(gone == holding)
if(istype(gone, /obj/item/tank))
var/obj/item/tank/T = gone
T.update_icon()
holding = null
/obj/structure/machinery/portable_atmospherics/attackby(obj/item/attacking_item, mob/user)
if ((istype(attacking_item, /obj/item/tank) && !( src.destroyed )))
if (src.holding)