Add all missing docs
This commit is contained in:
@@ -4,6 +4,10 @@ using PkmnLib.Static.Utils;
|
||||
|
||||
namespace PkmnLib.Dynamic.ScriptHandling;
|
||||
|
||||
/// <summary>
|
||||
/// A holder class for a script. This is used so we can cache a list of these, and iterate over them, even when
|
||||
/// the underlying script changes.
|
||||
/// </summary>
|
||||
public interface IReadOnlyScriptContainer : IEnumerable<ScriptContainer>, IDeepCloneable
|
||||
{
|
||||
/// <summary>
|
||||
@@ -17,10 +21,7 @@ public interface IReadOnlyScriptContainer : IEnumerable<ScriptContainer>, IDeepC
|
||||
public Script? Script { get; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// A holder class for a script. This is used so we can cache a list of these, and iterate over them, even when
|
||||
/// the underlying script changes.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="IReadOnlyScriptContainer"/>
|
||||
public class ScriptContainer : IReadOnlyScriptContainer
|
||||
{
|
||||
/// <inheritdoc cref="ScriptContainer"/>
|
||||
@@ -73,6 +74,11 @@ public class ScriptContainer : IReadOnlyScriptContainer
|
||||
return script;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the script from this container, but does not call <see cref="Script.OnRemove"/>.
|
||||
/// Be very careful with this, as it can lead to unexpected behavior. An example of a valid use is Baton-Pass,
|
||||
/// where scripts are being removed to be added to another Pokemon, so we want them to remain active.
|
||||
/// </summary>
|
||||
public void ClearWithoutRemoving()
|
||||
{
|
||||
Script = null;
|
||||
|
||||
Reference in New Issue
Block a user