diff --git a/code/__defines/dna.dm b/code/__defines/dna.dm index 6140bf37bf..9b3a0d51e3 100644 --- a/code/__defines/dna.dm +++ b/code/__defines/dna.dm @@ -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. diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index f7fd35165b..2e45631a76 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -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 diff --git a/code/game/objects/items/weapons/dna_injector.dm b/code/game/objects/items/weapons/dna_injector.dm index d4ab738be9..e6e7aafffe 100644 --- a/code/game/objects/items/weapons/dna_injector.dm +++ b/code/game/objects/items/weapons/dna_injector.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 58d44a1aab..7eb1e01b45 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_genes.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_genes.dm index 5b58c77fdb..1134aa6b14 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_genes.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/negative_genes.dm @@ -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..." diff --git a/code/modules/organs/subtypes/standard.dm b/code/modules/organs/subtypes/standard.dm index 40f5810044..d7be162527 100644 --- a/code/modules/organs/subtypes/standard.dm +++ b/code/modules/organs/subtypes/standard.dm @@ -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" diff --git a/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainAbnormalities.tsx b/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainAbnormalities.tsx index 0822ed7830..08faf4ee7e 100644 --- a/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainAbnormalities.tsx +++ b/tgui/packages/tgui/interfaces/BodyScanner/BodyScannerMainAbnormalities.tsx @@ -11,6 +11,7 @@ export const BodyScannerMainAbnormalities = (props: { occupant: occupant }) => { occupant.blind || occupant.colourblind || occupant.nearsighted || + occupant.brokenspine || occupant.hasVirus || occupant.husked; diff --git a/tgui/packages/tgui/interfaces/BodyScanner/constants.ts b/tgui/packages/tgui/interfaces/BodyScanner/constants.ts index 39b64a2594..3d156c5ad5 100644 --- a/tgui/packages/tgui/interfaces/BodyScanner/constants.ts +++ b/tgui/packages/tgui/interfaces/BodyScanner/constants.ts @@ -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', diff --git a/tgui/packages/tgui/interfaces/BodyScanner/types.ts b/tgui/packages/tgui/interfaces/BodyScanner/types.ts index 4ea5a70ab8..1e5dc73045 100644 --- a/tgui/packages/tgui/interfaces/BodyScanner/types.ts +++ b/tgui/packages/tgui/interfaces/BodyScanner/types.ts @@ -31,6 +31,7 @@ export type occupant = { intOrgan: internalOrgan[]; blind: BooleanLike; nearsighted: BooleanLike; + brokenspine: BooleanLike; livingPrey: number; humanPrey: number; objectPrey: number;