From be9299addf78bffcabe6d3ee13cc2cbc68da35b2 Mon Sep 17 00:00:00 2001 From: Zephyr <12817816+ZephyrTFA@users.noreply.github.com> Date: Sun, 10 Dec 2023 16:49:01 -0500 Subject: [PATCH] fix a few easy to spot hard deletes (#2580) --- code/game/machinery/computer/crew.dm | 4 ++++ code/modules/mob/living/silicon/ai/ai.dm | 8 +++++++- code/modules/overmap/ships/controlled_ship_datum.dm | 1 + code/modules/vehicles/scooter.dm | 2 +- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/computer/crew.dm b/code/game/machinery/computer/crew.dm index 589289c595db..f875defd6044 100644 --- a/code/game/machinery/computer/crew.dm +++ b/code/game/machinery/computer/crew.dm @@ -44,6 +44,10 @@ GLOBAL_DATUM_INIT(crewmonitor, /datum/crewmonitor, new) ui = new(user, src, "CrewConsole") ui.open() +/datum/crewmonitor/ui_close(mob/user) + ui_sources -= user + return ..() + /datum/crewmonitor/proc/show(mob/M, source) ui_sources[M] = source ui_interact(M) diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 2223a1491a6c..daa987904737 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -711,7 +711,7 @@ for (var/obj/machinery/camera/C in lit_cameras) C.set_light(0) - lit_cameras = list() + lit_cameras = list() return @@ -737,9 +737,15 @@ for (var/obj/machinery/camera/C in remove) lit_cameras -= C //Removed from list before turning off the light so that it doesn't check the AI looking away. C.Togglelight(0) + UnregisterSignal(C, COMSIG_PARENT_QDELETING, PROC_REF(camera_deleted)) for (var/obj/machinery/camera/C in add) C.Togglelight(1) lit_cameras |= C + RegisterSignal(C, COMSIG_PARENT_QDELETING, PROC_REF(camera_deleted)) + +/mob/living/silicon/ai/proc/camera_deleted(obj/machinery/camera/camera) + SIGNAL_HANDLER + lit_cameras -= camera /mob/living/silicon/ai/proc/control_integrated_radio() set name = "Transceiver Settings" diff --git a/code/modules/overmap/ships/controlled_ship_datum.dm b/code/modules/overmap/ships/controlled_ship_datum.dm index 4397919593aa..da35c3b9df9c 100644 --- a/code/modules/overmap/ships/controlled_ship_datum.dm +++ b/code/modules/overmap/ships/controlled_ship_datum.dm @@ -116,6 +116,7 @@ . = ..() SSovermap.controlled_ships -= src helms.Cut() + QDEL_LIST(missions) LAZYCLEARLIST(owner_candidates) if(!QDELETED(shuttle_port)) shuttle_port.current_ship = null diff --git a/code/modules/vehicles/scooter.dm b/code/modules/vehicles/scooter.dm index 6dee79d6e69a..8d6acea28452 100644 --- a/code/modules/vehicles/scooter.dm +++ b/code/modules/vehicles/scooter.dm @@ -76,7 +76,7 @@ /obj/vehicle/ridden/scooter/skateboard/Destroy() if(sparks) QDEL_NULL(sparks) - . = ..() + return ..() /obj/vehicle/ridden/scooter/skateboard/relaymove(mob/living/user, direction) if (grinding || world.time < next_crash)