This commit is contained in:
timothyteakettle
2020-12-06 00:02:14 +00:00
parent 640a86582a
commit fa26f4c402
+4 -7
View File
@@ -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)