Skip to content

Commit

Permalink
Paraplegia! (#27999)
Browse files Browse the repository at this point in the history
* Can pick paraplegic in character menu, will start floored+wheelchaired

* Why won't you show up on scanners

* Forgot the description.

* Got the scanners to show Paraplegia!

* block off some roles from paraplegics

* Use stance instead of the floored trait for paraplegic

* Prevent paraplegics from using/being hit by legsweeps, change get_num_legs()

* Add DNA injectors for paraplegia

* change legsweep to use traitcheck, get_num_leg() solution screwed up beartraps

* Can pick paraplegic in character menu, will start floored+wheelchaired

* Why won't you show up on scanners

* Forgot the description.

* Got the scanners to show Paraplegia!

* block off some roles from paraplegics

* Use stance instead of the floored trait for paraplegic

* Prevent paraplegics from using/being hit by legsweeps, change get_num_legs()

* Add DNA injectors for paraplegia

* change legsweep to use traitcheck, get_num_leg() solution screwed up beartraps

* whoops.

* TGUI.

* How did I miss that in testing

* Add the point interaction that nuggets get to armless paraplegics

* Update code/modules/mob/living/carbon/human/human_organs.dm

Co-authored-by: Luc <[email protected]>
Signed-off-by: Sheep <[email protected]>

---------

Signed-off-by: Sheep <[email protected]>
Co-authored-by: Scribble-Sheep <[email protected]>
Co-authored-by: Luc <[email protected]>
Co-authored-by: DGamerL <[email protected]>
  • Loading branch information
4 people authored Feb 12, 2025
1 parent 1d82fc7 commit 2e2a778
Show file tree
Hide file tree
Showing 23 changed files with 110 additions and 45 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/genetics_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#define DISABILITY_FLAG_DIZZY (1<<9)
#define DISABILITY_FLAG_CHAV (1<<10)
#define DISABILITY_FLAG_DEAF (1<<11)
#define DISABILITY_FLAG_PARAPLEGIC (1<<12)

///////////////////////////////////////
// MUTATIONS
Expand Down
1 change: 1 addition & 0 deletions code/__HELPERS/trait_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ Remember to update _globalvars/traits.dm if you're adding/removing/renaming trai
#define TRAIT_RESPAWNABLE "can_respawn_as_ghost_roles"
#define TRAIT_BEING_OFFERED "offered"
#define TRAIT_BLIND "blind"
#define TRAIT_PARAPLEGIC "paraplegic"
#define TRAIT_MUTE "mute"
#define TRAIT_DEAF "deaf"
#define TRAIT_NEARSIGHT "nearsighted"
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/genetics.dm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
///////////
GLOBAL_VAR_INIT(blindblock, 0)
GLOBAL_VAR_INIT(paraplegicblock, 0)
GLOBAL_VAR_INIT(colourblindblock, 0)
GLOBAL_VAR_INIT(deafblock, 0)
GLOBAL_VAR_INIT(hulkblock, 0)
Expand Down
1 change: 1 addition & 0 deletions code/_globalvars/traits.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ GLOBAL_LIST_INIT(traits_by_type, list(
/mob = list(
"TRAIT_BEING_OFFERED" = TRAIT_BEING_OFFERED,
"TRAIT_BLIND" = TRAIT_BLIND,
"TRAIT_PARAPLEGIC" = TRAIT_PARAPLEGIC,
"TRAIT_MUTE" = TRAIT_MUTE,
"TRAIT_DEAF" = TRAIT_DEAF,
"TRAIT_NEARSIGHT" = TRAIT_NEARSIGHT,
Expand Down
1 change: 1 addition & 0 deletions code/datums/components/zombie_regen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
zomboid.CureMute()
zomboid.CureDeaf()
zomboid.CureEpilepsy()
zomboid.CureParaplegia()
zomboid.CureCoughing()
zomboid.CureNervous()
zomboid.SetEyeBlind(0)
Expand Down
13 changes: 12 additions & 1 deletion code/game/dna/mutations/disabilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@
..()
M.update_blind_effects()


/datum/mutation/disability/colourblindness
name = "Colourblindness"
activation_messages = list("You feel a peculiar prickling in your eyes while your perception of colour changes.")
Expand Down Expand Up @@ -228,6 +227,18 @@
/datum/mutation/disability/mute/on_say(mob/M, message)
return ""

/datum/mutation/disability/paraplegic
name = "Paraplegic"
desc = "Your legs don't work, even with prosthetics."
activation_messages = list("MY LEG!")
deactivation_messages = list("You can feel your legs again.")
instability = -GENE_INSTABILITY_MAJOR
traits_to_add = list(TRAIT_PARAPLEGIC)

/datum/mutation/disability/paraplegic/New()
..()
block = GLOB.paraplegicblock

////////////////////////////////////////
// MARK: Harmful to everyone
////////////////////////////////////////
Expand Down
1 change: 1 addition & 0 deletions code/game/gamemodes/setupgame.dm
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
// Disabilities
GLOB.lispblock = getAssignedBlock("LISP", numsToAssign)
GLOB.muteblock = getAssignedBlock("MUTE", numsToAssign)
GLOB.paraplegicblock= getAssignedBlock("PARAPLEGIC", numsToAssign)
GLOB.radblock = getAssignedBlock("RAD", numsToAssign)
GLOB.fatblock = getAssignedBlock("FAT", numsToAssign)
GLOB.chavblock = getAssignedBlock("CHAV", numsToAssign)
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/engineering_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
)
minimal_player_age = 21
exp_map = list(EXP_TYPE_ENGINEERING = 1200)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP, DISABILITY_FLAG_PARAPLEGIC)
missing_limbs_allowed = FALSE
outfit = /datum/outfit/job/chief_engineer
important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Engineering), basic job duties, and act professionally (roleplay)."
Expand Down
8 changes: 4 additions & 4 deletions code/game/jobs/job/security_jobs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
)
minimal_player_age = 21
exp_map = list(EXP_TYPE_SECURITY = 1200)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP, DISABILITY_FLAG_PARAPLEGIC)
missing_limbs_allowed = FALSE
outfit = /datum/outfit/job/hos
important_information = "This role requires you to coordinate a department. You are required to be familiar with Standard Operating Procedure (Security), Space Law, basic job duties, and act professionally (roleplay)."
Expand Down Expand Up @@ -90,7 +90,7 @@
)
minimal_player_age = 21
exp_map = list(EXP_TYPE_SECURITY = 600)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP, DISABILITY_FLAG_PARAPLEGIC)
missing_limbs_allowed = FALSE
outfit = /datum/outfit/job/warden

