Purges a Bunch of In World Calls (#13641)

* Purges a Bunch of In World Calls

* tweaks and fixes also typeless lists

* typeless

* fixes

* tweak
This commit is contained in:
Fox McCloud
2020-06-22 08:56:19 -04:00
committed by GitHub
parent 0d4e0855f3
commit c8a7607129
67 changed files with 180 additions and 131 deletions
+4 -3
View File
@@ -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)])")
+9 -7
View File
@@ -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
+2 -1
View File
@@ -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
@@ -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")
+1 -1
View File
@@ -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)))
+5 -3
View File
@@ -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
+7 -4
View File
@@ -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)
@@ -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
@@ -33,7 +33,7 @@
return 1
if(href_list["set_subject"])
var/list/valves=list()
for(var/obj/machinery/atmospherics/binary/valve/digital/V in world)
for(var/obj/machinery/atmospherics/binary/valve/digital/V in SSair.atmos_machinery)
if(!isnull(V.id_tag) && V.frequency == parent.frequency)
valves|=V.id_tag
if(valves.len==0)
@@ -41,11 +41,11 @@
if(href_list["set_vent_pump"])
var/list/injector_names = list()
if(!vent_type)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in SSair.atmos_machinery)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names |= I.id_tag
else
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in SSair.atmos_machinery)
// to_chat(world, "test")
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names |= I.id_tag
@@ -98,11 +98,11 @@
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(!mode)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in SSair.atmos_machinery)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in SSair.atmos_machinery)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
@@ -186,11 +186,11 @@
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(mode)//DP vent selection
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in SSair.atmos_machinery)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in SSair.atmos_machinery)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
@@ -278,11 +278,11 @@ checks bitflags
if(href_list["set_vent_pump"])
var/list/injector_names=list()
if(mode)//DP vent selection
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in world)
for(var/obj/machinery/atmospherics/binary/dp_vent_pump/I in SSair.atmos_machinery)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
else
for(var/obj/machinery/atmospherics/unary/vent_pump/I in GLOB.machines)
for(var/obj/machinery/atmospherics/unary/vent_pump/I in SSair.atmos_machinery)
if(!isnull(I.id_tag) && I.frequency == parent.frequency)
injector_names|=I.id_tag
vent_pump = input("Select a vent:", "Vent Pumps", vent_pump) as null|anything in injector_names
+4 -4
View File
@@ -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, "<span class='notice'>Error: No destination found.</span>")
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, "<span class='notice'>Error: No destination found.</span>")
return
@@ -117,10 +117,8 @@
if("Peace")
to_chat(user, "<B>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.</B>")
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, "<span class='warning'>The communicator buzzes, and you hear the voice again: 'Really? I think not. Get them!'</span>")
if(option_threat)
to_chat(user, "<span class='warning'>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.</span>")
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"
+4 -2
View File
@@ -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)
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
+2 -1
View File
@@ -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))
+2 -1
View File
@@ -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))
+2 -1
View File
@@ -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)
+5 -3
View File
@@ -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()
+2 -2
View File
@@ -23,7 +23,7 @@ GLOBAL_VAR_INIT(account_hack_attempted, 0)
Notifications will be sent as updates occur.<br>"
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)
+1 -1
View File
@@ -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.<br>"
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, "<span class='danger'>Malicious program detected in the [english_list(areaName)] lighting and airlock control systems by [my_department].</span>")
+2 -1
View File
@@ -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)
+4 -2
View File
@@ -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")
+1 -1
View File
@@ -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
+2 -1
View File
@@ -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)
@@ -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
+1 -1
View File
@@ -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))
+1 -1
View File
@@ -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
@@ -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()
@@ -144,7 +144,7 @@
user.visible_message("<span class='warning'>\the [user] swipes [user.p_their()] ID card through [src], attempting to reboot it.</span>", "<span class='warning'>You swipe your ID card through [src], attempting to reboot it.</span>")
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)
@@ -34,7 +34,7 @@
var/dat
dat += "<B>Maintenance Units</B><BR>"
for(var/mob/living/silicon/robot/drone/D in world)
for(var/mob/living/silicon/robot/drone/D in GLOB.silicon_mob_list)
dat += "<BR>[D.real_name] ([D.stat == 2 ? "<font color='red'>INACTIVE" : "<font color='green'>ACTIVE"]</FONT>)"
dat += "<font dize = 9><BR>Cell charge: [D.cell.charge]/[D.cell.maxcharge]."
dat += "<BR>Currently located in: [get_area(D)]."
@@ -74,7 +74,7 @@
else if(href_list["ping"])
to_chat(usr, "<span class='notice'>You issue a maintenance request for all active drones, highlighting [drone_call_area].</span>")
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].")
@@ -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
+2 -2
View File
@@ -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)
+2 -1
View File
@@ -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
@@ -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
+3 -3
View File
@@ -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
@@ -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()
+1 -1
View File
@@ -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