mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
Ports the TG globals controller and converts globals. (#18057)
* SDQL2 update * fix that verb * cl * fix that * toworld * this is pointless * update info * siiiiick.. * vv edit update * fix that * fix editing vars * fix VV * Port the /TG/ globals controller. * part 1 * part 2 * oops * part 3 * Hollow Purple * sadas * bsbsdb * muda na agaki ta * ids 1-15 * 16-31 * 41-75 * bring me back to how things used to be before i lost it all * the strength of mayhem * final touches * cl * protect some vars * update sdql2 to use glob * stuff? * forgot that is not defined there * whoops * observ * but it never gets better * a --------- Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
/mob/living/carbon/human/proc/blood_squirt(var/amt, var/turf/sprayloc)
|
||||
if(amt <= 0 || !istype(sprayloc))
|
||||
return
|
||||
var/spraydir = pick(alldirs)
|
||||
var/spraydir = pick(GLOB.alldirs)
|
||||
amt = Ceiling(amt/BLOOD_SPRAY_DISTANCE)
|
||||
var/bled = 0
|
||||
spawn(0)
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
/obj/item/organ/internal/is_usable()
|
||||
if(robotize_type)
|
||||
var/datum/robolimb/R = all_robolimbs[robotize_type]
|
||||
var/datum/robolimb/R = GLOB.all_robolimbs[robotize_type]
|
||||
if(!R.malfunctioning_check(owner))
|
||||
return TRUE
|
||||
else
|
||||
@@ -83,7 +83,7 @@
|
||||
|
||||
if(company)
|
||||
model = company
|
||||
var/datum/robolimb/R = all_robolimbs[company]
|
||||
var/datum/robolimb/R = GLOB.all_robolimbs[company]
|
||||
|
||||
if(R)
|
||||
if(robotic_sprite)
|
||||
|
||||
@@ -91,10 +91,10 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
max_damage = min_broken_damage * 2
|
||||
if(istype(holder))
|
||||
src.owner = holder
|
||||
species = all_species[SPECIES_HUMAN]
|
||||
species = GLOB.all_species[SPECIES_HUMAN]
|
||||
if(holder.dna)
|
||||
dna = holder.dna.Clone()
|
||||
species = all_species[dna.species]
|
||||
species = GLOB.all_species[dna.species]
|
||||
else
|
||||
LOG_DEBUG("[src] at [loc] spawned without a proper DNA.")
|
||||
var/mob/living/carbon/human/H = holder
|
||||
@@ -173,7 +173,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
reagents.remove_reagent(/singleton/reagent/blood,0.1)
|
||||
if (isturf(loc))
|
||||
blood_splatter(src,src,TRUE)
|
||||
if(config.organs_decay) damage += rand(1,3)
|
||||
if(GLOB.config.organs_decay) damage += rand(1,3)
|
||||
if(damage >= max_damage)
|
||||
damage = max_damage
|
||||
germ_level += rand(2,6)
|
||||
|
||||
@@ -435,7 +435,7 @@
|
||||
|
||||
//If there are still hurties to dispense
|
||||
if (spillover)
|
||||
owner.shock_stage += spillover * config.organ_damage_spillover_multiplier
|
||||
owner.shock_stage += spillover * GLOB.config.organ_damage_spillover_multiplier
|
||||
|
||||
// sync the organ's damage with its wounds
|
||||
update_damages()
|
||||
@@ -497,9 +497,9 @@
|
||||
/obj/item/organ/external/proc/handle_limb_gibbing(var/used_weapon, var/brute, var/burn)
|
||||
//If limb took enough damage, try to cut or tear it off
|
||||
if(owner && loc == owner && !is_stump())
|
||||
if((limb_flags & ORGAN_CAN_AMPUTATE) && config.limbs_can_break)
|
||||
if((limb_flags & ORGAN_CAN_AMPUTATE) && GLOB.config.limbs_can_break)
|
||||
|
||||
if((brute_dam + burn_dam) >= (max_damage * config.organ_health_multiplier))
|
||||
if((brute_dam + burn_dam) >= (max_damage * GLOB.config.organ_health_multiplier))
|
||||
|
||||
var/edge_eligible = FALSE
|
||||
var/blunt_eligible = FALSE
|
||||
@@ -608,7 +608,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
fluid_loss_severity = FLUIDLOSS_WIDE_BURN
|
||||
if(LASER)
|
||||
fluid_loss_severity = FLUIDLOSS_CONC_BURN
|
||||
var/fluid_loss = (damage/(owner.maxHealth - config.health_threshold_dead)) * DEFAULT_BLOOD_AMOUNT * fluid_loss_severity
|
||||
var/fluid_loss = (damage/(owner.maxHealth - GLOB.config.health_threshold_dead)) * DEFAULT_BLOOD_AMOUNT * fluid_loss_severity
|
||||
owner.remove_blood_simple(fluid_loss)
|
||||
|
||||
// first check whether we can widen an existing wound
|
||||
@@ -897,7 +897,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
//we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime
|
||||
heal_amt = heal_amt * wound_update_accuracy
|
||||
//configurable regen speed woo, no-regen hardcore or instaheal hugbox, choose your destiny
|
||||
heal_amt = heal_amt * config.organ_regeneration_multiplier
|
||||
heal_amt = heal_amt * GLOB.config.organ_regeneration_multiplier
|
||||
// amount of healing is spread over all the wounds
|
||||
heal_amt = heal_amt / (wounds.len + 1)
|
||||
// making it look prettier on scanners
|
||||
@@ -1070,7 +1070,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(!clean)
|
||||
//Throw limb around.
|
||||
if(src && isturf(loc))
|
||||
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src,pick(alldirs)), rand(1,3), 4)
|
||||
INVOKE_ASYNC(src, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src,pick(GLOB.alldirs)), rand(1,3), 4)
|
||||
dir = 2
|
||||
if(DROPLIMB_BURN)
|
||||
new /obj/effect/decal/cleanable/ash(get_turf(victim))
|
||||
@@ -1085,12 +1085,12 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(victim.species.blood_color)
|
||||
gore.basecolor = victim.species.blood_color
|
||||
gore.update_icon()
|
||||
INVOKE_ASYNC(gore, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src, pick(alldirs)), rand(1,3), 4)
|
||||
INVOKE_ASYNC(gore, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src, pick(GLOB.alldirs)), rand(1,3), 4)
|
||||
|
||||
for(var/obj/item/organ/I in internal_organs)
|
||||
I.removed()
|
||||
if(istype(loc,/turf))
|
||||
INVOKE_ASYNC(I, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src, pick(alldirs)), rand(1,3), 4)
|
||||
INVOKE_ASYNC(I, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src, pick(GLOB.alldirs)), rand(1,3), 4)
|
||||
|
||||
var/turf/Tloc = get_turf(src)
|
||||
for(var/obj/item/I in src)
|
||||
@@ -1098,7 +1098,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
qdel(I)
|
||||
continue
|
||||
I.forceMove(Tloc)
|
||||
INVOKE_ASYNC(I, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src, pick(alldirs)), rand(1,3), 4)
|
||||
INVOKE_ASYNC(I, TYPE_PROC_REF(/atom/movable, throw_at), get_edge_target_turf(src, pick(GLOB.alldirs)), rand(1,3), 4)
|
||||
|
||||
qdel(src)
|
||||
|
||||
@@ -1209,7 +1209,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
/obj/item/organ/external/proc/mend_fracture()
|
||||
if(status & ORGAN_ROBOT)
|
||||
return 0 //ORGAN_BROKEN doesn't have the same meaning for robot limbs
|
||||
if(brute_dam > min_broken_damage * config.organ_health_multiplier)
|
||||
if(brute_dam > min_broken_damage * GLOB.config.organ_health_multiplier)
|
||||
return 0 //will just immediately fracture again
|
||||
|
||||
status &= ~ORGAN_BROKEN
|
||||
@@ -1221,7 +1221,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
if(company)
|
||||
model = company
|
||||
var/datum/robolimb/R = all_robolimbs[company]
|
||||
var/datum/robolimb/R = GLOB.all_robolimbs[company]
|
||||
|
||||
if(R)
|
||||
if(!force_skintone)
|
||||
@@ -1304,7 +1304,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(BP_IS_ROBOTIC(src) && (brute_ratio + burn_ratio) >= 0.3 && prob(brute_dam + burn_dam) || (surge_damage > (MAXIMUM_SURGE_DAMAGE * 0.25)))
|
||||
return TRUE
|
||||
if(robotize_type)
|
||||
var/datum/robolimb/R = all_robolimbs[robotize_type]
|
||||
var/datum/robolimb/R = GLOB.all_robolimbs[robotize_type]
|
||||
if(R.malfunctioning_check(owner))
|
||||
return TRUE
|
||||
else
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
hair_color = null
|
||||
var/limb_exception = FALSE
|
||||
if(robotize_type)
|
||||
var/datum/robolimb/R = all_robolimbs[robotize_type]
|
||||
var/datum/robolimb/R = GLOB.all_robolimbs[robotize_type]
|
||||
if(R.paintable)
|
||||
limb_exception = TRUE
|
||||
if((status & ORGAN_ROBOT) && !limb_exception)
|
||||
|
||||
@@ -1,20 +1,20 @@
|
||||
var/global/list/all_robolimbs = list()
|
||||
var/global/list/internal_robolimbs = list()
|
||||
var/global/list/chargen_robolimbs = list()
|
||||
var/global/list/fabricator_robolimbs = list()
|
||||
var/global/datum/robolimb/basic_robolimb
|
||||
GLOBAL_LIST_EMPTY(all_robolimbs)
|
||||
GLOBAL_LIST_EMPTY(internal_robolimbs)
|
||||
GLOBAL_LIST_EMPTY(chargen_robolimbs)
|
||||
GLOBAL_LIST_EMPTY(fabricator_robolimbs)
|
||||
GLOBAL_DATUM(basic_robolimb, /datum/robolimb)
|
||||
|
||||
/proc/populate_robolimb_list()
|
||||
basic_robolimb = new()
|
||||
GLOB.basic_robolimb = new()
|
||||
for(var/limb_type in typesof(/datum/robolimb))
|
||||
var/datum/robolimb/R = new limb_type()
|
||||
all_robolimbs[R.company] = R
|
||||
GLOB.all_robolimbs[R.company] = R
|
||||
if(!R.unavailable_at_chargen)
|
||||
chargen_robolimbs[R.company] = R
|
||||
GLOB.chargen_robolimbs[R.company] = R
|
||||
if(R.fabricator_available)
|
||||
fabricator_robolimbs[R.company] = R
|
||||
GLOB.fabricator_robolimbs[R.company] = R
|
||||
if(R.allows_internal)
|
||||
internal_robolimbs[R.company] = R
|
||||
GLOB.internal_robolimbs[R.company] = R
|
||||
|
||||
/datum/robolimb
|
||||
var/company = "Unbranded" // Shown when selecting the limb.
|
||||
|
||||
@@ -83,7 +83,7 @@
|
||||
if(!.)
|
||||
return FALSE
|
||||
|
||||
to_chat(owner, SPAN_NOTICE("Hello [user], it is currently: '[worldtime2text()]'. Today's date is '[time2text(world.time, "Month DD")]. [game_year]'. Have a lovely day."))
|
||||
to_chat(owner, SPAN_NOTICE("Hello [user], it is currently: '[worldtime2text()]'. Today's date is '[time2text(world.time, "Month DD")]. [GLOB.game_year]'. Have a lovely day."))
|
||||
if (evacuation_controller.get_status_panel_eta())
|
||||
to_chat(owner, SPAN_WARNING("Notice: You have one (1) scheduled flight, ETA: [evacuation_controller.get_status_panel_eta()]."))
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
switch(selected_hud)
|
||||
|
||||
if(SEC_HUDTYPE)
|
||||
req_access = list(access_security)
|
||||
req_access = list(ACCESS_SECURITY)
|
||||
if(allowed(owner))
|
||||
active_hud = "security"
|
||||
process_sec_hud(owner, 1)
|
||||
@@ -370,7 +370,7 @@
|
||||
switch(selected_hud)
|
||||
|
||||
if(MED_HUDTYPE)
|
||||
req_access = list(access_medical)
|
||||
req_access = list(ACCESS_MEDICAL)
|
||||
if(allowed(owner))
|
||||
active_hud = "medical"
|
||||
process_med_hud(owner, 1)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
E.nymph = new /mob/living/carbon/alien/diona
|
||||
|
||||
E.status |= (ORGAN_PLANT | ORGAN_NYMPH)
|
||||
E.species = all_species["Nymph Limb"]
|
||||
E.species = GLOB.all_species["Nymph Limb"]
|
||||
E.fingerprints = null
|
||||
if(!E.dna)
|
||||
E.blood_DNA = list()
|
||||
@@ -237,11 +237,11 @@
|
||||
H.client && H.stat == CONSCIOUS)
|
||||
mob_list += H
|
||||
|
||||
if(!LAZYLEN(mob_list))
|
||||
if(!LAZYLEN(GLOB.mob_list))
|
||||
to_chat(src, span("warning", "There are no valid hosts to bond to."))
|
||||
return FALSE
|
||||
|
||||
var/choice = input(src, "Choose a host to bond to:", "Attach to Host") in mob_list
|
||||
var/choice = input(src, "Choose a host to bond to:", "Attach to Host") in GLOB.mob_list
|
||||
var/mob/living/carbon/human/target = choice
|
||||
if(!Adjacent(target) || target.stat || !target.client)
|
||||
return
|
||||
|
||||
@@ -185,7 +185,7 @@
|
||||
|
||||
if(stage >= 3)
|
||||
set_light(-1.5, 6, "#FFFFFF")
|
||||
if(!(all_languages[LANGUAGE_VAURCA] in owner.languages))
|
||||
if(!(GLOB.all_languages[LANGUAGE_VAURCA] in owner.languages))
|
||||
owner.add_language(LANGUAGE_VAURCA)
|
||||
to_chat(owner, "<span class='notice'> Your mind expands, and your thoughts join the unity of the Hivenet.</span>")
|
||||
|
||||
@@ -307,10 +307,10 @@
|
||||
SPAN_DANGER("You feel the cold of the knife cutting and cutting, but it is too late. There is nothing left of you but the Lii'dra's will, now. A final cut - and then you are granted the only escape that still remains to you."))
|
||||
to_chat(target, SPAN_GOOD("Your function is fulfilled. We have no further need of you. Releasing control."))
|
||||
target.death(FALSE) //too late, there is no brain left to save
|
||||
if(all_languages[LANGUAGE_VAURCA] in target.languages && stage >= 3 && !isvaurca(target))
|
||||
if(GLOB.all_languages[LANGUAGE_VAURCA] in target.languages && stage >= 3 && !isvaurca(target))
|
||||
target.remove_language(LANGUAGE_VAURCA)
|
||||
to_chat(target, "<span class='warning'>Your mind suddenly grows dark as the unity of the Hive is torn from you.</span>")
|
||||
if(all_languages[LANGUAGE_LIIDRA] in target.languages && stage >= 3)
|
||||
if(GLOB.all_languages[LANGUAGE_LIIDRA] in target.languages && stage >= 3)
|
||||
target.remove_language(LANGUAGE_LIIDRA)
|
||||
removed_langs = 0
|
||||
remove_verb(owner, /mob/living/carbon/human/proc/kois_cough)
|
||||
|
||||
@@ -105,11 +105,11 @@
|
||||
if(last_action > world.time)
|
||||
last_action--
|
||||
if (is_broken())
|
||||
if (all_languages[LANGUAGE_VAURCA] in owner.languages)
|
||||
if (GLOB.all_languages[LANGUAGE_VAURCA] in owner.languages)
|
||||
owner.remove_language(LANGUAGE_VAURCA)
|
||||
to_chat(owner, "<span class='warning'>Your mind suddenly grows dark as the unity of the Hive is torn from you.</span>")
|
||||
else
|
||||
if (!(all_languages[LANGUAGE_VAURCA] in owner.languages) && !banned)
|
||||
if (!(GLOB.all_languages[LANGUAGE_VAURCA] in owner.languages) && !banned)
|
||||
owner.add_language(LANGUAGE_VAURCA)
|
||||
to_chat(owner, "<span class='notice'> Your mind expands, and your thoughts join the unity of the Hivenet.</span>")
|
||||
if(disrupted)
|
||||
@@ -121,14 +121,14 @@
|
||||
|
||||
/obj/item/organ/internal/vaurca/neuralsocket/replaced(var/mob/living/carbon/human/target)
|
||||
owner = target
|
||||
if (!(all_languages[LANGUAGE_VAURCA] in owner.languages) && !banned)
|
||||
if (!(GLOB.all_languages[LANGUAGE_VAURCA] in owner.languages) && !banned)
|
||||
owner.add_language(LANGUAGE_VAURCA)
|
||||
to_chat(owner, "<span class='notice'> Your mind expands, and your thoughts join the unity of the Hivenet.</span>")
|
||||
add_verb(owner, granted_verbs)
|
||||
..()
|
||||
|
||||
/obj/item/organ/internal/vaurca/neuralsocket/removed(var/mob/living/carbon/human/target)
|
||||
if(all_languages[LANGUAGE_VAURCA] in target.languages)
|
||||
if(GLOB.all_languages[LANGUAGE_VAURCA] in target.languages)
|
||||
target.remove_language(LANGUAGE_VAURCA)
|
||||
to_chat(target, "<span class='warning'>Your mind suddenly grows dark as the unity of the Hive is torn from you.</span>")
|
||||
remove_verb(owner, all_hive_verbs)
|
||||
@@ -161,11 +161,11 @@
|
||||
if(!owner)
|
||||
return
|
||||
if (is_broken())
|
||||
if (all_languages[LANGUAGE_VAURCA] in owner.languages)
|
||||
if (GLOB.all_languages[LANGUAGE_VAURCA] in owner.languages)
|
||||
owner.remove_language(LANGUAGE_VAURCA)
|
||||
to_chat(owner, SPAN_WARNING("Your mind suddenly grows dark as the unity of the Hive is torn from you."))
|
||||
else
|
||||
if (!(all_languages[LANGUAGE_VAURCA] in owner.languages) && !banned)
|
||||
if (!(GLOB.all_languages[LANGUAGE_VAURCA] in owner.languages) && !banned)
|
||||
owner.add_language(LANGUAGE_VAURCA)
|
||||
to_chat(owner, SPAN_NOTICE("Your mind expands, and your thoughts join the unity of the Hivenet."))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user