mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 02:25:06 +01:00
Conversion many Globals to Managed Globals (Part 1) (#17121)
* Conversion of some Globals to Managed Globals * Fix * for later --------- Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
var/global/list/prevent_respawns = list()
|
||||
GLOBAL_LIST_EMPTY(prevent_respawns)
|
||||
|
||||
/hook/death/proc/quit_notify(mob/dead)
|
||||
if(ishuman(dead))
|
||||
@@ -25,7 +25,7 @@ var/global/list/prevent_respawns = list()
|
||||
//prevent_respawns += mind.name //Replaced by PR 4785
|
||||
|
||||
//Update any existing objectives involving this mob.
|
||||
for(var/datum/objective/O in all_objectives)
|
||||
for(var/datum/objective/O in GLOB.all_objectives)
|
||||
if(O.target == src.mind)
|
||||
if(O.owner && O.owner.current)
|
||||
to_chat(O.owner.current,span_warning("You get the feeling your target is no longer within your reach..."))
|
||||
@@ -45,8 +45,8 @@ var/global/list/prevent_respawns = list()
|
||||
src.mind.special_role = null
|
||||
|
||||
//Cut the PDA manifest (ugh)
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
if(GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if((R.fields["name"] == src.real_name))
|
||||
qdel(R)
|
||||
|
||||
@@ -307,14 +307,14 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
to_chat(src, span_warning("Another consciousness is in your body... it is resisting you."))
|
||||
return
|
||||
//VOREStation Add
|
||||
if(prevent_respawns.Find(mind.name))
|
||||
if(GLOB.prevent_respawns.Find(mind.name))
|
||||
to_chat(src, span_warning("You already quit this round as this character, sorry!"))
|
||||
return
|
||||
//VOREStation Add End
|
||||
if(mind.current.ajourn && mind.current.stat != DEAD) //check if the corpse is astral-journeying (it's client ghosted using a cultist rune).
|
||||
var/found_rune
|
||||
for(var/obj/effect/rune/R in mind.current.loc) //whilst corpse is alive, we can only reenter the body if it's on the rune
|
||||
if(R && R.word1 == cultwords["hell"] && R.word2 == cultwords["travel"] && R.word3 == cultwords["self"]) // Found an astral journey rune.
|
||||
if(R && R.word1 == GLOB.cultwords["hell"] && R.word2 == GLOB.cultwords["travel"] && R.word3 == GLOB.cultwords["self"]) // Found an astral journey rune.
|
||||
found_rune = 1
|
||||
break
|
||||
if(!found_rune)
|
||||
@@ -858,7 +858,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
)
|
||||
toggle_ghost_visibility(TRUE)
|
||||
else
|
||||
var/datum/gender/T = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()]
|
||||
user.visible_message ( \
|
||||
span_warning("\The [user] just tried to smash [T.his] book into that ghost! It's not very effective."), \
|
||||
span_warning("You get the feeling that the ghost can't become any more visible.") \
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
|
||||
/var/list/gender_datums = list()
|
||||
GLOBAL_LIST_EMPTY(gender_datums)
|
||||
|
||||
/hook/startup/proc/populate_gender_datum_list()
|
||||
for(var/type in typesof(/datum/gender))
|
||||
var/datum/gender/G = new type
|
||||
gender_datums[G.key] = G
|
||||
GLOB.gender_datums[G.key] = G
|
||||
return 1
|
||||
|
||||
/datum/gender
|
||||
|
||||
@@ -329,7 +329,7 @@
|
||||
var/obj/machinery/navbeacon/targ = locate() in get_turf(src)
|
||||
|
||||
if(!targ)
|
||||
for(var/obj/machinery/navbeacon/N in navbeacons)
|
||||
for(var/obj/machinery/navbeacon/N in GLOB.navbeacons)
|
||||
if(!N.codes["patrol"])
|
||||
continue
|
||||
if(get_dist(src, N) < minDist)
|
||||
@@ -337,7 +337,7 @@
|
||||
targ = N
|
||||
|
||||
if(targ && targ.codes["next_patrol"])
|
||||
for(var/obj/machinery/navbeacon/N in navbeacons)
|
||||
for(var/obj/machinery/navbeacon/N in GLOB.navbeacons)
|
||||
if(N.location == targ.codes["next_patrol"])
|
||||
targ = N
|
||||
break
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
|
||||
/mob/living/bot/mulebot/proc/GetBeaconList()
|
||||
var/list/beaconlist = list()
|
||||
for(var/obj/machinery/navbeacon/N in navbeacons)
|
||||
for(var/obj/machinery/navbeacon/N in GLOB.navbeacons)
|
||||
if(!N.codes["delivery"])
|
||||
continue
|
||||
beaconlist.Add(N.location)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
if (src.health >= CONFIG_GET(number/health_threshold_crit))
|
||||
if(src == M && ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()]
|
||||
src.visible_message( \
|
||||
span_notice("[src] examines [T.himself]."), \
|
||||
span_notice("You check yourself for injuries.") \
|
||||
@@ -250,7 +250,7 @@
|
||||
|
||||
var/show_ssd
|
||||
var/mob/living/carbon/human/H = src
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()!
|
||||
var/datum/gender/T = GLOB.gender_datums[H.get_visible_gender()] // make sure to cast to human before using get_gender() or get_visible_gender()!
|
||||
if(istype(H)) show_ssd = H.species.show_ssd
|
||||
if(show_ssd && !client && !teleop)
|
||||
M.visible_message(span_notice("[M] shakes [src] trying to wake [T.him] up!"), \
|
||||
@@ -264,7 +264,7 @@
|
||||
span_notice("You shake [src] trying to wake [T.him] up!"))
|
||||
else
|
||||
var/mob/living/carbon/human/hugger = M
|
||||
var/datum/gender/TM = gender_datums[M.get_visible_gender()]
|
||||
var/datum/gender/TM = GLOB.gender_datums[M.get_visible_gender()]
|
||||
if(M.resting == 1) //Are they resting on the ground?
|
||||
M.visible_message(span_notice("[M] grabs onto [src] and pulls [TM.himself] up"), \
|
||||
span_notice("You grip onto [src] and pull yourself up off the ground!"))
|
||||
|
||||
@@ -75,8 +75,8 @@
|
||||
/datum/mob_descriptor/proc/get_comparative_value_descriptor(var/my_value, var/mob/observer, var/mob/me)
|
||||
|
||||
// Store our gender info for later.
|
||||
var/datum/gender/my_gender = gender_datums[me.get_gender()]
|
||||
var/datum/gender/other_gender = gender_datums[observer.get_gender()]
|
||||
var/datum/gender/my_gender = GLOB.gender_datums[me.get_gender()]
|
||||
var/datum/gender/other_gender = GLOB.gender_datums[observer.get_gender()]
|
||||
|
||||
. = get_initial_comparison_component(me, my_gender, other_gender, my_value)
|
||||
|
||||
|
||||
@@ -335,7 +335,7 @@ var/list/_simple_mob_default_emotes = list(
|
||||
set desc = "Sets a description which will be shown when someone examines you."
|
||||
set category = "IC.Settings"
|
||||
|
||||
var/datum/gender/T = gender_datums[get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[get_visible_gender()]
|
||||
|
||||
pose = strip_html_simple(tgui_input_text(src, "This is [src]. [T.he]...", "Pose", null))
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
var/gender_hidden = (skip_gear & EXAMINE_SKIPJUMPSUIT) && (skip_body & EXAMINE_SKIPFACE)
|
||||
var/gender_key = get_visible_gender(user, gender_hidden)
|
||||
var/datum/gender/T = gender_datums[gender_key]
|
||||
var/datum/gender/T = GLOB.gender_datums[gender_key]
|
||||
if (!T)
|
||||
CRASH({"Null gender datum on examine: mob="[src]",hidden="[gender_hidden]",key="[gender_key]",bio="[gender]",id="[identifying_gender]""})
|
||||
|
||||
|
||||
@@ -544,8 +544,8 @@
|
||||
if(setmedical != "Cancel")
|
||||
R.fields["p_stat"] = setmedical
|
||||
modified = 1
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
if(GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
|
||||
spawn()
|
||||
if(ishuman(usr))
|
||||
@@ -861,7 +861,7 @@
|
||||
|
||||
/mob/living/carbon/human/proc/play_xylophone()
|
||||
if(!src.xylophone)
|
||||
var/datum/gender/T = gender_datums[get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[get_visible_gender()]
|
||||
visible_message(span_filter_notice("[span_red("\The [src] begins playing [T.his] ribcage like a xylophone. It's quite spooky.")]"),span_notice("You begin to play a spooky refrain on your ribcage."),span_filter_notice("[span_red("You hear a spooky xylophone melody.")]"))
|
||||
var/song = pick('sound/effects/xylophone1.ogg','sound/effects/xylophone2.ogg','sound/effects/xylophone3.ogg')
|
||||
playsound(src, song, 50, 1, -1)
|
||||
@@ -952,7 +952,7 @@
|
||||
gender = NEUTER
|
||||
regenerate_icons()
|
||||
check_dna()
|
||||
var/datum/gender/T = gender_datums[get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[get_visible_gender()]
|
||||
visible_message(span_notice("\The [src] morphs and changes [T.his] appearance!"), span_notice("You change your appearance!"), span_filter_notice("[span_red("Oh, god! What the hell was that? It sounded like flesh getting squished and bone ground into a different shape!")]"))
|
||||
|
||||
/mob/living/carbon/human/proc/remotesay()
|
||||
@@ -1222,8 +1222,8 @@
|
||||
|
||||
if(usr.stat || usr.restrained() || !isliving(usr)) return
|
||||
|
||||
var/datum/gender/TU = gender_datums[usr.get_visible_gender()]
|
||||
var/datum/gender/T = gender_datums[get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[usr.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[get_visible_gender()]
|
||||
|
||||
if(usr == src)
|
||||
self = 1
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
return null
|
||||
|
||||
/mob/living/carbon/human/attack_hand(mob/living/M as mob)
|
||||
var/datum/gender/TT = gender_datums[M.get_visible_gender()]
|
||||
var/datum/gender/TT = GLOB.gender_datums[M.get_visible_gender()]
|
||||
var/mob/living/carbon/human/H = M
|
||||
|
||||
if(is_incorporeal())
|
||||
@@ -499,7 +499,7 @@
|
||||
to_chat(user,message)
|
||||
return FALSE
|
||||
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
|
||||
if(user == src)
|
||||
user.visible_message(span_filter_notice("\The [user] starts applying pressure to [TU.his] [organ.name]!"), span_filter_notice("You start applying pressure to your [organ.name]!"))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
/obj/item/organ/external/proc/get_modular_limb_category()
|
||||
. = MODULAR_BODYPART_INVALID
|
||||
if(robotic >= ORGAN_ROBOT && model)
|
||||
var/datum/robolimb/manufacturer = all_robolimbs[model]
|
||||
var/datum/robolimb/manufacturer = GLOB.all_robolimbs[model]
|
||||
if(!isnull(manufacturer?.modular_bodyparts))
|
||||
. = manufacturer.modular_bodyparts
|
||||
|
||||
@@ -167,7 +167,7 @@
|
||||
for(var/obj/item/organ/external/child in E.children)
|
||||
child.status &= ~ORGAN_CUT_AWAY
|
||||
|
||||
var/datum/gender/G = gender_datums[gender]
|
||||
var/datum/gender/G = GLOB.gender_datums[gender]
|
||||
visible_message(
|
||||
span_notice("\The [src] attaches \the [E] to [G.his] body!"),
|
||||
span_notice("You attach \the [E] to your body!"))
|
||||
@@ -195,7 +195,7 @@
|
||||
E.removed(src)
|
||||
E.dropInto(loc)
|
||||
put_in_hands(E)
|
||||
var/datum/gender/G = gender_datums[gender]
|
||||
var/datum/gender/G = GLOB.gender_datums[gender]
|
||||
visible_message(
|
||||
span_notice("\The [src] detaches [G.his] [E.name]!"),
|
||||
span_notice("You detach your [E.name]!"))
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
return
|
||||
if(refresh_traits && species.traits)
|
||||
for(var/TR in species.traits)
|
||||
var/datum/trait/T = all_traits[TR]
|
||||
var/datum/trait/T = GLOB.all_traits[TR]
|
||||
if(!T)
|
||||
continue
|
||||
if(!T.linked_gene)
|
||||
|
||||
@@ -350,7 +350,7 @@
|
||||
if(!E)
|
||||
to_chat(src,span_warning("You don't seem to have a head!"))
|
||||
return
|
||||
var/datum/robolimb/robohead = all_robolimbs[E.model]
|
||||
var/datum/robolimb/robohead = GLOB.all_robolimbs[E.model]
|
||||
if(!robohead.monitor_styles || !robohead.monitor_icon)
|
||||
to_chat(src,span_warning("Your head doesn't have a monitor, or it doesn't support being changed!"))
|
||||
return
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
update_icons_body()
|
||||
|
||||
if(H.robotic)
|
||||
var/datum/robolimb/robohead = all_robolimbs[H.model]
|
||||
var/datum/robolimb/robohead = GLOB.all_robolimbs[H.model]
|
||||
if(robohead.monitor_styles && robohead.monitor_icon)
|
||||
to_chat(src, span_notice("You reconfigure the rendering order of your facial display."))
|
||||
|
||||
|
||||
@@ -1735,7 +1735,7 @@
|
||||
|
||||
if(seer==1)
|
||||
var/obj/effect/rune/R = locate() in loc
|
||||
if(R && R.word1 == cultwords["see"] && R.word2 == cultwords["hell"] && R.word3 == cultwords["join"])
|
||||
if(R && R.word1 == GLOB.cultwords["see"] && R.word2 == GLOB.cultwords["hell"] && R.word3 == GLOB.cultwords["join"])
|
||||
see_invisible = SEE_INVISIBLE_CULT
|
||||
else
|
||||
see_invisible = see_invisible_default
|
||||
|
||||
@@ -764,7 +764,7 @@
|
||||
//If you had traits, apply them
|
||||
if(new_copy.traits)
|
||||
for(var/trait in new_copy.traits)
|
||||
var/datum/trait/T = all_traits[trait]
|
||||
var/datum/trait/T = GLOB.all_traits[trait]
|
||||
T.apply(new_copy, H, new_copy.traits[trait])
|
||||
|
||||
//Set up a mob
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
/datum/unarmed_attack/claws/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/datum/gender/T = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TT = gender_datums[target.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()]
|
||||
attack_damage = CLAMP(attack_damage, 1, 5)
|
||||
|
||||
if(target == user)
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
if(!H.species || !H.species.traits || H.species.traits.len == 0)
|
||||
H.emote(pick("scratch","jump","roll","tail")) // fallbacks
|
||||
else
|
||||
var/datum/trait/T = all_traits[pick(H.species.traits)]
|
||||
var/datum/trait/T = GLOB.all_traits[pick(H.species.traits)]
|
||||
if(T)
|
||||
var/geneexpression
|
||||
if(T.primitive_expression_messages.len)
|
||||
|
||||
@@ -66,8 +66,8 @@
|
||||
|
||||
//Organ exists, let's reshape it
|
||||
var/list/usable_manufacturers = list()
|
||||
for(var/company in chargen_robolimbs)
|
||||
var/datum/robolimb/M = chargen_robolimbs[company]
|
||||
for(var/company in GLOB.chargen_robolimbs)
|
||||
var/datum/robolimb/M = GLOB.chargen_robolimbs[company]
|
||||
if(!(choice in M.parts))
|
||||
continue
|
||||
if(species?.base_species in M.species_cannot_use)
|
||||
|
||||
@@ -1007,8 +1007,8 @@
|
||||
var/finalized = "No"
|
||||
|
||||
while(finalized == "No" && src.client)
|
||||
choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", weavable_structures)
|
||||
desired_result = weavable_structures[choice]
|
||||
choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", GLOB.weavable_structures)
|
||||
desired_result = GLOB.weavable_structures[choice]
|
||||
if(!desired_result || !istype(desired_result))
|
||||
return
|
||||
|
||||
@@ -1066,8 +1066,8 @@
|
||||
var/finalized = "No"
|
||||
|
||||
while(finalized == "No" && src.client)
|
||||
choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", weavable_items)
|
||||
desired_result = weavable_items[choice]
|
||||
choice = tgui_input_list(src,"What would you like to weave?", "Weave Choice", GLOB.weavable_items)
|
||||
desired_result = GLOB.weavable_items[choice]
|
||||
if(!desired_result || !istype(desired_result))
|
||||
return
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ TGUI frontend path: tgui\packages\tgui\interfaces\TraitTutorial.tsx
|
||||
var/trait_desc = list() // name:desc
|
||||
var/trait_tutorial = list() //name:tutorial
|
||||
for(var/trait in list_of_traits)
|
||||
var/datum/trait/T = all_traits[trait]
|
||||
var/datum/trait/T = GLOB.all_traits[trait]
|
||||
trait_names += T.name
|
||||
trait_desc[T.name] = T.desc
|
||||
trait_tutorial[T.name] = T.tutorial
|
||||
|
||||
@@ -46,7 +46,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
/datum/unarmed_attack/proc/apply_effects(var/mob/living/carbon/human/user,var/mob/living/carbon/human/target,var/armour,var/attack_damage,var/zone)
|
||||
|
||||
var/stun_chance = rand(0, 100)
|
||||
var/datum/gender/TT = gender_datums[target.get_visible_gender()]
|
||||
var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()]
|
||||
|
||||
if(attack_damage >= 5 && armour < 2 && !(target == user) && stun_chance <= attack_damage * 5) // 25% standard chance
|
||||
switch(zone) // strong punches can have effects depending on where they hit
|
||||
@@ -97,8 +97,8 @@ var/global/list/sparring_attack_cache = list()
|
||||
|
||||
/datum/unarmed_attack/proc/handle_eye_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target)
|
||||
var/obj/item/organ/internal/eyes/eyes = target.internal_organs_by_name[O_EYES]
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TT = gender_datums[target.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()]
|
||||
if(eyes)
|
||||
eyes.take_damage(rand(3,4), 1)
|
||||
user.visible_message(span_danger("[user] presses [TU.his] [eye_attack_text] into [target]'s [eyes.name]!"))
|
||||
@@ -145,8 +145,8 @@ var/global/list/sparring_attack_cache = list()
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/organ = affecting.name
|
||||
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TT = gender_datums[target.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()]
|
||||
|
||||
attack_damage = CLAMP(attack_damage, 1, 5) // We expect damage input of 1 to 5 for this proc. But we leave this check juuust in case.
|
||||
|
||||
@@ -220,7 +220,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
|
||||
/datum/unarmed_attack/kick/show_attack(var/mob/living/carbon/human/user, var/mob/living/carbon/human/target, var/zone, var/attack_damage)
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/datum/gender/TT = gender_datums[target.get_visible_gender()]
|
||||
var/datum/gender/TT = GLOB.gender_datums[target.get_visible_gender()]
|
||||
var/organ = affecting.name
|
||||
|
||||
attack_damage = CLAMP(attack_damage, 1, 5)
|
||||
@@ -268,7 +268,7 @@ var/global/list/sparring_attack_cache = list()
|
||||
var/obj/item/organ/external/affecting = target.get_organ(zone)
|
||||
var/organ = affecting.name
|
||||
var/obj/item/clothing/shoes = user.shoes
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
|
||||
attack_damage = CLAMP(attack_damage, 1, 5)
|
||||
|
||||
|
||||
@@ -143,7 +143,7 @@
|
||||
var/list/possible_voice_types = get_talk_sound()
|
||||
var/choice = tgui_input_list(src, "Which set of sounds would you like to use for your character's speech sounds?", "Voice Sounds", possible_voice_types)
|
||||
if(!choice)
|
||||
voice_sounds_list = talk_sound
|
||||
voice_sounds_list = GLOB.talk_sound
|
||||
voice_sounds_list = get_talk_sound(choice)
|
||||
|
||||
/mob/living/proc/save_private_notes(mob/user)
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
var/prefsound = client.prefs.voice_sound
|
||||
voice_sounds_list = get_talk_sound(prefsound)
|
||||
else
|
||||
voice_sounds_list = talk_sound
|
||||
voice_sounds_list = GLOB.talk_sound
|
||||
resize(size_multiplier, animate = FALSE, uncapped = has_large_resize_bounds(), ignore_prefs = TRUE, aura_animation = FALSE)
|
||||
|
||||
return .
|
||||
|
||||
@@ -174,7 +174,7 @@ var/list/ai_verbs_default = list(
|
||||
|
||||
if(!safety)//Only used by AIize() to successfully spawn an AI.
|
||||
if (!B)//If there is no player/brain inside.
|
||||
empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
|
||||
GLOB.empty_playable_ai_cores += new/obj/structure/AIcore/deactivated(loc)//New empty terminal.
|
||||
return INITIALIZE_HINT_QDEL //Delete AI.
|
||||
|
||||
if (B.brainmob.mind)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/list/empty_playable_ai_cores = list()
|
||||
GLOBAL_LIST_EMPTY(empty_playable_ai_cores)
|
||||
|
||||
/hook/roundstart/proc/spawn_empty_ai()
|
||||
for(var/obj/effect/landmark/start/S in landmarks_list)
|
||||
@@ -6,7 +6,7 @@ var/global/list/empty_playable_ai_cores = list()
|
||||
continue
|
||||
if(locate(/mob/living) in S.loc)
|
||||
continue
|
||||
empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S))
|
||||
GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(get_turf(S))
|
||||
|
||||
return 1
|
||||
|
||||
@@ -24,7 +24,7 @@ var/global/list/empty_playable_ai_cores = list()
|
||||
return
|
||||
|
||||
// We warned you.
|
||||
empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc)
|
||||
GLOB.empty_playable_ai_cores += new /obj/structure/AIcore/deactivated(loc)
|
||||
global_announcer.autosay("[src] has been moved to intelligence storage.", "Artificial Intelligence Oversight")
|
||||
|
||||
//Handle job slot/tater cleanup.
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
count++
|
||||
|
||||
// Check the carrier
|
||||
var/datum/gender/TM = gender_datums[M.get_visible_gender()]
|
||||
var/datum/gender/TM = GLOB.gender_datums[M.get_visible_gender()]
|
||||
var/answer = tgui_alert(M, "[P] is requesting a DNA sample from you. Will you allow it to confirm your identity?", "[P] Check DNA", list("Yes", "No"))
|
||||
if(answer == "Yes")
|
||||
var/turf/T = get_turf(P.loc)
|
||||
@@ -113,7 +113,7 @@
|
||||
var/list/data = ..()
|
||||
if(data_core)
|
||||
data_core.get_manifest_list()
|
||||
data["manifest"] = PDA_Manifest
|
||||
data["manifest"] = GLOB.PDA_Manifest
|
||||
return data
|
||||
|
||||
/datum/pai_software/messenger
|
||||
|
||||
@@ -230,7 +230,7 @@ var/list/mob_hat_cache = list()
|
||||
return
|
||||
|
||||
else if (istype(W, /obj/item/card/id)||istype(W, /obj/item/pda))
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
if(stat == 2)
|
||||
|
||||
if(!CONFIG_GET(flag/allow_drone_spawn) || emagged || health < -35) //It's dead, Dave.
|
||||
@@ -288,7 +288,7 @@ var/list/mob_hat_cache = list()
|
||||
clear_supplied_laws()
|
||||
clear_inherent_laws()
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.")
|
||||
|
||||
to_chat(src, span_infoplain(span_bold("Obey these laws:")))
|
||||
|
||||
@@ -1270,7 +1270,7 @@
|
||||
to_chat(user, span_filter_notice("You assigned yourself as [src]'s operator."))
|
||||
message_admins("[key_name_admin(user)] assigned as operator on cyborg [key_name_admin(src)]. Syndicate Operator change.")
|
||||
log_game("[key_name(user)] assigned as operator on cyborg [key_name(src)]. Syndicate Operator change.")
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.")
|
||||
to_chat(src, span_infoplain(span_bold("Obey these laws:")))
|
||||
laws.show_laws(src)
|
||||
@@ -1303,7 +1303,7 @@
|
||||
laws = new /datum/ai_laws/syndicate_override
|
||||
var/time = time2text(world.realtime,"hh:mm:ss")
|
||||
lawchanges.Add("[time] <B>:</B> [user.name]([user.key]) emagged [name]([key])")
|
||||
var/datum/gender/TU = gender_datums[user.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[user.get_visible_gender()]
|
||||
set_zeroth_law("Only [user.real_name] and people [TU.he] designate[TU.s] as being such are operatives.")
|
||||
. = 1
|
||||
spawn()
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
modules.Add(shell_module_types)
|
||||
else
|
||||
modules.Add(robot_module_types)
|
||||
if(R.crisis || security_level >= SEC_LEVEL_RED || R.crisis_override)
|
||||
if(R.crisis || GLOB.security_level >= SEC_LEVEL_RED || R.crisis_override)
|
||||
to_chat(R, span_red("Crisis mode active. Combat module available."))
|
||||
modules |= emergency_module_types
|
||||
for(var/module_name in whitelisted_module_types)
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
adjustBruteLoss(-MED.heal_brute)
|
||||
visible_message(span_infoplain(span_bold("\The [user]") + " applies the [MED] on [src]."))
|
||||
else
|
||||
var/datum/gender/T = gender_datums[src.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[src.get_visible_gender()]
|
||||
to_chat(user, span_notice("\The [src] is dead, medical items won't bring [T.him] back to life.")) // the gender lookup is somewhat overkill, but it functions identically to the obsolete gender macros and future-proofs this code
|
||||
if(can_butcher(user, O)) //if the animal can be butchered, do so and return. It's likely to be gibbed.
|
||||
harvest(user, O)
|
||||
|
||||
@@ -555,7 +555,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
|
||||
if(!client && lets_eat(user) && prob(1))
|
||||
visible_message(span_danger("\The [src] scromfs \the [user] along with the food!"))
|
||||
to_chat(user, span_notice("\The [src] leans in close, spreading its jaws in front of you. A hot, humid gust of breath blows over you as the weight of \the [src]'s presses you over, knocking you off of your feet as the warm gooey tough of jaws scromf over your figure, rapidly guzzling you away with the [O], leaving you to tumble down into the depths of its body..."))
|
||||
playsound(src, pick(bodyfall_sound), 75, 1)
|
||||
playsound(src, pick(GLOB.bodyfall_sound), 75, 1)
|
||||
teppi_pounce(user)
|
||||
if(yum && nutrition >= 500)
|
||||
to_chat(user, span_notice("\The [src] seems satisfied."))
|
||||
@@ -641,7 +641,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
|
||||
else if(lets_eat(M) && prob(50))
|
||||
to_chat(M, span_notice("\The [src] grumbles a bit... and then bowls you over, pressing their weight into yours to knock you off of your feet! In a rush of chaotic presses and schlorps, the gooey touch of Teppi flesh grinds over you as you're guzzled away! Casually swallowed down in retaliation for all of the pettings. Pumped down deep into the grumbling depths of \the [src]."))
|
||||
visible_message(span_danger("\The [src] scromfs \the [M], before chuffing and settling down again."))
|
||||
playsound(src, pick(bodyfall_sound), 75, 1)
|
||||
playsound(src, pick(GLOB.bodyfall_sound), 75, 1)
|
||||
teppi_pounce(M)
|
||||
wantpet = 100
|
||||
else
|
||||
@@ -731,7 +731,7 @@ GLOBAL_VAR_INIT(teppi_count, 0) // How mant teppi DO we have?
|
||||
return
|
||||
if(resting)
|
||||
return
|
||||
playsound(src, pick(teppi_sound), 75, 1)
|
||||
playsound(src, pick(GLOB.teppi_sound), 75, 1)
|
||||
|
||||
/mob/living/simple_mob/vore/alienanimals/teppi/proc/teppi_shear(var/mob/user as mob, tool)
|
||||
var/sheartime = 3 SECONDS
|
||||
|
||||
@@ -212,7 +212,7 @@ Field studies suggest analytical abilities on par with some species of cepholapo
|
||||
|
||||
var/list/original_armor
|
||||
|
||||
var/global/list/wounds_being_tended_by_drakes = list()
|
||||
GLOBAL_LIST_EMPTY(wounds_being_tended_by_drakes)
|
||||
/mob/living/simple_mob/animal/sif/grafadreka/proc/can_tend_wounds(var/mob/living/friend)
|
||||
|
||||
// We can't heal robots.
|
||||
@@ -220,7 +220,7 @@ var/global/list/wounds_being_tended_by_drakes = list()
|
||||
return FALSE
|
||||
|
||||
// Check if someone else is looking after them already.
|
||||
if(global.wounds_being_tended_by_drakes["\ref[friend]"] > world.time)
|
||||
if(GLOB.wounds_being_tended_by_drakes["\ref[friend]"] > world.time)
|
||||
return FALSE
|
||||
|
||||
// Humans need to have a bleeding external organ to qualify.
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
/mob/living/simple_mob/vore/squirrel/Initialize(mapload)
|
||||
. = ..()
|
||||
if(do_seasons)
|
||||
switch(world_time_season)
|
||||
switch(GLOB.world_time_season)
|
||||
if("spring")
|
||||
if(prob(1))
|
||||
winterize()
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
else
|
||||
switch(M.a_intent)
|
||||
if(I_HELP)
|
||||
var/datum/gender/T = gender_datums[src.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[src.get_visible_gender()]
|
||||
M.visible_message(
|
||||
span_notice("\The [M] hugs [src] to make [T.him] feel better!"), \
|
||||
span_notice("You hug [src] to make [T.him] feel better!")
|
||||
|
||||
@@ -68,7 +68,7 @@ List of things solar grubs should be able to do:
|
||||
|
||||
/mob/living/simple_mob/vore/solargrub/Initialize(mapload)
|
||||
. = ..()
|
||||
existing_solargrubs += src
|
||||
GLOB.existing_solargrubs += src
|
||||
|
||||
/mob/living/simple_mob/vore/solargrub/Life()
|
||||
. = ..()
|
||||
@@ -160,7 +160,7 @@ List of things solar grubs should be able to do:
|
||||
..()
|
||||
|
||||
/mob/living/simple_mob/vore/solargrub/Destroy()
|
||||
existing_solargrubs -= src
|
||||
GLOB.existing_solargrubs -= src
|
||||
. = ..()
|
||||
|
||||
/mob/living/simple_mob/vore/solargrub/handle_light()
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/global/list/grub_machine_overlays = list()
|
||||
GLOBAL_LIST_EMPTY(grub_machine_overlays)
|
||||
|
||||
/mob/living/simple_mob/animal/solargrub_larva
|
||||
name = "solargrub larva"
|
||||
@@ -55,7 +55,7 @@ var/global/list/grub_machine_overlays = list()
|
||||
|
||||
/mob/living/simple_mob/animal/solargrub_larva/Initialize(mapload)
|
||||
. = ..()
|
||||
existing_solargrubs += src
|
||||
GLOB.existing_solargrubs += src
|
||||
powermachine = new(src)
|
||||
sparks = new(src)
|
||||
sparks.set_up()
|
||||
@@ -68,7 +68,7 @@ var/global/list/grub_machine_overlays = list()
|
||||
return ..()
|
||||
|
||||
/mob/living/simple_mob/animal/solargrub_larva/Destroy()
|
||||
existing_solargrubs -= src
|
||||
GLOB.existing_solargrubs -= src
|
||||
QDEL_NULL(powermachine)
|
||||
QDEL_NULL(sparks)
|
||||
QDEL_NULL(machine_effect)
|
||||
@@ -123,9 +123,9 @@ var/global/list/grub_machine_overlays = list()
|
||||
forceMove(M)
|
||||
powermachine.draining = 2
|
||||
visible_message(span_warning("\The [src] finds an opening and crawls inside \the [M]."))
|
||||
if(!(M.type in grub_machine_overlays))
|
||||
if(!(M.type in GLOB.grub_machine_overlays))
|
||||
generate_machine_effect(M)
|
||||
machine_effect = image(grub_machine_overlays[M.type], M) //Can't do this the reasonable way with an overlay,
|
||||
machine_effect = image(GLOB.grub_machine_overlays[M.type], M) //Can't do this the reasonable way with an overlay,
|
||||
for(var/mob/L in player_list) //because nearly every machine updates its icon by removing all overlays first
|
||||
L << machine_effect
|
||||
|
||||
@@ -133,7 +133,7 @@ var/global/list/grub_machine_overlays = list()
|
||||
var/icon/I = new /icon(M.icon, M.icon_state)
|
||||
I.Blend(new /icon('icons/effects/blood.dmi', rgb(255,255,255)),ICON_ADD)
|
||||
I.Blend(new /icon('icons/effects/alert.dmi', "_red"),ICON_MULTIPLY)
|
||||
grub_machine_overlays[M.type] = I
|
||||
GLOB.grub_machine_overlays[M.type] = I
|
||||
|
||||
/mob/living/simple_mob/animal/solargrub_larva/proc/eject_from_machine(var/obj/machinery/M)
|
||||
if(!M)
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
"Quit This Round",list("Quit Round","No"))
|
||||
if(extra_check == "Quit Round")
|
||||
//Update any existing objectives involving this mob.
|
||||
for(var/datum/objective/O in all_objectives)
|
||||
for(var/datum/objective/O in GLOB.all_objectives)
|
||||
if(O.target == mind)
|
||||
if(O.owner && O.owner.current)
|
||||
to_chat(O.owner.current,span_warning("You get the feeling your target is no longer within your reach..."))
|
||||
@@ -409,8 +409,8 @@
|
||||
mind.special_role = null
|
||||
|
||||
//Cut the PDA manifest (ugh)
|
||||
if(PDA_Manifest.len)
|
||||
PDA_Manifest.Cut()
|
||||
if(GLOB.PDA_Manifest.len)
|
||||
GLOB.PDA_Manifest.Cut()
|
||||
for(var/datum/data/record/R in data_core.medical)
|
||||
if((R.fields["name"] == real_name))
|
||||
qdel(R)
|
||||
@@ -479,7 +479,7 @@
|
||||
var/list/targets = list()
|
||||
|
||||
|
||||
targets += observe_list_format(nuke_disks)
|
||||
targets += observe_list_format(GLOB.nuke_disks)
|
||||
targets += observe_list_format(all_singularities)
|
||||
targets += getmobs()
|
||||
targets += observe_list_format(sortAtom(mechas_list))
|
||||
|
||||
@@ -244,7 +244,7 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
var/datum/gender/TU = gender_datums[assailant.get_visible_gender()]
|
||||
var/datum/gender/TU = GLOB.gender_datums[assailant.get_visible_gender()]
|
||||
|
||||
last_action = world.time
|
||||
|
||||
@@ -349,7 +349,7 @@
|
||||
|
||||
/obj/item/grab/proc/reset_kill_state()
|
||||
if(state == GRAB_KILL)
|
||||
var/datum/gender/T = gender_datums[assailant.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[assailant.get_visible_gender()]
|
||||
assailant.visible_message(span_warning("[assailant] lost [T.his] tight grip on [affecting]'s neck!"))
|
||||
hud.icon_state = "kill"
|
||||
state = GRAB_NECK
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
return
|
||||
if(target.lying)
|
||||
return
|
||||
var/datum/gender/T = gender_datums[attacker.get_visible_gender()]
|
||||
var/datum/gender/T = GLOB.gender_datums[attacker.get_visible_gender()]
|
||||
attacker.visible_message(span_danger("[attacker] thrusts [T.his] head into [target]'s skull!"))
|
||||
|
||||
var/damage = 20
|
||||
|
||||
@@ -483,8 +483,8 @@
|
||||
if(J.mob_type & JOB_SILICON_AI)
|
||||
|
||||
// IsJobAvailable for AI checks that there is an empty core available in this list
|
||||
var/obj/structure/AIcore/deactivated/C = empty_playable_ai_cores[1]
|
||||
empty_playable_ai_cores -= C
|
||||
var/obj/structure/AIcore/deactivated/C = GLOB.empty_playable_ai_cores[1]
|
||||
GLOB.empty_playable_ai_cores -= C
|
||||
|
||||
character.loc = C.loc
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
pass = FALSE
|
||||
|
||||
//Are they on the VERBOTEN LIST?
|
||||
if (prevent_respawns.Find(client?.prefs?.real_name))
|
||||
if (GLOB.prevent_respawns.Find(client?.prefs?.real_name))
|
||||
to_chat(src,span_warning("You've already quit the round as this character. You can't go back now that you've free'd your job slot. Play another character, or wait for the next round."))
|
||||
pass = FALSE
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
var/pref_synth = client.prefs.dirty_synth
|
||||
var/pref_meat = client.prefs.gross_meatbag
|
||||
for(var/datum/trait/T as anything in megalist)
|
||||
var/cost = traits_costs[T]
|
||||
var/cost = GLOB.traits_costs[T]
|
||||
|
||||
if(T.category == TRAIT_TYPE_POSITIVE)
|
||||
traits_left--
|
||||
@@ -57,7 +57,7 @@
|
||||
to_chat(src,span_warning("Your species is not playable. One or more traits appear to have been removed from the game or renamed. Enter character setup to correct this."))
|
||||
break
|
||||
else
|
||||
points_left -= traits_costs[T]
|
||||
points_left -= GLOB.traits_costs[T]
|
||||
|
||||
var/take_flags = initial(T.can_take)
|
||||
if((pref_synth && !(take_flags & SYNTHETICS)) || (pref_meat && !(take_flags & ORGANICS)))
|
||||
|
||||
@@ -473,7 +473,7 @@
|
||||
ourfreq = voice_freq
|
||||
|
||||
if(client)
|
||||
playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds)
|
||||
playsound(T, pick(GLOB.emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds)
|
||||
|
||||
var/list/in_range = get_mobs_and_objs_in_view_fast(T,world.view,2,remote_ghosts = client ? TRUE : FALSE)
|
||||
var/list/m_viewers = in_range["mobs"]
|
||||
@@ -491,6 +491,6 @@
|
||||
set name = "Select Speech Bubble"
|
||||
set category = "OOC.Chat Settings"
|
||||
|
||||
var/new_speech_bubble = tgui_input_list(src, "Pick new voice (default for automatic selection)", "Character Preference", selectable_speech_bubbles)
|
||||
var/new_speech_bubble = tgui_input_list(src, "Pick new voice (default for automatic selection)", "Character Preference", GLOB.selectable_speech_bubbles)
|
||||
if(new_speech_bubble)
|
||||
custom_speech_bubble = new_speech_bubble
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
//For use with various spawners! Put your selections inside of a list!
|
||||
/var/global/list/theme_animal = list()
|
||||
/var/global/list/theme_monster = list()
|
||||
/var/global/list/theme_alien = list()
|
||||
/var/global/list/theme_cold = list()
|
||||
/var/global/list/theme_hot = list()
|
||||
/var/global/list/theme_aquatic = list()
|
||||
/var/global/list/theme_dark = list()
|
||||
/var/global/list/theme_forest = list()
|
||||
/var/global/list/theme_humanoid = list()
|
||||
GLOBAL_LIST_EMPTY(theme_animal)
|
||||
GLOBAL_LIST_EMPTY(theme_monster)
|
||||
GLOBAL_LIST_EMPTY(theme_alien)
|
||||
GLOBAL_LIST_EMPTY(theme_cold)
|
||||
GLOBAL_LIST_EMPTY(theme_hot)
|
||||
GLOBAL_LIST_EMPTY(theme_aquatic)
|
||||
GLOBAL_LIST_EMPTY(theme_dark)
|
||||
GLOBAL_LIST_EMPTY(theme_forest)
|
||||
GLOBAL_LIST_EMPTY(theme_humanoid)
|
||||
|
||||
Reference in New Issue
Block a user