Unfastening objects will now check constantly during the do_after (#23881)

* Unfastening objects will now check constantly during the do_after for if you can

* .
This commit is contained in:
Joan Lung
2017-02-10 20:25:32 +13:00
committed by oranges
parent 172d029bf3
commit c4ae453aed
7 changed files with 34 additions and 22 deletions
+3 -2
View File
@@ -53,9 +53,10 @@ var/global/list/rad_collectors = list()
return
..()
/obj/machinery/power/rad_collector/can_be_unfasten_wrench(mob/user)
/obj/machinery/power/rad_collector/can_be_unfasten_wrench(mob/user, silent)
if(loaded_tank)
user << "<span class='warning'>Remove the plasma tank first!</span>"
if(!silent)
user << "<span class='warning'>Remove the plasma tank first!</span>"
return FAILED_UNFASTEN
return ..()
+4 -3
View File
@@ -128,7 +128,7 @@
return 1
/obj/machinery/power/emitter/attack_animal(mob/living/simple_animal/M)
if(ismegafauna(M))
if(ismegafauna(M) && anchored)
state = 0
anchored = FALSE
M.visible_message("<span class='warning'>[M] rips [src] free from its moorings!</span>")
@@ -217,9 +217,10 @@
A.starting = loc
A.fire()
/obj/machinery/power/emitter/can_be_unfasten_wrench(mob/user)
/obj/machinery/power/emitter/can_be_unfasten_wrench(mob/user, silent)
if(state == EM_WELDED)
user << "<span class='warning'>[src] is welded to the floor!</span>"
if(!silent)
user << "<span class='warning'>[src] is welded to the floor!</span>"
return FAILED_UNFASTEN
return ..()
@@ -77,9 +77,10 @@ field_generator power level display
else
user << "<span class='warning'>The [src] needs to be firmly secured to the floor first!</span>"
/obj/machinery/field/generator/can_be_unfasten_wrench(mob/user)
/obj/machinery/field/generator/can_be_unfasten_wrench(mob/user, silent)
if(state == FG_WELDED)
user << "<span class='warning'>[src] is welded to the floor!</span>"
if(!silent)
user << "<span class='warning'>[src] is welded to the floor!</span>"
return FAILED_UNFASTEN
return ..()