Expand Down Expand Up @@ -142,7 +142,7 @@
)
minimal_player_age = 14
exp_map = list(EXP_TYPE_CREW = 600)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_PARAPLEGIC)
missing_limbs_allowed = FALSE
outfit = /datum/outfit/job/detective
important_information = "Track, investigate, and look cool while doing it."
Expand Down Expand Up @@ -206,7 +206,7 @@
)
minimal_player_age = 14
exp_map = list(EXP_TYPE_CREW = 600)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_PARAPLEGIC)
missing_limbs_allowed = FALSE
outfit = /datum/outfit/job/officer
important_information = "Space Law is the law, not a suggestion."
Expand Down
2 changes: 1 addition & 1 deletion code/game/jobs/job/supervisor.dm
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@
ACCESS_SEC_DOORS,
ACCESS_WEAPONS
)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP)
blacklisted_disabilities = list(DISABILITY_FLAG_BLIND, DISABILITY_FLAG_DEAF, DISABILITY_FLAG_MUTE, DISABILITY_FLAG_DIZZY, DISABILITY_FLAG_NERVOUS, DISABILITY_FLAG_LISP, DISABILITY_FLAG_PARAPLEGIC)
missing_limbs_allowed = FALSE
outfit = /datum/outfit/job/blueshield
important_information = "This role requires you to ensure the safety of the Heads of Staff, not the general crew. You may perform arrests only if the combatant is directly threatening a member of Command, the Nanotrasen Representative, or the Magistrate."
Expand Down
3 changes: 3 additions & 0 deletions code/game/machinery/adv_med.dm
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,7 @@
occupantData["blind"] = HAS_TRAIT(occupant, TRAIT_BLIND)
occupantData["colourblind"] = HAS_TRAIT(occupant, TRAIT_COLORBLIND)
occupantData["nearsighted"] = HAS_TRAIT(occupant, TRAIT_NEARSIGHT)
occupantData["paraplegic"] = HAS_TRAIT(occupant, TRAIT_PARAPLEGIC)

