From 2624abdaba285c7483c559cc525ce35d403ef12c Mon Sep 17 00:00:00 2001 From: Spamcat Date: Wed, 19 Jun 2013 15:08:55 +0400 Subject: [PATCH 1/5] Secbelts now can hold melee weapons. --- code/game/objects/items/weapons/storage/belt.dm | 2 +- code/game/objects/items/weapons/swords_axes_etc.dm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/code/game/objects/items/weapons/storage/belt.dm b/code/game/objects/items/weapons/storage/belt.dm index 6978809bf42..323bed9ed5b 100644 --- a/code/game/objects/items/weapons/storage/belt.dm +++ b/code/game/objects/items/weapons/storage/belt.dm @@ -127,7 +127,7 @@ "/obj/item/device/flashlight", "/obj/item/device/pda", "/obj/item/device/radio/headset", - "/obj/item/weapon/melee/baton", + "/obj/item/weapon/melee", "/obj/item/taperoll/police", "/obj/item/weapon/gun/energy/taser" ) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 24d622bff1a..60ea8312450 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -125,7 +125,7 @@ "You hear an ominous click.") icon_state = "telebaton_1" item_state = "telebaton_1" - w_class = 4 + w_class = 3 force = 15//quite robust attack_verb = list("smacked", "struck", "slapped") else From 2b348eaa3eadf2d981cdf47a502058b10cb6bc45 Mon Sep 17 00:00:00 2001 From: Spamcat Date: Thu, 20 Jun 2013 17:21:16 +0400 Subject: [PATCH 2/5] Phasing out world loops, pt 1 --- code/__HELPERS/global_lists.dm | 1 + code/game/gamemodes/events.dm | 6 +++--- code/game/gamemodes/game_mode.dm | 2 +- code/game/machinery/doppler_array.dm | 2 ++ code/game/machinery/machinery.dm | 1 + code/game/machinery/requests_console.dm | 1 + code/game/response_team.dm | 11 ++++++----- code/modules/detectivework/scanner.dm | 9 --------- code/modules/events/alien_infestation.dm | 2 +- 9 files changed, 16 insertions(+), 19 deletions(-) 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 From 10ee1fbcfee03b9c42ec5230aced3d67a86c9300 Mon Sep 17 00:00:00 2001 From: Spamcat Date: Mon, 1 Jul 2013 19:43:56 +0400 Subject: [PATCH 3/5] World loops 2: Electric Boogaloo. --- code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm | 8 ++++---- code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm | 2 +- code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm | 6 +++--- code/WorkInProgress/Mini/ATM.dm | 2 +- code/WorkInProgress/Mini/atmos_control.dm | 2 +- code/WorkInProgress/kilakk/responseteam.dm | 4 ++-- code/__HELPERS/global_lists.dm | 2 +- code/__HELPERS/unsorted.dm | 2 +- code/controllers/master_controller.dm | 4 ++-- code/controllers/shuttle_controller.dm | 10 +++++----- code/datums/mind.dm | 4 ++-- code/game/area/areas.dm | 10 +++++----- code/game/gamemodes/autotraitor/autotraitor.dm | 4 ++-- code/game/gamemodes/blob/blob_report.dm | 4 ++-- code/game/gamemodes/gameticker.dm | 2 +- code/game/gamemodes/objective.dm | 2 +- code/modules/power/gravitygenerator.dm | 2 +- code/modules/power/singularity/field_generator.dm | 2 +- code/modules/power/singularity/singularity.dm | 2 +- code/modules/power/turbine.dm | 4 ++-- code/modules/research/message_server.dm | 2 +- code/modules/research/rdconsole.dm | 6 +++--- code/modules/research/server.dm | 12 ++++++------ .../artifact/effects/unknown_effect_cellcharge.dm | 4 ++-- .../artifact/effects/unknown_effect_celldrain.dm | 4 ++-- .../xenoarchaeology/finds/finds_talkingitem.dm | 2 +- .../security levels/keycard authentication.dm | 4 ++-- code/modules/security levels/security levels.dm | 8 ++++---- maps/RandomZLevels/wildwest.dm | 2 +- 29 files changed, 61 insertions(+), 61 deletions(-) diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm b/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm index 3f069ced4e2..6fef666acad 100644 --- a/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm +++ b/code/WorkInProgress/Cael_Aislinn/Economy/Accounts.dm @@ -27,7 +27,7 @@ var/global/datum/money_account/vendor_account //add the account station_account.transaction_log.Add(T) - for(var/obj/machinery/account_database/A in world) + for(var/obj/machinery/account_database/A in machines) A.accounts.Add(station_account) /proc/create_department_account(department) @@ -50,7 +50,7 @@ var/global/datum/money_account/vendor_account //add the account department_account.transaction_log.Add(T) - for(var/obj/machinery/account_database/A in world) + for(var/obj/machinery/account_database/A in machines) A.accounts.Add(department_account) department_accounts[department] = department_account @@ -194,7 +194,7 @@ var/global/datum/money_account/vendor_account if(href_list["choice"]) switch(href_list["choice"]) if("sync_accounts") - for(var/obj/machinery/account_database/A in world) + for(var/obj/machinery/account_database/A in machines) for(var/datum/money_account/M in src.accounts) if(!A.accounts.Find(M)) A.accounts.Add(M) @@ -257,7 +257,7 @@ var/global/datum/money_account/vendor_account /obj/machinery/account_database/proc/add_account_across_all(var/new_owner_name = "Default user", var/starting_funds = 0, var/pre_existing = 0) var/datum/money_account/M = add_account(new_owner_name, starting_funds, pre_existing) - for(var/obj/machinery/account_database/D in world) + for(var/obj/machinery/account_database/D in machines) if(D == src) continue D.accounts.Add(M) diff --git a/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm b/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm index 4d4c28d17ad..7df719a2e09 100644 --- a/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm +++ b/code/WorkInProgress/Cael_Aislinn/Economy/EFTPOS.dm @@ -46,7 +46,7 @@ D.name = "small parcel - 'EFTPOS access code'" /obj/item/device/eftpos/proc/reconnect_database() - for(var/obj/machinery/account_database/DB in world) + for(var/obj/machinery/account_database/DB in machines) if(DB.z == src.z) linked_db = DB break diff --git a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm index 72fe022657a..ccfe4c1e657 100644 --- a/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm +++ b/code/WorkInProgress/Cael_Aislinn/Jungle/jungle.dm @@ -35,7 +35,7 @@ New() //pick a random temple to link to var/list/waypoints = list() - for(var/obj/effect/landmark/temple/destination/T in world) + for(var/obj/effect/landmark/temple/destination/T in landmarks_list) waypoints.Add(T) if(!T) return @@ -163,7 +163,7 @@ num_spawned++ //make some randomly pathing rivers - for(var/obj/effect/landmark/river_waypoint/W in world) + for(var/obj/effect/landmark/river_waypoint/W in landmarks_list) if (W.z != src.z || W.connected) continue @@ -236,7 +236,7 @@ num_spawned++ //get any path nodes placed on the map - for(var/obj/effect/landmark/path_waypoint/W in world) + for(var/obj/effect/landmark/path_waypoint/W in landmarks_list) if (W.z == src.z) path_nodes.Add(W) diff --git a/code/WorkInProgress/Mini/ATM.dm b/code/WorkInProgress/Mini/ATM.dm index 15aa916efe7..544c439033a 100644 --- a/code/WorkInProgress/Mini/ATM.dm +++ b/code/WorkInProgress/Mini/ATM.dm @@ -67,7 +67,7 @@ log transactions break /obj/machinery/atm/proc/reconnect_database() - for(var/obj/machinery/account_database/DB in world) + for(var/obj/machinery/account_database/DB in machines) if( DB.z == src.z && !(DB.stat & NOPOWER) && DB.activated ) linked_db = DB break diff --git a/code/WorkInProgress/Mini/atmos_control.dm b/code/WorkInProgress/Mini/atmos_control.dm index 15dd1c7fe95..c6d611b7a39 100644 --- a/code/WorkInProgress/Mini/atmos_control.dm +++ b/code/WorkInProgress/Mini/atmos_control.dm @@ -35,7 +35,7 @@ if(current) dat += specific() else - for(var/obj/machinery/alarm/alarm in world) + for(var/obj/machinery/alarm/alarm in machines) dat += "" switch(max(alarm.danger_level, alarm.alarm_area.atmosalm)) if (0) diff --git a/code/WorkInProgress/kilakk/responseteam.dm b/code/WorkInProgress/kilakk/responseteam.dm index 8729c0ab26b..575e5ab6fd0 100644 --- a/code/WorkInProgress/kilakk/responseteam.dm +++ b/code/WorkInProgress/kilakk/responseteam.dm @@ -49,7 +49,7 @@ var/sent_emergency_team = 0 // Shamelessly stolen nuke code var/nuke_code var/temp_code - for(var/obj/machinery/nuclearbomb/N in world) + for(var/obj/machinery/nuclearbomb/N in machines) temp_code = text2num(N.r_code) if(temp_code) nuke_code = N.r_code @@ -94,7 +94,7 @@ var/sent_emergency_team = 0 command_alert("Sensors indicate that [station_name()] has entered Code Red and is in need of assistance. We will prepare and dispatch an emergency response team to deal with the situation.", "NMV Icarus Command") - for(var/obj/effect/landmark/L in world) + for(var/obj/effect/landmark/L in landmarks_list) if(L.name == "Response Team") leader_selected = member_number == 1?1:0 // The last person selected will be the leader diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 84f55ddc84b..074c452dbfd 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -10,7 +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/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/__HELPERS/unsorted.dm b/code/__HELPERS/unsorted.dm index 4f000fe603e..eababc43c11 100644 --- a/code/__HELPERS/unsorted.dm +++ b/code/__HELPERS/unsorted.dm @@ -1198,7 +1198,7 @@ proc/oview_or_orange(distance = world.view , center = usr , type) proc/get_mob_with_client_list() var/list/mobs = list() - for(var/mob/M in world) + for(var/mob/M in mob_list) if (M.client) mobs += M return mobs diff --git a/code/controllers/master_controller.dm b/code/controllers/master_controller.dm index 3633cda3748..829e63000ec 100644 --- a/code/controllers/master_controller.dm +++ b/code/controllers/master_controller.dm @@ -83,12 +83,12 @@ datum/controller/game_controller/proc/setup_objects() world << "\red \b Initializing pipe networks" sleep(-1) - for(var/obj/machinery/atmospherics/machine in world) + for(var/obj/machinery/atmospherics/machine in machines) machine.build_network() world << "\red \b Initializing atmos machinery." sleep(-1) - for(var/obj/machinery/atmospherics/unary/U in world) + for(var/obj/machinery/atmospherics/unary/U in machines) if(istype(U, /obj/machinery/atmospherics/unary/vent_pump)) var/obj/machinery/atmospherics/unary/vent_pump/T = U T.broadcast_status() diff --git a/code/controllers/shuttle_controller.dm b/code/controllers/shuttle_controller.dm index 1800038c337..dc68cda2b6e 100644 --- a/code/controllers/shuttle_controller.dm +++ b/code/controllers/shuttle_controller.dm @@ -131,7 +131,7 @@ datum/shuttle_controller start_location.move_contents_to(end_location, null, NORTH) - for(var/obj/machinery/door/unpowered/D in world) + for(var/obj/machinery/door/unpowered/D in machines) if( get_area(D) == end_location ) spawn(0) D.locked = 0 @@ -153,7 +153,7 @@ datum/shuttle_controller end_location = locate(/area/shuttle/escape_pod1/centcom) start_location.move_contents_to(end_location, null, NORTH) - for(var/obj/machinery/door/D in world) + for(var/obj/machinery/door/D in machines) if( get_area(D) == end_location ) spawn(0) D.open() @@ -173,7 +173,7 @@ datum/shuttle_controller end_location = locate(/area/shuttle/escape_pod2/centcom) start_location.move_contents_to(end_location, null, NORTH) - for(var/obj/machinery/door/D in world) + for(var/obj/machinery/door/D in machines) if( get_area(D) == end_location ) spawn(0) D.open() @@ -193,7 +193,7 @@ datum/shuttle_controller end_location = locate(/area/shuttle/escape_pod3/centcom) start_location.move_contents_to(end_location, null, NORTH) - for(var/obj/machinery/door/D in world) + for(var/obj/machinery/door/D in machines) if( get_area(D) == end_location ) spawn(0) D.open() @@ -213,7 +213,7 @@ datum/shuttle_controller end_location = locate(/area/shuttle/escape_pod5/centcom) start_location.move_contents_to(end_location, null, EAST) - for(var/obj/machinery/door/D in world) + for(var/obj/machinery/door/D in machines) if( get_area(D) == end_location ) spawn(0) D.open() diff --git a/code/datums/mind.dm b/code/datums/mind.dm index 4984b982839..769f7707eaf 100644 --- a/code/datums/mind.dm +++ b/code/datums/mind.dm @@ -217,7 +217,7 @@ datum/mind text += "OPERATIVE|nanotrasen" text += "
To shuttle, undress, dress up." var/code - for (var/obj/machinery/nuclearbomb/bombue in world) + for (var/obj/machinery/nuclearbomb/bombue in machines) if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN") code = bombue.r_code break @@ -719,7 +719,7 @@ datum/mind usr << "\red Equipping a syndicate failed!" if("tellcode") var/code - for (var/obj/machinery/nuclearbomb/bombue in world) + for (var/obj/machinery/nuclearbomb/bombue in machines) if (length(bombue.r_code) <= 5 && bombue.r_code != "LOLNO" && bombue.r_code != "ADMIN") code = bombue.r_code break diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index ffb194f79fa..c0921cd54a1 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -53,7 +53,7 @@ aiPlayer.cancelAlarm("Power", src, source) else aiPlayer.triggerAlarm("Power", src, cameras, source) - for(var/obj/machinery/computer/station_alert/a in world) + for(var/obj/machinery/computer/station_alert/a in machines) if(a.z == source.z) if(state == 1) a.cancelAlarm("Power", src, source) @@ -75,12 +75,12 @@ cameras += C for(var/mob/living/silicon/aiPlayer in player_list) aiPlayer.triggerAlarm("Atmosphere", src, cameras, src) - for(var/obj/machinery/computer/station_alert/a in world) + for(var/obj/machinery/computer/station_alert/a in machines) a.triggerAlarm("Atmosphere", src, cameras, src) else if (atmosalm == 2) for(var/mob/living/silicon/aiPlayer in player_list) aiPlayer.cancelAlarm("Atmosphere", src, src) - for(var/obj/machinery/computer/station_alert/a in world) + for(var/obj/machinery/computer/station_alert/a in machines) a.cancelAlarm("Atmosphere", src, src) atmosalm = danger_level return 1 @@ -105,7 +105,7 @@ cameras += C for (var/mob/living/silicon/ai/aiPlayer in player_list) aiPlayer.triggerAlarm("Fire", src, cameras, src) - for (var/obj/machinery/computer/station_alert/a in world) + for (var/obj/machinery/computer/station_alert/a in machines) a.triggerAlarm("Fire", src, cameras, src) /area/proc/firereset() @@ -122,7 +122,7 @@ D.open() for (var/mob/living/silicon/ai/aiPlayer in player_list) aiPlayer.cancelAlarm("Fire", src, src) - for (var/obj/machinery/computer/station_alert/a in world) + for (var/obj/machinery/computer/station_alert/a in machines) a.cancelAlarm("Fire", src, src) /area/proc/readyalert() diff --git a/code/game/gamemodes/autotraitor/autotraitor.dm b/code/game/gamemodes/autotraitor/autotraitor.dm index c5b159dd1a9..4de814a50c3 100644 --- a/code/game/gamemodes/autotraitor/autotraitor.dm +++ b/code/game/gamemodes/autotraitor/autotraitor.dm @@ -81,7 +81,7 @@ var/playercount = 0 var/traitorcount = 0 var/possible_traitors[0] - for(var/mob/living/player in world) + for(var/mob/living/player in mob_list) if (player.client && player.stat != 2) playercount += 1 @@ -153,7 +153,7 @@ //message_admins("Checking number of players") var/playercount = 0 var/traitorcount = 0 - for(var/mob/living/player in world) + for(var/mob/living/player in mob_list) if (player.client && player.stat != 2) playercount += 1 diff --git a/code/game/gamemodes/blob/blob_report.dm b/code/game/gamemodes/blob/blob_report.dm index 731ac0ea396..f58c59673c8 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 = "ERROR" - for(var/obj/machinery/nuclearbomb/bomb in world) + for(var/obj/machinery/nuclearbomb/bomb in machines) if(bomb && bomb.r_code) if(bomb.z == 1) nukecode = bomb.r_code @@ -39,7 +39,7 @@ aiPlayer.set_zeroth_law(law) aiPlayer << "Laws Updated: [law]" - for(var/obj/machinery/computer/communications/comm in world) + for(var/obj/machinery/computer/communications/comm in machines) comm.messagetitle.Add(interceptname) comm.messagetext.Add(intercepttext) if(!(comm.stat & (BROKEN | NOPOWER)) && comm.prints_intercept) diff --git a/code/game/gamemodes/gameticker.dm b/code/game/gamemodes/gameticker.dm index dd15f580636..5e2b0af9747 100644 --- a/code/game/gamemodes/gameticker.dm +++ b/code/game/gamemodes/gameticker.dm @@ -108,7 +108,7 @@ var/global/datum/controller/gameticker/ticker //setup the money accounts if(!centcomm_account_db) - for(var/obj/machinery/account_database/check_db in world) + for(var/obj/machinery/account_database/check_db in machines) if(check_db.z == 2) centcomm_account_db = check_db break diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index f323e26a1c4..9ca2d259fcc 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -569,7 +569,7 @@ datum/objective/steal for(var/mob/living/silicon/ai/M in C) if(istype(M, /mob/living/silicon/ai) && M.stat != 2) //See if any AI's are alive inside that card. return 1 - for(var/mob/living/silicon/ai/ai in world) + for(var/mob/living/silicon/ai/ai in mob_list) if(istype(ai.loc, /turf)) var/area/check_area = get_area(ai) if(istype(check_area, /area/shuttle/escape/centcom)) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index cbdb9865409..73a0fce4ec5 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -128,7 +128,7 @@ for(var/area/A in gravity_generator:localareas) var/obj/machinery/gravity_generator/G - for(G in world) + for(G in machines) if((A.master in G.localareas) && (G.on)) break if(!G) diff --git a/code/modules/power/singularity/field_generator.dm b/code/modules/power/singularity/field_generator.dm index edd773ec4ae..315068792d3 100644 --- a/code/modules/power/singularity/field_generator.dm +++ b/code/modules/power/singularity/field_generator.dm @@ -346,7 +346,7 @@ field_generator power level display //I want to avoid using global variables. spawn(1) var/temp = 1 //stops spam - for(var/obj/machinery/singularity/O in world) + for(var/obj/machinery/singularity/O in machines) if(O.last_warning && temp) if((world.time - O.last_warning) > 50) //to stop message-spam temp = 0 diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 16e62ebc3a5..83abddb76b1 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -42,7 +42,7 @@ var/global/list/uneatable = list( spawn(temp) del(src) ..() - for(var/obj/machinery/singularity_beacon/singubeacon in world) + for(var/obj/machinery/singularity_beacon/singubeacon in machines) if(singubeacon.active) target = singubeacon break diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 8724d76f098..82e05e954be 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -212,11 +212,11 @@ /obj/machinery/computer/turbine_computer/New() ..() spawn(5) - for(var/obj/machinery/compressor/C in world) + for(var/obj/machinery/compressor/C in machines) if(id == C.comp_id) compressor = C doors = new /list() - for(var/obj/machinery/door/poddoor/P in world) + for(var/obj/machinery/door/poddoor/P in machines) if(P.id == id) doors += P diff --git a/code/modules/research/message_server.dm b/code/modules/research/message_server.dm index 3571d3a2244..6ccf529e763 100644 --- a/code/modules/research/message_server.dm +++ b/code/modules/research/message_server.dm @@ -241,7 +241,7 @@ var/obj/machinery/blackbox_recorder/blackbox var/pda_msg_amt = 0 var/rc_msg_amt = 0 - for(var/obj/machinery/message_server/MS in world) + for(var/obj/machinery/message_server/MS in machines) if(MS.pda_msgs.len > pda_msg_amt) pda_msg_amt = MS.pda_msgs.len if(MS.rc_msgs.len > rc_msg_amt) diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 5b50efc41c5..5597c815091 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -116,7 +116,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 centcomm 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 machines) for(var/datum/tech/T in files.known_tech) C.files.AddTech2Known(T) for(var/datum/design/D in files.known_designs) @@ -128,7 +128,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. 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 machines) S.initialize() break @@ -322,7 +322,7 @@ won't update every console in existence) but it's more of a hassle to do. Also, griefProtection() //Putting this here because I dont trust the sync process spawn(30) if(src) - for(var/obj/machinery/r_n_d/server/S in world) + for(var/obj/machinery/r_n_d/server/S in machines) var/server_processed = 0 if(S.disabled) continue diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 3819e7878d3..e1f5740b690 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -93,7 +93,7 @@ //Backup files to centcomm to help admins recover data after greifer attacks /obj/machinery/r_n_d/server/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 machines) for(var/datum/tech/T in files.known_tech) C.files.AddTech2Known(T) for(var/datum/design/D in files.known_designs) @@ -170,7 +170,7 @@ ..() var/list/no_id_servers = list() var/list/server_ids = list() - for(var/obj/machinery/r_n_d/server/S in world) + for(var/obj/machinery/r_n_d/server/S in machines) switch(S.server_id) if(-1) continue @@ -219,20 +219,20 @@ temp_server = null consoles = list() servers = list() - for(var/obj/machinery/r_n_d/server/S in world) + for(var/obj/machinery/r_n_d/server/S in machines) if(S.server_id == text2num(href_list["access"]) || S.server_id == text2num(href_list["data"]) || S.server_id == text2num(href_list["transfer"])) temp_server = S break if(href_list["access"]) screen = 1 - for(var/obj/machinery/computer/rdconsole/C in world) + for(var/obj/machinery/computer/rdconsole/C in machines) if(C.sync) consoles += C else if(href_list["data"]) screen = 2 else if(href_list["transfer"]) screen = 3 - for(var/obj/machinery/r_n_d/server/S in world) + for(var/obj/machinery/r_n_d/server/S in machines) if(S == src) continue servers += S @@ -283,7 +283,7 @@ if(0) //Main Menu dat += "Connected Servers:

