Files
CHOMPStation2/code/modules/turbolift/turbolift_floor.dm
Arokha Sieyes 248e5ca503 Allow turbolift specific-floor delays
If one floor is 'taller' than the others, or otherwise takes longer to traverse, you can set delay_time on the area to have it wait a different time there. Or, wait even less time, though less than 1 second isn't possible since the controller only fires every second.
2017-04-24 16:10:03 -04:00

35 lines
928 B
Plaintext

// Simple holder for each floor in the lift.
/datum/turbolift_floor
var/area_ref
var/label
var/name
var/announce_str
var/arrival_sound
var/delay_time
var/list/doors = list()
var/obj/structure/lift/button/ext_panel
/datum/turbolift_floor/proc/set_area_ref(var/ref)
var/area/turbolift/A = locate(ref)
if(!istype(A))
log_debug("Turbolift floor area was of the wrong type: ref=[ref]")
return
area_ref = ref
label = A.lift_floor_label
name = A.lift_floor_name ? A.lift_floor_name : A.name
announce_str = A.lift_announce_str
arrival_sound = A.arrival_sound
delay_time = A.delay_time
//called when a lift has queued this floor as a destination
/datum/turbolift_floor/proc/pending_move(var/datum/turbolift/lift)
if(ext_panel)
ext_panel.light_up()
//called when a lift arrives at this floor
/datum/turbolift_floor/proc/arrived(var/datum/turbolift/lift)
lift.open_doors(src)
if(ext_panel)
ext_panel.reset()