Files
Bubberstation/code/modules/unit_tests/screenshot_husk.dm
MrMelbert be8bbf4c55 Fixes husk appearances not working, adds a screenshot test for it (#72190)
## About The Pull Request

Fixes #72159

Before this proc used to early return when the limb was husked
The leg refactor changed it to no longer early return and as a result it
overrided the generated husk icon with a normal limb icon
So I just wrapped even more of the proc in `!is_husked`, since like most
of it is not supposed to run

Screenshot tests husks too

## Why It's Good For The Game

Husks are good(?)

## Changelog

🆑 Melbert
fix: Husked bodies look husked again
/🆑
2022-12-24 02:37:37 -08:00

16 lines
725 B
Plaintext

/// A screenshot test for husks
/datum/unit_test/screenshot_husk
/datum/unit_test/screenshot_husk/Run()
var/mob/living/carbon/human/human = allocate(/mob/living/carbon/human/dummy/consistent) //we don't use a dummy as they have no organs
human.become_husk(BURN)
// test with no clothes, the full husk experience
test_screenshot("body", get_flat_icon_for_all_directions(human))
var/obj/item/bodypart/leg/left/leftleg = human.get_bodypart(BODY_ZONE_L_LEG)
var/obj/item/bodypart/arm/right/rightarm = human.get_bodypart(BODY_ZONE_R_ARM)
leftleg.drop_limb(special = TRUE)
rightarm.drop_limb(special = TRUE)
// test with some limbs missing
test_screenshot("body_missing_limbs", get_flat_icon_for_all_directions(human))