diff --git a/code/modules/overmap/_overmap_datum.dm b/code/modules/overmap/_overmap_datum.dm index 278a8786ca1a..46eb2eded0cf 100644 --- a/code/modules/overmap/_overmap_datum.dm +++ b/code/modules/overmap/_overmap_datum.dm @@ -65,8 +65,10 @@ /datum/overmap/Destroy(force, ...) SSovermap.overmap_objects -= src if(docked_to) - Undock(TRUE) - SSovermap.overmap_container[x][y] -= src + docked_to.post_undocked() + docked_to.contents -= src + if(isnum(x) && isnum(y)) + SSovermap.overmap_container[x][y] -= src token.parent = null QDEL_NULL(token) QDEL_LIST(contents) @@ -339,6 +341,8 @@ * * dock_requester - The overmap datum trying to undock from this one. Cannot be null. */ /datum/overmap/proc/post_undocked(datum/overmap/ship/controlled/dock_requester) + SHOULD_CALL_PARENT(TRUE) + contents -= dock_requester return /** diff --git a/code/modules/overmap/ships/ship_datum.dm b/code/modules/overmap/ships/ship_datum.dm index 0d2ef4370b35..d4080098712e 100644 --- a/code/modules/overmap/ships/ship_datum.dm +++ b/code/modules/overmap/ships/ship_datum.dm @@ -33,9 +33,9 @@ RegisterSignal(docked_to, COMSIG_OVERMAP_MOVED, .proc/on_docked_to_moved) /datum/overmap/ship/Destroy() - . = ..() if(movement_callback_id) deltimer(movement_callback_id, SSovermap_movement) + return ..() /datum/overmap/ship/complete_dock(datum/overmap/dock_target, datum/docking_ticket/ticket) . = ..()