chair breakage mechanics - by VV

This commit is contained in:
evilew
2024-02-19 00:12:14 +01:00
parent e53fc1729b
commit c41b1b6a19
+21 -5
View File
@@ -1,5 +1,4 @@
/atom/movable
var/can_buckle = 0
var/buckle_lying = -1 //bed-like behaviour, forces mob.lying = buckle_lying if != -1
@@ -108,18 +107,35 @@
/atom/movable/proc/post_unbuckle_mob(mob/living/M)
//Wrapper procs that handle sanity and user feedback
/atom/movable/proc/user_buckle_mob(mob/living/M, mob/user, check_loc = TRUE)
/atom/movable/proc/user_buckle_mob(mob/living/carbon/M, mob/user, check_loc = TRUE)
if(!in_range(user, src) || !isturf(user.loc) || user.incapacitated() || M.anchored)
return FALSE
add_fingerprint(user)
. = buckle_mob(M, check_loc = check_loc)
if(.)
if(M == user)
if (M == user && M.fatness >= 3440 && istype(src, /obj/structure/chair)) //GS13 stuff - chair breaking mechanics
M.visible_message(\
"<span class='notice'>[M] buckles [M.p_them()]self to [src].</span>",\
"<span class='notice'>You buckle yourself to [src].</span>",\
"<span class='notice'>[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! </span>",\
"<span class='notice'>You slowly try to buckle yourself to [src]. But it breaks under your massive ass!</span>",\
"<span class='italics'>You hear metal clanking.</span>")
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(\
"<span class='notice'>[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. .</span>",\
"<span class='notice'>You buckle yourself to [src].The [src] is cracking and is barely able to hold your weight </span>",\
"<span class='italics'>You hear metal clanking.</span>")
playsound(loc, 'sound/effects/crossed.ogg', 50, 1)
else if(M == user && M.fatness >= 840)
M.visible_message(\
"<span class='notice'>[M] buckles [M.p_them()]self to the creaking [src] as their weight spreads all over it.</span>",\
"<span class='notice'>You buckle yourself to [src].The [src] is creaking as you shuffle a bit </span>",\
"<span class='italics'>You hear metal clanking.</span>")
playsound(loc, 'sound/effects/crossed.ogg', 50, 1)
else
M.visible_message(\
"<span class='warning'>[user] buckles [M] to [src]!</span>",\