diff --git a/code/__SPLURTCODE/DEFINES/cit_defines.dm b/code/__SPLURTCODE/DEFINES/cit_defines.dm index 768bb61ea2..5a952148bd 100644 --- a/code/__SPLURTCODE/DEFINES/cit_defines.dm +++ b/code/__SPLURTCODE/DEFINES/cit_defines.dm @@ -4,4 +4,7 @@ #define GEN_REMOVE_EQUIPMENT "Remove Equipment" #define GEN_INSERT_EQUIPMENT "Insert Equipment" +#define GENITAL_CAN_STUFF (1<<14) +#define GEN_ALLOW_EGG_STUFFING "Allows egg stuffing" //SPLURT EDIT, EGG STUFFING + GLOBAL_LIST_INIT(genitals_interactions, list(GEN_REMOVE_EQUIPMENT, GEN_INSERT_EQUIPMENT)) diff --git a/code/__SPLURTCODE/DEFINES/signals.dm b/code/__SPLURTCODE/DEFINES/signals.dm index 3d290d25ed..9a44ad968d 100644 --- a/code/__SPLURTCODE/DEFINES/signals.dm +++ b/code/__SPLURTCODE/DEFINES/signals.dm @@ -2,3 +2,4 @@ #define COMSIG_HEALTH_SCAN "health_scan" #define COMSIG_ORGAN_REMOVED "organ_removed" #define COMSIG_MOB_CLIMAX "mob_coomed" +#define COMSIG_OBJ_WRITTEN_ON "written_on" diff --git a/code/modules/arousal/genitals.dm b/code/modules/arousal/genitals.dm index 723903b1a5..eb8bf76296 100644 --- a/code/modules/arousal/genitals.dm +++ b/code/modules/arousal/genitals.dm @@ -81,7 +81,8 @@ return owner.is_groin_exposed() /obj/item/organ/genital/proc/toggle_visibility(visibility, update = TRUE) - genital_flags &= ~(GENITAL_THROUGH_CLOTHES|GENITAL_HIDDEN|GENITAL_UNDIES_HIDDEN) + if(visibility != GEN_ALLOW_EGG_STUFFING) + genital_flags &= ~(GENITAL_THROUGH_CLOTHES|GENITAL_HIDDEN|GENITAL_UNDIES_HIDDEN) if(owner) owner.exposed_genitals -= src switch(visibility) @@ -101,6 +102,10 @@ genital_flags |= GENITAL_HIDDEN if(owner) owner.log_message("Hid their [src] completely",LOG_EMOTE) + if(GEN_ALLOW_EGG_STUFFING) + TOGGLE_BITFIELD(genital_flags, GENITAL_CAN_STUFF) + if(owner) + owner.log_message("Allowed egg stuffing in their [src]") if(update && owner && ishuman(owner)) //recast to use update genitals proc var/mob/living/carbon/human/H = owner diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 8670c00f65..af3caa80a0 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -366,8 +366,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) var/oviposition = FALSE /// Does john spaceman look like a gluttonous slob if he pregent? var/pregnancy_inflation = FALSE - /// Does john spaceman like being stuffed - var/egg_stuffing = FALSE //SPLURT END /datum/preferences/New(client/C) @@ -849,7 +847,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "

Pregnancy preferences

