mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixes depowered doors not being able to be closed
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
return 0
|
||||
/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
|
||||
|
||||
Reference in New Issue
Block a user