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
+20 -16
View File
@@ -190,24 +190,28 @@
update_nearby_tiles()
/obj/structure/inflatable/door/proc/Open()
isSwitchingStates = 1
flick("door_opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
update_icon()
isSwitchingStates = 0
spawn()
if(isSwitchingStates) return
isSwitchingStates = 1
flick("door_opening",src)
sleep(10)
density = 0
opacity = 0
state = 1
update_icon()
isSwitchingStates = 0
/obj/structure/inflatable/door/proc/Close()
isSwitchingStates = 1
flick("door_closing",src)
sleep(10)
density = 1
opacity = 0
state = 0
update_icon()
isSwitchingStates = 0
spawn()
if(isSwitchingStates) return
isSwitchingStates = 1
flick("door_closing",src)
sleep(10)
density = 1
opacity = 0
state = 0
update_icon()
isSwitchingStates = 0
/obj/structure/inflatable/door/update_icon()
if(state)