From 9b147ca4afada0f61ebb82da21fcc707601eb052 Mon Sep 17 00:00:00 2001 From: CHOMPStation2 <58959929+CHOMPStation2@users.noreply.github.com> Date: Tue, 2 Apr 2024 03:23:45 -0700 Subject: [PATCH] [MIRROR] Added Post-Drain belly modes (#8118) Co-authored-by: SatinIsle <98125273+SatinIsle@users.noreply.github.com> Co-authored-by: Kashargul --- code/__defines/belly_modes_vr.dm | 6 ++++++ code/modules/mob/living/carbon/human/life.dm | 20 ++++++++++++++++++ code/modules/mob/living/living_defines.dm | 1 + code/modules/vore/eating/belly_obj_vr.dm | 14 ++++++++++++- code/modules/vore/eating/bellymodes_vr.dm | 14 +++++++++++++ code/modules/vore/eating/living_vr.dm | 1 + code/modules/vore/eating/vorepanel_vr.dm | 21 +++++++++++++++++++ tgui/packages/tgui/interfaces/VorePanel.jsx | 7 +++++++ .../VorePanel/VoreSelectedBellyOptions.tsx | 7 +++++++ 9 files changed, 90 insertions(+), 1 deletion(-) diff --git a/code/__defines/belly_modes_vr.dm b/code/__defines/belly_modes_vr.dm index fde55e8ad8..6116eb7d28 100644 --- a/code/__defines/belly_modes_vr.dm +++ b/code/__defines/belly_modes_vr.dm @@ -40,3 +40,9 @@ #define MIN_NUTRITION_TO_GAIN 450 // Above this amount you will gain weight #define MAX_NUTRITION_TO_LOSE 150 // Below this amount you will lose weight //CHOMPEdit Making weight loss mechanically more accessible // #define WEIGHT_PER_NUTRITION 0.0285 // Tuned so 1050 (nutrition for average mob) = 30 lbs + +// Drain modes +#define DR_NORMAL "Normal" +#define DR_SLEEP "Sleep" +#define DR_FAKE "False Sleep" +#define DR_WEIGHT "Weight Drain" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index ad310b0c23..8d0d5e2d31 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -1309,6 +1309,11 @@ Paralyse(10) setHalLoss(species.total_health - 1) + if(tiredness) //tiredness for vore drain + tiredness = (tiredness - 1) + if(tiredness >= 100) + Sleeping(5) + if(paralysis || sleeping) blinded = 1 set_stat(UNCONSCIOUS) @@ -1499,6 +1504,21 @@ else clear_fullscreen("brute") + //tiredness for drain vore + if(tiredness) + var/severity = 0 + switch(tiredness) + if(10 to 20) severity = 1 + if(20 to 30) severity = 2 + if(30 to 45) severity = 3 + if(45 to 60) severity = 4 + if(60 to 75) severity = 5 + if(75 to 90) severity = 6 + if(90 to INFINITY) severity = 7 + overlay_fullscreen("tired", /obj/screen/fullscreen/oxy, severity) + else + clear_fullscreen("tired") + if(healths) if (chem_effects[CE_PAINKILLER] > 100) healths.icon_state = "health_numb" diff --git a/code/modules/mob/living/living_defines.dm b/code/modules/mob/living/living_defines.dm index 7bdb20349d..6635200baa 100644 --- a/code/modules/mob/living/living_defines.dm +++ b/code/modules/mob/living/living_defines.dm @@ -82,3 +82,4 @@ var/inventory_panel_type = /datum/inventory_panel var/datum/inventory_panel/inventory_panel var/last_resist_time = 0 // world.time of the most recent resist that wasn't on cooldown. + var/tiredness = 0 //For vore draining diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index 9b542b7c7f..04b10e8e67 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -91,7 +91,9 @@ //Digest mode addon flags var/tmp/static/list/mode_flag_list = list("Numbing" = DM_FLAG_NUMBING, "Stripping" = DM_FLAG_STRIPPING, "Leave Remains" = DM_FLAG_LEAVEREMAINS, "Muffles" = DM_FLAG_THICKBELLY, "Affect Worn Items" = DM_FLAG_AFFECTWORN, "Jams Sensors" = DM_FLAG_JAMSENSORS, "Complete Absorb" = DM_FLAG_FORCEPSAY, "Slow Body Digestion" = DM_FLAG_SLOWBODY, "Muffle Items" = DM_FLAG_MUFFLEITEMS, "TURBO MODE" = DM_FLAG_TURBOMODE) //CHOMPEdit //Item related modes - var/tmp/static/list/item_digest_modes = list(IM_HOLD,IM_DIGEST_FOOD,IM_DIGEST,IM_DIGEST_PARALLEL) + var/tmp/static/list/item_digest_modes = list(IM_HOLD,IM_DIGEST_FOOD,IM_DIGEST,IM_DIGEST_PARALLEL) //CHOMPEdit + //drain modes + var/tmp/static/list/drainmodes = list(DR_NORMAL,DR_SLEEP,DR_FAKE,DR_WEIGHT) //List of slots that stripping handles strips var/tmp/static/list/slots = list(slot_back,slot_handcuffed,slot_l_store,slot_r_store,slot_wear_mask,slot_l_hand,slot_r_hand,slot_wear_id,slot_glasses,slot_gloves,slot_head,slot_shoes,slot_belt,slot_wear_suit,slot_w_uniform,slot_s_store,slot_l_ear,slot_r_ear) @@ -100,6 +102,7 @@ var/tmp/digest_mode = DM_HOLD // Current mode the belly is set to from digest_modes (+transform_modes if human) var/tmp/list/items_preserved = list() // Stuff that wont digest so we shouldn't process it again. var/tmp/recent_sound = FALSE // Prevent audio spam + var/tmp/drainmode = DR_NORMAL // Simply drains the prey then does nothing. // Don't forget to watch your commas at the end of each line if you change these. var/list/struggle_messages_outside = list( @@ -455,6 +458,7 @@ "belly_mob_mult", "belly_item_mult", "belly_overall_mult", + "drainmode", ) if (save_digest_mode == 1) @@ -1015,6 +1019,8 @@ for(var/atom/movable/AM as anything in contents) if(isliving(AM)) var/mob/living/L = AM + if(L.stat) + L.SetSleeping(min(L.sleeping,20)) if(L.absorbed && !include_absorbed) continue count += release_specific_contents(AM, silent = TRUE) @@ -1100,6 +1106,12 @@ absorbed_count++ Pred.bloodstr.trans_to(Prey, Pred.reagents.total_volume / absorbed_count) + //Makes it so that if prey are heavily asleep, they will wake up shortly after release + if(isliving(M)) + var/mob/living/ML = M + if(ML.stat) + ML.SetSleeping(min(ML.sleeping,20)) + //Clean up our own business if(!ishuman(owner)) owner.update_icons() diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index bd152d746d..beefccfd1e 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -384,6 +384,20 @@ owner_adjust_nutrition((nutrition_percent / 100) * compensation * 4.5 * personal_nutrition_modifier * pred_digestion_efficiency) //CHOMPedit end /obj/belly/proc/steal_nutrition(mob/living/L) + if(L.nutrition <= 110) + if(drainmode == DR_SLEEP && istype(L,/mob/living/carbon/human)) //Slowly put prey to sleep + if(L.tiredness <= 105) + L.tiredness = (L.tiredness + 6) + if(L.tiredness <= 90 && L.tiredness >= 75) + to_chat(L, "You are about to fall unconscious!") + to_chat(owner, "[L] is about to fall unconscious!") + if(drainmode == DR_FAKE && istype(L,/mob/living/carbon/human)) //Slowly bring prey to the edge of sleep without crossing it + if(L.tiredness <= 93) + L.tiredness = (L.tiredness + 6) + if(drainmode == DR_WEIGHT && istype(L,/mob/living/carbon/human)) //Slowly drain your prey's weight and add it to your own + if(L.weight > 70) + L.weight -= (0.01 * L.weight_loss) + owner.weight += (0.01 * L.weight_loss) //intentionally dependant on the prey's weight loss ratio rather than the preds weight gain to keep them in pace with one another. if(L.nutrition >= 100) var/oldnutrition = (L.nutrition * 0.05) L.nutrition = (L.nutrition * 0.95) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 021b470bf3..b787605ab3 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -498,6 +498,7 @@ absorbed = FALSE //Make sure we're not absorbed muffled = FALSE //Removes Muffling forceMove(get_turf(src)) //Just move me up to the turf, let's not cascade through bellies, there's been a problem, let's just leave. + SetSleeping(0) //Wake up instantly if asleep for(var/mob/living/simple_mob/SA in range(10)) LAZYSET(SA.prey_excludes, src, world.time) log_and_message_admins("[key_name(src)] used the OOC escape button to get out of [key_name(B.owner)] ([B.owner ? "JMP" : "null"])") diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index 302e906f46..6b20e62bc1 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -251,6 +251,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", "belly_mob_mult" = selected.belly_mob_mult, "belly_item_mult" = selected.belly_item_mult, "belly_overall_mult" = selected.belly_overall_mult, + "drainmode" = selected.drainmode, //CHOMP add: vore sprite options and additional stuff "belly_fullscreen_color" = selected.belly_fullscreen_color, //"belly_fullscreen_color_secondary" = selected.belly_fullscreen_color_secondary, // Chomp REMOVE - use our solution, not upstream's @@ -2445,6 +2446,8 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", if(ourtarget.absorbable) process_options += "Absorb" + process_options += "Knockout" //Can't think of any mechanical prefs that would restrict this. Even if they are already asleep, you may want to make it permanent. + if(process_options.len) process_options += "Cancel" else @@ -2500,6 +2503,16 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", var/n = 0 - ourtarget.nutrition ourtarget.adjust_nutrition(n) b.absorb_living(ourtarget) + if("Knockout") + if(tgui_alert(ourtarget, "\The [usr] is attempting to instantly make you unconscious, you will be unable until ejected from the pred. Is this something you are okay with happening to you?","Instant Knockout", list("No", "Yes")) != "Yes") + to_chat(usr, "\The [ourtarget] declined your knockout attempt.") + to_chat(ourtarget, "You declined the knockout attempt.") + return + if(ourtarget.loc != b) + to_chat(usr, "\The [ourtarget] is no longer in \the [b].") + return + ourtarget.AdjustSleeping(500000) + to_chat(ourtarget, "\The [usr] has put you to sleep, you will remain unconscious until ejected from the belly.") if("Cancel") return if("Health Check") @@ -3208,6 +3221,14 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono", var/new_new_damage = CLAMP(new_damage, 0, 6) host.vore_selected.digest_clone = new_new_damage . = TRUE + if("b_drainmode") + var/list/menu_list = host.vore_selected.drainmodes.Copy() + var/new_drainmode = tgui_input_list(usr, "Choose Mode (currently [host.vore_selected.digest_mode])", "Mode Choice", menu_list) + if(!new_drainmode) + return FALSE + + host.vore_selected.drainmode = new_drainmode + host.vore_selected.updateVRPanels() if("b_emoteactive") host.vore_selected.emote_active = !host.vore_selected.emote_active . = TRUE diff --git a/tgui/packages/tgui/interfaces/VorePanel.jsx b/tgui/packages/tgui/interfaces/VorePanel.jsx index eb1b208d33..41fbe1c675 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.jsx +++ b/tgui/packages/tgui/interfaces/VorePanel.jsx @@ -743,6 +743,7 @@ const VoreSelectedBellyOptions = (props) => { belly_item_mult, belly_overall_mult, vorespawn_blacklist, + drainmode, } = belly; return ( @@ -898,6 +899,12 @@ const VoreSelectedBellyOptions = (props) => { content={digest_clone} /> + +