Support for deep cloning battles and Pokemon

This commit is contained in:
Deukhoofd committed 2024-12-29 13:51:59 +01:00
1 parent b3529fa22f
commit 40803f0269
13 files changed
+356 -12

No files matched your search

+1 -1
View File
@@ -12,7 +12,7 @@ namespace PkmnLib.Dynamic.ScriptHandling;
/// changes. This allows for easily defining generational differences, and add effects that the
/// developer might require.
/// </summary>
public abstract class Script
public abstract class Script : IDeepCloneable
{
internal event Action<Script>? OnRemoveEvent;
@@ -1,5 +1,6 @@
using System.Collections;
using System.Diagnostics.CodeAnalysis;
using PkmnLib.Static.Utils;
namespace PkmnLib.Dynamic.ScriptHandling;
@@ -7,7 +8,7 @@ namespace PkmnLib.Dynamic.ScriptHandling;
/// 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 class ScriptContainer : IEnumerable<ScriptContainer>
public class ScriptContainer : IEnumerable<ScriptContainer>, IDeepCloneable
{
/// <inheritdoc cref="ScriptContainer"/>
public ScriptContainer()