mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-13 17:07:53 +01:00
Remove a whole bunch of in world loops and rework machinery global lists (#3053)
Removes a whole bunch of in world loops. Reworks SSmachinery to hold two lists: all_machines and processing_machines. all_machines contains all machines 5ever. All of them. Literally. Forever. And ever. processing_machines only contains machines that process with the SSmachinery controller. I checked most types at runtime on the live server to see whether they're in processing_machines or in all_machines, and did debug to ensure that most machinery ends up and stays in all_machines. Includes a basic UT to make sure all mapped in machinery types remain within the all_machines list post-init.
This commit is contained in:
@@ -111,7 +111,7 @@
|
||||
|
||||
/obj/machinery/keycard_auth/proc/broadcast_request()
|
||||
icon_state = "auth_on"
|
||||
for(var/obj/machinery/keycard_auth/KA in world)
|
||||
for(var/obj/machinery/keycard_auth/KA in SSmachinery.all_machines)
|
||||
if(KA == src) continue
|
||||
KA.reset()
|
||||
spawn()
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
SSnightlight.temp_disable()
|
||||
|
||||
var/newlevel = get_security_level()
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
for(var/obj/machinery/firealarm/FA in SSmachinery.processing_machines)
|
||||
if(FA.z in config.contact_levels)
|
||||
FA.set_security_level(newlevel)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user