Adds functionality for placing hats on top of hats. Plasma-man hat accessory edition. (#26927)

* Init

* adds functionality for hats to be placed on hats.

* species sprites

* Removes modsuit stuff

* applies a bunch of suggestions from lewc

* batched suggestions (1/2)

Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>

* typecasts loop
removes unnecessary length check
uses forceMove

* one more forgotten typecast

* turn-around city 3

* turnaround city 3.1

* : -> .

* removes if(length)

* Applies suggestions from @lewcc

---------

Signed-off-by: Spaghetti-bit <yumyumkillkill@gmail.com>
Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com>
This commit is contained in:
Spaghetti-bit
2024-10-22 09:19:13 +00:00
committed by GitHub
co-authored by Luc
parent c4cc00400d
commit 29409d3821
4 changed files with 158 additions and 4 deletions
@@ -855,15 +855,24 @@ GLOBAL_LIST_EMPTY(damage_icon_parts)
var/mutable_appearance/standing
if(head.sprite_sheets && head.sprite_sheets[dna.species.sprite_sheet_name])
standing = mutable_appearance(head.sprite_sheets[dna.species.sprite_sheet_name], "[head.icon_state]", layer = -HEAD_LAYER)
if(istype(head, /obj/item/clothing/head/helmet/space/plasmaman))
var/obj/item/clothing/head/helmet/space/plasmaman/P = head
if(!P.up)
standing.overlays += P.visor_icon
else if(head.icon_override)
standing = mutable_appearance(head.icon_override, "[head.icon_state]", layer = -HEAD_LAYER)
else
standing = mutable_appearance('icons/mob/clothing/head.dmi', "[head.icon_state]", layer = -HEAD_LAYER)
if(istype(head, /obj/item/clothing/head/helmet/space/plasmaman))
var/obj/item/clothing/head/helmet/space/plasmaman/P = head
if(!P.up)
standing.overlays += P.visor_icon
if(istype(head, /obj/item/clothing/head))
var/obj/item/clothing/head/w_hat = head
for(var/obj/item/clothing/head/hat in w_hat.attached_hats)
if(hat.sprite_sheets && hat.sprite_sheets[dna.species.sprite_sheet_name])
standing.overlays += image("icon" = hat.sprite_sheets[dna.species.sprite_sheet_name], "icon_state" = "[hat.icon_state]")
else
standing.overlays += image("icon" = hat.icon_override, "icon_state" = "[hat.icon_state]")
if(head.blood_DNA)
var/image/bloodsies = image("icon" = dna.species.blood_mask, "icon_state" = "helmetblood")
bloodsies.color = head.blood_color