[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>
This commit is contained in:
SkyratBot
2023-08-09 05:34:14 +02:00
committed by GitHub
parent f5cdd8b789
commit d80d42dd8a
6 changed files with 87 additions and 31 deletions
+2
View File
@@ -84,10 +84,12 @@
/// A trait source when adding traits through unit tests
#define TRAIT_SOURCE_UNIT_TESTS "unit_tests"
// BEGIN_INCLUDE
// SKYRAT EDIT START
#include "~skyrat/opposing_force.dm"
#include "~skyrat/automapper.dm"
//SKYRAT EDIT END
#include "abductor_baton_spell.dm"
#include "ablative_hud.dm"
#include "achievements.dm"
#include "anchored_mobs.dm"
@@ -0,0 +1,19 @@
/// 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.")