mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
Performing a head transplant will now properly preserve the appearance. (#53494)
This commit is contained in:
@@ -27,6 +27,33 @@
|
||||
TEST_ASSERT(!patient.has_trauma_type(), "Patient kept their brain trauma after brain surgery")
|
||||
TEST_ASSERT(patient.getOrganLoss(ORGAN_SLOT_BRAIN) < 20, "Patient did not heal their brain damage after brain surgery")
|
||||
|
||||
/datum/unit_test/head_transplant/Run()
|
||||
var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human)
|
||||
var/mob/living/carbon/human/alice = allocate(/mob/living/carbon/human)
|
||||
var/mob/living/carbon/human/bob = allocate(/mob/living/carbon/human)
|
||||
|
||||
alice.fully_replace_character_name(null, "Alice")
|
||||
bob.fully_replace_character_name(null, "Bob")
|
||||
|
||||
var/obj/item/bodypart/head/alices_head = alice.get_bodypart(BODY_ZONE_HEAD)
|
||||
alices_head.drop_limb()
|
||||
|
||||
var/obj/item/bodypart/head/bobs_head = bob.get_bodypart(BODY_ZONE_HEAD)
|
||||
bobs_head.drop_limb()
|
||||
|
||||
TEST_ASSERT_EQUAL(alice.get_bodypart(BODY_ZONE_HEAD), null, "Alice still has a head after dismemberment")
|
||||
TEST_ASSERT_EQUAL(alice.get_visible_name(), "Unknown", "Alice's head was dismembered, but they are not Unknown")
|
||||
|
||||
TEST_ASSERT_EQUAL(bobs_head.real_name, "Bob", "Bob's head does not remember that it is from Bob")
|
||||
|
||||
// Put Bob's head onto Alice's body
|
||||
var/datum/surgery_step/add_prosthetic/add_prosthetic = new
|
||||
user.put_in_active_hand(bobs_head)
|
||||
add_prosthetic.success(user, alice, BODY_ZONE_HEAD, bobs_head)
|
||||
|
||||
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")
|
||||
|
||||
/datum/unit_test/multiple_surgeries/Run()
|
||||
var/mob/living/carbon/human/user = allocate(/mob/living/carbon/human)
|
||||
var/mob/living/carbon/human/patient_zero = allocate(/mob/living/carbon/human)
|
||||
|
||||
Reference in New Issue
Block a user