" - for(var/obj/machinery/r_n_d/server/S in world) + for(var/obj/machinery/r_n_d/server/S in machines) if(istype(S, /obj/machinery/r_n_d/server/centcom) && !badmin) continue dat += "[S.name] || " diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm index 5008f5306af..5105628cfe3 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_cellcharge.dm @@ -20,7 +20,7 @@ B.charge += 25 for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) S.charge += 25 - for (var/mob/living/silicon/robot/M in world) + for (var/mob/living/silicon/robot/M in mob_list) for (var/obj/item/weapon/cell/D in M.contents) D.charge += 25 M << "\blue SYSTEM ALERT: Energy boost detected!" @@ -33,7 +33,7 @@ B.charge += rand() * 100 for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) S.charge += 250 - for (var/mob/living/silicon/robot/M in world) + for (var/mob/living/silicon/robot/M in mob_list) for (var/obj/item/weapon/cell/D in M.contents) D.charge += rand() * 100 M << "\blue SYSTEM ALERT: Energy boost detected!" diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_celldrain.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_celldrain.dm index 1f091433d98..550b49b0686 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_celldrain.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_celldrain.dm @@ -22,7 +22,7 @@ B.charge = max(B.charge - 50,0) for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) S.charge = max(S.charge - 100,0) - for (var/mob/living/silicon/robot/M in world) + for (var/mob/living/silicon/robot/M in mob_list) for (var/obj/item/weapon/cell/D in M.contents) D.charge = max(D.charge - 50,0) M << "\red SYSTEM ALERT: Energy drain detected!" @@ -35,7 +35,7 @@ B.charge = max(B.charge - rand() * 150,0) for (var/obj/machinery/power/smes/S in range (src.effectrange,src)) S.charge = max(S.charge - 250,0) - for (var/mob/living/silicon/robot/M in world) + for (var/mob/living/silicon/robot/M in mob_list) for (var/obj/item/weapon/cell/D in M.contents) D.charge = max(D.charge - rand() * 150,0) M << "\red SYSTEM ALERT: Energy drain detected!" diff --git a/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm b/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm index 81f9831ed56..46f78087e69 100644 --- a/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm +++ b/code/modules/research/xenoarchaeology/finds/finds_talkingitem.dm @@ -96,7 +96,7 @@ msg+="!" var/list/listening = viewers(src) - for(var/mob/M in world) + for(var/mob/M in mob_list) if (!M.client) continue //skip monkeys and leavers if (istype(M, /mob/new_player)) diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index c42aec969ae..a0149abdf6e 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -109,7 +109,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 machines) if(KA == src) continue KA.reset() spawn() @@ -148,7 +148,7 @@ feedback_inc("alert_keycard_auth_maint",1) /proc/make_maint_all_access() - for(var/obj/machinery/door/airlock/A in world) + for(var/obj/machinery/door/airlock/A in machines) if(A.z == 1) A.req_access.Remove(access_maint_tunnels) diff --git a/code/modules/security levels/security levels.dm b/code/modules/security levels/security levels.dm index da3f9174689..dd259d2c1bb 100644 --- a/code/modules/security levels/security levels.dm +++ b/code/modules/security levels/security levels.dm @@ -24,7 +24,7 @@ world << "Attention! Security level lowered to green" world << "[config.alert_desc_green]" security_level = SEC_LEVEL_GREEN - for(var/obj/machinery/firealarm/FA in world) + for(var/obj/machinery/firealarm/FA in machines) if(FA.z == 1) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_green") @@ -36,7 +36,7 @@ world << "Attention! Security level lowered to blue" world << "[config.alert_desc_blue_downto]" security_level = SEC_LEVEL_BLUE - for(var/obj/machinery/firealarm/FA in world) + for(var/obj/machinery/firealarm/FA in machines) if(FA.z == 1) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_blue") @@ -54,7 +54,7 @@ if(CC) CC.post_status("alert", "redalert")*/ - for(var/obj/machinery/firealarm/FA in world) + for(var/obj/machinery/firealarm/FA in machines) if(FA.z == 1) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_red") @@ -67,7 +67,7 @@ world << "Attention! Delta security level reached!" world << "[config.alert_desc_delta]" security_level = SEC_LEVEL_DELTA - for(var/obj/machinery/firealarm/FA in world) + for(var/obj/machinery/firealarm/FA in machines) if(FA.z == 1) FA.overlays = list() FA.overlays += image('icons/obj/monitors.dmi', "overlay_delta") diff --git a/maps/RandomZLevels/wildwest.dm b/maps/RandomZLevels/wildwest.dm index 499d37eeb79..d2935b69f6f 100644 --- a/maps/RandomZLevels/wildwest.dm +++ b/maps/RandomZLevels/wildwest.dm @@ -90,7 +90,7 @@ if("Peace") 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." user << "You feel as if you just narrowly avoided a terrible fate..." - for(var/mob/living/simple_animal/hostile/faithless/F in world) + for(var/mob/living/simple_animal/hostile/faithless/F in living_mob_list) F.health = -10 F.stat = 2 F.icon_state = "faithless_dead" From c79d58159bd7b38ed0c790191469071f84ee31db Mon Sep 17 00:00:00 2001 From: Spamcat Date: Mon, 1 Jul 2013 19:50:06 +0400 Subject: [PATCH 4/5] whoops --- code/__HELPERS/global_lists.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/__HELPERS/global_lists.dm b/code/__HELPERS/global_lists.dm index 074c452dbfd..ed740f85d16 100644 --- a/code/__HELPERS/global_lists.dm +++ b/code/__HELPERS/global_lists.dm @@ -10,7 +10,6 @@ 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 From d0236394ef1f39b93bcc7a26dbb9b29f4737c021 Mon Sep 17 00:00:00 2001 From: Spamcat Date: Mon, 1 Jul 2013 20:02:42 +0400 Subject: [PATCH 5/5] Client, mind, big difference... --- code/game/response_team.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/response_team.dm b/code/game/response_team.dm index 262f4860d80..43e40cf0d7f 100644 --- a/code/game/response_team.dm +++ b/code/game/response_team.dm @@ -44,7 +44,7 @@ proc/percentage_dead() var/total = 0 var/deadcount = 0 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.client) // Monkeys and mice don't have a client, amirite? if(H.stat == 2) deadcount++ total++