Refactors spell targeting to delegate it to a targeting datum (#16552)

Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com>
This commit is contained in:
Farie82
2021-12-13 17:40:36 +01:00
committed by GitHub
co-authored by AffectedArc07
parent 636e6b8505
commit 576482907b
98 changed files with 1747 additions and 1434 deletions
+1
View File
@@ -10,6 +10,7 @@
#include "reagent_id_typos.dm"
#include "rustg_version.dm"
#include "spawn_humans.dm"
#include "spell_targeting_test.dm"
#include "sql.dm"
#include "subsystem_init.dm"
#include "subsystem_metric_sanity.dm"
@@ -0,0 +1,10 @@
/datum/unit_test/spell_targeting/Run()
var/list/bad_spells = list()
for(var/obj/effect/proc_holder/spell/S as anything in typesof(/obj/effect/proc_holder/spell))
if(initial(S.name) == "Spell")
continue // Skip abstract spells
S = new S
if(!S.targeting)
bad_spells += S
if(length(bad_spells))
Fail("Spells without targeting found: [bad_spells.Join(", ")]")