diff --git a/GainStation13/code/modules/client/preferences/preferences.dm b/GainStation13/code/modules/client/preferences/preferences.dm index 7a968916..311af660 100644 --- a/GainStation13/code/modules/client/preferences/preferences.dm +++ b/GainStation13/code/modules/client/preferences/preferences.dm @@ -19,8 +19,10 @@ var/blueberry_inflation = FALSE ///Extreme weight gain var/weight_gain_extreme = FALSE - ///stuckage + /// At what weight will you start to get stuck in airlocks? var/stuckage = FALSE + /// At what weight will you start to break chairs? + var/chair_breakage = FALSE // Helplessness, a set of prefs that make things extra tough at higher weights. If set to FALSE, they won't do anything. ///What fatness level disables movement? diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm index c449eeed..7719b4c4 100644 --- a/code/game/machinery/doors/airlock_types.dm +++ b/code/game/machinery/doors/airlock_types.dm @@ -12,7 +12,11 @@ if(!istype(L)) return ..() - if(L.fatness > 5000 && L.client?.prefs?.stuckage) + var/stuckage_weight = L?.client?.prefs?.stuckage + if(!stuckage_weight) + return ..() // They aren't able to get stuck + + if(L.fatness > (stuckage_weight * 2)) if(rand(1, 3) == 1) L.doorstuck = 1 L.visible_message("[L] gets stuck in the doorway!") @@ -22,7 +26,7 @@ L.Knockdown(1) return ..() - else if(L.fatness > 3000 && L.client?.prefs?.stuckage) + else if(L.fatness > stuckage_weight) if(rand(1, 5) == 1) L.doorstuck = 1 L.visible_message("[L] gets stuck in the doorway!") @@ -35,13 +39,13 @@ to_chat(L, "With great effort, you manage to squeeze your massive form through \the [src]. It's a tight fit, but you successfully navigate the narrow opening, barely avoiding getting stuck.") return ..() - else if(L.fatness > 1890 && L.client?.prefs?.stuckage) + else if(L.fatness > (stuckage_weight / 2)) if(rand(1, 5) == 1) L.visible_message("[L]'s hips brush against the doorway...") to_chat(L, "As you pass through \the [src], you feel a slight brushing against your hips. The [src] frame accommodates your form, but it's a close fit..") return ..() - else - return ..() + + return ..() /obj/machinery/door/airlock/abandoned abandoned = TRUE diff --git a/code/game/objects/buckling.dm b/code/game/objects/buckling.dm index f45755bb..f35443e3 100644 --- a/code/game/objects/buckling.dm +++ b/code/game/objects/buckling.dm @@ -113,34 +113,40 @@ add_fingerprint(user) . = buckle_mob(M, check_loc = check_loc) - if(.) - if (M == user && M.fatness >= 3440 && istype(src, /obj/structure/chair)) //GS13 stuff - chair breaking mechanics - M.visible_message(\ - "[M] slowly buckles [M.p_them()]self to [src]. their movements slow and deliberate. As [M] settles into the seat, a sudden, violent crash echoes through the air. [M]'s massive weight mercilessly crushes the poor [src], reducing it to pieces! ",\ - "You slowly try to buckle yourself to [src]. But it breaks under your massive ass!",\ - "You hear metal clanking.") - playsound(loc, 'sound/effects/snap.ogg', 50, 1) - playsound(loc, 'sound/effects/woodhit.ogg', 50, 1) - playsound(loc, 'sound/effects/bodyfall4.ogg', 50, 1) - // Destroy the src object - src.Destroy() - else if(M == user && M.fatness >= 1840) - M.visible_message(\ - "[M] buckles [M.p_them()]self to the creaking [src]. The [src] protests audibly under the weight as [M]'s ample form settles onto its surface. .",\ - "You buckle yourself to [src].The [src] is cracking and is barely able to hold your weight ",\ - "You hear metal clanking.") - playsound(loc, 'sound/effects/crossed.ogg', 50, 1) - else if(M == user && M.fatness >= 840) - M.visible_message(\ - "[M] buckles [M.p_them()]self to the creaking [src] as their weight spreads all over it.",\ - "You buckle yourself to [src].The [src] is creaking as you shuffle a bit ",\ - "You hear metal clanking.") - playsound(loc, 'sound/effects/crossed.ogg', 50, 1) - else - M.visible_message(\ - "[user] buckles [M] to [src]!",\ - "[user] buckles you to [src]!",\ - "You hear metal clanking.") + if(!.) + return + + var/breaking_weight = M?.client?.prefs?.chair_breakage + if(!breaking_weight || (M != user) || ((breaking_weight / 3) > M.fatness)) + M.visible_message(\ + "[user] buckles [M] to [src]!",\ + "[user] buckles you to [src]!",\ + "You hear metal clanking.") + return + + if ((M.fatness >= breaking_weight) && istype(src, /obj/structure/chair)) //GS13 stuff - chair breaking mechanics + M.visible_message(\ + "[M] slowly buckles [M.p_them()]self to [src]. their movements slow and deliberate. As [M] settles into the seat, a sudden, violent crash echoes through the air. [M]'s massive weight mercilessly crushes the poor [src], reducing it to pieces! ",\ + "You slowly try to buckle yourself to [src]. But it breaks under your massive ass!",\ + "You hear metal clanking.") + playsound(loc, 'sound/effects/snap.ogg', 50, 1) + playsound(loc, 'sound/effects/woodhit.ogg', 50, 1) + playsound(loc, 'sound/effects/bodyfall4.ogg', 50, 1) + // Destroy the src object + src.Destroy() + else if(M.fatness >= (breaking_weight / 2)) + M.visible_message(\ + "[M] buckles [M.p_them()]self to the creaking [src]. The [src] protests audibly under the weight as [M]'s ample form settles onto its surface. .",\ + "You buckle yourself to [src].The [src] is cracking and is barely able to hold your weight ",\ + "You hear metal clanking.") + playsound(loc, 'sound/effects/crossed.ogg', 50, 1) + else if(M.fatness >= (breaking_weight / 3)) + M.visible_message(\ + "[M] buckles [M.p_them()]self to the creaking [src] as their weight spreads all over it.",\ + "You buckle yourself to [src].The [src] is creaking as you shuffle a bit ",\ + "You hear metal clanking.") + playsound(loc, 'sound/effects/crossed.ogg', 50, 1) + /atom/movable/proc/user_unbuckle_mob(mob/living/buckled_mob, mob/user) var/mob/living/M = unbuckle_mob(buckled_mob) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index eeeb311e..8c91d27d 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -1069,7 +1069,8 @@ GLOBAL_LIST_EMPTY(preferences_datums) dat += "Blueberry Inflation:[blueberry_inflation == TRUE ? "Enabled" : "Disabled"]
" dat += "

