mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
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:
@@ -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(", ")]")
|
||||
Reference in New Issue
Block a user