Implements terrain
Build / Build (push) Successful in 49s

This commit is contained in:
Deukhoofd committed 2025-06-22 11:31:24 +02:00
1 parent 02510fd1d0
commit 6394f4eab3
10 files changed
+133 -11

No files matched your search

+1 -1
View File
@@ -774,7 +774,7 @@ public abstract class Script : IDeepCloneable
/// <summary>
/// This function allows a script to prevent a Pokémon from being affected by a volatile status condition.
/// </summary>
public virtual void PreventVolatileAdd(Script script, ref bool preventVolatileAdd)
public virtual void PreventVolatileAdd(IScriptSource parent, Script script, ref bool preventVolatileAdd)
{
}
+2 -2
View File
@@ -86,7 +86,7 @@ public interface IScriptSet : IEnumerable<ScriptContainer>
/// <inheritdoc cref="IScriptSet"/>
public class ScriptSet : IScriptSet
{
private IScriptSource _source;
private readonly IScriptSource _source;
private readonly List<ScriptContainer> _scripts = [];
@@ -108,7 +108,7 @@ public class ScriptSet : IScriptSet
if (!forceAdd)
{
var preventVolatileAdd = false;
_source.RunScriptHook(x => x.PreventVolatileAdd(script, ref preventVolatileAdd));
_source.RunScriptHook(x => x.PreventVolatileAdd(_source, script, ref preventVolatileAdd));
if (preventVolatileAdd)
return null;
}