mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 19:47:47 +01:00
for(var/bad_code in world)
Removes a very large amount of world loops. Adds a macro to painlessly generate a global list, and the needed code to modify the list when an object is made or deleted automatically. Cleans up some commented out code.
This commit is contained in:
@@ -35,7 +35,7 @@ SUBSYSTEM_DEF(air)
|
||||
|
||||
current_cycle = 0
|
||||
var/simulated_turf_count = 0
|
||||
for(var/turf/simulated/S in world)
|
||||
for(var/turf/simulated/S in turfs)
|
||||
simulated_turf_count++
|
||||
S.update_air_properties()
|
||||
CHECK_TICK
|
||||
|
||||
@@ -46,7 +46,7 @@ SUBSYSTEM_DEF(atoms)
|
||||
CHECK_TICK
|
||||
else
|
||||
count = 0
|
||||
for(var/atom/A in world)
|
||||
for(var/atom/A in world) // This must be world, since this operation adds all the atoms to their specific lists.
|
||||
if(!A.initialized)
|
||||
InitAtom(A, mapload_arg)
|
||||
++count
|
||||
|
||||
@@ -30,7 +30,7 @@ SUBSYSTEM_DEF(xenoarch)
|
||||
. = ..()
|
||||
|
||||
/datum/controller/subsystem/xenoarch/proc/SetupXenoarch()
|
||||
for(var/turf/simulated/mineral/M in world)
|
||||
for(var/turf/simulated/mineral/M in turfs)
|
||||
if(!M.density)
|
||||
continue
|
||||
|
||||
|
||||
Reference in New Issue
Block a user