diff --git a/code/game/area/areas/depot-areas.dm b/code/game/area/areas/depot-areas.dm
index 7a7c934df35..48760540c78 100644
--- a/code/game/area/areas/depot-areas.dm
+++ b/code/game/area/areas/depot-areas.dm
@@ -216,7 +216,8 @@
if(!silent)
announce_here("Depot Code BLUE", reason)
var/list/possible_bot_spawns = list()
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "syndi_depot_bot")
possible_bot_spawns |= L
if(possible_bot_spawns.len)
@@ -248,7 +249,8 @@
comms_online = TRUE
if(comms_online)
spawn(0)
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(prob(50))
if(L.name == "syndi_depot_backup")
var/mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space/S = new /mob/living/simple_animal/hostile/syndicate/melee/autogib/depot/space(get_turf(L))
@@ -344,7 +346,8 @@
/area/syndicate_depot/core/proc/shields_up()
if(shield_list.len)
return
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "syndi_depot_shield")
var/obj/machinery/shieldwall/syndicate/S = new /obj/machinery/shieldwall/syndicate(L.loc)
shield_list += S.UID()
diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm
index 6128c22f66d..9c7fb99fe81 100644
--- a/code/game/gamemodes/blob/blob_report.dm
+++ b/code/game/gamemodes/blob/blob_report.dm
@@ -19,7 +19,7 @@
intercepttext += "Message ends."
if(2)
var/nukecode = rand(10000, 99999)
- for(var/obj/machinery/nuclearbomb/bomb in world)
+ for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
if(bomb && bomb.r_code)
if(is_station_level(bomb.z))
bomb.r_code = nukecode
diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm
index 2b604839c62..2d71df8c979 100644
--- a/code/game/gamemodes/game_mode.dm
+++ b/code/game/gamemodes/game_mode.dm
@@ -415,7 +415,7 @@ proc/display_roundstart_logout_report()
/proc/get_nuke_code()
var/nukecode = "ERROR"
- for(var/obj/machinery/nuclearbomb/bomb in world)
+ for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
if(bomb && bomb.r_code && is_station_level(bomb.z))
nukecode = bomb.r_code
return nukecode
diff --git a/code/game/gamemodes/malfunction/Malf_Modules.dm b/code/game/gamemodes/malfunction/Malf_Modules.dm
index c1a907f9191..a4b8c594b89 100644
--- a/code/game/gamemodes/malfunction/Malf_Modules.dm
+++ b/code/game/gamemodes/malfunction/Malf_Modules.dm
@@ -652,7 +652,8 @@
button.desc = desc
/datum/action/innate/ai/blackout/Activate()
- for(var/obj/machinery/power/apc/apc in GLOB.apcs)
+ for(var/thing in GLOB.apcs)
+ var/obj/machinery/power/apc/apc
if(prob(30 * apc.overload))
apc.overload_lighting()
else
diff --git a/code/game/gamemodes/miniantags/borer/borer_event.dm b/code/game/gamemodes/miniantags/borer/borer_event.dm
index 245b8fa7b41..f5a3b7aa4af 100644
--- a/code/game/gamemodes/miniantags/borer/borer_event.dm
+++ b/code/game/gamemodes/miniantags/borer/borer_event.dm
@@ -16,7 +16,7 @@
/datum/event/borer_infestation/start()
var/list/vents = list()
- for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
+ for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery)
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
//Stops cortical borers getting stuck in small networks. See: Security, Virology
if(temp_vent.parent.other_atmosmch.len > 50)
diff --git a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
index 1f902a51806..5e5f0f87a79 100644
--- a/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
+++ b/code/game/gamemodes/miniantags/revenant/revenant_spawn_event.dm
@@ -26,13 +26,15 @@
var/datum/mind/player_mind = new /datum/mind(key_of_revenant)
player_mind.active = 1
var/list/spawn_locs = list()
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(isturf(L.loc))
switch(L.name)
if("revenantspawn")
spawn_locs += L.loc
if(!spawn_locs) //If we can't find any revenant spawns, try the carp spawns
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(isturf(L.loc))
switch(L.name)
if("carpspawn")
diff --git a/code/game/gamemodes/nuclear/nuclear.dm b/code/game/gamemodes/nuclear/nuclear.dm
index ad1146c0bc8..0ff5508f2ac 100644
--- a/code/game/gamemodes/nuclear/nuclear.dm
+++ b/code/game/gamemodes/nuclear/nuclear.dm
@@ -95,7 +95,8 @@ proc/issyndicate(mob/living/M as mob)
var/list/turf/synd_spawn = list()
- for(var/obj/effect/landmark/A in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/A = thing
if(A.name == "Syndicate-Spawn")
synd_spawn += get_turf(A)
qdel(A)
@@ -450,7 +451,7 @@ proc/issyndicate(mob/living/M as mob)
if(foecount == GLOB.score_arrested)
GLOB.score_allarrested = 1
- for(var/obj/machinery/nuclearbomb/nuke in world)
+ for(var/obj/machinery/nuclearbomb/nuke in GLOB.machines)
if(nuke.r_code == "Nope") continue
var/turf/T = get_turf(nuke)
var/area/A = T.loc
@@ -491,13 +492,16 @@ proc/issyndicate(mob/living/M as mob)
for(var/datum/mind/M in SSticker.mode.syndicates)
foecount++
- for(var/mob/living/C in world)
+ for(var/mob in GLOB.mob_living_list)
+ var/mob/living/C = mob
if(ishuman(C) || isAI(C) || isrobot(C))
- if(C.stat == 2) continue
- if(!C.client) continue
+ if(C.stat == DEAD)
+ continue
+ if(!C.client)
+ continue
crewcount++
- var/obj/item/disk/nuclear/N = locate() in world
+ var/obj/item/disk/nuclear/N = locate() in GLOB.poi_list
if(istype(N))
var/atom/disk_loc = N.loc
while(!isturf(disk_loc))
diff --git a/code/game/gamemodes/revolution/revolution.dm b/code/game/gamemodes/revolution/revolution.dm
index a38982905bc..b09bb7a851f 100644
--- a/code/game/gamemodes/revolution/revolution.dm
+++ b/code/game/gamemodes/revolution/revolution.dm
@@ -385,7 +385,7 @@
if(foecount == GLOB.score_arrested)
GLOB.score_allarrested = 1
- for(var/mob/living/carbon/human/player in world)
+ for(var/mob/living/carbon/human/player in GLOB.mob_living_list)
if(player.mind)
var/role = player.mind.assigned_role
if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director"))
@@ -415,7 +415,7 @@
for(var/datum/mind/M in SSticker.mode:revolutionaries)
if(M.current && M.current.stat != DEAD)
revcount++
- for(var/mob/living/carbon/human/player in world)
+ for(var/mob/living/carbon/human/player in GLOB.mob_living_list)
if(player.mind)
var/role = player.mind.assigned_role
if(role in list("Captain", "Head of Security", "Head of Personnel", "Chief Engineer", "Research Director"))
@@ -425,7 +425,8 @@
if(player.mind in SSticker.mode.revolutionaries) continue
loycount++
- for(var/mob/living/silicon/X in world)
+ for(var/beepboop in GLOB.silicon_mob_list)
+ var/mob/living/silicon/X = beepboop
if(X.stat != DEAD)
loycount++
diff --git a/code/game/gamemodes/scoreboard.dm b/code/game/gamemodes/scoreboard.dm
index 069b0915c00..182bcc78bd2 100644
--- a/code/game/gamemodes/scoreboard.dm
+++ b/code/game/gamemodes/scoreboard.dm
@@ -71,7 +71,8 @@
// Check station's power levels
- for(var/obj/machinery/power/apc/A in GLOB.apcs)
+ for(var/thing in GLOB.apcs)
+ var/obj/machinery/power/apc/A = thing
if(!is_station_level(A.z)) continue
for(var/obj/item/stock_parts/cell/C in A.contents)
if(C.charge < 2300)
diff --git a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
index 7896a4aab61..5fc5e1e78cc 100644
--- a/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
+++ b/code/game/gamemodes/shadowling/special_shadowling_abilities.dm
@@ -161,7 +161,8 @@ GLOBAL_LIST_INIT(possibleShadowlingNames, list("U'ruan", "Y`shej", "Nex", "Hel-u
for(var/mob/living/M in orange(7, H))
M.Weaken(10)
to_chat(M, "An immense pressure slams you onto the ground!")
- for(var/obj/machinery/power/apc/A in GLOB.apcs)
+ for(var/thing in GLOB.apcs)
+ var/obj/machinery/power/apc/A = thing
A.overload_lighting()
var/mob/living/simple_animal/ascendant_shadowling/A = new /mob/living/simple_animal/ascendant_shadowling(H.loc)
A.announce("VYSHA NERADA YEKHEZET U'RUU!!", 5, 'sound/hallucinations/veryfar_noise.ogg')
diff --git a/code/game/machinery/atmoalter/area_atmos_computer.dm b/code/game/machinery/atmoalter/area_atmos_computer.dm
index 3d53e130628..d7650d1cb68 100644
--- a/code/game/machinery/atmoalter/area_atmos_computer.dm
+++ b/code/game/machinery/atmoalter/area_atmos_computer.dm
@@ -164,7 +164,7 @@
var/turf/T = get_turf(src)
if(!T.loc) return
var/area/A = get_area(T)
- for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in world )
+ for(var/obj/machinery/portable_atmospherics/scrubber/huge/scrubber in SSair.atmos_machinery)
var/turf/T2 = get_turf(scrubber)
if(T2 && T2.loc)
var/area/A2 = T2.loc
diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm
index 796d5c552dd..5ec4206734c 100644
--- a/code/game/machinery/buttons.dm
+++ b/code/game/machinery/buttons.dm
@@ -189,12 +189,12 @@
active = 1
icon_state = "launcheract"
- for(var/obj/machinery/sparker/M in world)
+ for(var/obj/machinery/sparker/M in GLOB.machines)
if(M.id == id)
spawn( 0 )
M.spark()
- for(var/obj/machinery/igniter/M in world)
+ for(var/obj/machinery/igniter/M in GLOB.machines)
if(M.id == id)
use_power(50)
M.on = !( M.on )
diff --git a/code/game/machinery/camera/presets.dm b/code/game/machinery/camera/presets.dm
index c0949fb3c9d..b7ae75cd13f 100644
--- a/code/game/machinery/camera/presets.dm
+++ b/code/game/machinery/camera/presets.dm
@@ -41,7 +41,7 @@
number = 1
var/area/A = get_area(src)
if(A)
- for(var/obj/machinery/camera/autoname/C in world)
+ for(var/obj/machinery/camera/autoname/C in GLOB.machines)
if(C == src) continue
var/area/CA = get_area(C)
if(CA.type == A.type)
diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm
index 9464c43b107..3674358f07f 100644
--- a/code/game/machinery/computer/medical.dm
+++ b/code/game/machinery/computer/medical.dm
@@ -121,7 +121,7 @@
data["virus"] += list(list("name" = DS.name, "D" = D))
if(MED_DATA_MEDBOT)
data["medbots"] = list()
- for(var/mob/living/simple_animal/bot/medbot/M in world)
+ for(var/mob/living/simple_animal/bot/medbot/M in GLOB.bots_list)
if(M.z != z)
continue
var/turf/T = get_turf(M)
diff --git a/code/game/machinery/computer/pod.dm b/code/game/machinery/computer/pod.dm
index 6ea095028a2..bafcd2d8ca2 100644
--- a/code/game/machinery/computer/pod.dm
+++ b/code/game/machinery/computer/pod.dm
@@ -23,7 +23,7 @@
timings = list()
times = list()
synced = list()
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
for(var/ident_tag in id_tags)
if((M.id_tag == ident_tag) && !(ident_tag in synced))
@@ -49,7 +49,7 @@
return
/obj/machinery/computer/pod/proc/solo_sync(var/ident_tag)
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if((M.id_tag == ident_tag) && !(ident_tag in synced))
synced += ident_tag
@@ -78,7 +78,7 @@
if(stat & (NOPOWER|BROKEN))
return
var/anydriver = 0
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
anydriver = 1
@@ -94,7 +94,7 @@
sleep(20)
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
M.drive()
@@ -219,7 +219,7 @@
var/ident_tag = href_list["driver"]
var/t = text2num(href_list["power"])
t = min(max(0.25, t), 16)
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.id_tag == ident_tag)
M.power = t
powers[ident_tag] = t
@@ -294,7 +294,7 @@
if(stat & (NOPOWER|BROKEN))
return
var/anydriver = 0
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
anydriver = 1
@@ -303,10 +303,12 @@
return
var/spawn_marauder[] = new()
- for(var/obj/effect/landmark/L in world)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Marauder Entry")
spawn_marauder.Add(L)
- for(var/obj/effect/landmark/L in world)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Marauder Exit")
var/obj/effect/portal/P = new(L.loc, pick(spawn_marauder))
P.invisibility = 101//So it is not seen by anyone.
@@ -320,7 +322,7 @@
M.open()
sleep(20)
- for(var/obj/machinery/mass_driver/M in world)
+ for(var/obj/machinery/mass_driver/M in GLOB.machines)
if(M.z != src.z) continue
if(M.id_tag == ident_tag)
M.drive()
diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm
index f509ee42d34..2ba3b25b6f6 100644
--- a/code/game/machinery/computer/specops_shuttle.dm
+++ b/code/game/machinery/computer/specops_shuttle.dm
@@ -93,7 +93,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
GLOB.specops_shuttle_at_station = 0
- for(var/obj/machinery/computer/specops_shuttle/S in world)
+ for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
qdel(announcer)
@@ -160,10 +160,12 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
sleep(10)
var/spawn_marauder[] = new()
- for(var/obj/effect/landmark/L in world)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Marauder Entry")
spawn_marauder.Add(L.loc)
- for(var/obj/effect/landmark/L in world)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Marauder Exit")
var/obj/effect/portal/P = new(L.loc, pick(spawn_marauder))
//P.invisibility = 101//So it is not seen by anyone.
@@ -233,7 +235,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
var/mob/M = locate(/mob) in T
to_chat(M, "You have arrived to [station_name()]. Commence operation!")
- for(var/obj/machinery/computer/specops_shuttle/S in world)
+ for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
S.specops_shuttle_timereset = world.time + SPECOPS_RETURN_DELAY
qdel(announcer)
@@ -241,7 +243,7 @@ GLOBAL_VAR_INIT(specops_shuttle_timeleft, 0)
/proc/specops_can_move()
if(GLOB.specops_shuttle_moving_to_station || GLOB.specops_shuttle_moving_to_centcom)
return 0
- for(var/obj/machinery/computer/specops_shuttle/S in world)
+ for(var/obj/machinery/computer/specops_shuttle/S in GLOB.machines)
if(world.timeofday <= S.specops_shuttle_timereset)
return 0
return 1
diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm
index 4a701e2c960..7ec7bd7a026 100644
--- a/code/game/machinery/computer/syndicate_specops_shuttle.dm
+++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm
@@ -132,7 +132,8 @@ GLOBAL_VAR_INIT(syndicate_elite_shuttle_timeleft, 0)
*/
//End Marauder launchpad.
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Syndicate Breach Area")
explosion(L.loc,4,6,8,10,0)
diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm
index 57057ad510a..37766db58fb 100644
--- a/code/game/machinery/flasher.dm
+++ b/code/game/machinery/flasher.dm
@@ -144,7 +144,7 @@
active = 1
icon_state = "launcheract"
- for(var/obj/machinery/flasher/M in world)
+ for(var/obj/machinery/flasher/M in GLOB.machines)
if(M.id == id)
spawn()
M.flash()
diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm
index aca4254b517..aa541ec8619 100644
--- a/code/game/machinery/holosign.dm
+++ b/code/game/machinery/holosign.dm
@@ -67,7 +67,7 @@
else
icon_state = "light0"
- for(var/obj/machinery/holosign/M in world)
+ for(var/obj/machinery/holosign/M in GLOB.machines)
if(M.id == src.id)
spawn( 0 )
M.toggle()
diff --git a/code/game/machinery/magnet.dm b/code/game/machinery/magnet.dm
index b73fa94259f..d713817ca06 100644
--- a/code/game/machinery/magnet.dm
+++ b/code/game/machinery/magnet.dm
@@ -202,7 +202,7 @@
..()
if(autolink)
- for(var/obj/machinery/magnetic_module/M in world)
+ for(var/obj/machinery/magnetic_module/M in GLOB.machines)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
@@ -224,7 +224,7 @@
/obj/machinery/magnetic_controller/process()
if(magnets.len == 0 && autolink)
- for(var/obj/machinery/magnetic_module/M in world)
+ for(var/obj/machinery/magnetic_module/M in GLOB.machines)
if(M.freq == frequency && M.code == code)
magnets.Add(M)
diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm
index 095b2e7d56e..6529dd4b73d 100644
--- a/code/game/machinery/requests_console.dm
+++ b/code/game/machinery/requests_console.dm
@@ -200,7 +200,7 @@ GLOBAL_LIST_EMPTY(allRequestConsoles)
var/log_msg = message
var/pass = 0
screen = RCS_SENTFAIL
- for(var/obj/machinery/message_server/MS in world)
+ for(var/obj/machinery/message_server/MS in GLOB.machines)
if(!MS.active) continue
MS.send_rc_message(ckey(href_list["department"]),department,log_msg,msgStamped,msgVerified,priority)
pass = 1
diff --git a/code/game/machinery/syndicatebeacon.dm b/code/game/machinery/syndicatebeacon.dm
index 6299be7be3d..a5cff57ad52 100644
--- a/code/game/machinery/syndicatebeacon.dm
+++ b/code/game/machinery/syndicatebeacon.dm
@@ -121,7 +121,8 @@
if(user)
to_chat(user, "The connected wire doesn't have enough current.")
return
- for(var/obj/singularity/singulo in GLOB.singularities)
+ for(var/thing in GLOB.singularities)
+ var/obj/singularity/singulo = thing
if(singulo.z == z)
singulo.target = src
icon_state = "[icontype]1"
@@ -132,7 +133,8 @@
/obj/machinery/power/singularity_beacon/proc/Deactivate(mob/user = null)
- for(var/obj/singularity/singulo in world)
+ for(var/thing in GLOB.singularities)
+ var/obj/singularity/singulo = thing
if(singulo.target == src)
singulo.target = null
icon_state = "[icontype]0"
diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm
index 610436406d8..8c6c1fff866 100644
--- a/code/game/mecha/mecha.dm
+++ b/code/game/mecha/mecha.dm
@@ -609,6 +609,8 @@
occupant = null
icon_state = initial(icon_state)+"-open"
setDir(dir_in)
+ if(A in trackers)
+ trackers -= A
/obj/mecha/Destroy()
if(occupant)
@@ -639,7 +641,7 @@
cabin_air = null
QDEL_NULL(spark_system)
QDEL_NULL(smoke_system)
-
+ QDEL_LIST(trackers)
GLOB.mechas_list -= src //global mech list
return ..()
diff --git a/code/game/mecha/mecha_control_console.dm b/code/game/mecha/mecha_control_console.dm
index 9a3dffb0c3b..f72770a8ea3 100644
--- a/code/game/mecha/mecha_control_console.dm
+++ b/code/game/mecha/mecha_control_console.dm
@@ -28,7 +28,12 @@
data["screen"] = screen
if(screen == 0)
var/list/mechas[0]
- for(var/obj/item/mecha_parts/mecha_tracking/TR in world)
+ var/list/trackerlist = list()
+ for(var/stompy in GLOB.mechas_list)
+ var/obj/mecha/MC = stompy
+ trackerlist += MC.trackers
+ for(var/thing in trackerlist)
+ var/obj/item/mecha_parts/mecha_tracking/TR = thing
var/answer = TR.get_mecha_info()
if(answer)
mechas[++mechas.len] = answer
diff --git a/code/game/mecha/working/ripley.dm b/code/game/mecha/working/ripley.dm
index 494fc70d36b..7569d8b5263 100644
--- a/code/game/mecha/working/ripley.dm
+++ b/code/game/mecha/working/ripley.dm
@@ -124,8 +124,7 @@
//Attach hydraulic clamp
var/obj/item/mecha_parts/mecha_equipment/hydraulic_clamp/HC = new
HC.attach(src)
- for(var/obj/item/mecha_parts/mecha_tracking/B in trackers)//Deletes the beacon so it can't be found easily
- qdel(B)
+ QDEL_LIST(trackers) //Deletes the beacon so it can't be found easily
var/obj/item/mecha_parts/mecha_equipment/mining_scanner/scanner = new
scanner.attach(src)
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index 4ac9651ea65..33aeddeaab0 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -115,7 +115,7 @@ Frequency:
to_chat(user, "\The [src] is malfunctioning.")
return
var/list/L = list( )
- for(var/obj/machinery/computer/teleporter/com in world)
+ for(var/obj/machinery/computer/teleporter/com in GLOB.machines)
if(com.target)
if(com.power_station && com.power_station.teleporter_hub && com.power_station.engaged)
L["[com.id] (Active)"] = com.target
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index 82487dbd0ae..6f4cbda45bb 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -154,7 +154,7 @@
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
- for(var/obj/machinery/telepad_cargo/R in world)
+ for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm
index f9010c19415..7ff29b947ba 100644
--- a/code/game/objects/structures/crates_lockers/crates.dm
+++ b/code/game/objects/structures/crates_lockers/crates.dm
@@ -89,7 +89,7 @@
if(!E.teleporting)
var/list/L = list()
var/list/areaindex = list()
- for(var/obj/machinery/telepad_cargo/R in world)
+ for(var/obj/machinery/telepad_cargo/R in GLOB.machines)
if(R.stage == 0)
var/turf/T = get_turf(R)
var/tmpname = T.loc.name
diff --git a/code/modules/admin/verbs/atmosdebug.dm b/code/modules/admin/verbs/atmosdebug.dm
index 7e2046867b2..ed8533dc9d5 100644
--- a/code/modules/admin/verbs/atmosdebug.dm
+++ b/code/modules/admin/verbs/atmosdebug.dm
@@ -11,17 +11,18 @@
to_chat(usr, "Checking for disconnected pipes...")
//all plumbing - yes, some things might get stated twice, doesn't matter.
- for(var/obj/machinery/atmospherics/plumbing in world)
+ for(var/thing in SSair.atmos_machinery)
+ var/obj/machinery/atmospherics/plumbing = thing
if(plumbing.nodealert)
to_chat(usr, "Unconnected [plumbing.name] located at [plumbing.x],[plumbing.y],[plumbing.z] ([get_area(plumbing.loc)])")
//Manifolds
- for(var/obj/machinery/atmospherics/pipe/manifold/pipe in world)
+ for(var/obj/machinery/atmospherics/pipe/manifold/pipe in SSair.atmos_machinery)
if(!pipe.node1 || !pipe.node2 || !pipe.node3)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
//Pipes
- for(var/obj/machinery/atmospherics/pipe/simple/pipe in world)
+ for(var/obj/machinery/atmospherics/pipe/simple/pipe in SSair.atmos_machinery)
if(!pipe.node1 || !pipe.node2)
to_chat(usr, "Unconnected [pipe.name] located at [pipe.x],[pipe.y],[pipe.z] ([get_area(pipe.loc)])")
diff --git a/code/modules/admin/verbs/debug.dm b/code/modules/admin/verbs/debug.dm
index c92e100b641..329efb8e067 100644
--- a/code/modules/admin/verbs/debug.dm
+++ b/code/modules/admin/verbs/debug.dm
@@ -487,7 +487,8 @@ GLOBAL_PROTECT(AdminProcCaller)
for(var/area/A in world)
areas_all |= A.type
- for(var/obj/machinery/power/apc/APC in world)
+ for(var/thing in GLOB.apcs)
+ var/obj/machinery/power/apc/APC = thing
var/area/A = get_area(APC)
if(!A)
continue
@@ -496,7 +497,8 @@ GLOBAL_PROTECT(AdminProcCaller)
else
areas_with_multiple_APCs |= A.type
- for(var/obj/machinery/alarm/alarm in world)
+ for(var/thing in GLOB.air_alarms)
+ var/obj/machinery/alarm/alarm = thing
var/area/A = get_area(alarm)
if(!A)
continue
@@ -505,31 +507,31 @@ GLOBAL_PROTECT(AdminProcCaller)
else
areas_with_multiple_air_alarms |= A.type
- for(var/obj/machinery/requests_console/RC in world)
+ for(var/obj/machinery/requests_console/RC in GLOB.machines)
var/area/A = get_area(RC)
if(!A)
continue
areas_with_RC |= A.type
- for(var/obj/machinery/light/L in world)
+ for(var/obj/machinery/light/L in GLOB.machines)
var/area/A = get_area(L)
if(!A)
continue
areas_with_light |= A.type
- for(var/obj/machinery/light_switch/LS in world)
+ for(var/obj/machinery/light_switch/LS in GLOB.machines)
var/area/A = get_area(LS)
if(!A)
continue
areas_with_LS |= A.type
- for(var/obj/item/radio/intercom/I in world)
+ for(var/obj/item/radio/intercom/I in GLOB.global_radios)
var/area/A = get_area(I)
if(!A)
continue
areas_with_intercom |= A.type
- for(var/obj/machinery/camera/C in world)
+ for(var/obj/machinery/camera/C in GLOB.machines)
var/area/A = get_area(C)
if(!A)
continue
diff --git a/code/modules/admin/verbs/honksquad.dm b/code/modules/admin/verbs/honksquad.dm
index 8c8d46ec97b..5107ce7e22c 100644
--- a/code/modules/admin/verbs/honksquad.dm
+++ b/code/modules/admin/verbs/honksquad.dm
@@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_honksquad, 0)
commandos += candidate//Add their ghost to commandos.
//Spawns HONKsquad and equips them.
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(honksquad_number<=0) break
if(L.name == "HONKsquad")
honk_leader_selected = honksquad_number == 1?1:0
diff --git a/code/modules/admin/verbs/infiltratorteam_syndicate.dm b/code/modules/admin/verbs/infiltratorteam_syndicate.dm
index 459f2b8fb4b..54ddf85045e 100644
--- a/code/modules/admin/verbs/infiltratorteam_syndicate.dm
+++ b/code/modules/admin/verbs/infiltratorteam_syndicate.dm
@@ -66,7 +66,8 @@ GLOBAL_VAR_INIT(sent_syndicate_infiltration_team, 0)
var/list/sit_spawns = list()
var/list/sit_spawns_leader = list()
var/list/sit_spawns_mgmt = list()
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Syndicate-Infiltrator")
sit_spawns += L
if(L.name == "Syndicate-Infiltrator-Leader")
diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm
index 10ad31ef410..5e05b8ecebd 100644
--- a/code/modules/admin/verbs/mapping.dm
+++ b/code/modules/admin/verbs/mapping.dm
@@ -118,7 +118,7 @@ GLOBAL_VAR_INIT(intercom_range_display_status, 0)
qdel(M)
if(GLOB.intercom_range_display_status)
- for(var/obj/item/radio/intercom/I in world)
+ for(var/obj/item/radio/intercom/I in GLOB.global_radios)
for(var/turf/T in orange(7,I))
var/obj/effect/debugging/marker/F = new/obj/effect/debugging/marker(T)
if(!(F in view(7,I.loc)))
diff --git a/code/modules/admin/verbs/one_click_antag.dm b/code/modules/admin/verbs/one_click_antag.dm
index 57f7cad31c4..3e89a6ac18d 100644
--- a/code/modules/admin/verbs/one_click_antag.dm
+++ b/code/modules/admin/verbs/one_click_antag.dm
@@ -267,7 +267,7 @@ client/proc/one_click_antag()
var/I = image('icons/mob/mob.dmi', loc = synd_mind_1.current, icon_state = "synd")
synd_mind.current.client.images += I
- for(var/obj/machinery/nuclearbomb/bomb in world)
+ for(var/obj/machinery/nuclearbomb/bomb in GLOB.machines)
bomb.r_code = nuke_code // All the nukes are set to this code.
return 1
@@ -455,7 +455,8 @@ client/proc/one_click_antag()
if(candidates.len)
var/raiders = min(antnum, candidates.len)
//Spawns vox raiders and equips them.
- for(var/obj/effect/landmark/L in world)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "voxstart")
if(raiders<=0)
break
@@ -583,7 +584,8 @@ client/proc/one_click_antag()
var/teamOneMembers = 5
var/teamTwoMembers = 5
var/datum/preferences/A = new()
- for(var/obj/effect/landmark/L in world)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "tdome1")
if(teamOneMembers<=0)
break
diff --git a/code/modules/admin/verbs/striketeam.dm b/code/modules/admin/verbs/striketeam.dm
index a03c37c4f67..0b84c96e71a 100644
--- a/code/modules/admin/verbs/striketeam.dm
+++ b/code/modules/admin/verbs/striketeam.dm
@@ -30,7 +30,7 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
// Find the nuclear auth code
var/nuke_code
var/temp_code
- for(var/obj/machinery/nuclearbomb/N in world)
+ for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
temp_code = text2num(N.r_code)
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
nuke_code = N.r_code
@@ -48,7 +48,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
var/commando_number = COMMANDOS_POSSIBLE //for selecting a leader
var/is_leader = TRUE // set to FALSE after leader is spawned
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(commando_number <= 0)
break
@@ -109,7 +110,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
commando_number--
//Spawns the rest of the commando gear.
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Commando_Manual")
//new /obj/item/gun/energy/pulse_rifle(L.loc)
var/obj/item/paper/P = new(L.loc)
@@ -120,7 +122,8 @@ GLOBAL_VAR_INIT(sent_strike_team, 0)
P.stamp(stamp)
qdel(stamp)
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "Commando-Bomb")
new /obj/effect/spawner/newbomb/timer/syndicate(L.loc)
qdel(L)
diff --git a/code/modules/admin/verbs/striketeam_syndicate.dm b/code/modules/admin/verbs/striketeam_syndicate.dm
index 73ee5edb82d..12df7467cbc 100644
--- a/code/modules/admin/verbs/striketeam_syndicate.dm
+++ b/code/modules/admin/verbs/striketeam_syndicate.dm
@@ -38,7 +38,7 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
// Find the nuclear auth code
var/nuke_code
var/temp_code
- for(var/obj/machinery/nuclearbomb/N in world)
+ for(var/obj/machinery/nuclearbomb/N in GLOB.machines)
temp_code = text2num(N.r_code)
if(temp_code)//if it's actually a number. It won't convert any non-numericals.
nuke_code = N.r_code
@@ -53,7 +53,8 @@ GLOBAL_VAR_INIT(sent_syndicate_strike_team, 0)
GLOB.sent_syndicate_strike_team = 1
//Spawns commandos and equips them.
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(syndicate_commando_number <= 0)
break
diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm
index d7e298e8c96..0118b0febb4 100644
--- a/code/modules/awaymissions/gateway.dm
+++ b/code/modules/awaymissions/gateway.dm
@@ -48,7 +48,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
..()
update_icon()
wait = world.time + config.gateway_delay //+ thirty minutes default
- awaygate = locate(/obj/machinery/gateway/centeraway) in world
+ awaygate = locate(/obj/machinery/gateway/centeraway) in GLOB.machines
/obj/machinery/gateway/centerstation/update_density_from_dir()
return
@@ -103,7 +103,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
if(!powered())
return
if(!awaygate)
- awaygate = locate(/obj/machinery/gateway/centeraway) in world
+ awaygate = locate(/obj/machinery/gateway/centeraway) in GLOB.machines
if(!awaygate)
to_chat(user, "Error: No destination found.")
return
@@ -180,7 +180,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
/obj/machinery/gateway/centeraway/Initialize()
..()
update_icon()
- stationgate = locate(/obj/machinery/gateway/centerstation) in world
+ stationgate = locate(/obj/machinery/gateway/centerstation) in GLOB.machines
/obj/machinery/gateway/centeraway/update_density_from_dir()
@@ -219,7 +219,7 @@ GLOBAL_DATUM_INIT(the_gateway, /obj/machinery/gateway/centerstation, null)
if(linked.len != 8)
return
if(!stationgate)
- stationgate = locate(/obj/machinery/gateway/centerstation) in world
+ stationgate = locate(/obj/machinery/gateway/centerstation) in GLOB.machines
if(!stationgate)
to_chat(user, "Error: No destination found.")
return
diff --git a/code/modules/awaymissions/mission_code/wildwest.dm b/code/modules/awaymissions/mission_code/wildwest.dm
index 5aa3e89192f..b678106df5c 100644
--- a/code/modules/awaymissions/mission_code/wildwest.dm
+++ b/code/modules/awaymissions/mission_code/wildwest.dm
@@ -117,10 +117,8 @@
if("Peace")
to_chat(user, "Whatever alien sentience that the Wish Granter possesses is satisfied with your wish. There is a distant wailing as the last of the Faithless begin to die, then silence.")
to_chat(user, "You feel as if you just narrowly avoided a terrible fate...")
- for(var/mob/living/simple_animal/hostile/faithless/F in world)
- F.health = -10
- F.stat = 2
- F.icon_state = "faithless_dead"
+ for(var/mob/living/simple_animal/hostile/faithless/F in GLOB.mob_living_list)
+ F.death()
///////////////Meatgrinder//////////////
@@ -220,7 +218,8 @@
to_chat(user, "The communicator buzzes, and you hear the voice again: 'Really? I think not. Get them!'")
if(option_threat)
to_chat(user, "The communicator buzzes, and you hear the voice again: 'Oh really now?' You hear a clicking sound. 'Team, get back here. We have trouble'. Then the line goes dead.")
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name == "wildwest_syndipod")
var/obj/spacepod/syndi/P = new /obj/spacepod/syndi(get_turf(L))
P.name = "Syndi Recon Pod"
diff --git a/code/modules/awaymissions/zlevel.dm b/code/modules/awaymissions/zlevel.dm
index 3b31a8bbcfc..c582508ace1 100644
--- a/code/modules/awaymissions/zlevel.dm
+++ b/code/modules/awaymissions/zlevel.dm
@@ -56,7 +56,8 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
GLOB.space_manager.remove_dirt(zlev)
log_world(" Away mission loaded: [map]")
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name != "awaystart")
continue
GLOB.awaydestinations.Add(L)
@@ -89,7 +90,8 @@ GLOBAL_LIST_INIT(potentialRandomZlevels, generateMapList(filename = "config/away
//map_transition_config.Add(AWAY_MISSION_LIST)
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(L.name != "awaystart")
continue
GLOB.awaydestinations.Add(L)
diff --git a/code/modules/economy/utils.dm b/code/modules/economy/utils.dm
index f7d6992e31f..4d7273cd719 100644
--- a/code/modules/economy/utils.dm
+++ b/code/modules/economy/utils.dm
@@ -5,7 +5,7 @@
////////////////////////
/proc/get_money_account(var/account_number, var/from_z=-1)
- for(var/obj/machinery/computer/account_database/DB in world)
+ for(var/obj/machinery/computer/account_database/DB in GLOB.machines)
if(from_z > -1 && DB.z != from_z) continue
if((DB.stat & NOPOWER) || !DB.activated ) continue
var/datum/money_account/acct = DB.get_account(account_number)
diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm
index 5e39295113c..8c01d5c7cc2 100644
--- a/code/modules/events/alien_infestation.dm
+++ b/code/modules/events/alien_infestation.dm
@@ -17,7 +17,7 @@
playercount = length(GLOB.clients)//grab playercount when event starts not when game starts
if(playercount >= highpop_trigger) //spawn with 4 if highpop
spawncount = 4
- for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
+ for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery)
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology
vents += temp_vent
diff --git a/code/modules/events/anomaly_bluespace.dm b/code/modules/events/anomaly_bluespace.dm
index 2924effa0de..929612cf6f9 100644
--- a/code/modules/events/anomaly_bluespace.dm
+++ b/code/modules/events/anomaly_bluespace.dm
@@ -18,7 +18,7 @@
// Calculate new position (searches through beacons in world)
var/obj/item/radio/beacon/chosen
var/list/possible = list()
- for(var/obj/item/radio/beacon/W in world)
+ for(var/obj/item/radio/beacon/W in GLOB.global_radios)
if(!is_station_level(W.z))
continue
possible += W
diff --git a/code/modules/events/apc_overload.dm b/code/modules/events/apc_overload.dm
index a773e71a173..13cabe81b3c 100644
--- a/code/modules/events/apc_overload.dm
+++ b/code/modules/events/apc_overload.dm
@@ -36,7 +36,8 @@
// break APC_BREAK_PROBABILITY% of all of the APCs on the station
var/affected_apc_count = 0
- for(var/obj/machinery/power/apc/C in GLOB.apcs)
+ for(var/thing in GLOB.apcs)
+ var/obj/machinery/power/apc/C = thing
// skip any APCs that are too critical to break
var/area/current_area = get_area(C)
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
diff --git a/code/modules/events/apc_short.dm b/code/modules/events/apc_short.dm
index b128fe6c2e9..d2fe04dcc5d 100644
--- a/code/modules/events/apc_short.dm
+++ b/code/modules/events/apc_short.dm
@@ -36,7 +36,8 @@
// break APC_BREAK_PROBABILITY% of all of the APCs on the station
var/affected_apc_count = 0
- for(var/obj/machinery/power/apc/C in GLOB.apcs)
+ for(var/thing in GLOB.apcs)
+ var/obj/machinery/power/apc/C = thing
// skip any APCs that are too critical to disable
var/area/current_area = get_area(C)
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
diff --git a/code/modules/events/carp_migration.dm b/code/modules/events/carp_migration.dm
index fb12a258c2d..fb02033b802 100644
--- a/code/modules/events/carp_migration.dm
+++ b/code/modules/events/carp_migration.dm
@@ -30,7 +30,8 @@
/datum/event/carp_migration/proc/spawn_fish(num_groups, group_size_min = 3, group_size_max = 5)
var/list/spawn_locations = list()
- for(var/obj/effect/landmark/C in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/C = thing
if(C.name == "carpspawn")
spawn_locations.Add(C.loc)
spawn_locations = shuffle(spawn_locations)
diff --git a/code/modules/events/electrical_storm.dm b/code/modules/events/electrical_storm.dm
index 755e2e2d47a..7304469f408 100644
--- a/code/modules/events/electrical_storm.dm
+++ b/code/modules/events/electrical_storm.dm
@@ -10,7 +10,8 @@
for(var/i=1, i <= lightsoutAmount, i++)
var/list/possibleEpicentres = list()
- for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/newEpicentre = thing
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
possibleEpicentres += newEpicentre
if(possibleEpicentres.len)
@@ -21,7 +22,8 @@
if(!epicentreList.len)
return
- for(var/obj/effect/landmark/epicentre in epicentreList)
- for(var/obj/machinery/power/apc/apc in range(epicentre,lightsoutRange))
+ for(var/thing in epicentreList)
+ var/obj/effect/landmark/epicentre = thing
+ for(var/obj/machinery/power/apc/apc in range(epicentre, lightsoutRange))
apc.overload_lighting()
diff --git a/code/modules/events/money_hacker.dm b/code/modules/events/money_hacker.dm
index 928b35e84ea..f26c12f5f7d 100644
--- a/code/modules/events/money_hacker.dm
+++ b/code/modules/events/money_hacker.dm
@@ -23,7 +23,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0)
Notifications will be sent as updates occur.
"
var/my_department = "[station_name()] firewall subroutines"
- for(var/obj/machinery/message_server/MS in world)
+ for(var/obj/machinery/message_server/MS in GLOB.machines)
if(!MS.active) continue
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
@@ -64,7 +64,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0)
var/my_department = "[station_name()] firewall subroutines"
- for(var/obj/machinery/message_server/MS in world)
+ for(var/obj/machinery/message_server/MS in GLOB.machines)
if(!MS.active) continue
MS.send_rc_message("Head of Personnel's Desk", my_department, message, "", "", 2)
diff --git a/code/modules/events/prison_break.dm b/code/modules/events/prison_break.dm
index 35c976fa2f9..748d39f2080 100644
--- a/code/modules/events/prison_break.dm
+++ b/code/modules/events/prison_break.dm
@@ -47,7 +47,7 @@
if(areas && areas.len > 0)
var/my_department = "[station_name()] firewall subroutines"
var/rc_message = "An unknown malicious program has been detected in the [english_list(areaName)] lighting and airlock control systems at [station_time_timestamp()]. Systems will be fully compromised within approximately three minutes. Direct intervention is required immediately.
"
- for(var/obj/machinery/message_server/MS in world)
+ for(var/obj/machinery/message_server/MS in GLOB.machines)
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
for(var/mob/living/silicon/ai/A in GLOB.player_list)
to_chat(A, "Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].")
diff --git a/code/modules/events/rogue_drones.dm b/code/modules/events/rogue_drones.dm
index e2a7dc739c3..02fa69b7c3e 100644
--- a/code/modules/events/rogue_drones.dm
+++ b/code/modules/events/rogue_drones.dm
@@ -6,7 +6,8 @@
/datum/event/rogue_drone/start()
//spawn them at the same place as carp
var/list/possible_spawns = list()
- for(var/obj/effect/landmark/C in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/C = thing
if(C.name == "carpspawn")
possible_spawns.Add(C)
diff --git a/code/modules/events/slaughterevent.dm b/code/modules/events/slaughterevent.dm
index 999303bf069..ac265adb420 100644
--- a/code/modules/events/slaughterevent.dm
+++ b/code/modules/events/slaughterevent.dm
@@ -16,13 +16,15 @@
var/datum/mind/player_mind = new /datum/mind(key_of_slaughter)
player_mind.active = 1
var/list/spawn_locs = list()
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(isturf(L.loc))
switch(L.name)
if("revenantspawn")
spawn_locs += L.loc
if(!spawn_locs) //If we can't find any revenant spawns, try the carp spawns
- for(var/obj/effect/landmark/L in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/L = thing
if(isturf(L.loc))
switch(L.name)
if("carpspawn")
diff --git a/code/modules/events/spider_infestation.dm b/code/modules/events/spider_infestation.dm
index e09e1efb705..694f8e98c89 100644
--- a/code/modules/events/spider_infestation.dm
+++ b/code/modules/events/spider_infestation.dm
@@ -15,7 +15,7 @@ GLOBAL_VAR_INIT(sent_spiders_to_station, 0)
/datum/event/spider_infestation/start()
var/list/vents = list()
- for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in world)
+ for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in SSair.atmos_machinery)
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
diff --git a/code/modules/events/traders.dm b/code/modules/events/traders.dm
index 4159885e993..0beeb3691e2 100644
--- a/code/modules/events/traders.dm
+++ b/code/modules/events/traders.dm
@@ -24,7 +24,8 @@ GLOBAL_LIST_INIT(unused_trade_stations, list("sol"))
return
var/list/spawnlocs = list()
- for(var/obj/effect/landmark/landmark in GLOB.landmarks_list)
+ for(var/thing in GLOB.landmarks_list)
+ var/obj/effect/landmark/landmark = thing
if(landmark.name == "traderstart_[station]")
spawnlocs += get_turf(landmark)
if(!spawnlocs.len)
diff --git a/code/modules/mining/equipment/wormhole_jaunter.dm b/code/modules/mining/equipment/wormhole_jaunter.dm
index 44462dedfda..43cce5904e3 100644
--- a/code/modules/mining/equipment/wormhole_jaunter.dm
+++ b/code/modules/mining/equipment/wormhole_jaunter.dm
@@ -26,7 +26,7 @@
/obj/item/wormhole_jaunter/proc/get_destinations(mob/user)
var/list/destinations = list()
- for(var/obj/item/radio/beacon/B in world)
+ for(var/obj/item/radio/beacon/B in GLOB.global_radios)
var/turf/T = get_turf(B)
if(is_station_level(T.z))
destinations += B
diff --git a/code/modules/mob/living/silicon/ai/death.dm b/code/modules/mob/living/silicon/ai/death.dm
index 641b1a2af0f..717f9700316 100644
--- a/code/modules/mob/living/silicon/ai/death.dm
+++ b/code/modules/mob/living/silicon/ai/death.dm
@@ -34,7 +34,7 @@
spawn(10)
explosion(src.loc, 3, 6, 12, 15)
- for(var/obj/machinery/ai_status_display/O in world) //change status
+ for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status
O.mode = 2
if(istype(loc, /obj/item/aicard))
diff --git a/code/modules/mob/living/silicon/ai/logout.dm b/code/modules/mob/living/silicon/ai/logout.dm
index a8060abd15c..d9dac308870 100644
--- a/code/modules/mob/living/silicon/ai/logout.dm
+++ b/code/modules/mob/living/silicon/ai/logout.dm
@@ -1,6 +1,6 @@
/mob/living/silicon/ai/Logout()
..()
- for(var/obj/machinery/ai_status_display/O in world) //change status
+ for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status
O.mode = 0
src.view_core()
return
diff --git a/code/modules/mob/living/silicon/decoy/death.dm b/code/modules/mob/living/silicon/decoy/death.dm
index 9e58001f47b..74db72978e0 100644
--- a/code/modules/mob/living/silicon/decoy/death.dm
+++ b/code/modules/mob/living/silicon/decoy/death.dm
@@ -4,7 +4,7 @@
if(!.)
return FALSE
icon_state = "ai-crash"
- for(var/obj/machinery/ai_status_display/O in world) //change status
+ for(var/obj/machinery/ai_status_display/O in GLOB.machines) //change status
if(atoms_share_level(O, src))
O.mode = 2
gib()
diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm
index b181cec8ec0..39bedc78c77 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone.dm
@@ -144,7 +144,7 @@
user.visible_message("\the [user] swipes [user.p_their()] ID card through [src], attempting to reboot it.", "You swipe your ID card through [src], attempting to reboot it.")
last_reboot = world.time / 10
var/drones = 0
- for(var/mob/living/silicon/robot/drone/D in world)
+ for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
if(D.key && D.client)
drones++
if(drones < config.max_maint_drones)
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_console.dm b/code/modules/mob/living/silicon/robot/drone/drone_console.dm
index 80d9f4d1ba3..d961d8e1c62 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_console.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_console.dm
@@ -34,7 +34,7 @@
var/dat
dat += "Maintenance Units
"
- for(var/mob/living/silicon/robot/drone/D in world)
+ for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
dat += "
[D.real_name] ([D.stat == 2 ? "INACTIVE" : "ACTIVE"])"
dat += "
Cell charge: [D.cell.charge]/[D.cell.maxcharge]."
dat += "
Currently located in: [get_area(D)]."
@@ -74,7 +74,7 @@
else if(href_list["ping"])
to_chat(usr, "You issue a maintenance request for all active drones, highlighting [drone_call_area].")
- for(var/mob/living/silicon/robot/drone/D in world)
+ for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
if(D.client && D.stat == 0)
to_chat(D, "-- Maintenance drone presence requested in: [drone_call_area].")
diff --git a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
index 50463b17bec..023cced9cdb 100644
--- a/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
+++ b/code/modules/mob/living/silicon/robot/drone/drone_manufacturer.dm
@@ -52,7 +52,7 @@
/obj/machinery/drone_fabricator/proc/count_drones()
var/drones = 0
- for(var/mob/living/silicon/robot/drone/D in world)
+ for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
if(D.key && D.client)
drones++
return drones
@@ -142,7 +142,7 @@
if(alert("Are you sure you want to respawn as a drone?", "Are you sure?", "Yes", "No") != "Yes")
return
- for(var/obj/machinery/drone_fabricator/DF in world)
+ for(var/obj/machinery/drone_fabricator/DF in GLOB.machines)
if(DF.stat & NOPOWER || !DF.produce_drones)
continue
diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm
index e4e0a098b07..b3d985ac4e4 100644
--- a/code/modules/mob/mob.dm
+++ b/code/modules/mob/mob.dm
@@ -765,7 +765,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
var/list/namecounts = list()
var/list/creatures = list()
- for(var/obj/O in world) //EWWWWWWWWWWWWWWWWWWWWWWWW ~needs to be optimised
+ for(var/obj/O in GLOB.poi_list)
if(!O.loc)
continue
if(istype(O, /obj/item/disk/nuclear))
@@ -1099,7 +1099,7 @@ GLOBAL_LIST_INIT(slot_equipment_priority, list( \
var/mob/living/simple_animal/mouse/host
var/obj/machinery/atmospherics/unary/vent_pump/vent_found
var/list/found_vents = list()
- for(var/obj/machinery/atmospherics/unary/vent_pump/v in world)
+ for(var/obj/machinery/atmospherics/unary/vent_pump/v in SSair.atmos_machinery)
if(!v.welded && v.z == src.z)
found_vents.Add(v)
if(found_vents.len)
diff --git a/code/modules/power/power.dm b/code/modules/power/power.dm
index c74f9cc0007..b4cc25bf390 100644
--- a/code/modules/power/power.dm
+++ b/code/modules/power/power.dm
@@ -375,6 +375,7 @@
return null
/area/proc/get_apc()
- for(var/obj/machinery/power/apc/APC in GLOB.apcs)
+ for(var/thing in GLOB.apcs)
+ var/obj/machinery/power/apc/APC = thing
if(APC.area == src)
return APC
diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm
index b70a79106be..046cf68a543 100644
--- a/code/modules/power/singularity/field_generator.dm
+++ b/code/modules/power/singularity/field_generator.dm
@@ -312,7 +312,8 @@ field_generator power level display
//I want to avoid using global variables.
spawn(1)
var/temp = 1 //stops spam
- for(var/obj/singularity/O in GLOB.singularities)
+ for(var/thing in GLOB.singularities)
+ var/obj/singularity/O = thing
if(O.last_warning && temp)
if((world.time - O.last_warning) > 50) //to stop message-spam
temp = 0
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index d7bf071a8eb..822554549c9 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -131,7 +131,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
//Have it automatically push research to the centcom server so wild griffins can't fuck up R&D's work --NEO
/obj/machinery/computer/rdconsole/proc/griefProtection()
- for(var/obj/machinery/r_n_d/server/centcom/C in world)
+ for(var/obj/machinery/r_n_d/server/centcom/C in GLOB.machines)
files.push_data(C.files)
/obj/machinery/computer/rdconsole/proc/Maximize()
@@ -148,7 +148,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
files = new /datum/research(src) //Setup the research data holder.
matching_designs = list()
if(!id)
- for(var/obj/machinery/r_n_d/server/centcom/S in world)
+ for(var/obj/machinery/r_n_d/server/centcom/S in GLOB.machines)
S.initialize_serv()
break
@@ -390,7 +390,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
spawn(SYNC_RESEARCH_DELAY)
clear_wait_message()
if(src)
- for(var/obj/machinery/r_n_d/server/S in world)
+ for(var/obj/machinery/r_n_d/server/S in GLOB.machines)
var/server_processed = 0
if(S.disabled)
continue
diff --git a/code/modules/security_levels/keycard authentication.dm b/code/modules/security_levels/keycard authentication.dm
index 06ebfaa3374..87723701281 100644
--- a/code/modules/security_levels/keycard authentication.dm
+++ b/code/modules/security_levels/keycard authentication.dm
@@ -117,7 +117,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 GLOB.machines)
if(KA == src) continue
KA.reset()
spawn()
diff --git a/code/modules/store/store.dm b/code/modules/store/store.dm
index 2557008def0..d276edd547d 100644
--- a/code/modules/store/store.dm
+++ b/code/modules/store/store.dm
@@ -47,7 +47,7 @@ GLOBAL_DATUM_INIT(centcomm_store, /datum/store, new())
return 1
/datum/store/proc/reconnect_database()
- for(var/obj/machinery/computer/account_database/DB in world)
+ for(var/obj/machinery/computer/account_database/DB in GLOB.machines)
if(is_station_level(DB.z))
linked_db = DB
break