[MIRROR] Changelings can now speak through their decoy brain if placed in an MMI [MDB IGNORE] (#23879)

* Changelings can now speak through their decoy brain if placed in an MMI (#78342)

## About The Pull Request

- If a changeling's decoy brain is placed in an MMI, they will now be
prompted to speak through it.
- They can speak through the decoy even if incapacitated or dead (or
fake-dead).

https://github.com/tgstation/tgstation/assets/51863163/804bd48a-c4b8-4feb-b021-019ea70e4b8e

## Why It's Good For The Game

The oft-controversial ling MMI test has been brought up time and time
again so I figure I throw my cards in for a solution.

We want as few ways as possible for people to hard and fast discover
whether someone is an antag, especially changling which is supposed to
revel in paranoia. This soft-patches out a big way, the MMI test, in
which you place a ling's brain in an MMI to determine if it's vestigial
and therefore, a ling.

Now the ling player can provide some benefit of the doubt by speaking
through the brain as normal, appearing active while actually in their
body still.

## Changelog

🆑 Melbert
add: Changelings can now speak through their decoy brain if it is placed
in an MMI, to maintain the illusion they are actually dead and have been
debrained.
/🆑

* Changelings can now speak through their decoy brain if placed in an MMI

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-09-24 07:00:24 -04:00
committed by GitHub
co-authored by MrMelbert
parent bfa7a1201c
commit 2fa835185e
10 changed files with 382 additions and 48 deletions
+1
View File
@@ -161,6 +161,7 @@
#include "leash.dm"
#include "lesserform.dm"
#include "limbsanity.dm"
#include "ling_decap.dm"
#include "liver.dm"
#include "load_map_security.dm"
#include "lungs.dm"
+45
View File
@@ -0,0 +1,45 @@
/// Test lings don't die when decapitated.
/datum/unit_test/ling_decap
/datum/unit_test/ling_decap/Run()
var/mob/living/carbon/human/ling = allocate(/mob/living/carbon/human/consistent)
ling.mind_initialize()
ling.mind.add_antag_datum(/datum/antagonist/changeling)
var/obj/item/bodypart/head/noggin = ling.get_bodypart(BODY_ZONE_HEAD)
noggin.dismember()
TEST_ASSERT_NULL(ling.get_bodypart(BODY_ZONE_HEAD), "Changeling failed to be decapitated.")
TEST_ASSERT_NULL(noggin.brainmob.mind, "Changeling's mind was moved to their head after decapitation, but it should have remained in their body.")
var/obj/item/organ/internal/brain/oldbrain = noggin.brain
noggin.drop_organs()
TEST_ASSERT_NULL(noggin.brain, "Changeling's head failed to drop its brain.")
TEST_ASSERT_NULL(oldbrain.brainmob.mind, "Changeling's mind was moved to their brain after decapitation and organ dropping, but it should have remained in their body.")
TEST_ASSERT_EQUAL(ling.stat, CONSCIOUS, "Changeling was not conscious after losing their head.")
// Cleanup
qdel(noggin)
for(var/obj/item/organ/leftover in ling.loc)
qdel(leftover)
/// Tests people get decapitated properly.
/datum/unit_test/normal_decap
/datum/unit_test/normal_decap/Run()
var/mob/living/carbon/human/normal_guy = allocate(/mob/living/carbon/human/consistent)
normal_guy.mind_initialize()
var/my_guys_mind = normal_guy.mind
var/obj/item/bodypart/head/noggin = normal_guy.get_bodypart(BODY_ZONE_HEAD)
noggin.dismember()
TEST_ASSERT_EQUAL(noggin.brainmob.mind, my_guys_mind, "Dummy's mind was not moved to their head after decapitation.")
var/obj/item/organ/internal/brain/oldbrain = noggin.brain
noggin.drop_organs()
TEST_ASSERT_EQUAL(oldbrain.brainmob.mind, my_guys_mind, "Dummy's mind was not moved to their brain after being removed from their head.")
// Cleanup
qdel(noggin)
for(var/obj/item/organ/leftover in normal_guy.loc)
qdel(leftover)