Quirk "quadruple amputee" now will return your original limbs back if you off it (#90745)

## About The Pull Request

Then you try to remove quirk - your limbs didn't change back to normal

**Visual bug only**, originally found on downstream. Also confirmed on
up-to-date TG-localhost


![error](https://github.com/user-attachments/assets/33c280d2-9aa9-4ccc-bca2-3977a2e723de)

## Why It's Good For The Game

Bug-Fix always good

## Changelog

🆑
fix: Quirk "quadruple amputee" now will return your original limbs back
if you off it
qol: Quirk "prosthetic limb" now resets more correctly
/🆑

---------

Co-authored-by: Maximal08 <73069825+Maximal08@users.noreply.github.com>
Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
This commit is contained in:
Artemchik542
2025-05-16 22:40:49 -07:00
committed by GitHub
co-authored by Maximal08 Ghom
parent a0e50e3265
commit fca1e61371
3 changed files with 35 additions and 6 deletions
@@ -8,24 +8,26 @@
mail_goodies = list(/obj/item/weldingtool/mini, /obj/item/stack/cable_coil/five)
/// The slot to replace, in string form
var/slot_string = "limb"
/// the original limb from before the prosthetic was applied
var/obj/item/bodypart/old_limb
/// The slot to replace, in GLOB.limb_zones (both arms and both legs)
var/limb_zone
/datum/quirk_constant_data/prosthetic_limb
associated_typepath = /datum/quirk/prosthetic_limb
customization_options = list(/datum/preference/choiced/prosthetic)
/datum/quirk/prosthetic_limb/add_unique(client/client_source)
var/limb_type = GLOB.prosthetic_limb_choice[client_source?.prefs?.read_preference(/datum/preference/choiced/prosthetic)]
var/obj/item/bodypart/limb_type = GLOB.prosthetic_limb_choice[client_source?.prefs?.read_preference(/datum/preference/choiced/prosthetic)]
if(isnull(limb_type)) //Client gone or they chose a random prosthetic
limb_type = GLOB.prosthetic_limb_choice[pick(GLOB.prosthetic_limb_choice)]
limb_zone = limb_type.body_zone
var/mob/living/carbon/human/human_holder = quirk_holder
var/obj/item/bodypart/surplus = new limb_type()
slot_string = "[surplus.plaintext_zone]"
medical_record_text = "Patient uses a low-budget prosthetic on the [slot_string]."
old_limb = human_holder.return_and_replace_bodypart(surplus, special = TRUE)
human_holder.del_and_replace_bodypart(surplus, special = TRUE)
/datum/quirk/prosthetic_limb/post_add()
to_chat(quirk_holder, span_bolddanger("Your [slot_string] has been replaced with a surplus prosthetic. It has almost no muscle force, and makes you unhealthier by just having it. Additionally, \
@@ -33,5 +35,4 @@
/datum/quirk/prosthetic_limb/remove()
var/mob/living/carbon/human/human_holder = quirk_holder
human_holder.del_and_replace_bodypart(old_limb, special = TRUE)
old_limb = null
human_holder.reset_to_original_bodypart(limb_zone)
@@ -18,3 +18,13 @@
/datum/quirk/quadruple_amputee/post_add()
to_chat(quirk_holder, span_bolddanger("All your limbs have been replaced with surplus prosthetics. They are fragile and will easily come apart under duress. \
Additionally, you need to use a welding tool and cables to repair them, instead of bruise packs and ointment."))
/datum/quirk/quadruple_amputee/remove()
if(QDELING(quirk_holder))
return
var/mob/living/carbon/human/human_holder = quirk_holder
human_holder.reset_to_original_bodypart(BODY_ZONE_L_ARM)
human_holder.reset_to_original_bodypart(BODY_ZONE_R_ARM)
human_holder.reset_to_original_bodypart(BODY_ZONE_L_LEG)
human_holder.reset_to_original_bodypart(BODY_ZONE_R_LEG)