" dat += "Can impregnate:[virility ? "Enabled" : "Disabled"]" dat += "Can get pregnant:[fertility ? "Enabled" : "Disabled"]" - dat += "Can be stuffed with eggs:[egg_stuffing ? "Enabled" : "Disabled"]" if(fertility) dat += "Pregnancy type:[oviposition ? "Oviposition" : "Live Birth"]" dat += "Pregnancy inflation:[pregnancy_inflation ? "Enabled" : "Disabled"]" @@ -2064,9 +2061,6 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("pregnancy_inflation") pregnancy_inflation = !pregnancy_inflation - if("egg_stuffing") - egg_stuffing = !egg_stuffing - //SPLURT EDIT END if("hair") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index 2a63a088d9..1fa1049913 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -1192,7 +1192,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["fertile"] >> fertility S["oviposition"] >> oviposition S["pregnancy_inflation"] >> pregnancy_inflation - S["egg_stuffing"] >> egg_stuffing //SPLURT EDIT END cit_character_pref_load(S) @@ -1391,7 +1390,6 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["fertile"], fertility) WRITE_FILE(S["oviposition"], oviposition) WRITE_FILE(S["pregnancy_inflation"], pregnancy_inflation) - WRITE_FILE(S["egg_stuffing"], egg_stuffing) WRITE_FILE(S["headshot"], features["headshot_link"]) //SPLURT EDIT END diff --git a/modular_sand/code/datums/interactions/interaction_interface.dm b/modular_sand/code/datums/interactions/interaction_interface.dm index cdaa8ffe52..a53453f0fb 100644 --- a/modular_sand/code/datums/interactions/interaction_interface.dm +++ b/modular_sand/code/datums/interactions/interaction_interface.dm @@ -97,8 +97,15 @@ visibility = "Always hidden" else visibility = "Hidden by clothes" + + var/extras = "None" + if(CHECK_BITFIELD(genital.genital_flags, GENITAL_CAN_STUFF)) + extras = "Allows egg stuffing" + + genital_entry["extras"] = extras genital_entry["visibility"] = visibility genital_entry["possible_choices"] = GLOB.genitals_visibility_toggles + genital_entry["extra_choices"] = list(GEN_ALLOW_EGG_STUFFING) genitals += list(genital_entry) if(iscarbon(self)) var/simulated_ass = list() diff --git a/modular_splurt/code/datums/components/pregnancy.dm b/modular_splurt/code/datums/components/pregnancy.dm index 57fa5a614c..e981ace27f 100644 --- a/modular_splurt/code/datums/components/pregnancy.dm +++ b/modular_splurt/code/datums/components/pregnancy.dm @@ -12,6 +12,8 @@ var/datum/dna/father_dna var/datum/dna/mother_dna + var/egg_name + var/stage = 0 var/max_stage = PREGNANCY_STAGES COOLDOWN_DECLARE(stage_time) @@ -69,12 +71,14 @@ if(isitem(parent)) RegisterSignal(parent, COMSIG_ATOM_ENTERING, .proc/on_entering) RegisterSignal(parent, COMSIG_OBJ_BREAK, .proc/on_obj_break) + RegisterSignal(parent, COMSIG_OBJ_WRITTEN_ON, .proc/name_egg) /datum/component/pregnancy/UnregisterFromParent() if(carrier) unregister_carrier() UnregisterSignal(parent, COMSIG_ATOM_ENTERING) UnregisterSignal(parent, COMSIG_OBJ_BREAK) + UnregisterSignal(parent, COMSIG_OBJ_WRITTEN_ON) /datum/component/pregnancy/proc/register_carrier() RegisterSignal(carrier, COMSIG_MOB_DEATH, .proc/fetus_mortus) @@ -108,6 +112,7 @@ oviposition = FALSE carrier = null container = null + egg_name = null /datum/component/pregnancy/PostTransfer() if(isliving(parent)) @@ -119,6 +124,11 @@ else return COMPONENT_INCOMPATIBLE +/datum/component/pregnancy/proc/name_egg(datum/source, name) + SIGNAL_HANDLER + + egg_name = name + /datum/component/pregnancy/proc/on_climax(datum/source, atom/target, obj/item/organ/genital/sender, obj/item/organ/genital/receiver, spill) SIGNAL_HANDLER @@ -131,8 +141,7 @@ to_chat(carrier, span_userlove("You feel your egg sliding out slowly inside!")) if(receiver && isliving(target)) - var/mob/living/livingtarg = target - if(livingtarg.client?.prefs?.egg_stuffing) + if(CHECK_BITFIELD(receiver.genital_flags, GENITAL_CAN_STUFF)) return lay_eg(receiver) return lay_eg(get_turf(carrier)) @@ -163,8 +172,8 @@ /datum/component/pregnancy/proc/handle_life(seconds) SIGNAL_HANDLER - if(ishuman(parent) && pregnancy_inflation) - handle_belly_stuff(parent) + if(ishuman(carrier) && pregnancy_inflation) + handle_belly_stuff(carrier) if(oviposition) handle_ovi_preg() @@ -175,6 +184,9 @@ revealed = TRUE carrier.apply_status_effect(/datum/status_effect/pregnancy) + if(stage > 3 && ishuman(carrier)) + SEND_SIGNAL(carrier, COMSIG_ADD_MOOD_EVENT, "pregnancy", /datum/mood_event/pregnant_negative) + if(COOLDOWN_FINISHED(src, stage_time)) stage += 1 stage = min(stage, max_stage) @@ -195,7 +207,7 @@ belly.update() /datum/component/pregnancy/proc/handle_preg() - if(prob(10)) + if(prob(2) && !isitem(parent)) switch(stage) if(2) to_chat(carrier, span_warning("You can feel your belly getting bigger!")) @@ -204,7 +216,7 @@ to_chat(carrier, span_warning("Oh! The kicking in my belly is getting a bit more intense!")) else to_chat(carrier, span_warning("The kicking is quite intense now!")) - carrier.adjustStaminaLoss(30) + carrier.adjustStaminaLoss(20) if(4) to_chat(carrier, span_warning("You feel like you're going into labor very soon! Get ready to give birth!")) carrier.adjustStaminaLoss(50) @@ -213,11 +225,16 @@ return if(stage < max_stage) return - - if(prob(50)) - to_chat(carrier, span_warning("You're going into labor right now!")) + if(!isitem(parent)) + if(prob(50)) + to_chat(carrier, span_warning("You're going into labor right now!")) + else + to_chat(carrier, span_userdanger("It hurts! The baby is coming out!")) else - to_chat(carrier, span_userdanger("It hurts! The baby is coming out!")) + if(prob(50)) + to_chat(carrier, span_warning("Something is moving inside you!")) + else + to_chat(carrier, span_userdanger("It hurts! Something is trying to come out!")) carrier.emote("scream") @@ -236,17 +253,17 @@ var/mob/living/babby = new baby_type(get_turf(carrier)) if(ishuman(babby)) determine_baby_dna(babby) - INVOKE_ASYNC(GLOBAL_PROC, .proc/offer_control_to_babby, babby, carrier) + INVOKE_ASYNC(GLOBAL_PROC, .proc/offer_control_to_babby, babby, carrier, egg_name) + SEND_SIGNAL(carrier, COMSIG_ADD_MOOD_EVENT, "pregnancy_end", /datum/mood_event/pregnant_positive) if(isitem(parent)) var/obj/item = parent item.forceMove(get_turf(carrier)) item.obj_break(MELEE) - else - qdel(src) + qdel(src) /datum/component/pregnancy/proc/handle_ovi_preg() if(stage <= 2) - if(stage == 2 && prob(10)) + if(stage == 2 && prob(2)) to_chat(carrier, span_notice("You feel something pressing lightly inside")) return @@ -278,9 +295,6 @@ var/obj/item/oviposition_egg/eggo = new(carrier) - eggo.TakeComponent(src) - eggo.forceMove(location) - if(isorgan(location)) var/obj/item/organ/recv = location carrier.visible_message(span_userlove("[carrier] laid an egg!"), \ @@ -289,6 +303,9 @@ carrier.visible_message(span_notice("[carrier] laid an egg!"), \ span_nicegreen("The egg came out!")) + eggo.TakeComponent(src) + eggo.forceMove(location) + return TRUE //not how genetics work but okay @@ -333,6 +350,7 @@ if(belly && pregnancy_inflation) belly.size = 0 belly.update() + SEND_SIGNAL(gregnant, COMSIG_CLEAR_MOOD_EVENT, "pregnancy") /datum/component/pregnancy/proc/fetus_mortus() SIGNAL_HANDLER @@ -342,6 +360,9 @@ new /obj/effect/gibspawner/generic(get_turf(carrier)) else new /obj/effect/decal/cleanable/egg_smudge(get_turf(carrier)) + carrier.Knockdown(200, TRUE, TRUE) + carrier.Stun(200, TRUE, TRUE) + carrier.adjustStaminaLoss(200) carrier.visible_message(span_danger("[carrier] has a miscarriage!"), \ span_userdanger("Oh no! My baby is dead!")) qdel(src) @@ -356,10 +377,10 @@ /datum/component/pregnancy/proc/handle_damage(datum/source, damage, damagetype, def_zone) SIGNAL_HANDLER - if(def_zone == BODY_ZONE_CHEST && damage > 25 && prob(40)) + if(def_zone == BODY_ZONE_CHEST && damage > 20 && prob(40)) fetus_mortus() -/proc/offer_control_to_babby(mob/living/babby, mob/living/mommy) +/proc/offer_control_to_babby(mob/living/babby, mob/living/mommy, pre_named) var/poll_message = "Do you want to play as [mommy]'s offspring?" var/list/mob/candidates = pollCandidatesForMob(poll_message, ROLE_RESPAWN, null, FALSE, 120, babby) if(!LAZYLEN(candidates)) @@ -378,7 +399,9 @@ to_chat(babby, "You are the son (or daughter) of [mommy_name]!") var/name - if(QDELETED(mommy)) + if(pre_named) + name = pre_named + else if(QDELETED(mommy)) name = input(babby, "What will be your name?", "Name yourself") as null|text else name = input(mommy, "What will be your baby's name?", "Name the baby") as null|text diff --git a/modular_splurt/code/datums/mood_events/preg_events.dm b/modular_splurt/code/datums/mood_events/preg_events.dm new file mode 100644 index 0000000000..35dcadfcd4 --- /dev/null +++ b/modular_splurt/code/datums/mood_events/preg_events.dm @@ -0,0 +1,8 @@ +/datum/mood_event/pregnant_negative + description = "THE BABY IS COMING OUT...\n" + mood_change = -7 + +/datum/mood_event/pregnant_positive + description = "The baby came out...phew\n" + mood_change = 3 + timeout = 2 MINUTES diff --git a/modular_splurt/code/game/object/items.dm b/modular_splurt/code/game/object/items.dm index 3e44eb95fa..238d8ea99f 100644 --- a/modular_splurt/code/game/object/items.dm +++ b/modular_splurt/code/game/object/items.dm @@ -122,8 +122,8 @@ /obj/item/oviposition_egg/insert_item_organ(mob/living/carbon/user, mob/living/carbon/target, obj/item/organ/genital/target_organ) - if(!target.client?.prefs?.egg_stuffing) - to_chat(user, span_warning("They don't want you to do that!")) + if(!(CHECK_BITFIELD(target_organ.genital_flags, GENITAL_CAN_STUFF))) + to_chat(user, span_warning("This genital can't be stuffed!")) return target.visible_message(span_warning("\The [user] is trying to insert an egg inside \the [target]!"),\ diff --git a/modular_splurt/code/game/object/items/oviposition.dm b/modular_splurt/code/game/object/items/oviposition.dm index 22fda4441c..f9b9740d6e 100644 --- a/modular_splurt/code/game/object/items/oviposition.dm +++ b/modular_splurt/code/game/object/items/oviposition.dm @@ -4,6 +4,7 @@ icon_state = "egg" icon = 'icons/obj/food/food.dmi' integrity_failure = 0.9 + obj_flags = UNIQUE_RENAME /obj/item/oviposition_egg/obj_break(damage_flag) . = ..() diff --git a/modular_splurt/code/modules/paperwork/pen.dm b/modular_splurt/code/modules/paperwork/pen.dm index e9e4d7c435..0e3fd48485 100644 --- a/modular_splurt/code/modules/paperwork/pen.dm +++ b/modular_splurt/code/modules/paperwork/pen.dm @@ -44,3 +44,10 @@ to_chat(user, "You write on your [BP:name].") else . = ..() + +/obj/item/pen/try_modify_object(obj/O, mob/living/user, proximity) + . = ..() + if(!O.renamedByPlayer) + return + if(O.name != initial(O.name)) + SEND_SIGNAL(O, COMSIG_OBJ_WRITTEN_ON, O.name) diff --git a/tgstation.dme b/tgstation.dme index b2bd50291e..b1f9627109 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4264,6 +4264,7 @@ #include "modular_splurt\code\datums\mood_events\generic_positive_events.dm" #include "modular_splurt\code\datums\mood_events\mood_event.dm" #include "modular_splurt\code\datums\mood_events\needs_events.dm" +#include "modular_splurt\code\datums\mood_events\preg_events.dm" #include "modular_splurt\code\datums\mutations\telekenisis.dm" #include "modular_splurt\code\datums\ruins\lavaland.dm" #include "modular_splurt\code\datums\ruins\station.dm" diff --git a/tgui/packages/tgui/interfaces/MobInteraction.tsx b/tgui/packages/tgui/interfaces/MobInteraction.tsx index 1d14a31a58..84b95fe13a 100644 --- a/tgui/packages/tgui/interfaces/MobInteraction.tsx +++ b/tgui/packages/tgui/interfaces/MobInteraction.tsx @@ -31,6 +31,8 @@ type GenitalData = { name: string, key: string, visibility: string, + extras: string, + extra_choices: string[], possible_choices: string[], } @@ -238,6 +240,7 @@ const ModeToIcon = { "Hidden by clothes": "tshirt", "Hidden by underwear": "low-vision", "Always hidden": "eye-slash", + "Allows egg stuffing": "egg", }; const GenitalVisibilityTab = (props, context) => { @@ -260,6 +263,18 @@ const GenitalVisibilityTab = (props, context) => { visibility: choice, })} /> ))} + {genital.extra_choices instanceof Array + ? genital.extra_choices.map(choice => ( +