From 1dd319d56aed8a7d0c92a968abcb6e30f376277d Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Thu, 17 Sep 2020 03:06:24 +0200 Subject: [PATCH] [MIRROR] Fix runtime in shade transformation when done via russian revolver (#835) * Fix runtime in shade transformation when done via russian revolver (#53739) /obj/item/gun/ballistic/revolver/russian/proc/shoot_self starts a transfer_soul chain with a null user, because it's the target who inflicted it on themselves. There is no user. Later on in when we init the shade, we attempt to copy the "master"/user's language to the shade too. No user, classic runtime. Moving the user language transfer behind a conditional check addresses this oversight. * Fix runtime in shade transformation when done via russian revolver Co-authored-by: Timberpoes --- code/modules/antagonists/wizard/equipment/soulstone.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/antagonists/wizard/equipment/soulstone.dm b/code/modules/antagonists/wizard/equipment/soulstone.dm index d799ef67981..f5e0a9c7120 100644 --- a/code/modules/antagonists/wizard/equipment/soulstone.dm +++ b/code/modules/antagonists/wizard/equipment/soulstone.dm @@ -310,7 +310,8 @@ S.real_name = "Shade of [T.real_name]" S.key = shade_controller.key S.copy_languages(T, LANGUAGE_MIND)//Copies the old mobs languages into the new mob holder. - S.copy_languages(user, LANGUAGE_MASTER) + if(user) + S.copy_languages(user, LANGUAGE_MASTER) S.update_atom_languages() grant_all_languages(FALSE, FALSE, TRUE) //Grants omnitongue if(user)