Move OnInitialize to interface

This commit is contained in:
2025-06-28 10:31:23 +02:00
parent d719ce03ea
commit 04cf585f5a
19 changed files with 49 additions and 44 deletions

View File

@@ -10,7 +10,7 @@ namespace PkmnLib.Plugin.Gen7.Scripts.Abilities;
/// <see href="https://bulbapedia.bulbagarden.net/wiki/Full_Metal_Body_(Ability)">Bulbapedia - Full Metal Body</see>
/// </summary>
[Script(ScriptCategory.Ability, "prevent_stat_lowering")]
public class PreventStatLowering : Script
public class PreventStatLowering : Script, IScriptOnInitialize
{
/// <summary>
/// The statistic that this ability prevents from being lowered.
@@ -19,7 +19,7 @@ public class PreventStatLowering : Script
private Statistic? _statistic;
/// <inheritdoc />
public override void OnInitialize(IReadOnlyDictionary<StringKey, object?>? parameters)
public void OnInitialize(IReadOnlyDictionary<StringKey, object?>? parameters)
{
if (parameters is null)
throw new ArgumentNullException(nameof(parameters), "Parameters cannot be null.");