mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
* Adds a priority call mode that allows heads and first responders to cancel all calls and summon the lift to their floor immediately. * Adds a firefighting mode that turns the lift over to manual control, doors only open when manually opened, all call buttons ignored. For use during fires.
46 lines
1.4 KiB
Plaintext
46 lines
1.4 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'
|
|
|
|
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)
|
|
if(!safe)
|
|
return ..()
|
|
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 ..() |