Fixes the robot transformer (#4430)

-fixes #4245
This commit is contained in:
Alberyk
2018-03-17 12:58:31 +01:00
committed by Werner
parent 12f3bb080f
commit a1eeafc3c8
2 changed files with 17 additions and 9 deletions
+11 -9
View File
@@ -34,7 +34,7 @@
var/turf/west = get_step(src, WEST)
if(istype(west, /turf/simulated/floor))
new /obj/machinery/conveyor(west, WEST, 1)
/obj/machinery/transformer/CollidedWith(var/atom/movable/AM)
// HasEntered didn't like people lying down.
if(ishuman(AM))
@@ -56,15 +56,17 @@
use_power(6000) // Use a lot of power.
visible_message("<span class='danger'>The machine makes a series of loud sounds as it starts to replace [H]'s organs and limbs with robotic parts!</span>")
H <<"<span class='danger'>You feel a horrible pain as the machine you entered starts to rip you apart and replace your limbs and organs!</span>"
sleep(30)
if(H.loc == src.loc)
H <<"<span class='danger'> You lose consciousness for a brief moment before waking up with a whole new body...</span>"
H.Robotize()
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
canuse = 0
sleep(120) // cooldown
canuse = 1
H.Robotize()
H <<"<span class='danger'> You lose consciousness for a brief moment before waking up with a whole new body...</span>"
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
canuse = FALSE
addtimer(CALLBACK(src, .proc/rearm), 120 SECONDS)
else
playsound(src.loc, 'sound/machines/buzz-sigh.ogg', 50, 0)
visible_message("<span class='notice'>The machine displays an error message reading it is still making the required parts.</span>")
return
/obj/machinery/transformer/proc/rearm()
src.visible_message("<span class='notice'>\The [src] pings!</span>")
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
canuse = TRUE