Lots more work on implementing battling

This commit is contained in:
Deukhoofd committed 2024-08-10 09:44:46 +02:00
1 parent 554e1cf2cd
commit a049dda240
29 files changed
+1226 -48

No files matched your search

+12 -1
View File
@@ -115,7 +115,18 @@ public class ScriptSet : IScriptSet
}
/// <inheritdoc />
public void Clear() => _scripts.Clear();
public void Clear()
{
foreach (var script in _scripts)
{
if (!script.IsEmpty)
{
script.Script.OnRemove();
script.Script.MarkForDeletion();
}
}
_scripts.Clear();
}
/// <inheritdoc />
public bool Contains(StringKey scriptKey) => _scripts.Any(s => s.Script?.Name == scriptKey);