Files
Bubberstation/code/modules/unit_tests/abductor_baton_spell.dm
SkyratBot d80d42dd8a [MIRROR] Abductor / general "Summon Item" spell QoL [MDB IGNORE] (#22947)
* Abductor / general "Summon Item" spell QoL

* Update _unit_tests.dm

* Update _unit_tests.dm

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com>
Co-authored-by: Pinta <68373373+softcerv@users.noreply.github.com>
2023-08-08 23:34:14 -04:00

20 lines
1.2 KiB
Plaintext

/// Tests that abductors get their baton recall spell when being equipped
/datum/unit_test/abductor_baton_spell
/datum/unit_test/abductor_baton_spell/Run()
// Test abductor agents get a linked "summon item" spell that marks their baton.
var/mob/living/carbon/human/ayy = allocate(/mob/living/carbon/human/consistent)
ayy.equipOutfit(/datum/outfit/abductor/agent)
var/datum/action/cooldown/spell/summonitem/abductor/summon = locate() in ayy.actions
TEST_ASSERT_NOTNULL(summon, "Abductor agent does not have summon item spell.")
TEST_ASSERT(istype(summon.marked_item, /obj/item/melee/baton/abductor), "Abductor agent's summon item spell did not mark their baton.")
// Also test abductor solo agents also get the spell.
var/mob/living/carbon/human/ayy_two = allocate(/mob/living/carbon/human/consistent)
ayy_two.equipOutfit(/datum/outfit/abductor/scientist/onemanteam)
var/datum/action/cooldown/spell/summonitem/abductor/summon_two = locate() in ayy_two.actions
TEST_ASSERT_NOTNULL(summon_two, "Abductor solo agent does not have summon item spell.")
TEST_ASSERT(istype(summon_two.marked_item, /obj/item/melee/baton/abductor), "Abductor solo agent's summon item spell did not mark their baton.")