mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-20 07:02:30 +00:00
Setup auto-configuration of shuttle consoles.
- Its now possible to put shuttle consoles on a shuttle without a specific subtype or mapediting the shuttle_tag on them. - After shtutle initialization, SSshuttles gives each initialized shuttle the chance to scan its areas for consoles it wants to claim and configure.
This commit is contained in:
@@ -74,6 +74,16 @@
|
||||
SSsupply.shuttle = null
|
||||
. = ..()
|
||||
|
||||
// This is called after all shuttles have been initialized by SSshuttles, but before sectors have been initialized.
|
||||
// Importantly for subtypes, all shuttles will have been initialized and mothershuttles hooked up by the time this is called.
|
||||
/datum/shuttle/proc/populate_shuttle_objects()
|
||||
// Scan for shuttle consoles on them needing auto-config.
|
||||
for(var/area/A in find_childfree_areas()) // Let sub-shuttles handle their areas, only do our own.
|
||||
for(var/obj/machinery/computer/shuttle_control/SC in A)
|
||||
if(!SC.shuttle_tag)
|
||||
SC.set_shuttle_tag(src.name)
|
||||
return
|
||||
|
||||
// This creates a graphical warning to where the shuttle is about to land, in approximately five seconds.
|
||||
/datum/shuttle/proc/create_warning_effect(var/obj/effect/shuttle_landmark/destination)
|
||||
destination.create_warning_effect(src)
|
||||
|
||||
@@ -126,6 +126,13 @@
|
||||
ui.open()
|
||||
ui.set_auto_update(1)
|
||||
|
||||
// Call to set the linked shuttle tag; override to add behaviour to shuttle tag changes
|
||||
/obj/machinery/computer/shuttle_control/proc/set_shuttle_tag(var/new_shuttle_tag)
|
||||
if(shuttle_tag == new_shuttle_tag)
|
||||
return FALSE
|
||||
shuttle_tag = new_shuttle_tag
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/shuttle_control/emag_act(var/remaining_charges, var/mob/user)
|
||||
if (!hacked)
|
||||
req_access = list()
|
||||
|
||||
Reference in New Issue
Block a user