Fixes some dyed items retaining their original appearance and adds plasmamen helmet dyeing (#27256)

* Fixes dying not changing the color or description of the dyed item, making it appear unchanged when worn.

* adds plasmaman helmet dyeing
This commit is contained in:
Migratingcocofruit
2024-11-29 10:52:09 +00:00
committed by GitHub
parent 8ad28af470
commit 3be13c3997
4 changed files with 31 additions and 2 deletions
@@ -4,6 +4,7 @@
desc = "A special containment helmet that allows plasma-based lifeforms to exist safely in an oxygenated environment. It is space-worthy, and may be worn in tandem with other EVA gear."
icon_state = "plasmaman-helm"
item_state = "plasmaman-helm"
base_icon_state = "plasmaman-helm"
strip_delay = 80
flash_protect = FLASH_PROTECTION_WELDER
tint = FLASH_PROTECTION_WELDER
@@ -15,6 +16,9 @@
var/smile_color = "#FF0000"
var/visor_icon = "envisor"
var/smile_state = "envirohelm_smile"
dyeable = TRUE
dyeing_key = DYE_REGISTRY_PLASMAMEN_HELMET
actions_types = list(/datum/action/item_action/toggle_helmet_light, /datum/action/item_action/toggle_welding_screen/plasmaman)
visor_vars_to_toggle = VISOR_FLASHPROTECT | VISOR_TINT
flags_inv = HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE
@@ -28,6 +32,7 @@
/obj/item/clothing/head/helmet/space/plasmaman/Initialize(mapload)
. = ..()
base_icon_state = icon_state
visor_toggling()
update_icon()
@@ -51,9 +56,9 @@
/obj/item/clothing/head/helmet/space/plasmaman/update_icon_state()
if(!up)
icon_state = initial(icon_state)
icon_state = base_icon_state
else
icon_state = "[initial(icon_state)][on ? "-light":""]"
icon_state = "[base_icon_state][on ? "-light":""]"
item_state = icon_state
/obj/item/clothing/head/helmet/space/plasmaman/update_overlays()