Files
Aurora.3/code/modules/turbolift/turbolift_door.dm
LordFowl 76cb0a59eb [Ready for Review] Unapologetic Grid Check Buffs (#5034)
When deprived of power airlocks will now open, unless they are marked as secure (Vault airlocks, AI core airlocks, and EVA airlocks) or are welded/bolted.
When deprived of power blast doors will automatically close.
Blast doors can no longer be opened with just a crowbar.
Some mapping changes have been made to ensure no department is completely inescapable due to blast doors.

No longer will people who had the misfortune of not shoving a crowbar in their pocket be forced to stare at an empty wall for 40 minutes. On the flipside now power outages will not just be a free ticket to loot the armory/bridge.
2018-08-02 18:49:47 +02:00

49 lines
1.5 KiB
Plaintext

/obj/machinery/door/airlock/lift
name = "Elevator Door"
desc = "Ding."
req_access = list(access_maint_tunnels)
opacity = 0
autoclose = 0
glass = 1
icon = 'icons/obj/doors/doorlift.dmi'
assembly_type = /obj/structure/door_assembly/door_assembly_lift
hashatch = 0
panel_visible_while_open = TRUE
insecure = 0
var/datum/turbolift/lift
var/datum/turbolift_floor/floor
/obj/machinery/door/airlock/lift/Destroy()
if(lift)
lift.doors -= src
if(floor)
floor.doors -= src
return ..()
/obj/machinery/door/airlock/lift/bumpopen(var/mob/user)
return // No accidental sprinting into open elevator shafts.
/obj/machinery/door/airlock/lift/allowed(mob/M)
return FALSE //only the lift machinery is allowed to operate this door
/obj/machinery/door/airlock/lift/close(var/forced=0)
for(var/turf/turf in locs)
for(var/mob/living/LM in turf)
if(LM.mob_size <= MOB_TINY)
var/moved = 0
for(dir in shuffle(cardinal.Copy()))
var/dest = get_step(LM,dir)
if(!(locate(/obj/machinery/door/airlock/lift) in dest))
if(LM.Move(dest))
moved = 1
LM.visible_message("\The [LM] scurries away from the closing doors.")
break
if(!moved) // nowhere to go....
LM.gib()
else // the mob is too big to just move, so we need to give up what we're doing
audible_message("\The [src]'s motors grind as they quickly reverse direction, unable to safely close.")
cur_command = null // the door will just keep trying otherwise
return 0
return ..()