From 732c73b0aaa739b4f336e2882055c266234ed257 Mon Sep 17 00:00:00 2001 From: SeepingVisage <160535199+SeepingVisage@users.noreply.github.com> Date: Sat, 11 Jan 2025 22:55:03 -0500 Subject: [PATCH] readds burpslur burpslur. get it from fizulphite --- GainStation13/code/mechanics/fatness.dm | 4 +- GainStation13/code/modules/mob/mob_helpers.dm | 37 +++++++++++++++++++ code/modules/mob/living/carbon/human/human.dm | 1 + code/modules/mob/living/life.dm | 3 ++ code/modules/mob/living/say.dm | 3 ++ tgstation.dme | 1 + 6 files changed, 48 insertions(+), 1 deletion(-) create mode 100644 GainStation13/code/modules/mob/mob_helpers.dm diff --git a/GainStation13/code/mechanics/fatness.dm b/GainStation13/code/mechanics/fatness.dm index 5f8b6ecdcb..de09afe0f4 100644 --- a/GainStation13/code/mechanics/fatness.dm +++ b/GainStation13/code/mechanics/fatness.dm @@ -1,5 +1,8 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/command/bridge, /area/maintenance, /area/security/prison, /area/holodeck, /area/commons/vacant_room/office, /area/space, /area/ruin, /area/lavaland, /area/awaymission, /area/centcom, /area/fatlab)) +/mob/living + var/burpslurring = 0 //GS13 - necessary due to "say" being defined by mob/living + /mob/living/carbon //Due to the changes needed to create the system to hide fatness, here's some notes: // -If you are making a mob simply gain or lose weight, use adjust_fatness. Try to not touch the variables directly unless you know 'em well @@ -21,7 +24,6 @@ GLOBAL_LIST_INIT(uncapped_resize_areas, list(/area/command/bridge, /area/mainten var/doorstuck = 0 var/fullness = FULLNESS_LEVEL_HALF_FULL - var/burpslurring = 0 var/fullness_reduction_timer = 0 // When was the last time they emoted to reduce their fullness /** diff --git a/GainStation13/code/modules/mob/mob_helpers.dm b/GainStation13/code/modules/mob/mob_helpers.dm new file mode 100644 index 0000000000..6f1531abae --- /dev/null +++ b/GainStation13/code/modules/mob/mob_helpers.dm @@ -0,0 +1,37 @@ +//GS13 - BURP SLURRING, USED IN SOME CHEMS OR EFFECTS + +/proc/burpslur(phrase, strength = 50) + strength = min(50, strength) + phrase = html_decode(phrase) + var/leng = length(phrase) + . = "" + var/newletter = "" + var/rawchar = "" + for(var/i = 1, i <= leng, i += length(rawchar)) + rawchar = newletter = phrase[i] + if(rand(1,100)<=strength * 0.5) + var/lowerletter = lowertext(newletter) + if(lowerletter == "o") + newletter = " ++BURRP++ " + else if(lowerletter == "s") + newletter = " ++URP++ " + else if(lowerletter == "a") + newletter = " ++GWUURRP++ " + else if(lowerletter == "u") + newletter = " ++BUUUURRP++ " + else if(lowerletter == "c") + newletter = " ++BURP++ " + if(rand(1,100) <= strength * 0.25) + if(newletter == " ") + newletter = "...++GWWUUARRP++..." + else if(newletter == ".") + newletter = " ++BWUUARRP++." + switch(rand(1,100) <= strength * 0.5) + if(1) + newletter += " ++BURRP++ " + if(10) + newletter += "[newletter]" + if(20) + newletter += "[newletter][newletter]" + . += "[newletter]" + return sanitize(.) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d75398a790..bcecb34121 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -643,6 +643,7 @@ remove_all_embedded_objects() set_heartattack(FALSE) drunkenness = 0 + burpslurring = 0 //GS13 for(var/datum/mutation/human/HM in dna.mutations) if(HM.quality != POSITIVE) dna.remove_mutation(HM.name) diff --git a/code/modules/mob/living/life.dm b/code/modules/mob/living/life.dm index bfad3339f1..704e919f5b 100644 --- a/code/modules/mob/living/life.dm +++ b/code/modules/mob/living/life.dm @@ -163,6 +163,9 @@ if(slurring) slurring = max(slurring-1,0) + if(burpslurring) // GS13 + burpslurring = max(burpslurring-1,0) + if(cultslurring) cultslurring = max(cultslurring-1, 0) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 5fe6a4b8da..7355bf7263 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -434,6 +434,9 @@ GLOBAL_LIST_INIT(department_radio_keys, list( if(slurring) message = slur(message,slurring) + if(burpslurring) + message = burpslur(message,burpslurring) //GS13 + if(cultslurring) message = cultslur(message) diff --git a/tgstation.dme b/tgstation.dme index 7b5e4ddf4a..fc71221d22 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -4037,6 +4037,7 @@ #include "GainStation13\code\modules\loadout\tablet.dm" #include "GainStation13\code\modules\mapping\areas.dm" #include "GainStation13\code\modules\mapping\ghost_roles.dm" +#include "GainStation13\code\modules\mob\mob_helpers.dm" #include "GainStation13\code\modules\mob\dead\new_player\sprite_accessories\ears.dm" #include "GainStation13\code\modules\mob\dead\new_player\sprite_accessories\frills.dm" #include "GainStation13\code\modules\mob\dead\new_player\sprite_accessories\hair_face.dm"