GS13 Gameplay Preferences

" - dat += "Stuckage (weight results in getting stuck in doors):[stuckage == TRUE ? "Enabled" : "Disabled"]
" + dat += "Stuckage (at what weight will you get stuck in doors?):[stuckage == FALSE ? "Disabled" : stuckage]
" + dat += "Chair Breakage (at what weight will you break chairs?):[chair_breakage == FALSE ? "Disabled" : chair_breakage]
" dat += "Extreme Weight Gain (Sprite Size scales with weight):[weight_gain_extreme == TRUE ? "Enabled" : "Disabled"]
" dat += "

GS13 Helplessness Preferences

" @@ -2665,7 +2666,10 @@ GLOBAL_LIST_EMPTY(preferences_datums) if("bot_feeding") bot_feeding = !bot_feeding if("stuckage") - stuckage = !stuckage + stuckage = chose_weight("Choose the level of fatness where your weight will hinder your ability to go through airlocks? None will disable this alltogether", user) + if("chair_breakage") + chair_breakage = chose_weight("Choose the level of fatness where your weight will be too much for chairs to handle? None will disable this alltogether", user) + if("blueberry_inflation") blueberry_inflation = !blueberry_inflation if("max_fatness") diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index ad1f1f0a..6351918a 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -171,6 +171,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car S["helplessness_clothing_back"] >> helplessness_clothing_back S["helplessness_no_buckle"] >> helplessness_no_buckle S["stuckage"] >> stuckage + S["chair_breakage"] >> chair_breakage S["blueberry_inflation"] >> blueberry_inflation @@ -325,6 +326,7 @@ SAVEFILE UPDATING/VERSIONING - 'Simplified', or rather, more coder-friendly ~Car WRITE_FILE(S["helplessness_clothing_back"], helplessness_clothing_back) WRITE_FILE(S["helplessness_no_buckle"], helplessness_no_buckle) WRITE_FILE(S["stuckage"], stuckage) + WRITE_FILE(S["chair_breakage"], chair_breakage) WRITE_FILE(S["blueberry_inflation"], blueberry_inflation) return 1