Move OnInitialize to interface
This commit is contained in:
@@ -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.");
|
||||
|
||||
Reference in New Issue
Block a user