global lists global defined

This commit is contained in:
Desolate
2018-10-02 15:52:46 -05:00
parent c47df961d9
commit c974e29a3c
385 changed files with 1403 additions and 1403 deletions
+1 -1
View File
@@ -24,7 +24,7 @@
var/obj/vent = pick_n_take(vents)
var/mob/C = pick_n_take(candidates)
if(C)
respawnable_list -= C.client
GLOB.respawnable_list -= C.client
var/mob/living/carbon/alien/larva/new_xeno = new(vent.loc)
new_xeno.key = C.key
if(ticker && ticker.mode)
+1 -1
View File
@@ -11,7 +11,7 @@ Nanotrasen has approved a short break for all employees to relax and observe thi
During this time, starlight will be bright but gentle, shifting between quiet green and blue colors. \
Any staff who would like to view these lights for themselves may proceed to the area nearest to them with viewing ports to open space. \
We hope you enjoy the lights.", "Harmless ions approaching", new_sound = 'sound/misc/notice2.ogg', from = "Nanotrasen Meteorology Division")
for(var/V in player_list)
for(var/V in GLOB.player_list)
var/mob/M = V
if((M.client.prefs.toggles & SOUND_MIDI) && is_station_level(M.z))
M.playsound_local(null, 'sound/ambience/aurora_caelus.ogg', 20, FALSE, pressure_affected = FALSE)
+1 -1
View File
@@ -13,7 +13,7 @@
if(!candidates.len)
return kill()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in all_vent_pumps)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.all_vent_pumps)
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
+1 -1
View File
@@ -17,7 +17,7 @@
event_announcement.Announce("Rampant brand intelligence has been detected aboard [station_name()], please stand-by. The origin is believed to be \a [originMachine.name].", "Machine Learning Alert")
/datum/event/brand_intelligence/start()
for(var/obj/machinery/vending/V in machines)
for(var/obj/machinery/vending/V in GLOB.machines)
if(!is_station_level(V.z)) continue
vendingMachines.Add(V)
+2 -2
View File
@@ -23,7 +23,7 @@
/datum/event/carp_migration/start()
if(severity == EVENT_LEVEL_MAJOR)
spawn_fish(landmarks_list.len)
spawn_fish(GLOB.landmarks_list.len)
else if(severity == EVENT_LEVEL_MODERATE)
spawn_fish(rand(4, 6)) //12 to 30 carp, in small groups
else
@@ -32,7 +32,7 @@
/datum/event/carp_migration/proc/spawn_fish(var/num_groups, var/group_size_min=3, var/group_size_max=5)
var/list/spawn_locations = list()
for(var/obj/effect/landmark/C in landmarks_list)
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
if(C.name == "carpspawn")
spawn_locations.Add(C.loc)
spawn_locations = shuffle(spawn_locations)
@@ -6,7 +6,7 @@
"Ionospheri:%? MCayj^j<.3-BZZZZZZT", \
"#4nd%;f4y6,>?%-BZZZZZZZT")
for(var/mob/living/silicon/ai/A in player_list) //AIs are always aware of communication blackouts.
for(var/mob/living/silicon/ai/A in GLOB.player_list) //AIs are always aware of communication blackouts.
to_chat(A, "<br>")
to_chat(A, "<span class='warning'><b>[alert]</b></span>")
to_chat(A, "<br>")
@@ -22,7 +22,7 @@
if(!silent)
event_announcement.Announce("Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT", new_sound = 'sound/misc/interference.ogg')
else // AIs will always know if there's a comm blackout, rogue AIs could then lie about comm blackouts in the future while they shutdown comms
for(var/mob/living/silicon/ai/A in player_list)
for(var/mob/living/silicon/ai/A in GLOB.player_list)
to_chat(A, "<br>")
to_chat(A, "<span class='warning'><b>Ionospheric anomalies detected. Temporary telecommunication failure imminent. Please contact you-BZZT<b></span>")
to_chat(A, "<br>")
+1 -1
View File
@@ -13,7 +13,7 @@
if(!virus_type)
virus_type = pick(/datum/disease/advance/flu, /datum/disease/advance/cold, /datum/disease/brainrot, /datum/disease/magnitis, /datum/disease/beesease, /datum/disease/anxiety, /datum/disease/fake_gbs, /datum/disease/fluspanish, /datum/disease/pierrot_throat, /datum/disease/lycan)
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
if(issmall(H)) //don't infect monkies; that's a waste
continue
if(!H.client)
+1 -1
View File
@@ -10,7 +10,7 @@
for(var/i=1, i <= lightsoutAmount, i++)
var/list/possibleEpicentres = list()
for(var/obj/effect/landmark/newEpicentre in landmarks_list)
for(var/obj/effect/landmark/newEpicentre in GLOB.landmarks_list)
if(newEpicentre.name == "lightsout" && !(newEpicentre in epicentreList))
possibleEpicentres += newEpicentre
if(possibleEpicentres.len)
+1 -1
View File
@@ -92,7 +92,7 @@ var/list/event_last_fired = list()
// Otherwise, follow the standard setup process
else
var/playercount_modifier = 1
switch(player_list.len)
switch(GLOB.player_list.len)
if(0 to 10)
playercount_modifier = 1.2
if(11 to 15)
+3 -3
View File
@@ -355,7 +355,7 @@
/datum/event/proc/num_players()
var/players = 0
for(var/mob/living/carbon/human/P in player_list)
for(var/mob/living/carbon/human/P in GLOB.player_list)
if(P.client)
players++
return players
@@ -373,9 +373,9 @@
active_with_role["Cyborg"] = 0
active_with_role["Janitor"] = 0
active_with_role["Botanist"] = 0
active_with_role["Any"] = player_list.len
active_with_role["Any"] = GLOB.player_list.len
for(var/mob/M in player_list)
for(var/mob/M in GLOB.player_list)
if(!M.mind || !M.client || M.client.inactivity > 10 * 10 * 60) // longer than 10 minutes AFK counts them as inactive
continue
+5 -5
View File
@@ -20,7 +20,7 @@
var/list/skipped_areas = list(/area/turret_protected/ai)
var/list/skipped_areas_apc = list(/area/engine/engineering)
for(var/obj/machinery/power/smes/S in machines)
for(var/obj/machinery/power/smes/S in GLOB.machines)
var/area/current_area = get_area(S)
if((current_area.type in skipped_areas) || !is_station_level(S.z))
continue
@@ -33,7 +33,7 @@
S.update_icon()
S.power_change()
for(var/obj/machinery/power/apc/C in apcs)
for(var/obj/machinery/power/apc/C in GLOB.apcs)
var/area/current_area = get_area(C)
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
continue
@@ -46,13 +46,13 @@
if(announce)
event_announcement.Announce("Power has been restored to [station_name()]. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/apc/C in apcs)
for(var/obj/machinery/power/apc/C in GLOB.apcs)
var/area/current_area = get_area(C)
if((current_area.type in skipped_areas_apc) || !is_station_level(C.z))
continue
if(C.cell)
C.cell.charge = C.cell.maxcharge
for(var/obj/machinery/power/smes/S in machines)
for(var/obj/machinery/power/smes/S in GLOB.machines)
var/area/current_area = get_area(S)
if((current_area.type in skipped_areas) || !is_station_level(S.z))
continue
@@ -65,7 +65,7 @@
/proc/power_restore_quick(var/announce = 1)
if(announce)
event_announcement.Announce("All SMESs on [station_name()] have been recharged. We apologize for the inconvenience.", "Power Systems Nominal", new_sound = 'sound/AI/poweron.ogg')
for(var/obj/machinery/power/smes/S in machines)
for(var/obj/machinery/power/smes/S in GLOB.machines)
if(!is_station_level(S.z))
continue
S.charge = S.capacity
+1 -1
View File
@@ -4,7 +4,7 @@
for(var/turf/simulated/floor/T in orange(1,xmas))
for(var/i=1,i<=rand(1,5),i++)
new /obj/item/a_gift(T)
for(var/mob/living/simple_animal/corgi/Ian/Ian in mob_list)
for(var/mob/living/simple_animal/corgi/Ian/Ian in GLOB.mob_list)
Ian.place_on_head(new /obj/item/clothing/head/helmet/space/santahat(Ian))
/proc/ChristmasEvent()
+2 -2
View File
@@ -41,7 +41,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
notify_ghosts("\A [src] is inbound!",
enter_link="<a href=?src=[UID()];follow=1>(Click to follow)</a>",
source=src, action=NOTIFY_FOLLOW)
poi_list |= src
GLOB.poi_list |= src
if(end && end.z==z_original)
walk_towards(src, destination, move_delay)
@@ -52,7 +52,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1
ghost.ManualFollow(src)
/obj/effect/immovablerod/Destroy()
poi_list.Remove(src)
GLOB.poi_list.Remove(src)
return ..()
/obj/effect/immovablerod/ex_act(test)
+3 -3
View File
@@ -22,7 +22,7 @@
/datum/event/ion_storm/start()
//AI laws
for(var/mob/living/silicon/ai/M in living_mob_list)
for(var/mob/living/silicon/ai/M in GLOB.living_mob_list)
if(M.stat != 2 && M.see_in_dark != 0)
var/message = generate_ion_law(ionMessage)
if(message)
@@ -32,7 +32,7 @@
to_chat(M, "<br>")
if(botEmagChance)
for(var/mob/living/simple_animal/bot/bot in machines)
for(var/mob/living/simple_animal/bot/bot in GLOB.machines)
if(prob(botEmagChance))
bot.emag_act()
@@ -492,7 +492,7 @@
/proc/generate_static_ion_law()
/var/list/players = list()
for(var/mob/living/carbon/human/player in player_list)
for(var/mob/living/carbon/human/player in GLOB.player_list)
if( !player.mind || player.mind.assigned_role == player.mind.special_role || player.client.inactivity > MinutesToTicks(10))
continue
players += player.real_name
+1 -1
View File
@@ -6,4 +6,4 @@
/datum/event/carp_migration/koi/start()
spawn_fish(landmarks_list.len)
spawn_fish(GLOB.landmarks_list.len)
+1 -1
View File
@@ -2,7 +2,7 @@
announceWhen = rand(0, 20)
/datum/event/mass_hallucination/start()
for(var/mob/living/carbon/human/H in living_mob_list)
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
var/armor = H.getarmor(type = "rad")
if((RADIMMUNE in H.dna.species.species_traits) || armor >= 75) // Leave radiation-immune species/rad armored players completely unaffected
continue
+2 -2
View File
@@ -52,7 +52,7 @@
if(2)
sender = pick(300;"QuickDatingSystem",200;"Find your russian bride",50;"Tajaran beauties are waiting",50;"Find your secret skrell crush",50;"Beautiful unathi brides")
message = pick("Your profile caught my attention and I wanted to write and say hello (QuickDating).",\
"If you will write to me on my email [pick(first_names_female)]@[pick(last_names)].[pick("ru","ck","tj","ur","nt")] I shall necessarily send you a photo (QuickDating).",\
"If you will write to me on my email [pick(GLOB.first_names_female)]@[pick(GLOB.last_names)].[pick("ru","ck","tj","ur","nt")] I shall necessarily send you a photo (QuickDating).",\
"I want that we write each other and I hope, that you will like my profile and you will answer me (QuickDating).",\
"You have (1) new message!",\
"You have (2) new profile views!")
@@ -98,7 +98,7 @@
last_spam_time = world.time
if(prob(50)) //Give the AI an increased chance to intercept the message
for(var/mob/living/silicon/ai/ai in mob_list)
for(var/mob/living/silicon/ai/ai in GLOB.mob_list)
// Allows other AIs to intercept the message but the AI won't intercept their own message.
if(ai.aiPDA != P && ai.aiPDA != src)
ai.show_message("<i>Intercepted message from <b>[sender]</b></i> (Unknown / spam?) <i>to <b>[P:owner]</b>: [message]</i>")
+1 -1
View File
@@ -49,7 +49,7 @@
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)
MS.send_rc_message("Engineering", my_department, rc_message, "", "", 2)
for(var/mob/living/silicon/ai/A in player_list)
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>")
else
+1 -1
View File
@@ -6,7 +6,7 @@
/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 landmarks_list)
for(var/obj/effect/landmark/C in GLOB.landmarks_list)
if(C.name == "carpspawn")
possible_spawns.Add(C)
+2 -2
View File
@@ -6,11 +6,11 @@
var/list/potential = list()
var/sentience_type = SENTIENCE_ORGANIC
for(var/mob/living/simple_animal/L in living_mob_list)
for(var/mob/living/simple_animal/L in GLOB.living_mob_list)
var/turf/T = get_turf(L)
if (T.z != 1)
continue
if(!(L in player_list) && !L.mind && (L.sentience_type == sentience_type))
if(!(L in GLOB.player_list) && !L.mind && (L.sentience_type == sentience_type))
potential += L
var/mob/living/simple_animal/SA = pick(potential)
+2 -2
View File
@@ -16,13 +16,13 @@
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 landmarks_list)
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
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 landmarks_list)
for(var/obj/effect/landmark/L in GLOB.landmarks_list)
if(isturf(L.loc))
switch(L.name)
if("carpspawn")
+1 -1
View File
@@ -13,7 +13,7 @@
/datum/event/spider_terror/start()
var/list/vents = list()
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in all_vent_pumps)
for(var/obj/machinery/atmospherics/unary/vent_pump/temp_vent in GLOB.all_vent_pumps)
if(is_station_level(temp_vent.loc.z) && !temp_vent.welded)
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
@@ -1,5 +1,5 @@
/datum/event/spontaneous_appendicitis/start()
for(var/mob/living/carbon/human/H in shuffle(living_mob_list))
for(var/mob/living/carbon/human/H in shuffle(GLOB.living_mob_list))
if(issmall(H)) //don't infect monkies; that's a waste.
continue
if(!H.client)
+2 -2
View File
@@ -17,7 +17,7 @@ var/global/list/unused_trade_stations = list("sol")
if(!station) // If there are no unused stations, just no.
return
var/list/spawnlocs = list()
for(var/obj/effect/landmark/landmark in landmarks_list)
for(var/obj/effect/landmark/landmark in GLOB.landmarks_list)
if(landmark.name == "traderstart_[station]")
spawnlocs += get_turf(landmark)
if(!spawnlocs.len)
@@ -36,7 +36,7 @@ var/global/list/unused_trade_stations = list("sol")
index++
var/mob/C = pick_n_take(candidates)
if(C)
respawnable_list -= C.client
GLOB.respawnable_list -= C.client
var/mob/living/carbon/human/M = create_trader(picked_loc)
M.ckey = C.ckey
M.mind.objectives += trader_objectives
+1 -1
View File
@@ -36,5 +36,5 @@
new undeadtype(T)
/datum/event/undead/announce()
for(var/mob/living/M in player_list)
for(var/mob/living/M in GLOB.player_list)
to_chat(M, "You feel [pick("a chill","a deathly chill","the undead","dirty", "creeped out","afraid","fear")]!")
+1 -1
View File
@@ -10,7 +10,7 @@
/datum/event/vent_clog/setup()
endWhen = rand(25, 100)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in machines)
for(var/obj/machinery/atmospherics/unary/vent_scrubber/temp_vent in GLOB.machines)
if(is_station_level(temp_vent.loc.z))
if(temp_vent.parent.other_atmosmch.len > 50)
vents += temp_vent
+2 -2
View File
@@ -56,8 +56,8 @@
if(istype(M, /atom/movable))
var/turf/target
if(portals.len)
var/obj/effect/portal/P = pick(portals)
if(GLOB.portals.len)
var/obj/effect/portal/P = pick(GLOB.portals)
if(P && isturf(P.loc))
target = P.loc
if(!target) return