From c6baa2083f3b4e4d73db188eaf6475389f73db65 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Tue, 24 Sep 2024 11:48:37 +0200 Subject: [PATCH 1/3] we load it from a file, that path might no longer exist --- code/modules/client/preference_setup/loadout/gear_tweaks.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/client/preference_setup/loadout/gear_tweaks.dm b/code/modules/client/preference_setup/loadout/gear_tweaks.dm index f371fac6c18..3fe07dd5fa7 100644 --- a/code/modules/client/preference_setup/loadout/gear_tweaks.dm +++ b/code/modules/client/preference_setup/loadout/gear_tweaks.dm @@ -151,7 +151,8 @@ GLOBAL_DATUM_INIT(gear_tweak_free_matrix_recolor, /datum/gear_tweak/matrix_recol continue else path = contents[metadata[i]] - new path(I) + if(path) + new path(I) /* * Ragent adjustment From 5ed2cde700ee18ed561f0de5bc1f59ff9d7b3021 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Tue, 24 Sep 2024 15:23:21 +0200 Subject: [PATCH 2/3] notify the user --- .../client/preference_setup/loadout/gear_tweaks.dm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/code/modules/client/preference_setup/loadout/gear_tweaks.dm b/code/modules/client/preference_setup/loadout/gear_tweaks.dm index 3fe07dd5fa7..2d2a2e29e43 100644 --- a/code/modules/client/preference_setup/loadout/gear_tweaks.dm +++ b/code/modules/client/preference_setup/loadout/gear_tweaks.dm @@ -151,8 +151,12 @@ GLOBAL_DATUM_INIT(gear_tweak_free_matrix_recolor, /datum/gear_tweak/matrix_recol continue else path = contents[metadata[i]] - if(path) - new path(I) + if(!path) + var/mob/user = ismob(I.loc) ? I.loc : I.loc.loc + if(istype(user)) + to_chat(user, span_warning("The content \"[metadata[i]]\" from \"[I]\" does no longer exist and has not been loaded. Please replace it in the character setup.")) + continue + new path(I) /* * Ragent adjustment From 757841c6927d088fe64e23de80fa3a2d7f28e887 Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Wed, 25 Sep 2024 01:07:19 +0200 Subject: [PATCH 3/3] . --- code/modules/client/preference_setup/loadout/gear_tweaks.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/client/preference_setup/loadout/gear_tweaks.dm b/code/modules/client/preference_setup/loadout/gear_tweaks.dm index 2d2a2e29e43..ba5f621dbc3 100644 --- a/code/modules/client/preference_setup/loadout/gear_tweaks.dm +++ b/code/modules/client/preference_setup/loadout/gear_tweaks.dm @@ -152,7 +152,7 @@ GLOBAL_DATUM_INIT(gear_tweak_free_matrix_recolor, /datum/gear_tweak/matrix_recol else path = contents[metadata[i]] if(!path) - var/mob/user = ismob(I.loc) ? I.loc : I.loc.loc + var/mob/user = ismob(I.loc) ? I.loc : I.loc?.loc if(istype(user)) to_chat(user, span_warning("The content \"[metadata[i]]\" from \"[I]\" does no longer exist and has not been loaded. Please replace it in the character setup.")) continue