Files
Aurora.3/code/modules/shuttles/shuttles_multi_lift.dm
DreamySkrell a331591bbe Robotics lift extended to third deck (#16864)
* kinda sorta works

* mapping mostly

* mapping

* holy hell it works

* lift sounds

* mapping

* multi/lift type

* mappin

* code

* ui

* code

* c

* remove old lift stuff

* weary

* Update code/modules/shuttles/shuttle_console_multi_lift.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Update code/modules/shuttles/shuttle_console_multi_lift.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Update code/modules/shuttles/shuttles_multi_lift.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Update code/modules/shuttles/shuttle_console_multi_lift.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Update code/modules/shuttles/shuttles_multi_lift.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Update code/modules/shuttles/shuttles_multi_lift.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* Update html/changelogs/DreamySkrell-robotics-lift-1111.yml

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

* emergency stop

* Update code/modules/shuttles/shuttles_multi_lift.dm

Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>

---------

Co-authored-by: DreamySkrell <>
Co-authored-by: SleepyGemmy <99297919+SleepyGemmy@users.noreply.github.com>
2023-07-31 20:11:45 +00:00

48 lines
1.7 KiB
Plaintext

// multi lift, meaning it goes between stops
// if it goes from first stop to the last one
// it goes one by one sequentially through the ones in the middle
// order of stops is same as defined in destination_tags
/datum/shuttle/autodock/multi/lift
warmup_time = 3
move_time = 2
knockdown = FALSE
squishes = FALSE
ceiling_type = null
sound_takeoff = 'sound/effects/lift_heavy_start.ogg'
sound_landing = 'sound/effects/lift_heavy_stop.ogg'
var/obj/effect/shuttle_landmark/final_location = null
// final_location must be set and valid
// if current and final location are the same, returns current location
/datum/shuttle/autodock/multi/lift/proc/get_next_destination_tag()
var/current_tag = current_location.landmark_tag
var/final_tag = final_location.landmark_tag
ASSERT(current_tag in destination_tags)
ASSERT(final_tag in destination_tags)
var/current_i = destination_tags.Find(current_tag)
var/final_i = destination_tags.Find(final_tag)
ASSERT(current_i != final_i)
if(current_i < final_i)
return destination_tags[current_i + 1]
else if(current_i > final_i)
return destination_tags[current_i - 1]
else
return destination_tags[current_i]
/datum/shuttle/autodock/multi/lift/set_destination(var/destination_key, mob/user)
final_location = destinations_cache[destination_key]
var/next_tag = get_next_destination_tag()
next_location = SSshuttle.get_landmark(next_tag)
..(next_location.name, user)
launch(user)
/datum/shuttle/autodock/multi/lift/arrived()
if(final_location == current_location)
final_location = null
else
var/next_tag = get_next_destination_tag()
next_location = SSshuttle.get_landmark(next_tag)
set_destination(next_location.name, null)
launch(in_use)
..()