diff --git a/GainStation13/code/modules/mob/living/emote.dm b/GainStation13/code/modules/mob/living/emote.dm index 5a7ff82e..3eed3f5d 100644 --- a/GainStation13/code/modules/mob/living/emote.dm +++ b/GainStation13/code/modules/mob/living/emote.dm @@ -8,6 +8,18 @@ if ((pref_toggle == 0) || (M.client && M.client.prefs.cit_toggles & pref_toggle)) M.playsound_local(source, noise_name, 50, 1, S = noise) +/datum/emote/living/proc/reduce_fullness(var/mob/living/user, fullness_amount) // fullness_amount should be between 5 and 20 for balance and below 80 for functionality + if(!ishuman(user)) + return FALSE + + var/mob/living/N = user + if(N.fullness >= FULLNESS_LEVEL_BLOATED && N.fullness_reducion_timer + FULLNESS_REDUCTION_COOLDOWN < world.time) + N.fullness -= fullness_amount + if(fullness_amount <= 5) + to_chat(N, "You felt that make some space") + if(fullness_amount > 5) + to_chat(N, "You felt that make a lot of space") + /datum/emote/living/belch key = "belch" key_third_person = "belches loudly" @@ -22,6 +34,7 @@ make_noise(user, "belch", BURPING_NOISES) . = ..() + reduce_fullness(user, rand(6,12)) /datum/emote/living/brap key = "brap" @@ -53,6 +66,7 @@ make_noise(user, "burp", BURPING_NOISES) . = ..() + reduce_fullness(user, rand(4,8)) /datum/emote/living/fart key = "fart" diff --git a/code/__DEFINES/mobs.dm b/code/__DEFINES/mobs.dm index 2c35c147..48962d2c 100644 --- a/code/__DEFINES/mobs.dm +++ b/code/__DEFINES/mobs.dm @@ -156,6 +156,9 @@ #define FULLNESS_LEVEL_HALF_FULL 20 #define FULLNESS_LEVEL_EMPTY 0 +//Fullness emote cooldown +#define FULLNESS_REDUCTION_COOLDOWN 50 + //Fatness levels, Here we go! #define FATNESS_LEVEL_BLOB 3440 #define FATNESS_LEVEL_IMMOBILE 2540 diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 46b56a9e..2320ea0c 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -68,6 +68,7 @@ var/satiety = 0//Carbon var/overeatduration = 0 // How long this guy is overeating //Carbon + var/fullness_reducion_timer = 0 // When was the last time they emoted to reduce their fullness var/a_intent = INTENT_HELP//Living var/list/possible_a_intents = null//Living var/m_intent = MOVE_INTENT_RUN//Living