mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 15:08:34 +01:00
More globals (#19247)
* More globals * planets * . * . * Update jukebox.dm * Fix timer callback syntax in jukebox.dm * .
This commit is contained in:
@@ -10,11 +10,11 @@
|
||||
// This list needs expansion... Currently, we have very few proper redspace areas.
|
||||
// Tossing /area/redgate in here as well. Entering one of these areas (unless coded to do such) doesn't apply
|
||||
// the modifier, but if you're in one of these areas, you'll keep the modifier until you leave.
|
||||
var/static/list/redspace_areas = list (
|
||||
GLOBAL_LIST_INIT(redspace_areas, list(
|
||||
/area/redspace_abduction,
|
||||
/area/redgate,
|
||||
/area/survivalpod/redspace // Redspace shelters effectively pull a bit of redspace into realspace, so
|
||||
)
|
||||
))
|
||||
|
||||
/datum/modifier/redspace_drain
|
||||
name = "redspace warp"
|
||||
@@ -29,7 +29,7 @@ var/static/list/redspace_areas = list (
|
||||
var/mob/living/carbon/human/unfortunate_soul //The human target of our modifier.
|
||||
|
||||
/datum/modifier/redspace_drain/can_apply(mob/living/L, suppress_output = TRUE)
|
||||
if(ishuman(L) && !L.isSynthetic() && L.lastarea && is_type_in_list(L.lastarea, redspace_areas))
|
||||
if(ishuman(L) && !L.isSynthetic() && L.lastarea && is_type_in_list(L.lastarea, GLOB.redspace_areas))
|
||||
return TRUE
|
||||
return FALSE
|
||||
|
||||
@@ -62,7 +62,7 @@ var/static/list/redspace_areas = list (
|
||||
/datum/modifier/redspace_drain/check_if_valid() //We don't call parent. This doesn't wear off without set conditions.
|
||||
if(holder.stat == DEAD)
|
||||
expire(silent = TRUE)
|
||||
else if(holder.lastarea && !is_type_in_list(holder.lastarea, redspace_areas))
|
||||
else if(holder.lastarea && !is_type_in_list(holder.lastarea, GLOB.redspace_areas))
|
||||
expire(silent = TRUE)
|
||||
|
||||
/datum/modifier/redspace_drain/tick()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
var/list/holder_mob_icon_cache = list()
|
||||
|
||||
//Helper object for picking dionaea (and other creatures) up.
|
||||
/obj/item/holder
|
||||
name = "holder"
|
||||
|
||||
@@ -1,22 +1,22 @@
|
||||
//The list of slots by priority. equip_to_appropriate_slot() uses this list. Doesn't matter if a mob type doesn't have a slot.
|
||||
var/list/slot_equipment_priority = list( \
|
||||
slot_back,\
|
||||
slot_wear_id,\
|
||||
slot_w_uniform,\
|
||||
slot_wear_suit,\
|
||||
slot_wear_mask,\
|
||||
slot_head,\
|
||||
slot_shoes,\
|
||||
slot_gloves,\
|
||||
slot_l_ear,\
|
||||
slot_r_ear,\
|
||||
slot_glasses,\
|
||||
slot_belt,\
|
||||
slot_s_store,\
|
||||
slot_tie,\
|
||||
slot_l_store,\
|
||||
slot_r_store\
|
||||
)
|
||||
GLOBAL_LIST_INIT(slot_equipment_priority, list(
|
||||
slot_back,
|
||||
slot_wear_id,
|
||||
slot_w_uniform,
|
||||
slot_wear_suit,
|
||||
slot_wear_mask,
|
||||
slot_head,
|
||||
slot_shoes,
|
||||
slot_gloves,
|
||||
slot_l_ear,
|
||||
slot_r_ear,
|
||||
slot_glasses,
|
||||
slot_belt,
|
||||
slot_s_store,
|
||||
slot_tie,
|
||||
slot_l_store,
|
||||
slot_r_store
|
||||
))
|
||||
|
||||
/mob
|
||||
var/obj/item/storage/s_active = null // Even ghosts can/should be able to peek into boxes on the ground
|
||||
@@ -87,7 +87,7 @@ var/list/slot_equipment_priority = list( \
|
||||
//puts the item "W" into an appropriate slot in a human's inventory
|
||||
//returns 0 if it cannot, 1 if successful
|
||||
/mob/proc/equip_to_appropriate_slot(obj/item/W)
|
||||
for(var/slot in slot_equipment_priority)
|
||||
for(var/slot in GLOB.slot_equipment_priority)
|
||||
if(equip_to_slot_if_possible(W, slot, del_on_fail=0, disable_warning=1, redraw_mob=1))
|
||||
return 1
|
||||
|
||||
|
||||
@@ -388,10 +388,10 @@
|
||||
def_zone = pick(BP_L_HAND, BP_R_HAND)
|
||||
|
||||
if(species.siemens_coefficient == -1)
|
||||
if(stored_shock_by_ref["\ref[src]"])
|
||||
stored_shock_by_ref["\ref[src]"] += shock_damage
|
||||
if(GLOB.stored_shock_by_ref["\ref[src]"])
|
||||
GLOB.stored_shock_by_ref["\ref[src]"] += shock_damage
|
||||
else
|
||||
stored_shock_by_ref["\ref[src]"] = shock_damage
|
||||
GLOB.stored_shock_by_ref["\ref[src]"] = shock_damage
|
||||
return
|
||||
|
||||
var/obj/item/organ/external/affected_organ = get_organ(check_zone(def_zone))
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
var/datum/unarmed_attack/default_attack
|
||||
|
||||
/mob/living/carbon/human/proc/get_unarmed_attack(var/mob/living/carbon/human/target, var/hit_zone)
|
||||
if(nif && nif.flag_check(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT)){return unarmed_hardclaws}
|
||||
if(nif && nif.flag_check(NIF_C_HARDCLAWS,NIF_FLAGS_COMBAT))
|
||||
return GLOB.unarmed_hardclaws
|
||||
if(src.default_attack && src.default_attack.is_usable(src, target, hit_zone))
|
||||
if(HAS_TRAIT(src, TRAIT_NONLETHAL_BLOWS))
|
||||
var/datum/unarmed_attack/soft_type = src.default_attack.get_sparring_variant()
|
||||
|
||||
@@ -103,10 +103,10 @@ emp_act
|
||||
|
||||
//If you don't specify a bodypart, it checks ALL your bodyparts for protection, and averages out the values
|
||||
for(var/organ_name in organs_by_name)
|
||||
if (organ_name in organ_rel_size)
|
||||
if (organ_name in GLOB.organ_rel_size)
|
||||
var/obj/item/organ/external/organ = organs_by_name[organ_name]
|
||||
if(organ)
|
||||
var/weight = organ_rel_size[organ_name]
|
||||
var/weight = GLOB.organ_rel_size[organ_name]
|
||||
armorval += (getarmor_organ(organ, type) * weight)
|
||||
total += weight
|
||||
return (armorval/max(total, 1))
|
||||
@@ -135,10 +135,10 @@ emp_act
|
||||
var/siemens_value = 0
|
||||
var/total = 0
|
||||
for(var/organ_name in organs_by_name)
|
||||
if(organ_name in organ_rel_size)
|
||||
if(organ_name in GLOB.organ_rel_size)
|
||||
var/obj/item/organ/external/organ = organs_by_name[organ_name]
|
||||
if(organ)
|
||||
var/weight = organ_rel_size[organ_name]
|
||||
var/weight = GLOB.organ_rel_size[organ_name]
|
||||
siemens_value += get_siemens_coefficient_organ(organ) * weight
|
||||
total += weight
|
||||
|
||||
|
||||
@@ -162,10 +162,10 @@
|
||||
hud_list[IMPTRACK_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_IMPTRACK)
|
||||
hud_list[SPECIALROLE_HUD] = gen_hud_image(GLOB.ingame_hud, src, "hudblank", plane = PLANE_CH_SPECIAL)
|
||||
hud_list[STATUS_HUD_OOC] = gen_hud_image(GLOB.ingame_hud, src, "hudhealthy", plane = PLANE_CH_STATUS_OOC)
|
||||
hud_list[HEALTH_VR_HUD] = gen_hud_image(ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR)
|
||||
hud_list[STATUS_R_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_STATUS_R)
|
||||
hud_list[BACKUP_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_BACKUP)
|
||||
hud_list[VANTAG_HUD] = gen_hud_image(ingame_hud_vr, src, "hudblank", plane = PLANE_CH_VANTAG)
|
||||
hud_list[HEALTH_VR_HUD] = gen_hud_image(GLOB.ingame_hud_med_vr, src, "100", plane = PLANE_CH_HEALTH_VR)
|
||||
hud_list[STATUS_R_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_STATUS_R)
|
||||
hud_list[BACKUP_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_BACKUP)
|
||||
hud_list[VANTAG_HUD] = gen_hud_image(GLOB.ingame_hud_vr, src, "hudblank", plane = PLANE_CH_VANTAG)
|
||||
add_overlay(hud_list)
|
||||
|
||||
/mob/living/carbon/human/recalculate_vis()
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
var/static/icon/ingame_hud_vr = icon('icons/mob/hud_vr.dmi')
|
||||
var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
|
||||
GLOBAL_DATUM_INIT(ingame_hud_vr, /icon, icon('icons/mob/hud_vr.dmi'))
|
||||
GLOBAL_DATUM_INIT(ingame_hud_med_vr, /icon, icon('icons/mob/hud_med_vr.dmi'))
|
||||
|
||||
/mob/living/carbon/human/proc/remove_marking(var/datum/sprite_accessory/marking/mark_datum)
|
||||
if (!mark_datum)
|
||||
@@ -263,7 +263,7 @@ var/static/icon/ingame_hud_med_vr = icon('icons/mob/hud_med_vr.dmi')
|
||||
species?.base_species = bodytype
|
||||
species?.vanity_base_fit = bodytype
|
||||
if (istype(species, /datum/species/shapeshifter))
|
||||
wrapped_species_by_ref["\ref[src]"] = bodytype
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = bodytype
|
||||
|
||||
custom_species = character.custom_species
|
||||
custom_say = character.custom_say
|
||||
|
||||
@@ -140,57 +140,57 @@
|
||||
|
||||
/datum/species/lleill/get_icobase(var/mob/living/carbon/human/H, var/get_deform)
|
||||
if(!H) return ..(null, get_deform)
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.type == src.type) return ..(H, get_deform)
|
||||
return S.get_icobase(H,get_deform)
|
||||
|
||||
/datum/species/lleill/get_race_key(var/mob/living/carbon/human/H)
|
||||
return "[..()]-[wrapped_species_by_ref["\ref[H]"]]"
|
||||
return "[..()]-[GLOB.wrapped_species_by_ref["\ref[H]"]]"
|
||||
|
||||
/datum/species/lleill/get_bodytype(var/mob/living/carbon/human/H)
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!H || !S) return ..()
|
||||
if(S.type == src.type) return ..(H)
|
||||
return S.get_bodytype(H)
|
||||
|
||||
/datum/species/lleill/get_blood_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_blood_mask(H)
|
||||
|
||||
/datum/species/lleill/get_damage_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_damage_mask(H)
|
||||
|
||||
/datum/species/lleill/get_damage_overlays(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_damage_overlays(H)
|
||||
|
||||
/datum/species/lleill/get_tail(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_tail(H)
|
||||
|
||||
/datum/species/lleill/get_tail_animation(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_tail_animation(H)
|
||||
|
||||
/datum/species/lleill/get_tail_hair(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
if(!S || S.name == src.name)
|
||||
return ..()
|
||||
return S?.get_tail_hair(H)
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
var/new_species = null
|
||||
new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src))
|
||||
|
||||
if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
if(!new_species || !GLOB.all_species[new_species] || GLOB.wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
return
|
||||
lleill_change_shape(new_species)
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
if(!new_species)
|
||||
return
|
||||
|
||||
wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
dna.base_species = new_species
|
||||
species.base_species = new_species
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!"))
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var/list/stored_shock_by_ref = list()
|
||||
GLOBAL_LIST_EMPTY(stored_shock_by_ref)
|
||||
|
||||
/mob/living/proc/apply_stored_shock_to(var/mob/living/target)
|
||||
if(stored_shock_by_ref["\ref[src]"])
|
||||
target.electrocute_act(stored_shock_by_ref["\ref[src]"]*0.9, src)
|
||||
stored_shock_by_ref["\ref[src]"] = 0
|
||||
if(GLOB.stored_shock_by_ref["\ref[src]"])
|
||||
target.electrocute_act(GLOB.stored_shock_by_ref["\ref[src]"]*0.9, src)
|
||||
GLOB.stored_shock_by_ref["\ref[src]"] = 0
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// This is something of an intermediary species used for species that
|
||||
// need to emulate the appearance of another race. Currently it is only
|
||||
// used for slimes but it may be useful for changelings later.
|
||||
var/list/wrapped_species_by_ref = list()
|
||||
GLOBAL_LIST_EMPTY(wrapped_species_by_ref)
|
||||
|
||||
/datum/species/shapeshifter
|
||||
|
||||
@@ -22,50 +22,50 @@ var/list/wrapped_species_by_ref = list()
|
||||
|
||||
/datum/species/shapeshifter/get_icobase(var/mob/living/carbon/human/H, var/get_deform)
|
||||
if(!H) return ..(null, get_deform)
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_icobase(H, get_deform)
|
||||
|
||||
/datum/species/shapeshifter/get_race_key(var/mob/living/carbon/human/H)
|
||||
return "[..()]-[wrapped_species_by_ref["\ref[H]"]]"
|
||||
return "[..()]-[GLOB.wrapped_species_by_ref["\ref[H]"]]"
|
||||
|
||||
/datum/species/shapeshifter/get_bodytype(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_bodytype(H)
|
||||
|
||||
/datum/species/shapeshifter/get_blood_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_blood_mask(H)
|
||||
|
||||
/datum/species/shapeshifter/get_damage_mask(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_damage_mask(H)
|
||||
|
||||
/datum/species/shapeshifter/get_damage_overlays(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_damage_overlays(H)
|
||||
|
||||
/datum/species/shapeshifter/get_tail(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_tail(H)
|
||||
|
||||
/datum/species/shapeshifter/get_tail_animation(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_tail_animation(H)
|
||||
|
||||
/datum/species/shapeshifter/get_tail_hair(var/mob/living/carbon/human/H)
|
||||
if(!H) return ..()
|
||||
var/datum/species/S = GLOB.all_species[wrapped_species_by_ref["\ref[H]"]]
|
||||
var/datum/species/S = GLOB.all_species[GLOB.wrapped_species_by_ref["\ref[H]"]]
|
||||
return S.get_tail_hair(H)
|
||||
|
||||
/datum/species/shapeshifter/handle_post_spawn(var/mob/living/carbon/human/H)
|
||||
..()
|
||||
wrapped_species_by_ref["\ref[H]"] = base_species //VOREStation edit
|
||||
GLOB.wrapped_species_by_ref["\ref[H]"] = base_species //VOREStation edit
|
||||
|
||||
for(var/obj/item/organ/external/E in H.organs)
|
||||
E.sync_colour_to_human(H)
|
||||
@@ -158,7 +158,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
var/new_species = null
|
||||
new_species = tgui_input_list(src, "Please select a species to emulate.", "Shapeshifter Body", species.get_valid_shapeshifter_forms(src))
|
||||
|
||||
if(!new_species || !GLOB.all_species[new_species] || wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
if(!new_species || !GLOB.all_species[new_species] || GLOB.wrapped_species_by_ref["\ref[src]"] == new_species)
|
||||
return
|
||||
shapeshifter_change_shape(new_species)
|
||||
|
||||
@@ -167,7 +167,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
if(!new_species)
|
||||
return
|
||||
|
||||
wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
visible_message(span_infoplain(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!"))
|
||||
regenerate_icons()
|
||||
*/
|
||||
@@ -565,7 +565,7 @@ var/list/wrapped_species_by_ref = list()
|
||||
|
||||
dna.base_species = new_species
|
||||
species.base_species = new_species
|
||||
wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
GLOB.wrapped_species_by_ref["\ref[src]"] = new_species
|
||||
if (visible)
|
||||
visible_message(span_filter_notice(span_bold("\The [src]") + " shifts and contorts, taking the form of \a [new_species]!"))
|
||||
regenerate_icons()
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
var/datum/species/shapeshifter/promethean/prometheans
|
||||
|
||||
// Species definition follows.
|
||||
/datum/species/shapeshifter/promethean
|
||||
name = SPECIES_PROMETHEAN
|
||||
@@ -139,10 +137,6 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
|
||||
footstep = FOOTSTEP_MOB_SLIME
|
||||
|
||||
/datum/species/shapeshifter/promethean/New()
|
||||
..()
|
||||
prometheans = src
|
||||
|
||||
/datum/species/shapeshifter/promethean/equip_survival_gear(var/mob/living/carbon/human/H)
|
||||
var/boxtype = pick(list(/obj/item/storage/toolbox/lunchbox,
|
||||
/obj/item/storage/toolbox/lunchbox/heart,
|
||||
@@ -358,7 +352,7 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
|
||||
/datum/species/shapeshifter/promethean/get_additional_examine_text(var/mob/living/carbon/human/H)
|
||||
|
||||
if(!stored_shock_by_ref["\ref[H]"])
|
||||
if(!GLOB.stored_shock_by_ref["\ref[H]"])
|
||||
return
|
||||
|
||||
var/t_she = "She is"
|
||||
@@ -371,7 +365,7 @@ var/datum/species/shapeshifter/promethean/prometheans
|
||||
else if(H.identifying_gender == HERM) //VOREStation Edit
|
||||
t_she = "Shi is"
|
||||
|
||||
switch(stored_shock_by_ref["\ref[H]"])
|
||||
switch(GLOB.stored_shock_by_ref["\ref[H]"])
|
||||
if(1 to 10)
|
||||
return "[t_she] flickering gently with a little electrical activity."
|
||||
if(11 to 20)
|
||||
|
||||
@@ -314,7 +314,7 @@
|
||||
return
|
||||
|
||||
/mob/living/simple_mob/slime/promethean/get_available_emotes()
|
||||
var/list/fulllist = global._slime_default_emotes.Copy()
|
||||
var/list/fulllist = GLOB.slime_default_emotes.Copy()
|
||||
fulllist += default_emotes
|
||||
return fulllist
|
||||
/mob/living/carbon/human
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/department_radio_keys = list(
|
||||
GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
":r" = "right ear", ".r" = "right ear",
|
||||
":l" = "left ear", ".l" = "left ear",
|
||||
":i" = "intercom", ".i" = "intercom",
|
||||
@@ -16,8 +16,8 @@ var/list/department_radio_keys = list(
|
||||
":u" = CHANNEL_SUPPLY, ".u" = CHANNEL_SUPPLY,
|
||||
":v" = CHANNEL_SERVICE, ".v" = CHANNEL_SERVICE,
|
||||
":p" = CHANNEL_AI_PRIVATE, ".p" = CHANNEL_AI_PRIVATE,
|
||||
":a" = CHANNEL_EXPLORATION, ".a" = CHANNEL_EXPLORATION, //VOREStation Edit
|
||||
":y" = CHANNEL_TALON, ".y" = CHANNEL_TALON, //VOREStation Add,
|
||||
":a" = CHANNEL_EXPLORATION, ".a" = CHANNEL_EXPLORATION,
|
||||
":y" = CHANNEL_TALON, ".y" = CHANNEL_TALON,
|
||||
":g" = CHANNEL_CASINO, ".g" = CHANNEL_CASINO,
|
||||
|
||||
":R" = "right ear", ".R" = "right ear",
|
||||
@@ -37,7 +37,7 @@ var/list/department_radio_keys = list(
|
||||
":V" = CHANNEL_SERVICE, ".V" = CHANNEL_SERVICE,
|
||||
":P" = CHANNEL_AI_PRIVATE, ".P" = CHANNEL_AI_PRIVATE,
|
||||
":A" = CHANNEL_EXPLORATION, ".A" = CHANNEL_EXPLORATION,
|
||||
":Y" = CHANNEL_TALON, ".Y" = CHANNEL_TALON, //VOREStation Add,
|
||||
":Y" = CHANNEL_TALON, ".Y" = CHANNEL_TALON,
|
||||
":G" = CHANNEL_CASINO, ".G" = CHANNEL_CASINO,
|
||||
|
||||
// Cyrillic characters on the same keys on the Russian QWERTY (phonetic) layout
|
||||
@@ -59,22 +59,21 @@ var/list/department_radio_keys = list(
|
||||
":м" = CHANNEL_SERVICE, ".м" = CHANNEL_SERVICE,
|
||||
":з" = CHANNEL_AI_PRIVATE, ".з" = CHANNEL_AI_PRIVATE,
|
||||
":ф" = CHANNEL_EXPLORATION, ".ф" = CHANNEL_EXPLORATION,
|
||||
":н" = CHANNEL_TALON, ".н" = CHANNEL_TALON, //VOREStation Add
|
||||
":н" = CHANNEL_TALON, ".н" = CHANNEL_TALON,
|
||||
":п" = CHANNEL_CASINO, ".п" = CHANNEL_CASINO,
|
||||
)
|
||||
))
|
||||
|
||||
|
||||
var/list/channel_to_radio_key = list()
|
||||
GLOBAL_LIST_EMPTY(channel_to_radio_key)
|
||||
/proc/get_radio_key_from_channel(var/channel)
|
||||
var/key = channel_to_radio_key[channel]
|
||||
var/key = GLOB.channel_to_radio_key[channel]
|
||||
if(!key)
|
||||
for(var/radio_key in department_radio_keys)
|
||||
if(department_radio_keys[radio_key] == channel)
|
||||
for(var/radio_key in GLOB.department_radio_keys)
|
||||
if(GLOB.department_radio_keys[radio_key] == channel)
|
||||
key = radio_key
|
||||
break
|
||||
if(!key)
|
||||
key = ""
|
||||
channel_to_radio_key[channel] = key
|
||||
GLOB.channel_to_radio_key[channel] = key
|
||||
|
||||
return key
|
||||
|
||||
|
||||
@@ -79,6 +79,6 @@
|
||||
|
||||
if("image")
|
||||
var/img = text2num(params["image"])
|
||||
if(1 <= img && img <= (GLOB.pai_emotions.len))
|
||||
if(1 <= img && img <= length(GLOB.pai_emotions))
|
||||
card.setEmotion(img)
|
||||
return TRUE
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
var/list/mob_hat_cache = list()
|
||||
GLOBAL_LIST_EMPTY(mob_hat_cache)
|
||||
|
||||
/proc/get_hat_icon(var/obj/item/hat, var/offset_x = 0, var/offset_y = 0)
|
||||
var/t_state = hat.icon_state
|
||||
if(LAZYACCESS(hat.item_state_slots, slot_head_str))
|
||||
@@ -6,7 +7,7 @@ var/list/mob_hat_cache = list()
|
||||
else if(hat.item_state)
|
||||
t_state = hat.item_state
|
||||
var/key = "[t_state]_[offset_x]_[offset_y]"
|
||||
if(!mob_hat_cache[key]) // Not ideal as there's no guarantee all hat icon_states
|
||||
if(!GLOB.mob_hat_cache[key]) // Not ideal as there's no guarantee all hat icon_states
|
||||
var/t_icon = INV_HEAD_DEF_ICON // are unique across multiple dmis, but whatever.
|
||||
if(hat.icon_override)
|
||||
t_icon = hat.icon_override
|
||||
@@ -15,8 +16,8 @@ var/list/mob_hat_cache = list()
|
||||
var/image/I = image(icon = t_icon, icon_state = t_state)
|
||||
I.pixel_x = offset_x
|
||||
I.pixel_y = offset_y
|
||||
mob_hat_cache[key] = I
|
||||
return mob_hat_cache[key]
|
||||
GLOB.mob_hat_cache[key] = I
|
||||
return GLOB.mob_hat_cache[key]
|
||||
|
||||
/mob/living/silicon/robot/drone
|
||||
name = "maintenance drone"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
var/list/_slime_default_emotes = list(
|
||||
GLOBAL_LIST_INIT(slime_default_emotes, list(
|
||||
/datum/decl/emote/audible/moan,
|
||||
/datum/decl/emote/visible/twitch,
|
||||
/datum/decl/emote/visible/sway,
|
||||
@@ -13,7 +13,7 @@ var/list/_slime_default_emotes = list(
|
||||
/datum/decl/emote/slime/angry,
|
||||
/datum/decl/emote/slime/frown,
|
||||
/datum/decl/emote/slime/smile
|
||||
)
|
||||
))
|
||||
|
||||
// The top-level slime defines. Xenobio slimes and feral slimes will inherit from this.
|
||||
/mob/living/simple_mob/slime
|
||||
@@ -87,7 +87,7 @@ var/list/_slime_default_emotes = list(
|
||||
pain_emote_3p = list("squishes", "squelches")
|
||||
|
||||
/mob/living/simple_mob/slime/get_available_emotes()
|
||||
return global._slime_default_emotes.Copy()
|
||||
return GLOB.slime_default_emotes.Copy()
|
||||
|
||||
/datum/say_list/slime
|
||||
speak = list("Blorp...", "Blop...")
|
||||
|
||||
@@ -113,17 +113,17 @@
|
||||
var/ran_zone = zone
|
||||
while (ran_zone == zone)
|
||||
ran_zone = pick (
|
||||
organ_rel_size[BP_HEAD]; BP_HEAD,
|
||||
organ_rel_size[BP_TORSO]; BP_TORSO,
|
||||
organ_rel_size[BP_GROIN]; BP_GROIN,
|
||||
organ_rel_size[BP_L_ARM]; BP_L_ARM,
|
||||
organ_rel_size[BP_R_ARM]; BP_R_ARM,
|
||||
organ_rel_size[BP_L_LEG]; BP_L_LEG,
|
||||
organ_rel_size[BP_R_LEG]; BP_R_LEG,
|
||||
organ_rel_size[BP_L_HAND]; BP_L_HAND,
|
||||
organ_rel_size[BP_R_HAND]; BP_R_HAND,
|
||||
organ_rel_size[BP_L_FOOT]; BP_L_FOOT,
|
||||
organ_rel_size[BP_R_FOOT]; BP_R_FOOT,
|
||||
GLOB.organ_rel_size[BP_HEAD]; BP_HEAD,
|
||||
GLOB.organ_rel_size[BP_TORSO]; BP_TORSO,
|
||||
GLOB.organ_rel_size[BP_GROIN]; BP_GROIN,
|
||||
GLOB.organ_rel_size[BP_L_ARM]; BP_L_ARM,
|
||||
GLOB.organ_rel_size[BP_R_ARM]; BP_R_ARM,
|
||||
GLOB.organ_rel_size[BP_L_LEG]; BP_L_LEG,
|
||||
GLOB.organ_rel_size[BP_R_LEG]; BP_R_LEG,
|
||||
GLOB.organ_rel_size[BP_L_HAND]; BP_L_HAND,
|
||||
GLOB.organ_rel_size[BP_R_HAND]; BP_R_HAND,
|
||||
GLOB.organ_rel_size[BP_L_FOOT]; BP_L_FOOT,
|
||||
GLOB.organ_rel_size[BP_R_FOOT]; BP_R_FOOT,
|
||||
)
|
||||
|
||||
return ran_zone
|
||||
@@ -214,15 +214,15 @@
|
||||
var/randomization_chance = 10 //This can also be set to 0 to ensure mobs ALWAYS target the limb they're originally targeting.
|
||||
/// First, we roll to see if we're going to target a random limb.
|
||||
if(randomization_chance) //We got a 10% chance! Randomize where we're targeting!
|
||||
zone = pick(base_miss_chance)
|
||||
zone = pick(GLOB.base_miss_chance)
|
||||
|
||||
// Second, we make sure to see if the place we are attacking is a valid area.
|
||||
if(zone in base_miss_chance)
|
||||
randomization_chance = base_miss_chance[zone]
|
||||
if(zone in GLOB.base_miss_chance)
|
||||
randomization_chance = GLOB.base_miss_chance[zone]
|
||||
|
||||
// Eyes and mouth can be targeted (although typically not by mobs) so we set it to the head.
|
||||
else if (zone == "eyes" || zone == "mouth")
|
||||
randomization_chance = base_miss_chance["head"]
|
||||
randomization_chance = GLOB.base_miss_chance["head"]
|
||||
|
||||
// Finally, now that we have our newfound zone, we see if we miss it or not!
|
||||
if(prob(randomization_chance)) //If the mob rolled a miss chance?
|
||||
@@ -672,7 +672,7 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
|
||||
//TODO: Integrate defence zones and targeting body parts with the actual organ system, move these into organ definitions.
|
||||
|
||||
//The base miss chance for the different defence zones
|
||||
var/list/global/base_miss_chance = list(
|
||||
GLOBAL_LIST_INIT(base_miss_chance, list(
|
||||
BP_HEAD = 40,
|
||||
BP_TORSO = 10,
|
||||
BP_GROIN = 20,
|
||||
@@ -684,11 +684,11 @@ var/list/global/base_miss_chance = list(
|
||||
BP_R_HAND = 50,
|
||||
BP_L_FOOT = 50,
|
||||
BP_R_FOOT = 50,
|
||||
)
|
||||
))
|
||||
|
||||
//Used to weight organs when an organ is hit randomly (i.e. not a directed, aimed attack).
|
||||
//Also used to weight the protection value that armour provides for covering that body part when calculating protection from full-body effects.
|
||||
var/list/global/organ_rel_size = list(
|
||||
GLOBAL_LIST_INIT(organ_rel_size, list(
|
||||
BP_HEAD = 25,
|
||||
BP_TORSO = 70,
|
||||
BP_GROIN = 30,
|
||||
@@ -700,7 +700,7 @@ var/list/global/organ_rel_size = list(
|
||||
BP_R_HAND = 10,
|
||||
BP_L_FOOT = 10,
|
||||
BP_R_FOOT = 10,
|
||||
)
|
||||
))
|
||||
|
||||
/mob/proc/flash_eyes(intensity = FLASH_PROTECTION_MODERATE, override_blindness_check = FALSE, affect_silicon = FALSE, visual = FALSE, type = /atom/movable/screen/fullscreen/flash)
|
||||
return
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
var/list/equipped_slots = list()
|
||||
var/list/active_gear_list = LAZYACCESS(gear_list, "[gear_slot]")
|
||||
for(var/thing in active_gear_list)
|
||||
var/datum/gear/G = gear_datums[thing]
|
||||
var/datum/gear/G = GLOB.gear_datums[thing]
|
||||
if(G)
|
||||
var/permitted = 0
|
||||
if(!G.allowed_roles)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
|
||||
if(length(message) >= 2)
|
||||
var/channel_prefix = copytext(message, 1, 3)
|
||||
return department_radio_keys[channel_prefix]
|
||||
return GLOB.department_radio_keys[channel_prefix]
|
||||
|
||||
return null
|
||||
|
||||
|
||||
Reference in New Issue
Block a user