mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
[MIRROR] Makes Lesser Form into one ability & unit tests it [MDB IGNORE] (#19521)
* Makes Lesser Form into one ability & unit tests it * Update headcrab.dm --------- Co-authored-by: Jacquerel <hnevard@gmail.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
This commit is contained in:
@@ -137,6 +137,7 @@
|
||||
#include "json_savefile_importing.dm"
|
||||
#include "keybinding_init.dm"
|
||||
#include "knockoff_component.dm"
|
||||
#include "lesserform.dm"
|
||||
#include "limbsanity.dm"
|
||||
#include "load_map_security.dm"
|
||||
#include "machine_disassembly.dm"
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
/// Unit test to ensure that changelings can consistently turn from monkeys to humans and back
|
||||
/datum/unit_test/lesserform
|
||||
|
||||
/datum/unit_test/lesserform/Run()
|
||||
var/mob/living/carbon/human/changeling = allocate(/mob/living/carbon/human/consistent)
|
||||
changeling.mind_initialize()
|
||||
var/datum/mind/mind = changeling.mind
|
||||
var/datum/antagonist/changeling/changeling_datum = mind.add_antag_datum(/datum/antagonist/changeling)
|
||||
changeling_datum.adjust_chemicals(INFINITY) // We don't care about how many chemicals they have
|
||||
var/datum/action/changeling/lesserform/transform_ability = new(changeling)
|
||||
transform_ability.transform_instantly = TRUE
|
||||
transform_ability.Grant(changeling)
|
||||
|
||||
transform_ability.Trigger()
|
||||
TEST_ASSERT(ismonkey(changeling), "Changeling failed to turn into a monkey after voluntarily transforming using lesser form.")
|
||||
changeling.humanize(instant = TRUE)
|
||||
transform_ability.Trigger()
|
||||
TEST_ASSERT(ismonkey(changeling), "Changeling failed to turn into a monkey after involuntarily being made into a human.")
|
||||
transform_ability.Trigger()
|
||||
TEST_ASSERT(!ismonkey(changeling), "Changeling failed to stop being a monkey after voluntarily transforming using lesser form.")
|
||||
changeling.monkeyize(instant = TRUE)
|
||||
transform_ability.Trigger()
|
||||
TEST_ASSERT(!ismonkey(changeling), "Changeling failed to stop being a monkey after being involuntarily turned into one.")
|
||||
Reference in New Issue
Block a user