Merge pull request #8388 from Useroth/collars-n-shit
Quick fix for the colorable collars. I've made the mistake of not testing code after applying a suggestion.
This commit is contained in:
@@ -180,6 +180,7 @@
|
||||
desc = "It's for pets. Though you probably could wear it yourself, you'd doubtless be the subject of ridicule. It seems to be made out of a polychromic material."
|
||||
icon_state = "petcollar"
|
||||
item_color = "petcollar"
|
||||
alternate_worn_icon = 'icons/mob/neck.dmi' //Because, as it appears, the item itself is normally not directly aware of its worn overlays, so this is about the easiest way, without adding a new var.
|
||||
hasprimary = TRUE
|
||||
primary_color = "#00BBBB"
|
||||
pocket_storage_component_path = /datum/component/storage/concrete/pockets/small/collar
|
||||
@@ -194,15 +195,15 @@
|
||||
if(hasprimary | hassecondary | hastertiary)
|
||||
if(!isinhands) //prevents the worn sprites from showing up if you're just holding them
|
||||
if(hasprimary) //checks if overlays are enabled
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(icon, "[item_color]-primary") //automagical sprite selection
|
||||
var/mutable_appearance/primary_worn = mutable_appearance(alternate_worn_icon, "[item_color]-primary") //automagical sprite selection
|
||||
primary_worn.color = primary_color //colors the overlay
|
||||
. += primary_worn //adds the overlay onto the buffer list to draw on the mob sprite
|
||||
if(hassecondary)
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(icon, "[item_color]-secondary")
|
||||
var/mutable_appearance/secondary_worn = mutable_appearance(alternate_worn_icon, "[item_color]-secondary")
|
||||
secondary_worn.color = secondary_color
|
||||
. += secondary_worn
|
||||
if(hastertiary)
|
||||
var/mutable_appearance/tertiary_worn = mutable_appearance(icon, "[item_color]-tertiary")
|
||||
var/mutable_appearance/tertiary_worn = mutable_appearance(alternate_worn_icon, "[item_color]-tertiary")
|
||||
tertiary_worn.color = tertiary_color
|
||||
. += tertiary_worn
|
||||
|
||||
|
||||
Reference in New Issue
Block a user