Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paraplegia! #27999

Open
wants to merge 28 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
5daae32
Can pick paraplegic in character menu, will start floored+wheelchaired
Jan 15, 2025
398bfa5
Why won't you show up on scanners
Jan 15, 2025
7c03ea9
Forgot the description.
Jan 15, 2025
7994848
Got the scanners to show Paraplegia!
Jan 15, 2025
95eaca7
block off some roles from paraplegics
Jan 15, 2025
c56897c
Use stance instead of the floored trait for paraplegic
Jan 15, 2025
b427b85
Prevent paraplegics from using/being hit by legsweeps, change get_num…
Jan 16, 2025
82b65a7
Add DNA injectors for paraplegia
Jan 16, 2025
b78a7f0
change legsweep to use traitcheck, get_num_leg() solution screwed up …
Jan 16, 2025
6d4a74e
Can pick paraplegic in character menu, will start floored+wheelchaired
Jan 15, 2025
7f36410
Why won't you show up on scanners
Jan 15, 2025
c7fcd4f
Forgot the description.
Jan 15, 2025
59ac8cc
Got the scanners to show Paraplegia!
Jan 15, 2025
289c846
block off some roles from paraplegics
Jan 15, 2025
cc0c250
Use stance instead of the floored trait for paraplegic
Jan 15, 2025
ff6e958
Prevent paraplegics from using/being hit by legsweeps, change get_num…
Jan 16, 2025
713627f
Add DNA injectors for paraplegia
Jan 16, 2025
3c3613d
change legsweep to use traitcheck, get_num_leg() solution screwed up …
Jan 16, 2025
bcfb479
Merge branch 'paraplegic-3' of https://github.com/Scribble-Sheep/Hel-…
Jan 16, 2025
49d11da
whoops.
Jan 16, 2025
3ebd752
TGUI.
Jan 16, 2025
5f9f431
How did I miss that in testing
Jan 16, 2025
e328e4e
Add the point interaction that nuggets get to armless paraplegics
Jan 16, 2025
ca70274
Merge branch 'master' into paraplegic-3
Scribble-Sheep Jan 16, 2025
c622d04
Merge branch 'master' into paraplegic-3
Scribble-Sheep Jan 17, 2025
e5d02f9
Merge branch 'master' into paraplegic-3
Scribble-Sheep Jan 18, 2025
07d755b
Merge branch 'master' into paraplegic-3
Scribble-Sheep Jan 24, 2025
44eb7ab
Update code/modules/mob/living/carbon/human/human_organs.dm
Scribble-Sheep Jan 30, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
13 changes: 12 additions & 1 deletion code/game/dna/mutations/disabilities.dm
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,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 @@ -251,6 +250,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 @@ -65,6 +65,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 @@ -363,6 +363,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 @@ -452,6 +453,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 @@ -1190,5 +1190,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 @@ -525,6 +525,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 @@ -1680,6 +1680,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 @@ -1904,7 +1905,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 @@ -1953,6 +1954,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))
Scribble-Sheep marked this conversation as resolved.
Show resolved Hide resolved
if(E?.status & ORGAN_DEAD && HAS_TRAIT(src, TRAIT_I_WANT_BRAINS))
continue
if(E && !E.properly_attached && life_tick % 24 == 0)
Expand Down
3 changes: 2 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,8 @@ STATUS EFFECTS
// Deaf
/mob/living/proc/CureDeaf()
CureIfHasDisability(GLOB.deafblock)

// Paraplegia
CureIfHasDisability(GLOB.paraplegicblock)
Scribble-Sheep marked this conversation as resolved.
Show resolved Hide resolved
// Epilepsy
/mob/living/proc/CureEpilepsy()
CureIfHasDisability(GLOB.epilepsyblock)
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
2 changes: 1 addition & 1 deletion tgui/public/tgui.bundle.js

Large diffs are not rendered by default.

Loading