mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
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.
35 lines
928 B
Plaintext
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() |