fixes modsuit icons (#71998)

## About The Pull Request
#71908 this pr breaks modsuit icons before the first time they seal by
making the icon state be skin-standard-part
this fixes that by making them use base_icon_state instead of initial,
and also puts that in other places to reduce hardcoded stuff

## Why It's Good For The Game
le bug is le fix

## Changelog
🆑
fix: fixes modsuit icons
/🆑
This commit is contained in:
Fikou
2022-12-14 13:51:04 +00:00
committed by GitHub
parent c2626a20cf
commit e79d3bc1c4
4 changed files with 11 additions and 8 deletions
+2 -4
View File
@@ -191,6 +191,7 @@
///Seals or unseals the given part
/obj/item/mod/control/proc/seal_part(obj/item/clothing/part, seal)
if(seal)
part.icon_state = "[skin]-[part.base_icon_state]-sealed"
part.clothing_flags |= part.visor_flags
part.flags_inv |= part.visor_flags_inv
part.flags_cover |= part.visor_flags_cover
@@ -198,6 +199,7 @@
part.cold_protection = initial(part.cold_protection)
part.alternate_worn_layer = null
else
part.icon_state = "[skin]-[part.base_icon_state]"
part.flags_cover &= ~part.visor_flags_cover
part.flags_inv &= ~part.visor_flags_inv
part.clothing_flags &= ~part.visor_flags
@@ -205,17 +207,13 @@
part.cold_protection = NONE
part.alternate_worn_layer = mod_parts[part]
if(part == boots)
boots.icon_state = "[skin]-boots[seal ? "-sealed" : ""]"
wearer.update_worn_shoes()
if(part == gauntlets)
gauntlets.icon_state = "[skin]-gauntlets[seal ? "-sealed" : ""]"
wearer.update_worn_gloves()
if(part == chestplate)
chestplate.icon_state = "[skin]-chestplate[seal ? "-sealed" : ""]"
wearer.update_worn_oversuit()
wearer.update_worn_undersuit()
if(part == helmet)
helmet.icon_state = "[skin]-helmet[seal ? "-sealed" : ""]"
wearer.update_worn_head()
wearer.update_worn_mask()
wearer.update_worn_glasses()