mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-29 23:17:28 +01:00
Disabled legs trait (#17271)
* spine disability trait * scanner shows it too, dna injector * proper path * synths don't count --------- Co-authored-by: Willburd <7099514+Willburd@users.noreply.github.com>
This commit is contained in:
co-authored by
Willburd
parent
ff10293878
commit
ac9d664953
@@ -49,6 +49,7 @@
|
||||
#define BLIND 0x1
|
||||
#define MUTE 0x2
|
||||
#define DEAF 0x4
|
||||
#define SPINE 0x8
|
||||
|
||||
/* Traitgenes (Blocks have finally been retired, huzzah!
|
||||
// The way blocks are handled badly needs a rewrite, this is horrible.
|
||||
|
||||
@@ -333,8 +333,9 @@
|
||||
|
||||
occupantData["blind"] = (H.sdisabilities & BLIND)
|
||||
occupantData["nearsighted"] = (H.disabilities & NEARSIGHTED)
|
||||
occupantData["husked"] = (HUSK in H.mutations) // VOREstation edit
|
||||
occupantData = attempt_vr(src, "get_occupant_data_vr", list(occupantData, H)) //VOREStation Insert
|
||||
occupantData["brokenspine"] = (H.disabilities & SPINE)
|
||||
occupantData["husked"] = (HUSK in H.mutations)
|
||||
occupantData = attempt_vr(src, "get_occupant_data_vr", list(occupantData, H))
|
||||
data["occupant"] = occupantData
|
||||
|
||||
return data
|
||||
|
||||
@@ -350,3 +350,7 @@
|
||||
/obj/item/dnainjector/set_trait/nonconduct/disable
|
||||
disabling = TRUE
|
||||
*/
|
||||
/obj/item/dnainjector/set_trait/damagedspine // brokenspine
|
||||
trait_path = /datum/trait/negative/disability_damagedspine
|
||||
/obj/item/dnainjector/set_trait/damagedspine/disable
|
||||
disabling = TRUE
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
if (istype(buckled, /obj/structure/bed))
|
||||
return
|
||||
|
||||
var/limb_pain
|
||||
var/limb_pain = FALSE
|
||||
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
|
||||
var/obj/item/organ/external/E = organs_by_name[limb_tag]
|
||||
if(!E || !E.is_usable())
|
||||
@@ -111,7 +111,8 @@
|
||||
if(limb_pain)
|
||||
emote("scream")
|
||||
custom_emote(1, "collapses!")
|
||||
Weaken(5) //can't emote while weakened, apparently.
|
||||
if(!(lying || resting)) // stops permastun with SPINE sdisability
|
||||
Weaken(5) //can't emote while weakened, apparently.
|
||||
|
||||
/mob/living/carbon/human/proc/handle_grasp()
|
||||
if(!l_hand && !r_hand)
|
||||
|
||||
@@ -207,3 +207,17 @@
|
||||
disability=CENSORED
|
||||
activation_message="You feel less rude..."
|
||||
primitive_expression_messages=list("BEEPS!")
|
||||
|
||||
/datum/trait/negative/disability_damagedspine
|
||||
name = "Lumbar Impairment"
|
||||
desc = "Due to neurological damage, you are unable to use your legs. Collapsing to the ground as soon as you try to stand. You should check the loadout menu for something to assist you."
|
||||
cost = -3
|
||||
custom_only = FALSE
|
||||
can_take = ORGANICS
|
||||
|
||||
is_genetrait = TRUE
|
||||
hidden = FALSE
|
||||
activity_bounds = DNA_HARDER_BOUNDS // Shouldn't be easy for genetics to find this
|
||||
|
||||
sdisability=SPINE
|
||||
activation_message="Your legs shake..."
|
||||
|
||||
@@ -151,6 +151,16 @@
|
||||
owner.custom_pain("Your [name] burns like it's on fire!",15)
|
||||
owner.Weaken(5)
|
||||
|
||||
/obj/item/organ/external/leg/is_usable() // We only do legs, otherwise the stance_damage will be 8 instead of 4, meaning crutches do nothing as they only negate 4
|
||||
if(robotic == ORGAN_FLESH && owner.sdisabilities & SPINE)
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/leg/organ_can_feel_pain()
|
||||
if(robotic < ORGAN_ROBOT && owner.sdisabilities & SPINE)
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/leg/right
|
||||
organ_tag = BP_R_LEG
|
||||
name = "right leg"
|
||||
@@ -194,6 +204,11 @@
|
||||
owner.custom_pain("Your [name] burns like it's on fire!",15)
|
||||
owner.Weaken(5)
|
||||
|
||||
/obj/item/organ/external/foot/organ_can_feel_pain()
|
||||
if(robotic < ORGAN_ROBOT && owner.sdisabilities & SPINE)
|
||||
return FALSE
|
||||
. = ..()
|
||||
|
||||
/obj/item/organ/external/foot/right
|
||||
organ_tag = BP_R_FOOT
|
||||
name = "right foot"
|
||||
|
||||
@@ -11,6 +11,7 @@ export const BodyScannerMainAbnormalities = (props: { occupant: occupant }) => {
|
||||
occupant.blind ||
|
||||
occupant.colourblind ||
|
||||
occupant.nearsighted ||
|
||||
occupant.brokenspine ||
|
||||
occupant.hasVirus ||
|
||||
occupant.husked;
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ export const abnormalities: (string | ((occupant: occupant) => string))[][] = [
|
||||
(occupant) => 'Photoreceptor abnormalities detected.',
|
||||
],
|
||||
['nearsighted', 'average', (occupant) => 'Retinal misalignment detected.'],
|
||||
['brokenspine', 'average', (occupant) => 'Lumbar spine impairement.'],
|
||||
[
|
||||
'humanPrey',
|
||||
'average',
|
||||
|
||||
@@ -31,6 +31,7 @@ export type occupant = {
|
||||
intOrgan: internalOrgan[];
|
||||
blind: BooleanLike;
|
||||
nearsighted: BooleanLike;
|
||||
brokenspine: BooleanLike;
|
||||
livingPrey: number;
|
||||
humanPrey: number;
|
||||
objectPrey: number;
|
||||
|
||||
Reference in New Issue
Block a user