mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-14 11:42:27 +00:00
* Completely removes `proc_holders` from existence. Refactors all wizard, xeno, spider, and genetics powers to be actions. Also refactors and sorts ton of accompanying code. * our changes * yes * 0 * Update blackmesa.dmm Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Gandalf <9026500+Gandalf2k15@users.noreply.github.com>
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
/**
|
|
* Tests that actions assigned to a mob's mind
|
|
* are successfuly transferred when their mind is transferred to a new mob.
|
|
*/
|
|
/datum/unit_test/actions_moved_on_mind_transfer
|
|
|
|
/datum/unit_test/actions_moved_on_mind_transfer/Run()
|
|
|
|
var/mob/living/carbon/human/wizard = allocate(/mob/living/carbon/human)
|
|
var/mob/living/simple_animal/pet/dog/corgi/wizard_dog = allocate(/mob/living/simple_animal/pet/dog/corgi)
|
|
wizard.mind_initialize()
|
|
|
|
var/datum/action/cooldown/spell/pointed/projectile/fireball/fireball = new(wizard.mind)
|
|
fireball.Grant(wizard)
|
|
var/datum/action/cooldown/spell/aoe/magic_missile/missile = new(wizard.mind)
|
|
missile.Grant(wizard)
|
|
var/datum/action/cooldown/spell/jaunt/ethereal_jaunt/jaunt = new(wizard.mind)
|
|
jaunt.Grant(wizard)
|
|
|
|
var/datum/mind/wizard_mind = wizard.mind
|
|
wizard_mind.transfer_to(wizard_dog)
|
|
|
|
TEST_ASSERT_EQUAL(wizard_dog.mind, wizard_mind, "Mind transfer failed to occur, which invalidates the test.")
|
|
|
|
for(var/datum/action/cooldown/spell/remaining_spell in wizard.actions)
|
|
Fail("Spell: [remaining_spell] failed to transfer minds when a mind transfer occured.")
|
|
|
|
qdel(fireball)
|
|
qdel(missile)
|
|
qdel(jaunt)
|