Update TUnit, warning cleanup
Some checks failed
Build / Build (push) Failing after 35s

This commit is contained in:
2026-07-05 13:24:22 +02:00
parent 16a1990486
commit cc091d5327
61 changed files with 113 additions and 190 deletions

View File

@@ -136,7 +136,7 @@ public interface IBattle : IScriptSource, IDeepCloneable, IDisposable
/// <summary>
/// Sets the current weather for the battle. If null is passed, this clears the weather.
/// A duration can be passed to set the duration of the weather in turns. This duration can be modified by
/// other scripts before the weather is set through the <see cref="Script.ChangeWeatherDuration"/> script hook.
/// other scripts before the weather is set through the <see cref="IScriptChangeWeatherDuration"/> script hook.
/// </summary>
bool SetWeather(StringKey? weatherName, int duration, EventBatchId batchId = default);
@@ -369,18 +369,18 @@ public class BattleImpl : ScriptSource, IBattle
return true;
bool IsValidForForcedTurn(ITurnChoice forcedChoice, ITurnChoice choiceToCheck)
bool IsValidForForcedTurn(ITurnChoice forcedChoiceInner, ITurnChoice choiceToCheck)
{
// If the forced choice is a move choice, we can only use it if the move is the same
if (forcedChoice is IMoveChoice forcedMove && choiceToCheck is IMoveChoice moveChoice)
if (forcedChoiceInner is IMoveChoice forcedMove && choiceToCheck is IMoveChoice moveChoiceInner)
{
return forcedMove.ChosenMove.MoveData.Name == moveChoice.ChosenMove.MoveData.Name;
return forcedMove.ChosenMove.MoveData.Name == moveChoiceInner.ChosenMove.MoveData.Name;
}
if (forcedChoice is IPassChoice && choiceToCheck is IPassChoice)
if (forcedChoiceInner is IPassChoice && choiceToCheck is IPassChoice)
{
return true; // Both are pass choices, so they are valid
}
return forcedChoice.Equals(choiceToCheck);
return forcedChoiceInner.Equals(choiceToCheck);
}
}