Lots more work on implementing battling
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user