From 2ae20de930d9a8c724ca17f8694476125ad65499 Mon Sep 17 00:00:00 2001 From: Darius <5933805+LeDrascol@users.noreply.github.com> Date: Thu, 2 Feb 2023 23:29:18 +0000 Subject: [PATCH 1/3] Port estrous quirks from SPLURT (#298) * Port estrous quirks from SPLURT This commit ports quirks related to the animal breeding cycle from the downstream server SPLURT. * Add null check for ashwalker round_season Adds a null value check for round_id in ashwalker estrous code to prevent possible runtime issues. --- code/__SANDCODE/DEFINES/traits.dm | 3 ++ modular_sand/code/datums/traits/neutral.dm | 38 +++++++++++++++++++ .../human/species_types/lizardpeople.dm | 28 ++++++++++++++ 3 files changed, 69 insertions(+) diff --git a/code/__SANDCODE/DEFINES/traits.dm b/code/__SANDCODE/DEFINES/traits.dm index a062d75fb6..92799a3fdf 100644 --- a/code/__SANDCODE/DEFINES/traits.dm +++ b/code/__SANDCODE/DEFINES/traits.dm @@ -8,3 +8,6 @@ #define TRAIT_INFERTILE "infertile" /// DNC trait, used to prevent cloning #define TRAIT_DNC_ORDER "dnc_order" +/// Estrous traits, used for mammalian seasonal arousal systems +#define TRAIT_ESTROUS_ACTIVE "estrous_active" +#define TRAIT_ESTROUS_DETECT "estrous_detect" diff --git a/modular_sand/code/datums/traits/neutral.dm b/modular_sand/code/datums/traits/neutral.dm index 9e7e08fdba..4877c1c832 100644 --- a/modular_sand/code/datums/traits/neutral.dm +++ b/modular_sand/code/datums/traits/neutral.dm @@ -21,3 +21,41 @@ gain_text = span_notice("Your womb starts feeling dry and empty, all the life in it begins to fade away...") lose_text = span_love("You feel the warm blow of life flooding your womb, full of newfound, vibrant fertility!") medical_record_text = "Patient doesn't seem able to ovulate properly..." + +/datum/quirk/estrous_detection + name = "Estrous Detection" + desc = "You have a mammalian sense of detecting if someone\'s body longs for breeding." + value = 0 + mob_trait = TRAIT_ESTROUS_DETECT + gain_text = span_love("Your senses adjust, allowing a mammalian sense of others' fertility.") + lose_text = span_notice("Your sense of others' fertility fades.") + +/datum/quirk/estrous_active + name = "In Estrous" + desc = "Your system burns with the desire to be bred. Satisfying your lust will make you happy, while ignoring it may cause you to become sad and needy." + value = 0 + mob_trait = TRAIT_ESTROUS_ACTIVE + gain_text = span_love("You body burns with the desire to be bred.") + lose_text = span_notice("You feel more in control of your body and thoughts.") + +/datum/quirk/estrous_active/add() + // Add examine hook + RegisterSignal(quirk_holder, COMSIG_PARENT_EXAMINE, .proc/quirk_examine_estrous_active) + +/datum/quirk/estrous_active/remove() + // Remove examine hook + UnregisterSignal(quirk_holder, COMSIG_PARENT_EXAMINE) + +/datum/quirk/estrous_active/proc/quirk_examine_estrous_active(atom/examine_target, mob/living/carbon/human/examiner, list/examine_list) + SIGNAL_HANDLER + + // Check if human examiner exists + if(!istype(examiner)) + return + + // Check if examiner lacks the trait, or is self examining + if(!HAS_TRAIT(examiner, TRAIT_ESTROUS_DETECT) || (examiner == quirk_holder)) + return + + // Add quirk message + examine_list += span_love("[quirk_holder.p_they(TRUE)] [quirk_holder.p_are()] currently influenced by the estrous cycle, and long for breeding.") diff --git a/modular_sand/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/modular_sand/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 505aaeeeca..a238241b79 100644 --- a/modular_sand/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/modular_sand/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -1,3 +1,31 @@ +#define ESTROUS_CYCLE_LENGTH 32 +#define ESTROUS_CYCLE_OFFSET 11 + /datum/species/lizard/New() mutant_bodyparts += list("ears" = "None") . = ..() + +/datum/species/lizard/ashwalker/on_species_gain(mob/living/carbon/human/C, datum/species/old_species) + . = ..() + + // Add estrous detect quirk + C.add_quirk(/datum/quirk/estrous_detection, SPECIES_TRAIT) + + // Define round ID + // Requires a server database to use this + var/round_id = text2num(GLOB.round_id) || null + + // Define round mating season value + var/round_season = ((round_id + (ESTROUS_CYCLE_OFFSET + 2)) % ESTROUS_CYCLE_LENGTH) + + // Check for mating season + // Default to active without variable + if((!round_id) || round_season <= 2 && round_season >= 0) + // Alert user in chat + to_chat(C, span_userlove("It\'s that time again. Your loins lay restless as they await a potential mate.")) + + // Add estrous quirk + C.add_quirk(/datum/quirk/estrous_active, SPECIES_TRAIT) + +#undef ESTROUS_CYCLE_LENGTH +#undef ESTROUS_CYCLE_OFFSET From f6f6bc3a82df24bc5a069d454e3f01f2abed07ce Mon Sep 17 00:00:00 2001 From: Sandstorm Bot <85452301+Sandstorm-Bot@users.noreply.github.com> Date: Thu, 2 Feb 2023 23:30:27 +0000 Subject: [PATCH 2/3] Automatic changelog generation for PR #298 [ci skip] --- html/changelogs/AutoChangeLog-pr-298.yml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 html/changelogs/AutoChangeLog-pr-298.yml diff --git a/html/changelogs/AutoChangeLog-pr-298.yml b/html/changelogs/AutoChangeLog-pr-298.yml new file mode 100644 index 0000000000..99f5a7399f --- /dev/null +++ b/html/changelogs/AutoChangeLog-pr-298.yml @@ -0,0 +1,7 @@ +author: LeDrascol +delete-after: true +changes: + - rscadd: Added quirk Estrous Detection + - rscadd: Added quirk In Estrous + - tweak: Ashwalkers now spawn with the Estrous Detection quirk + - tweak: Ashwalkers will now gain the In Estrous quirk during some rounds From 473b303eb1b3d0e18ffa89081e421251b7483d6d Mon Sep 17 00:00:00 2001 From: Sandstorm Bot <85452301+Sandstorm-Bot@users.noreply.github.com> Date: Thu, 2 Feb 2023 23:31:33 +0000 Subject: [PATCH 3/3] Automatic changelog compile [ci skip] --- .../{AutoChangeLog-pr-298.yml => archive/2023-02.yml} | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) rename html/changelogs/{AutoChangeLog-pr-298.yml => archive/2023-02.yml} (82%) diff --git a/html/changelogs/AutoChangeLog-pr-298.yml b/html/changelogs/archive/2023-02.yml similarity index 82% rename from html/changelogs/AutoChangeLog-pr-298.yml rename to html/changelogs/archive/2023-02.yml index 99f5a7399f..ededa77854 100644 --- a/html/changelogs/AutoChangeLog-pr-298.yml +++ b/html/changelogs/archive/2023-02.yml @@ -1,6 +1,5 @@ -author: LeDrascol -delete-after: true -changes: +2023-02-02: + LeDrascol: - rscadd: Added quirk Estrous Detection - rscadd: Added quirk In Estrous - tweak: Ashwalkers now spawn with the Estrous Detection quirk