diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index ed740f85d16..84f55ddc84b 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -10,6 +10,7 @@ var/global/list/mob_list = list() //List of all mobs, including clientless var/global/list/living_mob_list = list() //List of all alive mobs, including clientless. Excludes /mob/new_player var/global/list/dead_mob_list = list() //List of all dead mobs, including clientless. Excludes /mob/new_player +var/global/list/machine_list = list() //List of all /obj/machinery var/global/list/cable_list = list() //Index for all cables, so that powernets don't have to look through the entire world all the time var/global/list/chemical_reactions_list //list of all /datum/chemical_reaction datums. Used during chemical reactions var/global/list/chemical_reagents_list //list of all /datum/reagent datums indexed by reagent id. Used by chemistry stuff diff --git a/code/game/gamemodes/events.dm b/code/game/gamemodes/events.dm index 511b23b4b33..b9f68fb143c 100644 --- a/code/game/gamemodes/events.dm +++ b/code/game/gamemodes/events.dm @@ -186,7 +186,7 @@ //command_alert("Unidentified lifesigns detected coming aboard [station_name()]. Secure any exterior access, including ducting and ventilation.", "Lifesign Alert") //world << sound('sound/AI/aliens.ogg') 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 machines) if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) if(temp_vent.network.normal_members.len > 50) // Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent @@ -325,7 +325,7 @@ apc.overload_lighting() else - for(var/obj/machinery/power/apc/apc in world) + for(var/obj/machinery/power/apc/apc in machines) apc.overload_lighting() return @@ -436,7 +436,7 @@ Would like to add a law like "Law x is _______" where x = a number, and _____ is M.add_ion_law("THE STATION IS [who2pref] [who2]") if(botEmagChance) - for(var/obj/machinery/bot/bot in world) + for(var/obj/machinery/bot/bot in machines) if(prob(botEmagChance)) bot.Emag() diff --git a/code/game/gamemodes/game_mode.dm b/code/game/gamemodes/game_mode.dm index e1fbf5dfb4f..fdb6bce7bdf 100644 --- a/code/game/gamemodes/game_mode.dm +++ b/code/game/gamemodes/game_mode.dm @@ -243,7 +243,7 @@ Implants; else intercepttext += "[M.name], the [M.mind.assigned_role]
" - for (var/obj/machinery/computer/communications/comm in world) + for (var/obj/machinery/computer/communications/comm in machines) if (!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) var/obj/item/weapon/paper/intercept = new /obj/item/weapon/paper( comm.loc ) intercept.name = "paper- 'Cent. Com. Status Summary'" diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index 658375b9eea..8648b33d829 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -6,10 +6,12 @@ var/list/doppler_arrays = list() /obj/machinery/doppler_array/New() + ..() doppler_arrays += src /obj/machinery/doppler_array/Del() doppler_arrays -= src + ..() /obj/machinery/doppler_array/process() return PROCESS_KILL diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 0e3e6ec650a..1bacef1500e 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -114,6 +114,7 @@ Class Procs: machines += src /obj/machinery/Del() + machines -= src ..() /obj/machinery/process()//If you dont use process or power why are you here diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index ced7486384d..d358e39c67f 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -69,6 +69,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() icon_state = "req_comp0" /obj/machinery/requests_console/New() + ..() name = "[department] Requests Console" allConsoles += src //req_console_departments += department diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 1a3b8c4f837..262f4860d80 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -19,7 +19,7 @@ client/verb/JoinResponseTeam() var/leader_selected = (response_team_members.len == 0) - for (var/obj/effect/landmark/L in world) if (L.name == "Commando") + for (var/obj/effect/landmark/L in landmarks_list) if (L.name == "Commando") var/new_name = input(usr, "Pick a name","Name") as null|text if(!new_name) return @@ -43,9 +43,10 @@ client/verb/JoinResponseTeam() proc/percentage_dead() var/total = 0 var/deadcount = 0 - for(var/mob/living/carbon/human/H in world) if(H.mind) // I *think* monkeys gone human don't have a mind - if(H.stat == 2) deadcount++ - total++ + for(var/mob/living/carbon/human/H in mob_list) + if(H.mind) // I *think* monkeys gone human don't have a mind + if(H.stat == 2) deadcount++ + total++ if(total == 0) return 0 else return round(100 * deadcount / total) @@ -54,7 +55,7 @@ proc/percentage_dead() proc/percentage_antagonists() var/total = 0 var/antagonists = 0 - for(var/mob/living/carbon/human/H in world) + for(var/mob/living/carbon/human/H in mob_list) if(is_special_character(H) >= 1) antagonists++ total++ diff --git a/code/modules/detectivework/scanner.dm b/code/modules/detectivework/scanner.dm index 448425e454d..7bafd4a31fc 100644 --- a/code/modules/detectivework/scanner.dm +++ b/code/modules/detectivework/scanner.dm @@ -34,11 +34,9 @@ attack(mob/living/carbon/human/M as mob, mob/user as mob) if (!ishuman(M)) user << "\red [M] is not human and cannot have the fingerprints." - flick("forensic0",src) return 0 if (( !( istype(M.dna, /datum/dna) ) || M.gloves) ) user << "\blue No fingerprints found on [M]" - flick("forensic0",src) return 0 else if (src.amount < 1) @@ -73,7 +71,6 @@ return if(istype(A,/obj/item/weapon/f_card)) user << "The scanner displays on the screen: \"ERROR 43: Object on Excluded Object List.\"" - flick("forensic0",src) return add_fingerprint(user) @@ -84,7 +81,6 @@ if(!isnull(A.blood_DNA)) for(var/blood in A.blood_DNA) user << "\blue Blood type: [A.blood_DNA[blood]]\nDNA: [blood]" - flick("forensic2",src) return //General @@ -92,12 +88,10 @@ user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\ "\blue Unable to locate any fingerprints, materials, fibers, or blood on [A]!",\ "You hear a faint hum of electrical equipment.") - flick("forensic0",src) return 0 if(add_data(A)) user << "\blue Object already in internal memory. Consolidating data..." - flick("forensic2",src) return @@ -122,7 +116,6 @@ //FIBERS if(A.suit_fibers) user << "\blue Fibers/Materials Data Stored: Scan with Hi-Res Forensic Scanner to retrieve." - flick("forensic2",src) //Blood if (A.blood_DNA) @@ -134,13 +127,11 @@ user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]" ,\ "You finish scanning \the [A].",\ "You hear a faint hum of electrical equipment.") - flick("forensic2",src) return 0 else user.visible_message("\The [user] scans \the [A] with \a [src], the air around [user.gender == MALE ? "him" : "her"] humming[prob(70) ? " gently." : "."]\n[user.gender == MALE ? "He" : "She"] seems to perk up slightly at the readout." ,\ "The results of the scan pique your interest.",\ "You hear a faint hum of electrical equipment, and someone making a thoughtful noise.") - flick("forensic2",src) return 0 return diff --git a/code/modules/events/alien_infestation.dm b/code/modules/events/alien_infestation.dm index 7c25f4dd710..f3f95289750 100644 --- a/code/modules/events/alien_infestation.dm +++ b/code/modules/events/alien_infestation.dm @@ -21,7 +21,7 @@ /datum/event/alien_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 machines) if(temp_vent.loc.z == 1 && !temp_vent.welded && temp_vent.network) if(temp_vent.network.normal_members.len > 50) //Stops Aliens getting stuck in small networks. See: Security, Virology vents += temp_vent