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/html/changelogs/archive/2023-02.yml b/html/changelogs/archive/2023-02.yml index e7c8e502ce..6b359fb8ce 100644 --- a/html/changelogs/archive/2023-02.yml +++ b/html/changelogs/archive/2023-02.yml @@ -5,3 +5,7 @@ - tweak: Hypnotic Gaze accounts for non-con preferences - balance: Hypnotic Gaze interaction time reduced from 12s to 5s - balance: Hypnotic Gaze can be blocked by eye protection and mind shielding + - 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 diff --git a/modular_sand/code/datums/traits/neutral.dm b/modular_sand/code/datums/traits/neutral.dm index 89486dc153..363f6f7e25 100644 --- a/modular_sand/code/datums/traits/neutral.dm +++ b/modular_sand/code/datums/traits/neutral.dm @@ -22,3 +22,41 @@ 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