Skip to content

Commit

Permalink
cleanup and comments
Browse files Browse the repository at this point in the history
  • Loading branch information
fira committed Dec 8, 2023
1 parent 60e2d09 commit b3a089b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 12 deletions.
4 changes: 1 addition & 3 deletions code/__HELPERS/unsorted.dm
Original file line number Diff line number Diff line change
Expand Up @@ -867,16 +867,14 @@
animation.master = target
flick(flick_anim, animation)

//Will return the contents of an atom recursivly to a depth of 'searchDepth', not including starting atom
///Will return the contents of an atom recursivly to a depth of 'searchDepth', not including starting atom
/atom/proc/GetAllContents(searchDepth = 5, list/toReturn = list())
for(var/atom/part as anything in contents)
toReturn += part
if(part.contents.len && searchDepth)
part.GetAllContents(searchDepth - 1, toReturn)
return toReturn

// FIXME take care of standardizing GetAllContents to get_all_contents

///Returns the src and all recursive contents as a list. Includes the starting atom.
/atom/proc/get_all_contents(ignore_flag_1)
. = list(src)
Expand Down
2 changes: 1 addition & 1 deletion code/controllers/subsystem/mapping.dm
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ SUBSYSTEM_DEF(mapping)
return
clearing_reserved_turfs = TRUE
message_admins("Clearing dynamic reservation space.")
// FIXME : /tg/ Shuttles have extra handling here to avoid them being desallocated
// /tg/ Shuttles have extra handling here to avoid them being desallocated
do_wipe_turf_reservations()
clearing_reserved_turfs = FALSE

Expand Down
6 changes: 0 additions & 6 deletions code/controllers/subsystem/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -419,10 +419,6 @@ SUBSYSTEM_DEF(shuttle)

for(var/area/A as anything in preview_shuttle.shuttle_areas)
for(var/turf/T as anything in A)
// turfs inside the shuttle are not available for shuttles
// FIXME: /tg/ doesn't have this. Figure out if it's really needed.
//T.turf_flags &= ~UNUSED_RESERVATION_TURF

// update underlays
if(istype(T, /turf/closed/shuttle))
var/dx = T.x - preview_shuttle.x
Expand Down Expand Up @@ -467,8 +463,6 @@ SUBSYSTEM_DEF(shuttle)
if(!preview_reservation)
CRASH("failed to reserve an area for shuttle template loading")
var/turf/bottom_left = preview_reservation.bottom_left_turfs[1]
if(loading_template.type == /datum/map_template/shuttle/lifeboat_starboard)
pass() //DEBUG FIXME remove this
loading_template.load(bottom_left, centered = FALSE, register = FALSE)

var/affected = loading_template.get_affected_turfs(bottom_left, centered=FALSE)
Expand Down
9 changes: 7 additions & 2 deletions code/datums/shuttles.dm
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,12 @@
for(var/i in 1 to turfs.len)
var/turf/place = turfs[i]

// CM Note: We do this BEFORE and not AFTER because CM Lifeboats
// have their edges on space tiles and we'd skip the mobile port init
// ================== CM Change ==================
// We perform atom initialization of the docking_ports BEFORE skipping space,
// because our lifeboats have their corners as object props and still
// reside on space turfs. Notably the bottom left corner, which also contains
// the docking port.

for(var/obj/docking_port/mobile/port in place)
SSatoms.InitializeAtoms(list(port))
if(register)
Expand All @@ -75,6 +79,7 @@
if(length(place.baseturfs) < 2) // Some snowflake shuttle shit
continue
place.baseturfs.Insert(3, /turf/baseturf_skipover/shuttle)
// =============== END CM Change =================

//Whatever special stuff you want
/datum/map_template/shuttle/post_load(obj/docking_port/mobile/M)
Expand Down

0 comments on commit b3a089b

Please sign in to comment.