[MIRROR] BSbodybags inherit heaviest item weight + Easier to escape the disarm/BSbodybag combo (#1229)

* BSbodybags inherit heaviest item weight + Easier to escape the disarm/BSbodybag combo (#54065)

Bodybags now inherit the weight of their heaviest item. If it doesn't have a weight (people), we assume bulky since things like people can be firecarried or whatever.

It now takes less time to get out of a bag (20 > 12 secs), and the progress bar is unbreakable unless you get incapacitated. This means people interested in using it to kidnap can still do so but it requires considerably more effort that isnt based on a latency difference and a quick disarm. The timer still runs down if you open the bag and try to put them back in but good attempt😏.

This also fixes an issue with the BSB where it was picking up or otherwise doublecalling checks from inheritance.

* BSbodybags inherit heaviest item weight + Easier to escape the disarm/BSbodybag combo

Co-authored-by: girl <11748095+ExcessiveUseOfCobblestone@users.noreply.github.com>
This commit is contained in:
SkyratBot
2020-10-10 00:30:06 +01:00
committed by GitHub
co-authored by girl
parent 54916b8b81
commit c1c3fb93da
2 changed files with 78 additions and 39 deletions
+10 -5
View File
@@ -77,8 +77,13 @@
user.last_special = world.time + CLICK_CD_BREAKOUT
to_chat(user, "<span class='notice'>You claw at the fabric of [src], trying to tear it open...</span>")
to_chat(loc, "<span class='warning'>Someone starts trying to break free of [src]!</span>")
if(!do_after(user, 200, target = src))
to_chat(loc, "<span class='warning'>The pressure subsides. It seems that they've stopped resisting...</span>")
return
loc.visible_message("<span class='warning'>[user] suddenly appears in front of [loc]!</span>", "<span class='userdanger'>[user] breaks free of [src]!</span>")
qdel(src)
if(do_after_mob(user, src, 12 SECONDS, TRUE))
if(user.loc != src)
return
// you are still in the bag? time to go unless you KO'd, honey!
// if they escape during this time and you rebag them the timer is still clocking down and does NOT reset so they can very easily get out.
if(user.incapacitated())
to_chat(loc, "<span class='warning'>The pressure subsides. It seems that they've stopped resisting...</span>")
return
loc.visible_message("<span class='warning'>[user] suddenly appears in front of [loc]!</span>", "<span class='userdanger'>[user] breaks free of [src]!</span>")
qdel(src)