mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 23:27:34 +01:00
SPECIES NUKING 2023: Head flags 2: Electric Boogaloo (#76298) Continues the work I started on https://github.com/tgstation/tgstation/pull/76074 Fixes https://github.com/tgstation/tgstation/issues/73782 Implements a bunch of wrapper procs for hair style, facial hair style, etc etc the whole nine yards. Fixes many issues, especially with gradients because I did sloppy tired code that didn't work there. Makes head/get_limb_icon() not a disgusting mess (well, at least makes it less of a disgusting mess). Actually makes hair and lips depend entirely on the bodypart. 🆑 refactor: Head rendering code has been updated significantly... Again. Please report any issues with hair, facial hair, lipstick and such. /🆑 Co-authored-by: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com>
This commit is contained in:
co-authored by
ChungusGamer666
parent
6ab09f4f28
commit
db83be17da
@@ -29,11 +29,20 @@
|
||||
|
||||
/datum/unit_test/head_transplant/Run()
|
||||
var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent)
|
||||
var/mob/living/carbon/human/alice = allocate(/mob/living/carbon/human/consistent)
|
||||
var/mob/living/carbon/human/bob = allocate(/mob/living/carbon/human/consistent)
|
||||
|
||||
var/mob/living/carbon/human/alice = allocate(/mob/living/carbon/human/consistent)
|
||||
alice.fully_replace_character_name(null, "Alice")
|
||||
alice.set_haircolor(COLOR_LIGHT_PINK, update = FALSE)
|
||||
alice.set_hairstyle("Very Long Hair", update = FALSE)
|
||||
alice.set_facial_haircolor(COLOR_LIGHT_PINK, update = FALSE)
|
||||
alice.set_facial_hairstyle("Shaved", update = TRUE)
|
||||
|
||||
var/mob/living/carbon/human/bob = allocate(/mob/living/carbon/human/consistent)
|
||||
bob.fully_replace_character_name(null, "Bob")
|
||||
bob.set_haircolor(COLOR_LIGHT_BROWN, update = FALSE)
|
||||
bob.set_hairstyle("Short Hair", update = FALSE)
|
||||
bob.set_facial_haircolor(COLOR_LIGHT_BROWN, update = FALSE)
|
||||
bob.set_facial_hairstyle("Beard (Full)", update = TRUE)
|
||||
|
||||
var/obj/item/bodypart/head/alices_head = alice.get_bodypart(BODY_ZONE_HEAD)
|
||||
alices_head.drop_limb()
|
||||
@@ -53,6 +62,10 @@
|
||||
|
||||
TEST_ASSERT(!isnull(alice.get_bodypart(BODY_ZONE_HEAD)), "Alice has no head after prosthetic replacement")
|
||||
TEST_ASSERT_EQUAL(alice.get_visible_name(), "Bob", "Bob's head was transplanted onto Alice's body, but their name is not Bob")
|
||||
TEST_ASSERT_EQUAL(alice.hairstyle, "Short Hair", "Bob's head was transplanted onto Alice's body, but their hairstyle is not Short Hair")
|
||||
TEST_ASSERT_EQUAL(alice.hair_color, COLOR_LIGHT_BROWN, "Bob's head was transplanted onto Alice's body, but their hair color is not COLOR_LIGHT_BROWN")
|
||||
TEST_ASSERT_EQUAL(alice.facial_hairstyle, "Beard (Full)", "Bob's head was transplanted onto Alice's body, but their facial hairstyle is not Beard (Full)")
|
||||
TEST_ASSERT_EQUAL(alice.facial_hair_color, COLOR_LIGHT_BROWN, "Bob's head was transplanted onto Alice's body, but their facial hair color is not COLOR_LIGHT_BROWN")
|
||||
|
||||
/datum/unit_test/multiple_surgeries/Run()
|
||||
var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human/consistent)
|
||||
|
||||
Reference in New Issue
Block a user