Cargo Wire, runtime and inflatable fixes (#1268)

Fixes the APC in the cargo warehouse being unpowered
Fixes two runtime errors i reported
Fixes inflatable doors being unresponsive due to a sleep. Seperating the opening code off into a spawned child process has made it much more responsive
This commit is contained in:
NanakoAC
2016-12-22 17:53:42 +02:00
committed by skull132
parent 1c520de9d2
commit 95e4cf1c16
4 changed files with 27 additions and 21 deletions
+2 -2
View File
@@ -660,9 +660,9 @@
src << "<span class='warning'>It won't budge!</span>"
return
var/mob/M = AM
var/mob/M = null
if(ismob(AM))
M = AM
if(!can_pull_mobs || !can_pull_size)
src << "<span class='warning'>It won't budge!</span>"
return
+4 -2
View File
@@ -181,6 +181,8 @@
//Updating pixelshift, position and direction
//Gets called on process, when the grab gets upgraded or the assailant moves
/obj/item/weapon/grab/proc/adjust_position()
if (!affecting)
return
if(affecting.buckled)
animate(affecting, pixel_x = 0, pixel_y = 0, 4, 1, LINEAR_EASING)
return
@@ -265,7 +267,7 @@
hud.name = "kill"
affecting.Stun(10) //10 ticks of ensured grab
else if(state < GRAB_UPGRADING)
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
assailant.visible_message("<span class='danger'>[assailant] starts to tighten \his grip on [affecting]'s neck!</span>")
hud.icon_state = "kill1"
state = GRAB_KILL
@@ -277,7 +279,7 @@
affecting.setClickCooldown(10)
affecting.losebreath += 1
affecting.set_dir(WEST)
adjust_position()
adjust_position()
//This is used to make sure the victim hasn't managed to yackety sax away before using the grab.
/obj/item/weapon/grab/proc/confirm()