From b1379dd49eefd2e5255b9611c01b8d622ec8e851 Mon Sep 17 00:00:00 2001 From: timothyteakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Tue, 27 Oct 2020 21:11:42 +0000 Subject: [PATCH] still not working --- code/controllers/subsystem/job.dm | 7 ++++++- code/datums/elements/polychromic.dm | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 404bc16364..c7ea768de5 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -707,10 +707,15 @@ 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 = SSdcs.GetElement(list(/datum/element/polychromic)) + var/datum/element/polychromic/polychromic + for(var/some_connection in I.comp_lookup["parent_qdeleting"]) //stupid way to do it but GetElement does not work for this case, sigh + if(ispath(some_connection, /datum/element/polychromic)) + polychromic = some_connection + break if(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] diff --git a/code/datums/elements/polychromic.dm b/code/datums/elements/polychromic.dm index 7ae0d04b05..726ee8f967 100644 --- a/code/datums/elements/polychromic.dm +++ b/code/datums/elements/polychromic.dm @@ -37,6 +37,7 @@ var/col = LAZYACCESS(colors, I) || "#FFFFFF" L += make_appearances ? mutable_appearance(mut_icon, overlays_states[I], color = col) : col colors_by_atom[A] = L + message_admins("attached") RegisterSignal(A, COMSIG_ATOM_UPDATE_OVERLAYS, .proc/apply_overlays) @@ -170,7 +171,7 @@ if(istype(source,/obj/item/clothing/suit/hooded)) //so how come it be like this, where toggleable headslots are named separately (helmet/hood) anyways? var/obj/item/clothing/suit/hooded/sourcesuit = source H = sourcesuit.hood - else if(istype(source,/obj/item/clothing/suit/space/hardsuit)) + else if(istype(source,/obj/item/clothing/suit/space/hardsuit)) var/obj/item/clothing/suit/space/hardsuit/sourcesuit = source H = sourcesuit.helmet else