data["occupant"] = occupantData
return data
Expand Down Expand Up @@ -453,6 +454,8 @@
dat += "<font color='red'>Photoreceptor abnormalities detected.</font><br>"
if(HAS_TRAIT(occupant, TRAIT_NEARSIGHT))
dat += "<font color='red'>Retinal misalignment detected.</font><br>"
if(HAS_TRAIT(occupant, TRAIT_PARAPLEGIC))
dat += "<font color='red'>Lumbar nerves damaged.</font><br>"

dat += "<hr>"
dat += "<table border='1' style='width:100%'>"
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/devices/scanners.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1254,5 +1254,7 @@ SLIME SCANNER
dat += "<font color='red'>Photoreceptor abnormalities detected.</font><BR>"
if(HAS_TRAIT(target, TRAIT_NEARSIGHT))
dat += "<font color='red'>Retinal misalignment detected.</font><BR>"
if(HAS_TRAIT(target, TRAIT_PARAPLEGIC))
dat += "<font color='red'>Lumbar nerves damaged.</font><BR>"

return dat
20 changes: 20 additions & 0 deletions code/game/objects/items/weapons/dna_injector.dm
Original file line number Diff line number Diff line change
Expand Up @@ -505,6 +505,26 @@
/obj/item/dnainjector/antiblind/GetInitBlock()
return GLOB.blindblock

/obj/item/dnainjector/paraplegicmut
name = "DNA-Injector (Paraplegic)"
desc = "Faceplanting, in needle form."
datatype = DNA2_BUF_SE
value = 0xFFF
forcedmutation = TRUE

/obj/item/dnainjector/paraplegicmut/GetInitBlock()
return GLOB.paraplegicblock

/obj/item/dnainjector/antiparaplegic
name = "DNA-Injector (Anti-Paraplegic)"
desc = "Returns your legs to working order."
datatype = DNA2_BUF_SE
value = 0x001
forcedmutation = TRUE

/obj/item/dnainjector/antiparaplegic/GetInitBlock()
return GLOB.paraplegicblock

/obj/item/dnainjector/deafmut
name = "DNA-Injector (Deaf)"
desc = "Sorry, what did you say?"
Expand Down
7 changes: 6 additions & 1 deletion code/modules/client/preference/character.dm
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,7 @@
HTML += ShowDisabilityState(user, DISABILITY_FLAG_CHAV, "Chav accent")
HTML += ShowDisabilityState(user, DISABILITY_FLAG_LISP, "Lisp")
HTML += ShowDisabilityState(user, DISABILITY_FLAG_DIZZY, "Dizziness")
HTML += ShowDisabilityState(user, DISABILITY_FLAG_PARAPLEGIC, "Paraplegia")


