From fa26f4c4021d9fe17e60edfef3e60056ccbbe770 Mon Sep 17 00:00:00 2001 From: timothyteakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Sun, 6 Dec 2020 00:02:14 +0000 Subject: [PATCH] b --- code/controllers/subsystem/job.dm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 1e88b5c627..759cd339cb 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -676,7 +676,6 @@ SUBSYSTEM_DEF(job) return for(var/i in chosen_gear) var/datum/gear/G = i[LOADOUT_ITEM] - message_admins("attempt to index with category [initial(G.category)] and subcategory [initial(G.subcategory)] is this a race condition?") G = GLOB.loadout_items[initial(G.category)][initial(G.subcategory)][initial(G.name)] if(!G) continue @@ -708,14 +707,12 @@ SUBSYSTEM_DEF(job) qdel(I) if(I) //handle loadout colors last if((G.loadout_flags & LOADOUT_CAN_COLOR_POLYCHROMIC) && length(G.loadout_initial_colors)) - var/datum/element/polychromic/polychromic - var/some_connection = I.comp_lookup["item_worn_overlays"] //stupid way to do it but GetElement does not work for this case, sigh - if(ispath(some_connection, /datum/element/polychromic)) - polychromic = some_connection + var/datum/element/polychromic/polychromic = I.comp_lookup["item_worn_overlays"] //stupid way to do it but GetElement does not work for this + if(polychromic && istype(polychromic)) var/list/polychromic_entry = polychromic.colors_by_atom[I] if(polychromic_entry) - message_admins("we found the corresponding atom") - polychromic.colors_by_atom[I] = I[LOADOUT_COLOR] + polychromic.colors_by_atom[I] = i[LOADOUT_COLOR] + I.update_icon() /datum/controller/subsystem/job/proc/FreeRole(rank)