mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-14 01:18:40 +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:
@@ -6,5 +6,5 @@
|
||||
if(!.)
|
||||
return
|
||||
|
||||
for(var/obj/machinery/light/L in machines)
|
||||
for(var/obj/machinery/light/L in SSmachinery.all_machines)
|
||||
L.fix()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
usr << "Checking for overlapping pipes..."
|
||||
next_turf:
|
||||
for(var/turf/T in world)
|
||||
for(var/turf/T in turfs)
|
||||
for(var/dir in cardinal)
|
||||
var/list/connect_types = list(1 = 0, 2 = 0, 3 = 0)
|
||||
for(var/obj/machinery/atmospherics/pipe in T)
|
||||
|
||||
@@ -423,7 +423,7 @@ var/global/movement_disabled_exception //This is the client that calls the proc,
|
||||
set category = "Mapping"
|
||||
set name = "Find Bad Doors"
|
||||
|
||||
for(var/obj/machinery/door/airlock/A in machines)
|
||||
for(var/obj/machinery/door/airlock/A in world)
|
||||
var/turf/T = get_turf(A)
|
||||
if(istype(T, /turf/space) || istype(T, /turf/simulated/floor/asteroid) || isopenturf(T) || T.density)
|
||||
usr << "Airlock [A] with bad turf at ([A.x],[A.y],[A.z]) in [T.loc]."
|
||||
@@ -432,7 +432,7 @@ var/global/movement_disabled_exception //This is the client that calls the proc,
|
||||
set category = "Mapping"
|
||||
set name = "Find Bad Fire Doors"
|
||||
|
||||
for(var/obj/machinery/door/firedoor/F in machines)
|
||||
for(var/obj/machinery/door/firedoor/F in world)
|
||||
var/turf/T = get_turf(F)
|
||||
var/firelock_increment = 0
|
||||
for(var/obj/machinery/door/firedoor/FD in T)
|
||||
|
||||
Reference in New Issue
Block a user