Files
Bubberstation/code/datums/quirks/negative_quirks/body_purist.dm
SkyratBot 2c1398c34e [MIRROR] fixes punished sect instant transformation from changing species [MDB IGNORE] (#25503)
* fixes punished sect instant transformation from changing species

* Update CODEOWNERS

---------

Co-authored-by: Fikou <23585223+Fikou@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
2023-12-08 21:51:07 +00:00

70 lines
2.8 KiB
Plaintext

/datum/quirk/body_purist
name = "Body Purist"
desc = "You believe your body is a temple and its natural form is an embodiment of perfection. Accordingly, you despise the idea of ever augmenting it with unnatural parts, cybernetic, prosthetic, or anything like it."
icon = FA_ICON_PERSON_RAYS
value = -2
quirk_flags = QUIRK_HUMAN_ONLY|QUIRK_MOODLET_BASED
gain_text = span_danger("You now begin to hate the idea of having cybernetic implants.")
lose_text = span_notice("Maybe cybernetics aren't so bad. You now feel okay with augmentations and prosthetics.")
medical_record_text = "This patient has disclosed an extreme hatred for unnatural bodyparts and augmentations."
hardcore_value = 3
mail_goodies = list(/obj/item/paper/pamphlet/cybernetics)
var/cybernetics_level = 0
/datum/quirk/body_purist/add(client/client_source)
check_cybernetics()
RegisterSignal(quirk_holder, COMSIG_CARBON_GAIN_ORGAN, PROC_REF(on_organ_gain))
RegisterSignal(quirk_holder, COMSIG_CARBON_LOSE_ORGAN, PROC_REF(on_organ_lose))
RegisterSignal(quirk_holder, COMSIG_CARBON_ATTACH_LIMB, PROC_REF(on_limb_gain))
RegisterSignal(quirk_holder, COMSIG_CARBON_REMOVE_LIMB, PROC_REF(on_limb_lose))
/datum/quirk/body_purist/remove()
UnregisterSignal(quirk_holder, list(
COMSIG_CARBON_GAIN_ORGAN,
COMSIG_CARBON_LOSE_ORGAN,
COMSIG_CARBON_ATTACH_LIMB,
COMSIG_CARBON_REMOVE_LIMB,
))
quirk_holder.clear_mood_event("body_purist")
/datum/quirk/body_purist/proc/check_cybernetics()
var/mob/living/carbon/owner = quirk_holder
if(!istype(owner))
return
for(var/obj/item/bodypart/limb as anything in owner.bodyparts)
if(IS_ROBOTIC_LIMB(limb))
cybernetics_level++
for(var/obj/item/organ/organ as anything in owner.organs)
if(IS_ROBOTIC_ORGAN(organ) && !(organ.organ_flags & ORGAN_HIDDEN))
cybernetics_level++
update_mood()
/datum/quirk/body_purist/proc/update_mood()
quirk_holder.clear_mood_event("body_purist")
if(cybernetics_level)
quirk_holder.add_mood_event("body_purist", /datum/mood_event/body_purist, -cybernetics_level * 10)
/datum/quirk/body_purist/proc/on_organ_gain(datum/source, obj/item/organ/new_organ, special)
SIGNAL_HANDLER
if(IS_ROBOTIC_ORGAN(new_organ) && !(new_organ.organ_flags & ORGAN_HIDDEN)) //why the fuck are there 2 of them
cybernetics_level++
update_mood()
/datum/quirk/body_purist/proc/on_organ_lose(datum/source, obj/item/organ/old_organ, special)
SIGNAL_HANDLER
if(IS_ROBOTIC_ORGAN(old_organ) && !(old_organ.organ_flags & ORGAN_HIDDEN))
cybernetics_level--
update_mood()
/datum/quirk/body_purist/proc/on_limb_gain(datum/source, obj/item/bodypart/new_limb, special)
SIGNAL_HANDLER
if(IS_ROBOTIC_LIMB(new_limb))
cybernetics_level++
update_mood()
/datum/quirk/body_purist/proc/on_limb_lose(datum/source, obj/item/bodypart/old_limb, special, dismembered)
SIGNAL_HANDLER
if(IS_ROBOTIC_LIMB(old_limb))
cybernetics_level--
update_mood()