From 926c4a5e17b68ea6b9b6f7d27af0c8b65716c427 Mon Sep 17 00:00:00 2001 From: Squirgenheimer Date: Mon, 29 Oct 2018 01:20:33 -0400 Subject: [PATCH 1/2] fixes deleting mechs causing a runtime -removed unnecessary code handled by detach() --- code/game/mecha/equipment/mecha_equipment.dm | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/code/game/mecha/equipment/mecha_equipment.dm b/code/game/mecha/equipment/mecha_equipment.dm index 62928c95be5..743b8a097e6 100644 --- a/code/game/mecha/equipment/mecha_equipment.dm +++ b/code/game/mecha/equipment/mecha_equipment.dm @@ -31,19 +31,13 @@ /obj/item/mecha_parts/mecha_equipment/Destroy()//missiles detonating, teleporter creating singularity? if(chassis) - detach(chassis) - chassis.equipment -= src - listclearnulls(chassis.equipment) - if(chassis.selected == src) - chassis.selected = null - src.update_chassis_page() chassis.occupant_message("The [src] is destroyed!") chassis.log_append_to_last("[src] is destroyed.",1) if(istype(src, /obj/item/mecha_parts/mecha_equipment/weapon)) chassis.occupant << sound('sound/mecha/weapdestr.ogg', volume = 50) else chassis.occupant << sound('sound/mecha/critdestr.ogg', volume = 50) - chassis = null + detach(chassis) return ..() /obj/item/mecha_parts/mecha_equipment/proc/critfail() From c6da75590c73e166a5ae748f01a99de2f6a2facd Mon Sep 17 00:00:00 2001 From: Squirgenheimer Date: Mon, 29 Oct 2018 01:27:50 -0400 Subject: [PATCH 2/2] say code correction -we should be using the loc of the mob to create a speech bubble, not the loc of the loc of the mob -speech bubbles created by mobs inside a mech will now follow the mech --- code/modules/mob/living/say.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 5f577f79d7d..cb08ebff021 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -274,7 +274,7 @@ proc/get_radio_key_from_channel(var/channel) spawn(0) if(loc && !isturf(loc)) var/atom/A = loc //Non-turf, let it handle the speech bubble - A.speech_bubble("hR[speech_bubble_test]", A.loc, speech_bubble_recipients) + A.speech_bubble("hR[speech_bubble_test]", A, speech_bubble_recipients) else //Turf, leave speech bubbles to the mob speech_bubble("h[speech_bubble_test]", src, speech_bubble_recipients)