More warning fixes
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using JetBrains.Annotations;
|
||||
using PkmnLib.Dynamic.ScriptHandling;
|
||||
using PkmnLib.Static.Utils;
|
||||
|
||||
@@ -33,12 +34,19 @@ public interface IMoveChoice : ITurnChoice
|
||||
/// </summary>
|
||||
ScriptContainer Script { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Additional data that can be used by scripts to store information about the choice.
|
||||
/// </summary>
|
||||
Dictionary<StringKey, object?>? AdditionalData { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Volatile effects that are applied to the move choice.
|
||||
/// </summary>
|
||||
IScriptSet Volatile { get; }
|
||||
}
|
||||
|
||||
/// <inheritdoc cref="IMoveChoice"/>
|
||||
[PublicAPI]
|
||||
public class MoveChoice : TurnChoice, IMoveChoice
|
||||
{
|
||||
/// <inheritdoc cref="MoveChoice"/>
|
||||
|
||||
@@ -525,7 +525,7 @@ public class PokemonImpl : ScriptSource, IPokemon
|
||||
return null;
|
||||
if (!library.StaticLibrary.Moves.TryGet(move.MoveName, out var moveData))
|
||||
throw new KeyNotFoundException($"Move {move.MoveName} not found");
|
||||
return new LearnedMoveImpl(moveData, move.LearnMethod, move.CurrentPp);
|
||||
return (ILearnedMove)new LearnedMoveImpl(moveData, move.LearnMethod, move.CurrentPp);
|
||||
}).ToArray();
|
||||
AllowedExperience = serializedPokemon.AllowedExperience;
|
||||
IsEgg = serializedPokemon.IsEgg;
|
||||
|
||||
Reference in New Issue
Block a user