mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-30 08:29:57 +01:00
Repaths obj/machinery to obj/structure/machinery. **Note for reviewers:** the only meaningful changed code exists within **code/game/objects/structures.dm** and **code/game/objects/structures/_machinery.dm**, largely concerning damage procs. With the exception of moving airlock defines to their own file, ALL OTHER CHANGES ARE STRICTLY PATH CHANGES. Objects, _categorically_, are largely divided between those you can hold in your hand/inventory and those you can't. Machinery objects are already subtypes of Structures behaviorally, this PR just makes their pathing reflect that, and allows for future work (tool actions, more health/destruction functionality) to be developed without unnecessary code duplication. I have tested this PR by loading up the Horizon and dismantling various machines and structures with tools, shooting guns of various types throughout the ship, and detonating a bunch of explosions throughout the ship.
46 lines
1.5 KiB
Plaintext
46 lines
1.5 KiB
Plaintext
/obj/structure/machinery/computer/shuttle_control/multi/lift
|
|
name = "lift controller"
|
|
icon = 'icons/obj/computer.dmi'
|
|
icon_state = "lift"
|
|
icon_screen = null
|
|
density = FALSE
|
|
req_access = null
|
|
ui_template = "ShuttleControlConsoleMultiLift"
|
|
required_skill = null
|
|
|
|
/obj/structure/machinery/computer/shuttle_control/multi/lift/wall
|
|
icon_state = "lift_wall"
|
|
|
|
/obj/structure/machinery/computer/shuttle_control/multi/lift/ui_interact(mob/user, datum/tgui/ui)
|
|
var/datum/shuttle/autodock/multi/lift/shuttle = SSshuttle.shuttles[shuttle_tag]
|
|
if(!istype(shuttle))
|
|
to_chat(user, SPAN_WARNING("Unable to establish link with the shuttle."))
|
|
return
|
|
|
|
ui = SStgui.try_update_ui(user, src, ui)
|
|
if(!ui)
|
|
ui = new(user, src, ui_template, "[shuttle_tag] Control", ui_x=470, ui_y=300)
|
|
ui.open()
|
|
|
|
/obj/structure/machinery/computer/shuttle_control/multi/lift/ui_data(mob/user)
|
|
. = ..()
|
|
|
|
var/datum/shuttle/autodock/multi/lift/shuttle = SSshuttle.shuttles[shuttle_tag]
|
|
if(istype(shuttle))
|
|
var/list/destination_keys = list()
|
|
for(var/key in shuttle.get_destinations())
|
|
destination_keys.Add(key)
|
|
. += list(
|
|
"destinations" = destination_keys,
|
|
)
|
|
|
|
/obj/structure/machinery/computer/shuttle_control/multi/lift/handle_topic_href(var/mob/user, var/datum/shuttle/autodock/multi/lift/shuttle, var/action, var/list/params)
|
|
if(action == "pick")
|
|
shuttle.set_destination(params["destination"], usr)
|
|
return TRUE
|
|
|
|
if(action == "cancel")
|
|
shuttle.final_location = null // no return so parent can handle it
|
|
|
|
return ..()
|