content
This commit is contained in:
@@ -33,6 +33,14 @@
|
||||
WARNING("More than one arrivals docking_port placed on map! Ignoring duplicates.")
|
||||
SSshuttle.arrivals = src
|
||||
|
||||
/obj/docking_port/mobile/arrivals/proc/on_console_deleted(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
console = null
|
||||
for(var/obj/machinery/requests_console/new_console as anything in GLOB.allConsoles)
|
||||
var/area/console_area = get_area(new_console)
|
||||
if(istype(console_area, /area/shuttle/arrival) && !QDELETED(new_console) && new_console != source)
|
||||
console = new_console
|
||||
|
||||
/obj/docking_port/mobile/arrivals/LateInitialize()
|
||||
areas = list()
|
||||
|
||||
@@ -40,10 +48,18 @@
|
||||
for(var/area/shuttle/arrival/A in GLOB.sortedAreas)
|
||||
for(var/obj/structure/chair/C in A)
|
||||
new_latejoin += C
|
||||
if(!console)
|
||||
console = locate(/obj/machinery/requests_console) in A
|
||||
areas += A
|
||||
|
||||
if(!console)
|
||||
for(var/obj/machinery/requests_console/new_console as anything in GLOB.allConsoles)
|
||||
var/area/console_area = get_area(new_console)
|
||||
if(!istype(console_area, /area/shuttle/arrival) || QDELETED(new_console))
|
||||
continue
|
||||
console = new_console
|
||||
RegisterSignal(console, COMSIG_PARENT_QDELETING, PROC_REF(on_console_deleted))
|
||||
else if(istype(console))
|
||||
RegisterSignal(console, COMSIG_PARENT_QDELETING, PROC_REF(on_console_deleted))
|
||||
|
||||
if(SSjob.latejoin_trackers.len)
|
||||
WARNING("Map contains predefined latejoin spawn points and an arrivals shuttle. Using the arrivals shuttle.")
|
||||
|
||||
|
||||
@@ -941,13 +941,19 @@
|
||||
|
||||
/obj/docking_port/mobile/proc/count_engines()
|
||||
. = 0
|
||||
engine_list = list()
|
||||
for(var/thing in shuttle_areas)
|
||||
var/area/shuttle/areaInstance = thing
|
||||
for(var/obj/structure/shuttle/engine/E in areaInstance.contents)
|
||||
if(!QDELETED(E))
|
||||
engine_list += E
|
||||
RegisterSignal(E, COMSIG_PARENT_QDELETING, PROC_REF(on_engine_deleted))
|
||||
. += E.engine_power
|
||||
|
||||
/obj/docking_port/mobile/proc/on_engine_deleted(datum/source)
|
||||
SIGNAL_HANDLER
|
||||
engine_list -= source
|
||||
|
||||
// Double initial engines to get to 0.5 minimum
|
||||
// Lose all initial engines to get to 2
|
||||
//For 0 engine shuttles like BYOS 5 engines to get to doublespeed
|
||||
|
||||
@@ -198,8 +198,8 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He
|
||||
var/invertedDir = invertDir(portDirection)
|
||||
if(!portDirection || !invertedDir)
|
||||
to_chat(usr, "<span class='warning'>Shuttle creation aborted, docking airlock must be on an external wall. Please select a new airlock.</span>")
|
||||
port.Destroy()
|
||||
stationary_port.Destroy()
|
||||
QDEL_NULL(port)
|
||||
QDEL_NULL(stationary_port)
|
||||
linkedShuttleId = null
|
||||
return FALSE
|
||||
port.dir = invertedDir
|
||||
@@ -207,8 +207,8 @@ GLOBAL_LIST_EMPTY(custom_shuttle_machines) //Machines that require updating (He
|
||||
|
||||
if(!calculate_bounds(port))
|
||||
to_chat(usr, "<span class='warning'>Bluespace calculations failed, please select a new airlock.</span>")
|
||||
port.Destroy()
|
||||
stationary_port.Destroy()
|
||||
QDEL_NULL(port)
|
||||
QDEL_NULL(stationary_port)
|
||||
linkedShuttleId = null
|
||||
return FALSE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user