diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 8e38f106cc7..3a3b7df0261 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -42,6 +42,7 @@ GLOBAL_VAR(bomb_set) GLOB.poi_list |= src /obj/machinery/nuclearbomb/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) GLOB.poi_list.Remove(src) return ..() diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm index cc204725ce1..5ab5db96677 100644 --- a/code/game/machinery/alarm.dm +++ b/code/game/machinery/alarm.dm @@ -222,6 +222,7 @@ first_run() /obj/machinery/alarm/Destroy() + SStgui.close_uis(wires) GLOB.air_alarms -= src if(SSradio) SSradio.remove_object(src, frequency) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index c22922e4d14..f03495489f9 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -65,6 +65,7 @@ RefreshParts() /obj/machinery/autolathe/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) var/datum/component/material_container/materials = GetComponent(/datum/component/material_container) materials.retrieve_all() diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm index 8915572bb15..8ec5123ea66 100644 --- a/code/game/machinery/camera/camera.dm +++ b/code/game/machinery/camera/camera.dm @@ -49,6 +49,7 @@ wires.cut_all() /obj/machinery/camera/Destroy() + SStgui.close_uis(wires) toggle_cam(null, FALSE) //kick anyone viewing out QDEL_NULL(assembly) if(istype(bug)) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 19ef43a4ac9..58d2bb4535e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -142,6 +142,7 @@ About the new airlock wires panel: break /obj/machinery/door/airlock/Destroy() + SStgui.close_uis(wires) QDEL_NULL(electronics) QDEL_NULL(wires) QDEL_NULL(note) diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index da4df4f8382..15ff086e5a4 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -255,6 +255,7 @@ occupant_typecache = typecacheof(occupant_typecache) /obj/machinery/suit_storage_unit/Destroy() + SStgui.close_uis(wires) QDEL_NULL(suit) QDEL_NULL(helmet) QDEL_NULL(mask) diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 39ababea1a1..2a476c215ef 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -91,6 +91,7 @@ ..() /obj/machinery/syndicatebomb/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) QDEL_NULL(countdown) STOP_PROCESSING(SSfastprocess, src) diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm index 7aa5661febe..bbf8564ba1b 100644 --- a/code/game/machinery/vending.dm +++ b/code/game/machinery/vending.dm @@ -101,6 +101,7 @@ power_change() /obj/machinery/vending/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) QDEL_NULL(coin) QDEL_NULL(inserted_item) diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 477b9dffb92..881c7b27587 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -76,6 +76,7 @@ GLOBAL_LIST_INIT(default_medbay_channels, list( GLOB.global_radios |= src /obj/item/radio/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) if(SSradio) SSradio.remove_object(src, frequency) diff --git a/code/modules/clothing/spacesuits/rig/rig.dm b/code/modules/clothing/spacesuits/rig/rig.dm index 0d106a874a7..474361d4f6e 100644 --- a/code/modules/clothing/spacesuits/rig/rig.dm +++ b/code/modules/clothing/spacesuits/rig/rig.dm @@ -161,6 +161,7 @@ update_icon(1) /obj/item/rig/Destroy() + SStgui.close_uis(wires) for(var/obj/item/piece in list(gloves,boots,helmet,chest)) var/mob/living/M = piece.loc if(istype(M)) diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 346b78e5b26..0abd8782452 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -48,6 +48,7 @@ wires = new/datum/wires/smartfridge(src) /obj/machinery/smartfridge/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) for(var/atom/movable/A in contents) A.forceMove(loc) diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 8737fdf21b3..7e44faa64a8 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -220,6 +220,7 @@ GLOBAL_LIST_INIT(sand_recipes, list(\ var/datum/wires/explosive/gibtonite/wires /obj/item/twohanded/required/gibtonite/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) return ..() diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index c1f8f5a5a6b..57a275a1592 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -270,6 +270,7 @@ GLOBAL_LIST_INIT(robot_verbs_default, list( //If there's an MMI in the robot, have it ejected when the mob goes away. --NEO //Improved /N /mob/living/silicon/robot/Destroy() + SStgui.close_uis(wires) if(mmi && mind)//Safety for when a cyborg gets dust()ed. Or there is no MMI inside. var/turf/T = get_turf(loc)//To hopefully prevent run time errors. if(T) mmi.loc = T diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 5894d507a11..dbd8ae6033a 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -66,6 +66,7 @@ RegisterSignal(src, COMSIG_CROSSED_MOVABLE, .proc/human_squish_check) /mob/living/simple_animal/bot/mulebot/Destroy() + SStgui.close_uis(wires) unload(0) QDEL_NULL(wires) QDEL_NULL(cell) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 35f0199ff0e..30b5ad479f5 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -170,6 +170,7 @@ addtimer(CALLBACK(src, .proc/update), 5) /obj/machinery/power/apc/Destroy() + SStgui.close_uis(wires) GLOB.apcs -= src if(malfai && operating) malfai.malf_picker.processing_time = clamp(malfai.malf_picker.processing_time - 10,0,1000) diff --git a/code/modules/power/singularity/particle_accelerator/particle_control.dm b/code/modules/power/singularity/particle_accelerator/particle_control.dm index 9c3ca5f523c..3ad96050123 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_control.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_control.dm @@ -27,6 +27,7 @@ use_log = list() /obj/machinery/particle_accelerator/control_box/Destroy() + SStgui.close_uis(wires) if(active) toggle_power() QDEL_NULL(wires) diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 5f58bcb5dd4..5743bea8475 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -21,6 +21,7 @@ RefreshParts() /obj/machinery/power/tesla_coil/Destroy() + SStgui.close_uis(wires) QDEL_NULL(wires) return ..()