Fixes loadout specific polychromic hoodies
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -165,6 +165,15 @@
|
||||
/datum/element/polychromic/proc/on_examine(atom/source, mob/user, list/examine_list)
|
||||
examine_list += "<span class='notice'>Alt-click to recolor it.</span>"
|
||||
|
||||
/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?
|
||||
|
||||
Reference in New Issue
Block a user