Added buckling weight interactions
Added creaking sound from hypercode
This commit is contained in:
BIN
GainStation13/sound/effects/crossed.ogg
Normal file
BIN
GainStation13/sound/effects/crossed.ogg
Normal file
Binary file not shown.
@@ -144,18 +144,46 @@
|
||||
return FALSE
|
||||
|
||||
add_fingerprint(user)
|
||||
|
||||
// GS13 Port - Buckle changes
|
||||
. = buckle_mob(M, check_loc = check_loc)
|
||||
if(.)
|
||||
if(M == user)
|
||||
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='italics'>You hear metal clanking.</span>")
|
||||
else
|
||||
if(!.)
|
||||
return
|
||||
if (istype(M, /mob/living/carbon))
|
||||
var/mob/living/carbon/C = M
|
||||
var/breaking_weight = M?.client?.prefs?.chair_breakage
|
||||
if(isnull(breaking_weight) || (breaking_weight < 10) || (M != user) || ((breaking_weight / 3) > C.fatness))
|
||||
M.visible_message(\
|
||||
"<span class='warning'>[user] buckles [M] to [src]!</span>",\
|
||||
"<span class='warning'>[user] buckles you to [src]!</span>",\
|
||||
"<span class='italics'>You hear metal clanking.</span>")
|
||||
return
|
||||
|
||||
if ((C.fatness >= breaking_weight) && istype(src, /obj/structure/chair)) //GS13 stuff - chair breaking mechanics
|
||||
var/obj/structure/chair/chairToBreak = src
|
||||
M.visible_message(\
|
||||
"<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. If the chair can be deconstructed, do that as well..
|
||||
chairToBreak.deconstruct()
|
||||
//src.Destroy()
|
||||
else if(C.fatness >= (breaking_weight / 2))
|
||||
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, 'GainStation13/sound/effects/crossed.ogg', 50, 1)
|
||||
else if(C.fatness >= (breaking_weight / 3))
|
||||
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, 'GainStation13/sound/effects/crossed.ogg', 50, 1)
|
||||
//GS13 End
|
||||
|
||||
/atom/movable/proc/user_unbuckle_mob(mob/living/buckled_mob, mob/user)
|
||||
var/mob/living/M = unbuckle_mob(buckled_mob)
|
||||
|
||||
Reference in New Issue
Block a user