makes it work, somewhat

This commit is contained in:
Enric Gabriel
2020-08-18 23:29:04 -03:00
parent 5c44996ffb
commit 3e27f991b9
5 changed files with 821 additions and 669 deletions
@@ -64,18 +64,16 @@
return ..()
if(!other.opened && (other.welded || other.locked))
if(ismovable(other.loc))
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
user.DelayNextAction(CLICK_CD_BREAKOUT)
var/atom/movable/AM = other.loc
AM.relay_container_resist(user, other)
return
//okay, so the closet is either welded or locked... resist!!!
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
user.DelayNextAction(CLICK_CD_BREAKOUT)
other.visible_message("<span class='warning'>[other] begins to shake violently!</span>")
to_chat(user, "<span class='notice'>You start pushing the door open... (this will take about [DisplayTimeText(other.breakout_time)].)</span>")
if(do_after(user,(other.breakout_time), target = src))
if(do_after(user,(other.breakout_time), target = src, required_mobility_flags = MOBILITY_RESIST))
if(!user || user.stat != CONSCIOUS || other.opened || (!other.locked && !other.welded))
return
//we check after a while whether there is a point of resisting anymore and whether the user is capable of resisting