diff --git a/code/controllers/subsystem/job.dm b/code/controllers/subsystem/job.dm index 4963e33cc3..779ee2fbac 100644 --- a/code/controllers/subsystem/job.dm +++ b/code/controllers/subsystem/job.dm @@ -698,6 +698,8 @@ SUBSYSTEM_DEF(job) if(polychromic && istype(polychromic)) var/list/polychromic_entry = polychromic.colors_by_atom[I] if(polychromic_entry) + if(polychromic.suits_with_helmet_typecache[I.type]) //is this one of those toggleable hood/helmet things? + polychromic.connect_helmet(I,i[LOADOUT_COLOR]) polychromic.colors_by_atom[I] = i[LOADOUT_COLOR] I.update_icon() else diff --git a/code/datums/elements/polychromic.dm b/code/datums/elements/polychromic.dm index 600bf9250e..5e888e0609 100644 --- a/code/datums/elements/polychromic.dm +++ b/code/datums/elements/polychromic.dm @@ -165,6 +165,15 @@ /datum/element/polychromic/proc/on_examine(atom/source, mob/user, list/examine_list) examine_list += "Alt-click to recolor it." +/datum/element/polychromic/proc/connect_helmet(atom/I, var/applycolor) + if(isitem(I)) + if(istype(I,/obj/item/clothing/suit/hooded)) + var/obj/item/clothing/suit/hooded/Isuit = I + colors_by_atom[Isuit.hood] = applycolor + else if(istype(I,/obj/item/clothing/suit/space/hardsuit)) + var/obj/item/clothing/suit/space/hardsuit/Isuit = I + colors_by_atom[Isuit.helmet] = applycolor + /datum/element/polychromic/proc/register_helmet(atom/source, obj/item/clothing/head/H) if(!isitem(H)) //backup in case if it messes up somehow if(istype(source,/obj/item/clothing/suit/hooded)) //so how come it be like this, where toggleable headslots are named separately (helmet/hood) anyways?