mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-24 21:48:39 +01:00
Handle shuttle registration from inside the template
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
mappath = "[prefix][shuttle_id].dmm"
|
||||
. = ..()
|
||||
|
||||
/datum/map_template/shuttle/load(turf/T, centered)
|
||||
/datum/map_template/shuttle/load(turf/T, centered, register=TRUE)
|
||||
. = ..()
|
||||
if(!.)
|
||||
return
|
||||
@@ -35,6 +35,10 @@
|
||||
continue
|
||||
place.baseturfs.Insert(3, /turf/baseturf_skipover/shuttle)
|
||||
|
||||
if(register)
|
||||
for(var/obj/docking_port/mobile/port in place)
|
||||
port.register()
|
||||
|
||||
for(var/obj/structure/closet/closet in place)
|
||||
if(closet.anchorable)
|
||||
closet.anchored = TRUE
|
||||
|
||||
@@ -81,8 +81,6 @@
|
||||
candidates -= M
|
||||
else
|
||||
notify_ghosts("Space pirates are waking up!", source = spawner, action=NOTIFY_ATTACK, flashwindow = FALSE)
|
||||
for(var/obj/docking_port/mobile/port in A)
|
||||
port.register()
|
||||
|
||||
priority_announce("Unidentified armed ship detected near the station.")
|
||||
|
||||
|
||||
@@ -215,8 +215,7 @@
|
||||
D = existing_shuttle.get_docked()
|
||||
|
||||
if(!D)
|
||||
var/m = "No dock found for preview shuttle ([preview_template.name]), aborting."
|
||||
throw EXCEPTION(m)
|
||||
CRASH("No dock found for preview shuttle ([preview_template.name]), aborting.")
|
||||
|
||||
var/result = preview_shuttle.canDock(D)
|
||||
// truthy value means that it cannot dock for some reason
|
||||
@@ -254,7 +253,7 @@
|
||||
. = FALSE
|
||||
// load shuttle template, centred at shuttle import landmark,
|
||||
var/turf/landmark_turf = get_turf(locate(/obj/effect/landmark/shuttle_import) in GLOB.landmarks_list)
|
||||
S.load(landmark_turf, centered = TRUE)
|
||||
S.load(landmark_turf, centered = TRUE, register = FALSE)
|
||||
|
||||
var/affected = S.get_affected_turfs(landmark_turf, centered=TRUE)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user