From 95b2a10b3cfb0109de14ab0c6cb27bdf968000f0 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Sat, 18 Nov 2023 23:40:47 +0300 Subject: [PATCH] The Bird Is The Word: Avian Traits quirk for tweeting, chirping, and shrieking (#697) * Add Avian Traits perk, allowing characters to sound like birds * Ensure only one racial speech quirk is taken to prevent weirdness * Add racial trait definitions for canine & avians, plus species helper macros * Remove duplicate trait & tidy up defines * Proper overload --------- Co-authored-by: Ephemeralis Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> --- code/__DEFINES/~skyrat_defines/traits.dm | 9 +++++--- code/__HELPERS/~skyrat_helpers/is_helpers.dm | 2 ++ .../subsystem/processing/quirks.dm | 1 + .../code/datums/traits/neutral.dm | 16 ++++++++++++++ modular_skyrat/modules/organs/code/tongue.dm | 22 +++++++++++++++++++ 5 files changed, 47 insertions(+), 3 deletions(-) diff --git a/code/__DEFINES/~skyrat_defines/traits.dm b/code/__DEFINES/~skyrat_defines/traits.dm index 49f025e4ab0..027e0caf930 100644 --- a/code/__DEFINES/~skyrat_defines/traits.dm +++ b/code/__DEFINES/~skyrat_defines/traits.dm @@ -48,6 +48,12 @@ // felinid traits #define TRAIT_FELINE "feline_aspect" +// canine traits +#define TRAIT_CANINE "canine_aspect" + +// avian traits +#define TRAIT_AVIAN "avian_aspect" + // chameleon mutation #define TRAIT_CHAMELEON_SKIN "chameleon_skin" @@ -57,9 +63,6 @@ /// The trait that determines if someone has the oversized quirk. #define TRAIT_OVERSIZED "trait_oversized" -/// Caninid trait -#define TRAIT_CANINE "trait_canine" - /// Cargo Loader trait #define TRAIT_TRASHMAN "trait_trashman" diff --git a/code/__HELPERS/~skyrat_helpers/is_helpers.dm b/code/__HELPERS/~skyrat_helpers/is_helpers.dm index 80f96bf533c..6c46b9295b1 100644 --- a/code/__HELPERS/~skyrat_helpers/is_helpers.dm +++ b/code/__HELPERS/~skyrat_helpers/is_helpers.dm @@ -27,6 +27,8 @@ #define ismammal(A) (is_species(A,/datum/species/mammal)) #define isinsect(A) (is_species(A,/datum/species/insect)) #define isfeline(A) (isfelinid(A) || istajaran(A) || HAS_TRAIT(A, TRAIT_FELINE)) +#define iscanine(A) (isvulpkanin(A) || HAS_TRAIT(A, TRAIT_CANINE)) +#define isavian(A) (isteshari(A) || isvox(A) || isvoxprimalis(A) || HAS_TRAIT(A, TRAIT_AVIAN)) // Xen mobs #define isxenmob(A) (istype(A, /mob/living/simple_animal/hostile/blackmesa/xen)) diff --git a/code/controllers/subsystem/processing/quirks.dm b/code/controllers/subsystem/processing/quirks.dm index 8d8e9a82136..119180d3699 100644 --- a/code/controllers/subsystem/processing/quirks.dm +++ b/code/controllers/subsystem/processing/quirks.dm @@ -30,6 +30,7 @@ GLOBAL_LIST_INIT_TYPED(quirk_blacklist, /list/datum/quirk, list( list(/datum/quirk/no_guns, /datum/quirk/bighands, /datum/quirk/poor_aim), list(/datum/quirk/no_guns, /datum/quirk/nonviolent), list(/datum/quirk/spacer_born, /datum/quirk/oversized), + list(/datum/quirk/feline_aspect, /datum/quirk/item_quirk/canine, /datum/quirk/item_quirk/avian), //SKYRAT EDIT ADDITION END )) diff --git a/modular_skyrat/master_files/code/datums/traits/neutral.dm b/modular_skyrat/master_files/code/datums/traits/neutral.dm index eecdccaee62..e37161a1986 100644 --- a/modular_skyrat/master_files/code/datums/traits/neutral.dm +++ b/modular_skyrat/master_files/code/datums/traits/neutral.dm @@ -230,6 +230,7 @@ GLOBAL_VAR_INIT(DNR_trait_overlay, generate_DNR_trait_overlay()) /datum/quirk/item_quirk/canine name = "Canidae Traits" desc = "Bark. You seem to act like a canine for whatever reason. This will replace most other tongue-based speech quirks." + mob_trait = TRAIT_CANINE icon = FA_ICON_DOG value = 0 medical_record_text = "Patient was seen digging through the trash can. Keep an eye on them." @@ -241,6 +242,21 @@ GLOBAL_VAR_INIT(DNR_trait_overlay, generate_DNR_trait_overlay()) new_tongue.copy_traits_from(human_holder.get_organ_slot(ORGAN_SLOT_TONGUE)) new_tongue.Insert(human_holder, special = TRUE, drop_if_replaced = FALSE) +/datum/quirk/item_quirk/avian + name = "Avian Traits" + desc = "You're a birdbrain, or you've got a bird's brain. This will replace most other tongue-based speech quirks." + mob_trait = TRAIT_AVIAN + icon = FA_ICON_KIWI_BIRD + value = 0 + medical_record_text = "Patient exhibits avian-adjacent mannerisms." + +/datum/quirk/item_quirk/avian/add_unique(client/client_source) + var/mob/living/carbon/human/human_holder = quirk_holder + var/obj/item/organ/internal/tongue/avian/new_tongue = new(get_turf(human_holder)) + + new_tongue.copy_traits_from(human_holder.get_organ_slot(ORGAN_SLOT_TONGUE)) + new_tongue.Insert(human_holder, special = TRUE, drop_if_replaced = FALSE) + /datum/quirk/sensitivesnout name = "Sensitive Snout" desc = "Your face has always been sensitive, and it really hurts when someone pokes it!" diff --git a/modular_skyrat/modules/organs/code/tongue.dm b/modular_skyrat/modules/organs/code/tongue.dm index 54ef552356b..f2a4787ef86 100644 --- a/modular_skyrat/modules/organs/code/tongue.dm +++ b/modular_skyrat/modules/organs/code/tongue.dm @@ -27,6 +27,28 @@ speaker.verb_sing = initial(verb_sing) speaker.verb_yell = initial(verb_yell) +/obj/item/organ/internal/tongue/avian + name = "avian tongue" + desc = "A short and stubby tongue that craves seeds." + say_mod = "chirps" + icon_state = "tongue" + modifies_speech = TRUE + +/obj/item/organ/internal/tongue/avian/Insert(mob/living/carbon/signer, special = FALSE, drop_if_replaced = TRUE) + . = ..() + signer.verb_ask = "peeps" + signer.verb_exclaim = "squawks" + signer.verb_whisper = "murmurs" + signer.verb_yell = "shrieks" + +/obj/item/organ/internal/tongue/avian/Remove(mob/living/carbon/speaker, special = FALSE) + . = ..() + speaker.verb_ask = initial(verb_ask) + speaker.verb_exclaim = initial(verb_exclaim) + speaker.verb_whisper = initial(verb_whisper) + speaker.verb_sing = initial(verb_sing) + speaker.verb_yell = initial(verb_yell) + /// This "human" tongue is only used in Character Preferences / Augmentation menu. /// The base tongue class lacked a say_mod. With say_mod included it makes a non-Human user sound like a Human. /obj/item/organ/internal/tongue/human