Adds battle history, fixes code style
This commit is contained in:
@@ -14,7 +14,6 @@ namespace PkmnLib.Dynamic.ScriptHandling;
|
||||
/// </summary>
|
||||
public abstract class Script
|
||||
{
|
||||
private bool _markedForDeletion;
|
||||
private int _suppressCount;
|
||||
|
||||
/// <summary>
|
||||
@@ -24,9 +23,6 @@ public abstract class Script
|
||||
/// </summary>
|
||||
public virtual StringKey Name => this.ResolveName();
|
||||
|
||||
public bool MarkForDeletion() => _markedForDeletion = true;
|
||||
public bool IsMarkedForDeletion() => _markedForDeletion;
|
||||
|
||||
/// <summary>
|
||||
/// A script can be suppressed by other scripts. If a script is suppressed by at least one script
|
||||
/// we will not execute its methods. This should return the number of suppressions on the script.
|
||||
|
||||
@@ -52,7 +52,6 @@ public class ScriptContainer : IEnumerable<ScriptContainer>
|
||||
if (Script is not null)
|
||||
{
|
||||
Script.OnRemove();
|
||||
Script.MarkForDeletion();
|
||||
}
|
||||
Script = script;
|
||||
}
|
||||
@@ -65,7 +64,6 @@ public class ScriptContainer : IEnumerable<ScriptContainer>
|
||||
if (Script is not null)
|
||||
{
|
||||
Script.OnRemove();
|
||||
Script.MarkForDeletion();
|
||||
}
|
||||
Script = null;
|
||||
}
|
||||
|
||||
@@ -122,7 +122,6 @@ public class ScriptSet : IScriptSet
|
||||
if (!script.IsEmpty)
|
||||
{
|
||||
script.Script.OnRemove();
|
||||
script.Script.MarkForDeletion();
|
||||
}
|
||||
}
|
||||
_scripts.Clear();
|
||||
|
||||
Reference in New Issue
Block a user