bunch of global vars (#19091)

* bunch of global vars

* .
This commit is contained in:
Kashargul
2026-01-25 13:18:03 -08:00
committed by GitHub
parent 2f810d0f3e
commit de17517e42
92 changed files with 328 additions and 438 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/borer/borers
GLOBAL_DATUM(borers, /datum/antagonist/borer)
/datum/antagonist/borer
id = MODE_BORER
@@ -27,7 +27,7 @@ var/datum/antagonist/borer/borers
/datum/antagonist/borer/New()
..(1)
borers = src
GLOB.borers = src
/datum/antagonist/xenos/borer/get_extra_panel_options(var/datum/mind/player)
return "<a href='byond://?src=\ref[src];[HrefToken()];move_to_spawn=\ref[player.current]'>\[put in host\]</a>"
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/xenos/xenomorphs
GLOBAL_DATUM(xenomorphs, /datum/antagonist/xenos)
/datum/antagonist/xenos
id = MODE_XENOMORPH
@@ -24,7 +24,7 @@ var/datum/antagonist/xenos/xenomorphs
/datum/antagonist/xenos/New(var/no_reference)
..()
if(!no_reference)
xenomorphs = src
GLOB.xenomorphs = src
/datum/antagonist/xenos/attempt_random_spawn()
if(CONFIG_GET(flag/aliens_allowed)) ..()
+1 -1
View File
@@ -47,4 +47,4 @@
set category = "Abilities.Antag"
if(!M.mind)
return
convert_to_faction(M.mind, loyalists)
convert_to_faction(M.mind, GLOB.loyalists)
-10
View File
@@ -1,10 +0,0 @@
var/datum/antagonist/mutineer/loyalist/loyalists
/datum/antagonist/mutineer/loyalist
role_text = "Loyalist"
role_text_plural = "Loyalists"
id = MODE_LOYALIST
/datum/antagonist/mutineer/loyalist/New()
..(1)
loyalists = src
-66
View File
@@ -1,66 +0,0 @@
var/datum/antagonist/mutineer/mutineers
/datum/antagonist/mutineer
role_type = BE_MUTINEER
role_text = "Mutineer"
role_text_plural = "Mutineers"
id = MODE_MUTINEER
antag_indicator = "mutineer"
restricted_jobs = list(JOB_SITE_MANAGER)
/datum/antagonist/mutineer/New(var/no_reference)
..()
if(!no_reference)
mutineers = src
/datum/antagonist/mutineer/proc/recruit()
/datum/antagonist/mutineer/can_become_antag(var/datum/mind/player)
if(!..())
return 0
if(!ishuman(player.current))
return 0
if(M.special_role)
return 0
return 1
/*
var/list/directive_candidates = get_directive_candidates()
if(!directive_candidates || directive_candidates.len == 0)
to_world(span_warning("Mutiny mode aborted: no valid candidates for Directive X."))
return 0
head_loyalist = pick(loyalist_candidates)
head_mutineer = pick(mutineer_candidates)
current_directive = pick(directive_candidates)
// Returns an array in case we want to expand on this later.
proc/get_head_loyalist_candidates()
var/list/candidates[0]
for(var/mob/loyalist in GLOB.player_list)
if(loyalist.mind && loyalist.mind.assigned_role == JOB_SITE_MANAGER)
candidates.Add(loyalist.mind)
return candidates
proc/get_head_mutineer_candidates()
var/list/candidates[0]
for(var/mob/mutineer in GLOB.player_list)
if(mutineer.client.prefs.be_special & BE_MUTINEER)
for(var/job in GLOB.command_positions - JOB_SITE_MANAGER)
if(mutineer.mind && mutineer.mind.assigned_role == job)
candidates.Add(mutineer.mind)
return candidates
proc/get_directive_candidates()
var/list/candidates[0]
for(var/T in subtypesof(/datum/directive))
var/datum/directive/D = new T(src)
if (D.meets_prerequisites())
candidates.Add(D)
return candidates
return 1
*/
+3 -3
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/deathsquad/mercenary/commandos
GLOBAL_DATUM(commandos, /datum/antagonist/deathsquad/mercenary)
/datum/antagonist/deathsquad/mercenary
id = MODE_COMMANDO
@@ -7,7 +7,7 @@ var/datum/antagonist/deathsquad/mercenary/commandos
role_text_plural = "Commandos"
welcome_text = "You are in the employ of a criminal syndicate hostile to corporate interests."
antag_sound = 'sound/effects/antag_notice/deathsquid_alert.ogg'
id_type = /obj/item/card/id/centcom/ERT
id_type = /obj/item/card/id/centcom/ert
hard_cap = 4
hard_cap_round = 8
@@ -17,7 +17,7 @@ var/datum/antagonist/deathsquad/mercenary/commandos
/datum/antagonist/deathsquad/mercenary/New()
..(1)
commandos = src
GLOB.commandos = src
/datum/antagonist/deathsquad/mercenary/equip(var/mob/living/carbon/human/player)
+3 -3
View File
@@ -1,6 +1,6 @@
var/datum/antagonist/deathsquad/deathsquad
GLOBAL_DATUM(deathsquad, /datum/antagonist/deathsquad)
/datum/antagonist/deathsquad
/datum/antagonist/
id = MODE_DEATHSQUAD
role_type = BE_OPERATIVE
role_text = "Death Commando"
@@ -22,7 +22,7 @@ var/datum/antagonist/deathsquad/deathsquad
/datum/antagonist/deathsquad/New(var/no_reference)
..()
if(!no_reference)
deathsquad = src
GLOB.deathsquad = src
/datum/antagonist/deathsquad/attempt_spawn()
if(..())
+7 -7
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/ert/ert
GLOBAL_DATUM(ert, /datum/antagonist/ert)
/datum/antagonist/ert
id = MODE_ERT
@@ -16,15 +16,15 @@ var/datum/antagonist/ert/ert
rules aside from those without explicit exceptions apply to the ERT.")
leader_welcome_text = "As leader of the Emergency Response Team, you answer only to the Company, and have authority to override the " + JOB_SITE_MANAGER + " where it is necessary to achieve your mission goals. It is recommended that you attempt to cooperate with the " + JOB_SITE_MANAGER + " where possible, however."
landmark_id = "Response Team"
id_type = /obj/item/card/id/centcom/ERT
id_type = /obj/item/card/id/centcom/ert
flags = ANTAG_OVERRIDE_JOB | ANTAG_SET_APPEARANCE | ANTAG_HAS_LEADER | ANTAG_CHOOSE_NAME
antaghud_indicator = "hudloyalist"
hard_cap = 5
hard_cap_round = 7
initial_spawn_req = 5
initial_spawn_target = 7
hard_cap = 12
hard_cap_round = 12
initial_spawn_req = 4
initial_spawn_target = 12
can_hear_aooc = FALSE // They're the good guys.
can_speak_aooc = FALSE // Just in case the above var bugs, or gets touched.
@@ -35,7 +35,7 @@ var/datum/antagonist/ert/ert
/datum/antagonist/ert/New()
..()
ert = src
GLOB.ert = src
/datum/antagonist/ert/greet(var/datum/mind/player)
if(!..())
-6
View File
@@ -1,6 +0,0 @@
//boosted ERT spawn/cap numbers to match the Von Braun's spawns, just to be safe. not much point going to all the effort of giving you twelve slots if only seven can ever be used without admin fuckery. -Killian
/datum/antagonist/ert
hard_cap = 12
hard_cap_round = 12
initial_spawn_req = 4
initial_spawn_target = 12
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/mercenary/mercs
GLOBAL_DATUM(mercs, /datum/antagonist/mercenary)
/datum/antagonist/mercenary
id = MODE_MERCENARY
@@ -21,7 +21,7 @@ var/datum/antagonist/mercenary/mercs
/datum/antagonist/mercenary/New()
..()
mercs = src
GLOB.mercs = src
/datum/antagonist/mercenary/create_global_objectives()
if(!..())
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/ninja/ninjas
GLOBAL_DATUM(ninjas, /datum/antagonist/ninja)
/datum/antagonist/ninja
id = MODE_NINJA
@@ -20,7 +20,7 @@ var/datum/antagonist/ninja/ninjas
/datum/antagonist/ninja/New()
..()
ninjas = src
GLOB.ninjas = src
/datum/antagonist/ninja/attempt_random_spawn()
if(CONFIG_GET(flag/ninjas_allowed)) ..()
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/raider/raiders
GLOBAL_DATUM(raiders, /datum/antagonist/raider)
/datum/antagonist/raider
id = MODE_RAIDER
@@ -108,7 +108,7 @@ var/datum/antagonist/raider/raiders
/datum/antagonist/raider/New()
..()
raiders = src
GLOB.raiders = src
/datum/antagonist/raider/update_access(var/mob/living/player)
for(var/obj/item/storage/wallet/W in player.contents)
@@ -1,9 +1,9 @@
var/datum/antagonist/shipwreck_survivor/survivors
GLOBAL_DATUM(survivors, /datum/antagonist/shipwreck_survivor)
//Shipwreck survivors can only spawn from ghost_pods at time of this commit.
//These are NOT meant to be real antagonists
//They are, at best, comparable to ERT.
/datum/antagonist/SURVIVOR
/datum/antagonist/shipwreck_survivor
id = MODE_SURVIVOR
role_type = BE_SURVIVOR
role_text = "Shipwreck Survivor"
@@ -29,7 +29,11 @@ var/datum/antagonist/shipwreck_survivor/survivors
can_speak_aooc = FALSE
can_hear_aooc = FALSE
/datum/antagonist/SURVIVOR/greet(var/datum/mind/player)
/datum/antagonist/shipwreck_survivor/New()
..()
GLOB.survivors = src
/datum/antagonist/survivor/greet(var/datum/mind/player)
to_chat(player.current, span_warning("You are a <b>NOT</b> an antagonist! All rules apply to you as well. Your job is to help make the world seem more alive. \n \
You are not an existing station character, but some average person who has suffered a terrible accident. \
Feel free to make up what happened to the ship you awakened on as you please, \
@@ -1,4 +1,4 @@
var/datum/antagonist/technomancer/technomancers
GLOBAL_DATUM(technomancers, /datum/antagonist/technomancer)
/datum/antagonist/technomancer
id = MODE_TECHNOMANCER
@@ -24,7 +24,7 @@ var/datum/antagonist/technomancer/technomancers
/datum/antagonist/technomancer/New()
..()
technomancers = src
GLOB.technomancers = src
/datum/antagonist/technomancer/update_antag_mob(var/datum/mind/technomancer)
..()
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/trader/traders
GLOBAL_DATUM(traders, /datum/antagonist/trader)
/datum/antagonist/trader
id = MODE_TRADE
@@ -33,7 +33,7 @@ var/datum/antagonist/trader/traders
/datum/antagonist/trader/New()
..()
traders = src
GLOB.traders = src
/datum/antagonist/trader/greet(var/datum/mind/player)
if(!..())
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/wizard/wizards
GLOBAL_DATUM(wizards, /datum/antagonist/wizard)
/datum/antagonist/wizard
id = MODE_WIZARD
@@ -19,7 +19,7 @@ var/datum/antagonist/wizard/wizards
/datum/antagonist/wizard/New()
..()
wizards = src
GLOB.wizards = src
/datum/antagonist/wizard/create_objectives(var/datum/mind/wizard)
+4 -4
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/highlander/highlanders
GLOBAL_DATUM(highlanders, /datum/antagonist/highlander)
/datum/antagonist/highlander
role_text = "Highlander"
@@ -12,11 +12,11 @@ var/datum/antagonist/highlander/highlanders
initial_spawn_req = 3
initial_spawn_target = 5
id_type = /obj/item/card/id/centcom/ERT
id_type = /obj/item/card/id/centcom/ert
/datum/antagonist/highlander/New()
..()
highlanders = src
GLOB.highlanders = src
/datum/antagonist/highlander/create_objectives(var/datum/mind/player)
@@ -80,7 +80,7 @@ var/datum/antagonist/highlander/highlanders
for(var/mob/living/carbon/human/H in GLOB.player_list)
if(H.stat == 2 || !(H.client)) continue
if(is_special_character(H)) continue
highlanders.add_antagonist(H.mind)
GLOB.highlanders.add_antagonist(H.mind)
/client/proc/only_one_delayed()
//send_to_playing_players(span_userdanger("Bagpipes begin to blare. You feel Scottish pride coming over you."))
+2 -2
View File
@@ -1,4 +1,4 @@
var/datum/antagonist/loyalists/loyalists
GLOBAL_DATUM(loyalists, /datum/antagonist/loyalists)
/datum/antagonist/loyalists
id = MODE_LOYALIST
@@ -33,7 +33,7 @@ var/datum/antagonist/loyalists/loyalists
/datum/antagonist/loyalists/New()
..()
loyalists = src
GLOB.loyalists = src
/datum/antagonist/loyalists/create_global_objectives()
if(!..())
+2 -2
View File
@@ -63,7 +63,7 @@ GLOBAL_LIST_EMPTY(nuke_disks)
to_chat(world, span_filter_system(span_large(span_bold("[syndicate_name()] operatives have earned Darwin Award!"))))
to_chat(world, span_filter_system(span_bold("[syndicate_name()] operatives blew up something that wasn't [station_name()] and got caught in the explosion.") + " Next time, don't lose the disk!"))
else if (disk_rescued && mercs.antags_are_dead())
else if (disk_rescued && GLOB.mercs.antags_are_dead())
feedback_set_details("round_end_result","loss - evacuation - disk secured - syndi team dead")
to_chat(world, span_filter_system(span_large(span_bold("Crew Major Victory!"))))
to_chat(world, span_filter_system(span_bold("The Research Staff has saved the disc and killed the [syndicate_name()] Operatives")))
@@ -73,7 +73,7 @@ GLOBAL_LIST_EMPTY(nuke_disks)
to_chat(world, span_filter_system(span_large(span_bold("Crew Major Victory"))))
to_chat(world, span_filter_system(span_bold("The Research Staff has saved the disc and stopped the [syndicate_name()] Operatives!")))
else if (!disk_rescued && mercs.antags_are_dead())
else if (!disk_rescued && GLOB.mercs.antags_are_dead())
feedback_set_details("round_end_result","loss - evacuation - disk not secured")
to_chat(world, span_filter_system(span_large(span_bold("Mercenary Minor Victory!"))))
to_chat(world, span_filter_system(span_bold("The Research Staff failed to secure the authentication disk but did manage to kill most of the [syndicate_name()] Operatives!")))
+3 -3
View File
@@ -690,7 +690,7 @@ GLOBAL_LIST_EMPTY(all_objectives)
if(istype(I,target)) total_amount++
if(total_amount >= target_amount) return 1
for(var/datum/mind/raider in raiders.current_antagonists)
for(var/datum/mind/raider in GLOB.raiders.current_antagonists)
if(raider.current)
for(var/obj/O in raider.current.get_contents())
if(istype(O,target)) total_amount++
@@ -744,7 +744,7 @@ GLOBAL_LIST_EMPTY(all_objectives)
S = I
total_amount += S.get_amount()
for(var/datum/mind/raider in raiders.current_antagonists)
for(var/datum/mind/raider in GLOB.raiders.current_antagonists)
if(raider.current)
for(var/obj/item/O in raider.current.get_contents())
if(istype(O,/obj/item/stack/material))
@@ -760,7 +760,7 @@ GLOBAL_LIST_EMPTY(all_objectives)
explanation_text = "Do not leave anyone behind, alive or dead."
/datum/objective/heist/preserve_crew/check_completion()
if(raiders && raiders.is_raider_crew_safe()) return 1
if(GLOB.raiders && GLOB.raiders.is_raider_crew_safe()) return 1
return 0
//Borer objective(s).
+1 -1
View File
@@ -63,7 +63,7 @@ var/list/all_technomancer_assistance = subtypesof(/datum/technomancer/assistance
// Parameters: 1 (new_owner - mob that the book is trying to bind to)
// Description: Links the catalog to hopefully the technomancer, so that only they can access it.
/obj/item/technomancer_catalog/proc/bind_to_owner(var/mob/living/carbon/human/new_owner)
if(!owner && (technomancers.is_antagonist(new_owner.mind) || universal)) //VOREStation Edit - Universal catalogs
if(!owner && (GLOB.technomancers.is_antagonist(new_owner.mind) || universal)) //VOREStation Edit - Universal catalogs
owner = new_owner
// Proc: New()
+1 -1
View File
@@ -89,7 +89,7 @@
if(world.time % 5 == 0) // Maintaining fat lists is expensive, I imagine.
maintain_summon_list()
if(wearer && wearer.mind)
if(!(technomancers.is_antagonist(wearer.mind)) && !universal) // In case someone tries to wear a stolen core. //VOREStation Edit - Add universal cores
if(!(GLOB.technomancers.is_antagonist(wearer.mind)) && !universal) // In case someone tries to wear a stolen core. //VOREStation Edit - Add universal cores
wearer.adjust_instability(20)
if(!wearer || wearer.stat == DEAD) // Unlock if we're dead or not worn.
canremove = TRUE
@@ -165,7 +165,7 @@
if(core.loc != owner || owner.back != core) //Make sure the core's being worn.
to_chat(owner, span_danger("You need to be wearing a core on your back!"))
return 0
if(!technomancers.is_antagonist(owner.mind) && !core.universal) //Now make sure the person using this is the actual antag. //VOREStation Edit - Universal cores
if(!GLOB.technomancers.is_antagonist(owner.mind) && !core.universal) //Now make sure the person using this is the actual antag. //VOREStation Edit - Universal cores
to_chat(owner, span_danger("You can't seem to figure out how to make the machine work properly."))
return 0
return 1
@@ -17,7 +17,7 @@
/obj/item/spell/proc/is_ally(var/mob/living/L)
if(L == owner) // The best ally is ourselves.
return 1
if(L.mind && technomancers.is_antagonist(L.mind)) // This should be done better since we might want opposing technomancers later.
if(L.mind && GLOB.technomancers.is_antagonist(L.mind)) // This should be done better since we might want opposing technomancers later.
return 1
if(isanimal(L)) // Mind controlled simple mobs count as allies too.
var/mob/living/simple_mob/SM = L
+3 -3
View File
@@ -262,7 +262,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
if(istype(R))
LAZYDISTINCTADD(forced_radios, R)
if(connection.frequency in ANTAG_FREQS) // if antag broadcast, just
if(connection.frequency in GLOB.antag_frequencies) // if antag broadcast, just
Broadcast_Message(signal.data["connection"], signal.data["mob"],
signal.data["vmask"], signal.data["vmessage"],
signal.data["radio"], signal.data["message"],
@@ -378,7 +378,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
// --- Broadcast to antag radios! ---
else if(data == DATA_ANTAG)
for(var/antag_freq in ANTAG_FREQS)
for(var/antag_freq in GLOB.antag_frequencies)
var/datum/radio_frequency/antag_connection = SSradio.return_frequency(antag_freq)
for (var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"])
if(R.receive_range(antag_freq, level) > -1)
@@ -597,7 +597,7 @@ GLOBAL_VAR_INIT(message_delay, 0) // To make sure restarting the recentmessages
// --- Broadcast to antag radios! ---
else if(data == DATA_ANTAG)
for(var/freq in ANTAG_FREQS)
for(var/freq in GLOB.antag_frequencies)
var/datum/radio_frequency/antag_connection = SSradio.return_frequency(freq)
for (var/obj/item/radio/R in antag_connection.devices["[RADIO_CHAT]"])
var/turf/position = get_turf(R)
@@ -40,7 +40,7 @@
if(istype(R))
LAZYDISTINCTADD(forced_radios, R)
if(connection.frequency in CENT_FREQS) // if ert broadcast, just
if(connection.frequency in GLOB.cent_frequencies) // if ert broadcast, just
Broadcast_Message(signal.data["connection"], signal.data["mob"],
signal.data["vmask"], signal.data["vmessage"],
signal.data["radio"], signal.data["message"],
+2 -2
View File
@@ -84,7 +84,7 @@
to_chat(H, span_infoplain(span_bold("It would be wise to speak to your master, and learn what their plans are for today.")))
spawn(1)
technomancers.add_antagonist(H.mind, 0, 1, 0, 0, 0)
GLOB.technomancers.add_antagonist(H.mind, 0, 1, 0, 0, 0)
equip_antag(H)
used = 1
qdel(src)
@@ -133,7 +133,7 @@
R.key = C.key
spawn(1)
mercs.add_antagonist(R.mind, FALSE, TRUE, FALSE, FALSE, FALSE)
GLOB.mercs.add_antagonist(R.mind, FALSE, TRUE, FALSE, FALSE, FALSE)
//add_antagonist(var/datum/mind/player, var/ignore_role, var/do_not_equip, var/move_to_spawn, var/do_not_announce, var/preserve_appearance)
qdel(src)
@@ -170,7 +170,7 @@
return -1
if (!src.listening)
return -1
if(freq in ANTAG_FREQS)
if(freq in GLOB.antag_frequencies)
if(!(src.syndie))
return -1//Prevents broadcast of messages over devices lacking the encryption
@@ -560,10 +560,10 @@ GLOBAL_DATUM(autospeaker, /mob/living/silicon/ai/announcer)
var/pos_z = get_z(src)
if(!(pos_z in level))
return -1
if(freq in ANTAG_FREQS)
if(freq in GLOB.antag_frequencies)
if(!(src.syndie))//Checks to see if it's allowed on that frequency, based on the encryption keys
return -1
if(freq in CENT_FREQS)
if(freq in GLOB.cent_frequencies)
if(!(src.centComm))//Checks to see if it's allowed on that frequency, based on the encryption keys
return -1
if (!on)
+8 -8
View File
@@ -242,20 +242,20 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open)
balloon_alert(user, "the [affecting.name] is cut open!")
user.balloon_alert(user, "the [affecting.name] is cut open!")
return
if(affecting.is_salved())
balloon_alert(user, "the wounds on [M]'s [affecting.name] have already been salved.")
user.balloon_alert(user, "the wounds on [M]'s [affecting.name] have already been salved.")
return 1
else
user.balloon_alert_visible("\the [user] starts salving wounds on [M]'s [affecting.name].", \
"salving the wounds on [M]'s [affecting.name]." )
if(!do_after(user, 1 SECOND, affecting))
balloon_alert(user, "stand still to salve wounds.")
user.balloon_alert(user, "stand still to salve wounds.")
return 1
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
balloon_alert(user, "[M]'s [affecting.name] have already been salved.")
user.balloon_alert(user, "[M]'s [affecting.name] have already been salved.")
return 1
user.balloon_alert_visible("[user] salved wounds on [M]'s [affecting.name].", \
"salved wounds on [M]'s [affecting.name]." )
@@ -357,19 +357,19 @@
var/obj/item/organ/external/affecting = H.get_organ(user.zone_sel.selecting)
if(affecting.open)
balloon_alert(user, "the [affecting.name] is cut open!")
user.balloon_alert(user, "the [affecting.name] is cut open!")
if(affecting.is_salved())
balloon_alert(user, "[M]'s [affecting.name] has already been salved.")
user.balloon_alert(user, "[M]'s [affecting.name] has already been salved.")
return 1
else
user.balloon_alert_visible("\the [user] starts salving wounds on [M]'s [affecting.name].", \
"salving the wounds on [M]'s [affecting.name]." )
if(!do_after(user, 1 SECOND, affecting))
balloon_alert(user, "stand still to salve wounds.")
user.balloon_alert(user, "stand still to salve wounds.")
return 1
if(affecting.is_salved()) // We do a second check after the delay, in case it was bandaged after the first check.
balloon_alert(user, "[M]'s [affecting.name] have already been salved.")
user.balloon_alert(user, "[M]'s [affecting.name] have already been salved.")
return 1
user.balloon_alert_visible("[user] covers wounds on [M]'s [affecting.name] with regenerative membrane.", \
"covered wounds on [M]'s [affecting.name] with regenerative membrane." )
@@ -29,23 +29,23 @@
//ERT
/obj/item/card/id/centcom/ERT
/obj/item/card/id/centcom/ert
name = "Emergency Responder ID"
initial_sprite_stack = list("base-stamp-silver", "top-blue", "stamp-n", "pips-red", "stripe-red")
/obj/item/card/id/centcom/ERT/medic
/obj/item/card/id/centcom/ert/medic
name = "Emergency Medical Responder ID"
initial_sprite_stack = list("base-stamp-silver", "top-blue", "stamp-n", "pips-medblu", "stripe-medblu")
/obj/item/card/id/centcom/ERT/commander
/obj/item/card/id/centcom/ert/commander
name = "Emergency Response Commander ID"
initial_sprite_stack = list("base-stamp-silver", "top-blue", "stamp-n", "pips-gold", "stripe-gold")
/obj/item/card/id/centcom/ERT/engineer
/obj/item/card/id/centcom/ert/engineer
name = "Emergency Engineering Responder ID"
initial_sprite_stack = list("base-stamp-silver", "top-blue", "stamp-n", "pips-orange", "stripe-orange")
/obj/item/card/id/centcom/ERT/janitor
/obj/item/card/id/centcom/ert/janitor
name = "Emergency Cleanup Responder ID"
initial_sprite_stack = list("base-stamp-silver", "top-blue", "stamp-n", "pips-purple", "stripe-purple")
@@ -220,13 +220,13 @@
. = ..()
access |= get_all_station_access()
/obj/item/card/id/centcom/ERT
/obj/item/card/id/centcom/ert
name = "\improper " + JOB_EMERGENCY_RESPONSE_TEAM + "ID"
assignment = JOB_EMERGENCY_RESPONSE_TEAM
icon_state = "ert-id"
rank = JOB_EMERGENCY_RESPONSE_TEAM
/obj/item/card/id/centcom/ERT/Initialize(mapload)
/obj/item/card/id/centcom/ert/Initialize(mapload)
. = ..()
access |= get_all_station_access()
+1 -1
View File
@@ -18,7 +18,7 @@
. = ..(user)
if(.)
return TRUE
if((user.mind && !wizards.is_antagonist(user.mind)))
if((user.mind && !GLOB.wizards.is_antagonist(user.mind)))
to_chat(user, span_warning("You stare at the scroll but cannot make sense of the markings!"))
return
+2 -2
View File
@@ -168,10 +168,10 @@
overlays.Remove(blood_overlay)
if(gurgled && clean_types & CLEAN_WASH)
gurgled = FALSE
cut_overlay(gurgled_overlays[gurgled_color])
cut_overlay(GLOB.gurgled_overlays[gurgled_color])
if(contaminated && clean_types & CLEAN_RAD) // Phoron and stuff, washing machine needed
contaminated = FALSE
cut_overlay(contamination_overlay)
cut_overlay(GLOB.contamination_overlay)
/obj/vv_get_dropdown()
. = ..()
+2 -2
View File
@@ -135,7 +135,7 @@
if(choice && choice == "Yes")
var/mob/living/carbon/human/vox/vox = new(get_turf(src),SPECIES_VOX)
vox.gender = user.gender
raiders.equip(vox)
GLOB.raiders.equip(vox)
if(user.mind)
user.mind.transfer_to(vox)
spawn(1)
@@ -145,6 +145,6 @@
newname = L.get_random_name()
vox.real_name = newname
vox.name = vox.real_name
raiders.update_access(vox)
GLOB.raiders.update_access(vox)
qdel(user)
..()
+4 -4
View File
@@ -373,7 +373,7 @@ GLOBAL_LIST_INIT(wf_speak_vomva_sound, list ('sound/talksounds/wf/vomva_1.ogg',
// var/list/species_sounds = list()
// Global list containing all of our sound options.
var/list/species_sound_map = list(
GLOBAL_LIST_INIT(species_sound_map, list(
"Canine" = canine_sounds,
"Cervine" = cervine_sounds,
"Feline" = feline_sounds,
@@ -392,7 +392,7 @@ var/list/species_sound_map = list(
"Xeno" = xeno_sounds,
"None" = no_sounds,
"Unset" = use_default
)
))
/*
* Call this for when you need a sound from an already-identified list - IE, "Canine". pick() cannot parse procs.
@@ -406,9 +406,9 @@ var/list/species_sound_map = list(
* get_species_sound(H.species.species_sounds_male)["emote"] // If we're male, and want an emote sound gendered correctly.
*/
/proc/get_species_sound(var/sounds)
if(!islist(species_sound_map[sounds])) // We check here if this list actually has anything in it, or if we're about to return a null index
if(!islist(GLOB.species_sound_map[sounds])) // We check here if this list actually has anything in it, or if we're about to return a null index
return null // Shitty failsafe but better than rewriting an entire litany of procs rn when I'm low on time - Rykka // list('sound/voice/silence.ogg')
return species_sound_map[sounds] // Otherwise, successfully return our sound
return GLOB.species_sound_map[sounds] // Otherwise, successfully return our sound
/*
* The following helper proc will select a species' default sounds - useful for if we're set to "Unset"
+17 -19
View File
@@ -128,8 +128,8 @@ GLOBAL_VAR(restart_counter)
/world/New()
log_world("World loaded at [time_stamp()]!")
world_startup_time = world.timeofday
rollover_safety_date = world.realtime - world.timeofday // 00:00 today (ish, since floating point error with world.realtime) of today
GLOB.world_startup_time = world.timeofday
GLOB.rollover_safety_date = world.realtime - world.timeofday // 00:00 today (ish, since floating point error with world.realtime) of today
InitTgs()
@@ -303,8 +303,8 @@ GLOBAL_VAR(restart_counter)
world.log = file("[GLOB.log_directory]/dd.log") //not all runtimes trigger world/Error, so this is the only way to ensure we can see all of them.
#endif
var/world_topic_spam_protect_ip = "0.0.0.0"
var/world_topic_spam_protect_time = world.timeofday
GLOBAL_VAR_INIT(world_topic_spam_protect_ip, "0.0.0.0")
GLOBAL_VAR_INIT(world_topic_spam_protect_time, world.timeofday)
/world/Topic(T, addr, master, key)
TGS_TOPIC
@@ -462,14 +462,14 @@ var/world_topic_spam_protect_time = world.timeofday
var/input[] = params2list(T)
var/password = CONFIG_GET(string/comms_password)
if(!password || input["key"] != password)
if(world_topic_spam_protect_ip == addr && abs(world_topic_spam_protect_time - world.time) < 50)
if(GLOB.world_topic_spam_protect_ip == addr && abs(GLOB.world_topic_spam_protect_time - world.time) < 50)
spawn(50)
world_topic_spam_protect_time = world.time
GLOB.world_topic_spam_protect_time = world.time
return
world_topic_spam_protect_time = world.time
world_topic_spam_protect_ip = addr
GLOB.world_topic_spam_protect_time = world.time
GLOB.world_topic_spam_protect_ip = addr
return "Bad Key"
@@ -691,8 +691,7 @@ var/world_topic_spam_protect_time = world.timeofday
src.status = s
#define FAILED_DB_CONNECTION_CUTOFF 5
var/failed_db_connections = 0
var/failed_old_db_connections = 0
GLOBAL_VAR_INIT(failed_db_connections, 0)
/hook/startup/proc/connectDB()
if(!CONFIG_GET(flag/sql_enabled))
@@ -706,7 +705,7 @@ var/failed_old_db_connections = 0
/proc/setup_database_connection()
if(!CONFIG_GET(flag/sql_enabled))
return 0
if(failed_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore.
if(GLOB.failed_db_connections > FAILED_DB_CONNECTION_CUTOFF) //If it failed to establish a connection more than 5 times in a row, don't bother attempting to conenct anymore.
return 0
if(!SSdbcore)
@@ -721,16 +720,15 @@ var/failed_old_db_connections = 0
SSdbcore.Connect("dbi:mysql:[db]:[address]:[port]","[user]","[pass]")
. = SSdbcore.IsConnected()
if ( . )
failed_db_connections = 0 //If this connection succeeded, reset the failed connections counter.
else
failed_db_connections++ //If it failed, increase the failed connections counter.
log_sql(SSdbcore.ErrorMsg())
return .
GLOB.failed_db_connections = 0 //If this connection succeeded, reset the failed connections counter.
return
GLOB.failed_db_connections++ //If it failed, increase the failed connections counter.
log_sql(SSdbcore.ErrorMsg())
return
//This proc ensures that the connection to the feedback database (global variable dbcon) is established
/proc/establish_db_connection()
if(failed_db_connections > FAILED_DB_CONNECTION_CUTOFF)
if(GLOB.failed_db_connections > FAILED_DB_CONNECTION_CUTOFF)
return 0
if(!SSdbcore || !SSdbcore.IsConnected())
@@ -741,7 +739,7 @@ var/failed_old_db_connections = 0
// Cleans up DB connections and recreates them
/proc/reset_database_connections()
var/list/results = list("-- Resetting DB connections --")
failed_db_connections = 0
GLOB.failed_db_connections = 0
if(SSdbcore?.IsConnected())
SSdbcore.Disconnect()