HTML += {"</ul>
Expand Down Expand Up @@ -1942,7 +1943,7 @@
// Wheelchair necessary?
var/obj/item/organ/external/l_foot = character.get_organ("l_foot")
var/obj/item/organ/external/r_foot = character.get_organ("r_foot")
if(!l_foot && !r_foot)
if((!l_foot && !r_foot) || (disabilities & DISABILITY_FLAG_PARAPLEGIC))
var/obj/structure/chair/wheelchair/W = new /obj/structure/chair/wheelchair(character.loc)
W.buckle_mob(character, TRUE)
else if(!l_foot || !r_foot)
Expand Down Expand Up @@ -1991,6 +1992,10 @@
character.dna.SetSEState(GLOB.blindblock, TRUE, TRUE)
character.dna.default_blocks.Add(GLOB.blindblock)

if(disabilities & DISABILITY_FLAG_PARAPLEGIC)
character.dna.SetSEState(GLOB.paraplegicblock, TRUE, TRUE)
character.dna.default_blocks.Add(GLOB.paraplegicblock)

if(disabilities & DISABILITY_FLAG_DEAF)
character.dna.SetSEState(GLOB.deafblock, TRUE, TRUE)
character.dna.default_blocks.Add(GLOB.deafblock)
Expand Down
3 changes: 3 additions & 0 deletions code/modules/martial_arts/krav_maga.dm
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@
if(!owner.get_num_legs())
to_chat(owner, "<span class='warning'>You can't leg sweep someone if you have no legs.</span>")
return
if(HAS_TRAIT(owner, TRAIT_PARAPLEGIC))
to_chat(owner, "<span class='warning'>You can't leg sweep someone without working legs.</span>")
return
to_chat(owner, "<b><i>Your next attack will be a Leg Sweep.</i></b>")
owner.visible_message("<span class='danger'>[owner] assumes the Leg Sweep stance!</span>")
H.mind.martial_art.combos.Cut()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/human/human_organs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@

for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
var/obj/item/organ/external/E = bodyparts_by_name[limb_tag]
if(!E || (E.status & ORGAN_DEAD) || E.is_malfunctioning() || !E.properly_attached)
if(!E || (E.status & ORGAN_DEAD) || E.is_malfunctioning() || !E.properly_attached || HAS_TRAIT(src, TRAIT_PARAPLEGIC))
if(E?.status & ORGAN_DEAD && HAS_TRAIT(src, TRAIT_I_WANT_BRAINS))
continue
if(E && !E.properly_attached && life_tick % 24 == 0)
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/living.dm
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@
CureEpilepsy()
CureCoughing()
CureNervous()
CureParaplegia()
SetEyeBlind(0)
SetEyeBlurry(0)
SetDeaf(0)
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/living_emote.dm
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
if(ishuman(user))
var/mob/living/carbon/human/H = user
if(!H.has_left_hand() && !H.has_right_hand())
if(H.get_num_legs() != 0)
if(H.get_num_legs() != 0 && !HAS_TRAIT(H, TRAIT_PARAPLEGIC))
message_param = "tries to point at %t with a leg."
else
// nugget
Expand Down
4 changes: 3 additions & 1 deletion code/modules/mob/living/living_status_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,9 @@ STATUS EFFECTS
// Deaf
/mob/living/proc/CureDeaf()
CureIfHasDisability(GLOB.deafblock)

// Paraplegia
/mob/living/proc/CureParaplegia()
CureIfHasDisability(GLOB.paraplegicblock)
// Epilepsy
/mob/living/proc/CureEpilepsy()
CureIfHasDisability(GLOB.epilepsyblock)
Expand Down
1 change: 1 addition & 0 deletions code/modules/reagents/chemistry/reagents/admin_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
M.CureEpilepsy()
M.CureCoughing()
M.CureNervous()
M.CureParaplegia()
M.SetEyeBlurry(0)
M.SetWeakened(0)
M.SetStunned(0)
Expand Down
1 change: 1 addition & 0 deletions code/modules/surgery/organs/organ_helpers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@
.++
if(affecting.body_part == LEG_LEFT)
.++

/* Returns true if all the mob's vital organs are functional, otherwise returns false.
* This proc is only used for checking if IPCs can revive from death, so calling it on a non IPC will always return false (right now)
*/
Expand Down
12 changes: 11 additions & 1 deletion tgui/packages/tgui/interfaces/BodyScanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ const abnormalities = [
['blind', 'average', 'Cataracts detected.'],
['colourblind', 'average', 'Photoreceptor abnormalities detected.'],
['nearsighted', 'average', 'Retinal misalignment detected.'],
['paraplegic', 'bad', 'Lumbar nerves damaged.'],
];

const damages = [
Expand Down Expand Up @@ -172,7 +173,16 @@ const BodyScannerMainOccupant = (props, context) => {

const BodyScannerMainAbnormalities = (props) => {
const { occupant } = props;
if (!(occupant.hasBorer || occupant.blind || occupant.colourblind || occupant.nearsighted || occupant.hasVirus)) {
if (
!(
occupant.hasBorer ||
occupant.blind ||
occupant.colourblind ||
occupant.nearsighted ||
occupant.hasVirus ||
occupant.paraplegic
)
) {
return (
<Section title="Abnormalities">
<Box color="label">No abnormalities found.</Box>
Expand Down
66 changes: 33 additions & 33 deletions tgui/public/tgui.bundle.js

Large diffs are not rendered by default.

0 comments on commit 2e2a778

Please sign in to comment.