Fixes depowered doors not being able to be closed

This commit is contained in:
GinjaNinja32
2015-03-23 23:25:58 +00:00
parent d518df1076
commit 89bbfbcfad
2 changed files with 13 additions and 12 deletions

View File

@@ -844,19 +844,20 @@ About the new airlock wires panel:
return 0
return ..()
/obj/machinery/door/airlock/can_close(var/forced)
/obj/machinery/door/airlock/can_close()
if(locked || welded)
return 0
if(!forced)
//despite the name, this wire is for general door control.
//Bolts are already covered by the check for locked, above
if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
return 0
return ..()
/obj/machinery/door/airlock/close(var/forced=0)
if(!can_close(forced))
return
if(!can_close())
return 0
if(!forced)
//despite the name, this wire is for general door control.
//Bolts are already covered by the check for locked in can_close()
if(!arePowerSystemsOn() || isWireCut(AIRLOCK_WIRE_OPEN_DOOR))
return 0
if(safe)
for(var/turf/turf in locs)

View File

@@ -88,10 +88,10 @@
return 0
return 1
/obj/machinery/door/proc/can_close(var/forced = 0)
if(!density && !operating && !(!forced && (stat & (BROKEN|NOPOWER))))
return 1
/obj/machinery/door/proc/can_close()
if(density || operating || !ticker)
return 0
return 1
/obj/machinery/door/Bumped(atom/AM)
if(p_open || operating) return