Cleans up duplicate calls in bodypart overlays, implements a texture priority system (#89783)

## About The Pull Request

Implemented a bodypart texture overlay priority system - ensures that
derez suicide always goes ontop of carp infusions, and voidwalker curse
goes ontop of both - currently the last one applied is the one that
sticks with you. Also cleaned up duplicate update_body calls, either
removing them or adding ``update = FALSE`` to overlay code.

## Why It's Good For The Game

Having whichever overlay was applied the latest be displayed is just too
inconsistent. And duplicate calls eat perf, bad.
This commit is contained in:
SmArtKar
2025-03-11 13:28:34 -05:00
committed by GitHub
parent 6f22e7fb1f
commit fc71aa3977
18 changed files with 134 additions and 49 deletions
+6 -3
View File
@@ -111,10 +111,13 @@
/datum/bodypart_overlay/mutant/wings/moth/get_global_feature_list()
return SSaccessories.moth_wings_list
/datum/bodypart_overlay/mutant/wings/moth/can_draw_on_bodypart(mob/living/carbon/human/human)
if(!(human.wear_suit?.flags_inv & HIDEMUTWINGS))
/datum/bodypart_overlay/mutant/wings/moth/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
var/mob/living/carbon/human/human = bodypart_owner.owner
if(!istype(human))
return TRUE
return FALSE
if(human.wear_suit?.flags_inv & HIDEMUTWINGS)
return FALSE
return TRUE
/datum/bodypart_overlay/mutant/wings/moth/get_base_icon_state()
return burnt ? burn_datum.icon_state : sprite_datum.icon_state
+4 -1
View File
@@ -24,7 +24,10 @@
layers = ALL_EXTERNAL_OVERLAYS
feature_key = "wings"
/datum/bodypart_overlay/mutant/wings/can_draw_on_bodypart(mob/living/carbon/human/human)
/datum/bodypart_overlay/mutant/wings/can_draw_on_bodypart(obj/item/bodypart/bodypart_owner)
var/mob/living/carbon/human/human = bodypart_owner.owner
if(!istype(human))
return TRUE
if(!human.wear_suit)
return TRUE
if(!(human.wear_suit.flags_inv & HIDEJUMPSUIT))