Convert guns to initialize (#3266)

changes:

Converts guns to initialize.
Converts lift control panels to initialize.
Swaps out a spawn in droppods for addtimer.
Fixes a bug where already-opened pod doors would still attempt to prime if hit.
This commit is contained in:
Lohikar
2017-08-11 22:57:12 +03:00
committed by Erki
parent 1ed2f3c556
commit e7e30d3ab5
12 changed files with 32 additions and 35 deletions
@@ -10,11 +10,10 @@
var/deploying
var/deployed
/obj/structure/droppod_door/New(var/newloc, var/autoopen)
..(newloc)
/obj/structure/droppod_door/Initialize(mapload, var/autoopen)
. = ..(mapload)
if(autoopen)
spawn(100)
deploy()
addtimer(CALLBACK(src, .proc/deploy), 100)
/obj/structure/droppod_door/attack_ai(var/mob/user)
if(!user.Adjacent(src))
@@ -25,7 +24,7 @@
attack_hand(user)
/obj/structure/droppod_door/attack_hand(var/mob/user)
if(deploying) return
if(deploying || deployed) return
user << "<span class='danger'>You prime the explosive bolts. Better get clear!</span>"
sleep(30)
deploy()
@@ -77,4 +76,4 @@
door_bottom.density = 0
door_bottom.opacity = 0
door_bottom.dir = src.dir
door_bottom.icon_state = "rampbottom"
door_bottom.icon_state = "rampbottom"