mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-21 20:11:04 +01:00
-Changes almost all of door opening/closing animations to be smooth. Also adjusts some door sprites so they actually can be opened smoothly. -Fixes minor problems with some door sprites. Usually only few pixels. -Adds "o_door_open" opened state with panel open to common glass door, lift door and vault door, since these have visible panel even while opened. EDIT: They will now show up correctly when needed. Added a var used to mark doors with panels visible while open. -Adds opening/closing animations "door_closing_stat" and "door_opening_stat" with lights off to doors that did not have it. EDIT: Should now correctly show up when the door is forced manually. -Removes many unused duplicate dmi files and icon states in door file. -Adds new dmi file in doors folder containing misc door overlays. Not used anywhere, purely for reference and spriting. -Changes the multi-tile airlock to have 4 directions instead of 2. Also makes it correctly update hatches for those directions when moved or built from scratch. -Adds vault assembly. It can be built like any other door, but it costs 10 sheets instead of 4 and takes double the time to make, since it has double explosion resistance and lot more health. -Adds elevator door assembly along with icon states into the code. It is currently unused, because I have yet to figure out how to make building lift-doors work, and that will not be included in this PR.
48 lines
1.5 KiB
Plaintext
48 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
|
|
|
|
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 ..()
|