mirror of
https://github.com/KabKebab/GS13.git
synced 2026-07-12 00:20:55 +01:00
Allow multiple specific prosthetic limb quirks
Do not allow random limb and specific limb Do not allow specific legs with paraplegic
This commit is contained in:
@@ -26,7 +26,12 @@ PROCESSING_SUBSYSTEM_DEF(quirks)
|
||||
list("Ananas Affinity","Ananas Aversion"),
|
||||
list("Alcohol Tolerance","Light Drinker"),
|
||||
list("Social Anxiety","Mute"),
|
||||
list("Prosthetic Limb (Left Arm)","Prosthetic Limb (Right Arm)","Prosthetic Limb (Left Leg)","Prosthetic Limb (Right Leg)","Prosthetic Limb"),
|
||||
list("Prosthetic Limb","Prosthetic Limb (Left Arm)"),
|
||||
list("Prosthetic Limb","Prosthetic Limb (Right Arm)"),
|
||||
list("Prosthetic Limb","Prosthetic Limb (Left Leg)"),
|
||||
list("Prosthetic Limb","Prosthetic Limb (Right Leg)"),
|
||||
list("Paraplegic","Prosthetic Limb (Left Leg)"),
|
||||
list("Paraplegic","Prosthetic Limb (Right Leg)"),
|
||||
list("Fat Affinity","Fat Aversion")
|
||||
)
|
||||
return ..()
|
||||
|
||||
@@ -290,36 +290,68 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
|
||||
|
||||
/datum/quirk/prosthetic_limb/on_spawn()
|
||||
var/mob/living/carbon/human/H = quirk_holder
|
||||
var/limb_slot
|
||||
if(HAS_TRAIT(H, TRAIT_PARA))//Prevent paraplegic legs being replaced
|
||||
limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
|
||||
var/limb_slot = null
|
||||
|
||||
if (specific)
|
||||
limb_slot = specific
|
||||
else
|
||||
limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
if(specific)
|
||||
limb_slot = specific
|
||||
if(HAS_TRAIT(H, TRAIT_PARA)) // Prevent paraplegic legs being replaced
|
||||
limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM)
|
||||
else
|
||||
limb_slot = pick(BODY_ZONE_L_ARM, BODY_ZONE_R_ARM, BODY_ZONE_L_LEG, BODY_ZONE_R_LEG)
|
||||
|
||||
var/obj/item/bodypart/old_part = H.get_bodypart(limb_slot)
|
||||
var/obj/item/bodypart/prosthetic
|
||||
var/obj/item/bodypart/prosthetic = null
|
||||
|
||||
switch(limb_slot)
|
||||
if(BODY_ZONE_L_ARM)
|
||||
prosthetic = new/obj/item/bodypart/l_arm/robot/surplus(quirk_holder)
|
||||
slot_string = "left arm"
|
||||
prosthetic = new/obj/item/bodypart/l_arm/robot/surplus(quirk_holder)
|
||||
if(BODY_ZONE_R_ARM)
|
||||
prosthetic = new/obj/item/bodypart/r_arm/robot/surplus(quirk_holder)
|
||||
slot_string = "right arm"
|
||||
prosthetic = new/obj/item/bodypart/r_arm/robot/surplus(quirk_holder)
|
||||
if(BODY_ZONE_L_LEG)
|
||||
prosthetic = new/obj/item/bodypart/l_leg/robot/surplus(quirk_holder)
|
||||
slot_string = "left leg"
|
||||
if(!HAS_TRAIT(H, TRAIT_PARA)) // Prevent paraplegic legs being replaced
|
||||
prosthetic = new/obj/item/bodypart/l_leg/robot/surplus(quirk_holder)
|
||||
if(BODY_ZONE_R_LEG)
|
||||
prosthetic = new/obj/item/bodypart/r_leg/robot/surplus(quirk_holder)
|
||||
slot_string = "right leg"
|
||||
prosthetic.replace_limb(H)
|
||||
qdel(old_part)
|
||||
H.regenerate_icons()
|
||||
if(!HAS_TRAIT(H, TRAIT_PARA)) // Prevent paraplegic legs being replaced
|
||||
prosthetic = new/obj/item/bodypart/r_leg/robot/surplus(quirk_holder)
|
||||
|
||||
if (prosthetic)
|
||||
prosthetic.replace_limb(H)
|
||||
qdel(old_part)
|
||||
H.regenerate_icons()
|
||||
else
|
||||
WARNING("Prosthetic ([slot_string]) is incompatible with Paraplegic.")
|
||||
|
||||
/datum/quirk/prosthetic_limb/post_add()
|
||||
to_chat(quirk_holder, "<span class='boldannounce'>Your [slot_string] has been replaced with a surplus prosthetic. It is fragile and will easily come apart under duress. Additionally, \
|
||||
you need to use a welding tool and cables to repair it, instead of bruise packs and ointment.</span>")
|
||||
to_chat(quirk_holder, "<span class='boldannounce'>\
|
||||
Your [slot_string] has been replaced with a surplus prosthetic. \
|
||||
It is fragile and will easily come apart under duress. \
|
||||
Additionally, you need to use a welding tool and cables to repair it, \
|
||||
instead of bruise packs and ointment.</span>")
|
||||
|
||||
/datum/quirk/prosthetic_limb/left_arm
|
||||
name = "Prosthetic Limb (Left Arm)"
|
||||
desc = "An accident caused you to lose your left arm. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_L_ARM
|
||||
|
||||
/datum/quirk/prosthetic_limb/right_arm
|
||||
name = "Prosthetic Limb (Right Arm)"
|
||||
desc = "An accident caused you to lose your right arm. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_R_ARM
|
||||
|
||||
/datum/quirk/prosthetic_limb/left_leg
|
||||
name = "Prosthetic Limb (Left Leg)"
|
||||
desc = "An accident caused you to lose your left leg. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_L_LEG
|
||||
|
||||
/datum/quirk/prosthetic_limb/right_leg
|
||||
name = "Prosthetic Limb (Right Leg)"
|
||||
desc = "An accident caused you to lose your right leg. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_R_LEG
|
||||
|
||||
/datum/quirk/insanity
|
||||
name = "Reality Dissociation Syndrome"
|
||||
@@ -347,26 +379,6 @@ GLOBAL_LIST_EMPTY(family_heirlooms)
|
||||
to_chat(quirk_holder, "<span class='big bold info'>Please note that your dissociation syndrome does NOT give you the right to attack people or otherwise cause any interference to \
|
||||
the round. You are not an antagonist, and the rules will treat you the same as other crewmembers.</span>")
|
||||
|
||||
/datum/quirk/prosthetic_limb/left_arm
|
||||
name = "Prosthetic Limb (Left Arm)"
|
||||
desc = "An accident caused you to lose your left arm. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_L_ARM
|
||||
|
||||
/datum/quirk/prosthetic_limb/right_arm
|
||||
name = "Prosthetic Limb (Right Arm)"
|
||||
desc = "An accident caused you to lose your right arm. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_R_ARM
|
||||
|
||||
/datum/quirk/prosthetic_limb/left_leg
|
||||
name = "Prosthetic Limb (Left Leg)"
|
||||
desc = "An accident caused you to lose your left leg. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_L_LEG
|
||||
|
||||
/datum/quirk/prosthetic_limb/right_leg
|
||||
name = "Prosthetic Limb (Right Leg)"
|
||||
desc = "An accident caused you to lose your right leg. Because of this, it's replaced with a prosthetic!"
|
||||
specific = BODY_ZONE_R_LEG
|
||||
|
||||
/datum/quirk/social_anxiety
|
||||
name = "Social Anxiety"
|
||||
desc = "Talking to people is very difficult for you, and you often stutter or even lock up."
|
||||
|
||||
Reference in New Issue
Block a user