Roundstart Organ Scarring (#20262)

Adds organ scarring to the disabilities menu in a similar nature to
#19923, does not rely on code from the Roundstart Injuries PR

Credit to Geeves for the inspiration and help.

![image](https://github.com/user-attachments/assets/c27ab247-f785-4b79-919b-6e39fb94272e)

![image](https://github.com/user-attachments/assets/7f879d88-c1bc-42c7-ab7d-0efb6110128c)

---------

Signed-off-by: HanSolo1519 <72716882+HanSolo1519@users.noreply.github.com>
This commit is contained in:
HanSolo1519
2024-12-24 12:43:06 +00:00
committed by GitHub
parent 9724f02187
commit 0067510071
2 changed files with 35 additions and 0 deletions
@@ -79,3 +79,29 @@
name = "Major Hemophilia"
desc = "Your blood lacks ALL clotting factors, causing wounds to never stop bleeding."
trait_type = TRAIT_DISABILITY_HEMOPHILIA_MAJOR
ABSTRACT_TYPE(/datum/character_disabilities/organ_scarring)
name = "Organ Scarring"
var/affected_organ
/datum/character_disabilities/organ_scarring/apply_self(var/mob/living/carbon/human/target)
var/obj/item/organ/internal/affecting = target.internal_organs_by_name[affected_organ]
if(affecting)
affecting.set_max_damage(initial(affecting.max_damage) * 0.5)
#define ORGAN_DISABILITY(ORGAN_PATH, ORGAN_NAME, ORGAN_TAG) \
/datum/character_disabilities/organ_scarring/##ORGAN_PATH { \
name = "Scarred Organ: " + ##ORGAN_NAME; \
affected_organ = ##ORGAN_TAG; \
}
ORGAN_DISABILITY(brain, "Brain", BP_BRAIN)
ORGAN_DISABILITY(eyes, "Eyes", BP_EYES)
ORGAN_DISABILITY(lungs, "Lungs", BP_LUNGS)
ORGAN_DISABILITY(liver, "Liver", BP_LIVER)
ORGAN_DISABILITY(kidneys, "Kidneys", BP_KIDNEYS)
ORGAN_DISABILITY(stomach, "Stomach", BP_STOMACH)
ORGAN_DISABILITY(appendix, "Appendix", BP_APPENDIX)
#undef ORGAN_DISABILITY