mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 21:12:24 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user