mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
Color variables for scarves/beanie fix (#19438)
* Does some stuff * Fixes ties on humans and corgis not applying color and alpha to the overlays * Renames /datum/dog_fashion vars to reduce confusion Also fixes issue introduced in d2fd3f36918b9abfa833b75fda8af3c124c85336 where custom DF icon_states (now obj_icon_state) would not carry over to the corgi * Fixes consistency mess up with dog_fashion caused by 2595ce2d322cd74653eca2be43f79ad63104e61a
This commit is contained in:
@@ -9,7 +9,9 @@
|
|||||||
// This isn't applied to the dog, but stores the icon_state of the
|
// This isn't applied to the dog, but stores the icon_state of the
|
||||||
// sprite that the associated item uses
|
// sprite that the associated item uses
|
||||||
var/icon_file
|
var/icon_file
|
||||||
var/icon_state
|
var/obj_icon_state
|
||||||
|
var/obj_alpha
|
||||||
|
var/obj_color
|
||||||
|
|
||||||
/datum/dog_fashion/New(mob/M)
|
/datum/dog_fashion/New(mob/M)
|
||||||
name = replacetext(name, "REAL_NAME", M.real_name)
|
name = replacetext(name, "REAL_NAME", M.real_name)
|
||||||
@@ -30,8 +32,11 @@
|
|||||||
D.speak_emote = speak_emote
|
D.speak_emote = speak_emote
|
||||||
|
|
||||||
/datum/dog_fashion/proc/get_image(var/dir)
|
/datum/dog_fashion/proc/get_image(var/dir)
|
||||||
if(icon_file && icon_state)
|
if(icon_file && obj_icon_state)
|
||||||
return image(icon_file, icon_state = icon_state, dir = dir)
|
var/image/corgI = image(icon_file, icon_state = obj_icon_state, dir = dir)
|
||||||
|
corgI.alpha = obj_alpha
|
||||||
|
corgI.color = obj_color
|
||||||
|
return corgI
|
||||||
|
|
||||||
|
|
||||||
/datum/dog_fashion/head
|
/datum/dog_fashion/head
|
||||||
@@ -40,8 +45,6 @@
|
|||||||
/datum/dog_fashion/back
|
/datum/dog_fashion/back
|
||||||
icon_file = 'icons/mob/corgi_back.dmi'
|
icon_file = 'icons/mob/corgi_back.dmi'
|
||||||
|
|
||||||
/datum/dog_fashion/head
|
|
||||||
|
|
||||||
/datum/dog_fashion/head/helmet
|
/datum/dog_fashion/head/helmet
|
||||||
name = "Sergeant REAL_NAME"
|
name = "Sergeant REAL_NAME"
|
||||||
desc = "The ever-loyal, the ever-vigilant."
|
desc = "The ever-loyal, the ever-vigilant."
|
||||||
@@ -129,7 +132,7 @@
|
|||||||
emote_see = list("stumbles around.", "shivers.")
|
emote_see = list("stumbles around.", "shivers.")
|
||||||
emote_hear = list("howls!","groans.")
|
emote_hear = list("howls!","groans.")
|
||||||
desc = "Spooky!"
|
desc = "Spooky!"
|
||||||
icon_state = "sheet"
|
obj_icon_state = "sheet"
|
||||||
|
|
||||||
/datum/dog_fashion/head/santa
|
/datum/dog_fashion/head/santa
|
||||||
name = "Santa's Corgi Helper"
|
name = "Santa's Corgi Helper"
|
||||||
|
|||||||
@@ -987,7 +987,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
|||||||
/obj/item/clothing/tie/blue=1, /obj/item/clothing/tie/red=1, /obj/item/clothing/tie/black=1, /obj/item/clothing/tie/horrible=1,
|
/obj/item/clothing/tie/blue=1, /obj/item/clothing/tie/red=1, /obj/item/clothing/tie/black=1, /obj/item/clothing/tie/horrible=1,
|
||||||
/obj/item/clothing/tie/scarf/red=1,/obj/item/clothing/tie/scarf/green=1,/obj/item/clothing/tie/scarf/darkblue=1,
|
/obj/item/clothing/tie/scarf/red=1,/obj/item/clothing/tie/scarf/green=1,/obj/item/clothing/tie/scarf/darkblue=1,
|
||||||
/obj/item/clothing/tie/scarf/purple=1,/obj/item/clothing/tie/scarf/yellow=1,/obj/item/clothing/tie/scarf/orange=1,
|
/obj/item/clothing/tie/scarf/purple=1,/obj/item/clothing/tie/scarf/yellow=1,/obj/item/clothing/tie/scarf/orange=1,
|
||||||
/obj/item/clothing/tie/scarf/lightblue=1,/obj/item/clothing/tie/scarf/white=1,/obj/item/clothing/tie/scarf/black=1,
|
/obj/item/clothing/tie/scarf/cyan=1,/obj/item/clothing/tie/scarf=1,/obj/item/clothing/tie/scarf/black=1,
|
||||||
/obj/item/clothing/tie/scarf/zebra=1,/obj/item/clothing/tie/scarf/christmas=1,/obj/item/clothing/tie/stripedredscarf=1,
|
/obj/item/clothing/tie/scarf/zebra=1,/obj/item/clothing/tie/scarf/christmas=1,/obj/item/clothing/tie/stripedredscarf=1,
|
||||||
/obj/item/clothing/tie/stripedbluescarf=1,/obj/item/clothing/tie/stripedgreenscarf=1,/obj/item/clothing/tie/waistcoat=1,
|
/obj/item/clothing/tie/stripedbluescarf=1,/obj/item/clothing/tie/stripedgreenscarf=1,/obj/item/clothing/tie/waistcoat=1,
|
||||||
/obj/item/clothing/under/blackskirt=1,/obj/item/clothing/under/blueskirt=1,/obj/item/clothing/under/blueskirt/redskirt=1,
|
/obj/item/clothing/under/blackskirt=1,/obj/item/clothing/under/blueskirt=1,/obj/item/clothing/under/blueskirt/redskirt=1,
|
||||||
@@ -997,7 +997,7 @@ IF YOU MODIFY THE PRODUCTS LIST OF A MACHINE, MAKE SURE TO UPDATE ITS RESUPPLY C
|
|||||||
/obj/item/clothing/suit/ianshirt=1,/obj/item/clothing/shoes/laceup=2,/obj/item/clothing/shoes/sneakers/black=4,
|
/obj/item/clothing/suit/ianshirt=1,/obj/item/clothing/shoes/laceup=2,/obj/item/clothing/shoes/sneakers/black=4,
|
||||||
/obj/item/clothing/shoes/sandal=1, /obj/item/clothing/gloves/fingerless=2,/obj/item/clothing/glasses/orange=1,/obj/item/clothing/glasses/red=1,
|
/obj/item/clothing/shoes/sandal=1, /obj/item/clothing/gloves/fingerless=2,/obj/item/clothing/glasses/orange=1,/obj/item/clothing/glasses/red=1,
|
||||||
/obj/item/weapon/storage/belt/fannypack=1, /obj/item/weapon/storage/belt/fannypack/blue=1, /obj/item/weapon/storage/belt/fannypack/red=1, /obj/item/clothing/suit/jacket/letterman=2,
|
/obj/item/weapon/storage/belt/fannypack=1, /obj/item/weapon/storage/belt/fannypack/blue=1, /obj/item/weapon/storage/belt/fannypack/red=1, /obj/item/clothing/suit/jacket/letterman=2,
|
||||||
/obj/item/clothing/head/beanie=1, /obj/item/clothing/head/beanie/black=1, /obj/item/clothing/head/beanie/red=1, /obj/item/clothing/head/beanie/green=1, /obj/item/clothing/head/beanie/blue=1,
|
/obj/item/clothing/head/beanie=1, /obj/item/clothing/head/beanie/black=1, /obj/item/clothing/head/beanie/red=1, /obj/item/clothing/head/beanie/green=1, /obj/item/clothing/head/beanie/darkblue=1,
|
||||||
/obj/item/clothing/head/beanie/purple=1, /obj/item/clothing/head/beanie/yellow=1, /obj/item/clothing/head/beanie/orange=1, /obj/item/clothing/head/beanie/cyan=1, /obj/item/clothing/head/beanie/christmas=1,
|
/obj/item/clothing/head/beanie/purple=1, /obj/item/clothing/head/beanie/yellow=1, /obj/item/clothing/head/beanie/orange=1, /obj/item/clothing/head/beanie/cyan=1, /obj/item/clothing/head/beanie/christmas=1,
|
||||||
/obj/item/clothing/head/beanie/striped=1, /obj/item/clothing/head/beanie/stripedred=1, /obj/item/clothing/head/beanie/stripedblue=1, /obj/item/clothing/head/beanie/stripedgreen=1,
|
/obj/item/clothing/head/beanie/striped=1, /obj/item/clothing/head/beanie/stripedred=1, /obj/item/clothing/head/beanie/stripedblue=1, /obj/item/clothing/head/beanie/stripedgreen=1,
|
||||||
/obj/item/clothing/suit/jacket/letterman_red=1)
|
/obj/item/clothing/suit/jacket/letterman_red=1)
|
||||||
|
|||||||
@@ -387,7 +387,10 @@ BLIND // can't see anything
|
|||||||
var/tie_color = hastie.item_color
|
var/tie_color = hastie.item_color
|
||||||
if(!tie_color)
|
if(!tie_color)
|
||||||
tie_color = hastie.icon_state
|
tie_color = hastie.icon_state
|
||||||
. += image("icon"='icons/mob/ties.dmi', "icon_state"="[tie_color]")
|
var/image/tI = image("icon"='icons/mob/ties.dmi', "icon_state"="[tie_color]")
|
||||||
|
tI.alpha = hastie.alpha
|
||||||
|
tI.color = hastie.color
|
||||||
|
. += tI
|
||||||
|
|
||||||
|
|
||||||
/obj/item/clothing/under/New()
|
/obj/item/clothing/under/New()
|
||||||
|
|||||||
@@ -5,55 +5,47 @@
|
|||||||
name = "white beanie"
|
name = "white beanie"
|
||||||
desc = "A stylish beanie. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their heads."
|
desc = "A stylish beanie. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their heads."
|
||||||
icon_state = "beanie" //Default white
|
icon_state = "beanie" //Default white
|
||||||
item_color = "white"
|
item_color = "beanie"
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/black
|
/obj/item/clothing/head/beanie/black
|
||||||
name = "black beanie"
|
name = "black beanie"
|
||||||
icon_state = "white"
|
icon_state = "beanie"
|
||||||
color = "#4A4A4B" //Grey but it looks black
|
color = "#4A4A4B" //Grey but it looks black
|
||||||
item_color = "black"
|
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/red
|
/obj/item/clothing/head/beanie/red
|
||||||
name = "red beanie"
|
name = "red beanie"
|
||||||
icon_state = "beanie"
|
icon_state = "beanie"
|
||||||
color = "#D91414" //Red
|
color = "#D91414" //Red
|
||||||
item_color = "red"
|
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/green
|
/obj/item/clothing/head/beanie/green
|
||||||
name = "green beanie"
|
name = "green beanie"
|
||||||
icon_state = "beanie"
|
icon_state = "beanie"
|
||||||
color = "#5C9E54" //Green
|
color = "#5C9E54" //Green
|
||||||
item_color = "green"
|
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/blue
|
/obj/item/clothing/head/beanie/darkblue
|
||||||
name = "blue beanie"
|
name = "dark blue beanie"
|
||||||
icon_state = "beanie"
|
icon_state = "beanie"
|
||||||
color = "#1E85BC" //Blue
|
color = "#1E85BC" //Blue
|
||||||
item_color = "blue"
|
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/purple
|
/obj/item/clothing/head/beanie/purple
|
||||||
name = "purple beanie"
|
name = "purple beanie"
|
||||||
icon_state = "beanie"
|
icon_state = "beanie"
|
||||||
color = "#9557C5" //purple
|
color = "#9557C5" //purple
|
||||||
item_color = "purple"
|
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/yellow
|
/obj/item/clothing/head/beanie/yellow
|
||||||
name = "yellow beanie"
|
name = "yellow beanie"
|
||||||
icon_state = "beanie"
|
icon_state = "beanie"
|
||||||
color = "#E0C14F" //Yellow
|
color = "#E0C14F" //Yellow
|
||||||
item_color = "yellow"
|
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/orange
|
/obj/item/clothing/head/beanie/orange
|
||||||
name = "orange beanie"
|
name = "orange beanie"
|
||||||
icon_state = "beanie"
|
icon_state = "beanie"
|
||||||
color = "#C67A4B" //orange
|
color = "#C67A4B" //orange
|
||||||
item_color = "orange"
|
|
||||||
|
|
||||||
/obj/item/clothing/head/beanie/cyan
|
/obj/item/clothing/head/beanie/cyan
|
||||||
name = "cyan beanie"
|
name = "cyan beanie"
|
||||||
icon_state = "beanie"
|
icon_state = "beanie"
|
||||||
color = "#54A3CE" //Cyan (Or close to it)
|
color = "#54A3CE" //Cyan (Or close to it)
|
||||||
item_color = "cyan"
|
|
||||||
|
|
||||||
//Striped Beanies have unique sprites
|
//Striped Beanies have unique sprites
|
||||||
|
|
||||||
|
|||||||
@@ -214,55 +214,55 @@
|
|||||||
//SCARVES//
|
//SCARVES//
|
||||||
///////////
|
///////////
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf
|
/obj/item/clothing/tie/scarf //Default white color, same functionality as beanies.
|
||||||
name = "scarf"
|
|
||||||
desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
|
|
||||||
dog_fashion = /datum/dog_fashion/head
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/red
|
|
||||||
name = "red scarf"
|
|
||||||
icon_state = "redscarf"
|
|
||||||
item_color = "redscarf"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/green
|
|
||||||
name = "green scarf"
|
|
||||||
icon_state = "greenscarf"
|
|
||||||
item_color = "greenscarf"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/darkblue
|
|
||||||
name = "dark blue scarf"
|
|
||||||
icon_state = "darkbluescarf"
|
|
||||||
item_color = "darkbluescarf"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/purple
|
|
||||||
name = "purple scarf"
|
|
||||||
icon_state = "purplescarf"
|
|
||||||
item_color = "purplescarf"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/yellow
|
|
||||||
name = "yellow scarf"
|
|
||||||
icon_state = "yellowscarf"
|
|
||||||
item_color = "yellowscarf"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/orange
|
|
||||||
name = "orange scarf"
|
|
||||||
icon_state = "orangescarf"
|
|
||||||
item_color = "orangescarf"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/lightblue
|
|
||||||
name = "light blue scarf"
|
|
||||||
icon_state = "lightbluescarf"
|
|
||||||
item_color = "lightbluescarf"
|
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/white
|
|
||||||
name = "white scarf"
|
name = "white scarf"
|
||||||
icon_state = "whitescarf"
|
icon_state = "scarf"
|
||||||
item_color = "whitescarf"
|
desc = "A stylish scarf. The perfect winter accessory for those with a keen fashion sense, and those who just can't handle a cold breeze on their necks."
|
||||||
|
item_color = "scarf"
|
||||||
|
dog_fashion = /datum/dog_fashion/head
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/black
|
/obj/item/clothing/tie/scarf/black
|
||||||
name = "black scarf"
|
name = "black scarf"
|
||||||
icon_state = "blackscarf"
|
icon_state = "scarf"
|
||||||
item_color = "blackscarf"
|
color = "#4A4A4B" //Grey but it looks black
|
||||||
|
|
||||||
|
/obj/item/clothing/tie/scarf/red
|
||||||
|
name = "red scarf"
|
||||||
|
icon_state = "scarf"
|
||||||
|
color = "#D91414" //Red
|
||||||
|
|
||||||
|
/obj/item/clothing/tie/scarf/green
|
||||||
|
name = "green scarf"
|
||||||
|
icon_state = "scarf"
|
||||||
|
color = "#5C9E54" //Green
|
||||||
|
|
||||||
|
/obj/item/clothing/tie/scarf/darkblue
|
||||||
|
name = "dark blue scarf"
|
||||||
|
icon_state = "scarf"
|
||||||
|
color = "#1E85BC" //Blue
|
||||||
|
|
||||||
|
/obj/item/clothing/tie/scarf/purple
|
||||||
|
name = "purple scarf"
|
||||||
|
icon_state = "scarf"
|
||||||
|
color = "#9557C5" //purple
|
||||||
|
|
||||||
|
/obj/item/clothing/tie/scarf/yellow
|
||||||
|
name = "yellow scarf"
|
||||||
|
icon_state = "scarf"
|
||||||
|
color = "#E0C14F" //Yellow
|
||||||
|
|
||||||
|
/obj/item/clothing/tie/scarf/orange
|
||||||
|
name = "orange scarf"
|
||||||
|
icon_state = "scarf"
|
||||||
|
color = "#C67A4B" //orange
|
||||||
|
|
||||||
|
/obj/item/clothing/tie/scarf/cyan
|
||||||
|
name = "cyan scarf"
|
||||||
|
icon_state = "scarf"
|
||||||
|
color = "#54A3CE" //Cyan
|
||||||
|
|
||||||
|
|
||||||
|
//Striped scarves get their own icons
|
||||||
|
|
||||||
/obj/item/clothing/tie/scarf/zebra
|
/obj/item/clothing/tie/scarf/zebra
|
||||||
name = "zebra scarf"
|
name = "zebra scarf"
|
||||||
|
|||||||
@@ -400,8 +400,12 @@
|
|||||||
var/image/head_icon
|
var/image/head_icon
|
||||||
var/datum/dog_fashion.DF = new inventory_head.dog_fashion(src)
|
var/datum/dog_fashion.DF = new inventory_head.dog_fashion(src)
|
||||||
|
|
||||||
if(!DF.icon_state)
|
if(!DF.obj_icon_state)
|
||||||
DF.icon_state = inventory_head.icon_state
|
DF.obj_icon_state = inventory_head.icon_state
|
||||||
|
if(!DF.obj_alpha)
|
||||||
|
DF.obj_alpha = inventory_head.alpha
|
||||||
|
if(!DF.obj_color)
|
||||||
|
DF.obj_color = inventory_head.color
|
||||||
|
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
head_icon = DF.get_image(dir = EAST)
|
head_icon = DF.get_image(dir = EAST)
|
||||||
@@ -416,8 +420,12 @@
|
|||||||
var/image/back_icon
|
var/image/back_icon
|
||||||
var/datum/dog_fashion.DF = new inventory_back.dog_fashion(src)
|
var/datum/dog_fashion.DF = new inventory_back.dog_fashion(src)
|
||||||
|
|
||||||
if(!DF.icon_state)
|
if(!DF.obj_icon_state)
|
||||||
DF.icon_state = inventory_back.icon_state
|
DF.obj_icon_state = inventory_back.icon_state
|
||||||
|
if(!DF.obj_alpha)
|
||||||
|
DF.obj_alpha = inventory_back.alpha
|
||||||
|
if(!DF.obj_color)
|
||||||
|
DF.obj_color = inventory_back.color
|
||||||
|
|
||||||
if(health <= 0)
|
if(health <= 0)
|
||||||
back_icon = DF.get_image(dir = EAST)
|
back_icon = DF.get_image(dir = EAST)
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 15 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 2.6 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 11 KiB |
Reference in New Issue
Block a user