[MIRROR] refactors resist act to be on atom level (#384)

* refactors resist act to be on atom level (#53016)

* refactors resist act to be on atom level

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
This commit is contained in:
SkyratBot
2020-08-19 02:09:09 +02:00
committed by GitHub
co-authored by Qustinnus
parent dd0a49cbd6
commit 2f7e5b762a
33 changed files with 45 additions and 45 deletions
+1 -1
View File
@@ -243,7 +243,7 @@
icon_state = pick("cocoon1","cocoon2","cocoon3")
. = ..()
/obj/structure/spider/cocoon/container_resist(mob/living/user)
/obj/structure/spider/cocoon/container_resist_act(mob/living/user)
var/breakout_time = 600
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
+1 -1
View File
@@ -69,7 +69,7 @@
R.foldedbag_instance = src
moveToNullspace()
/obj/item/bodybag/bluespace/container_resist(mob/living/user)
/obj/item/bodybag/bluespace/container_resist_act(mob/living/user)
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't get out while you're restrained like this!</span>")
return
@@ -121,7 +121,7 @@
ready = TRUE
update_icon()
/obj/machinery/implantchair/container_resist(mob/living/user)
/obj/machinery/implantchair/container_resist_act(mob/living/user)
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
user.visible_message("<span class='notice'>You see [user] kicking against the door of [src]!</span>", \
+2 -2
View File
@@ -115,9 +115,9 @@
update_icon()
return
else if(user.client)
container_resist(user)
container_resist_act(user)
/obj/item/pet_carrier/container_resist(mob/living/user)
/obj/item/pet_carrier/container_resist_act(mob/living/user)
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
if(user.mob_size <= MOB_SIZE_SMALL)
-3
View File
@@ -170,9 +170,6 @@
return
ui_interact(user)
/obj/proc/container_resist(mob/living/user)
return
/mob/proc/unset_machine()
if(machine)
machine.on_unset_machine(src)
@@ -351,7 +351,7 @@
message_cooldown = world.time + 50
to_chat(user, "<span class='warning'>[src]'s door won't budge!</span>")
return
container_resist(user)
container_resist_act(user)
/obj/structure/closet/attack_hand(mob/living/user)
. = ..()
@@ -396,14 +396,14 @@
return 0
return 1
/obj/structure/closet/container_resist(mob/living/user)
/obj/structure/closet/container_resist_act(mob/living/user)
if(opened)
return
if(ismovable(loc))
user.changeNext_move(CLICK_CD_BREAKOUT)
user.last_special = world.time + CLICK_CD_BREAKOUT
var/atom/movable/AM = loc
AM.relay_container_resist(user, src)
AM.relay_container_resist_act(user, src)
return
if(!welded && !locked)
open()
+1 -1
View File
@@ -105,7 +105,7 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
recursive_organ_check(src)
qdel(src)
/obj/structure/bodycontainer/container_resist(mob/living/user)
/obj/structure/bodycontainer/container_resist_act(mob/living/user)
if(!locked)
open()
return
@@ -72,7 +72,7 @@
if(current_size >= STAGE_FIVE)
deconstruct(FALSE)
/obj/structure/transit_tube_pod/container_resist(mob/living/user)
/obj/structure/transit_tube_pod/container_resist_act(mob/living/user)
if(!user.incapacitated())
empty_pod()
return