Files
Neutron/src/GamePort/Game/PlayerLevelState.cs
T

17 lines
755 B
C#

namespace GamePort.Game;
/// <summary>
/// Retained scalars proven through route GAM read, Init and PostLoad callbacks.
/// This is in-memory ordinary-load state, never part of the original TSK format.
/// Other gadget cleanup branches/levels need their own lifecycle proof.
/// </summary>
public sealed record PlayerLevelState(string SourceLevel, int SelectedGadget,
int MovementMode, float HoldSeconds, float EffectRemaining,
float ForwardPitch=JimmyAirMotion.ForwardPitch,float BackwardPitch=JimmyAirMotion.BackwardPitch)
{
public bool SupportsDestination(string level) => IsRoute(SourceLevel) && IsRoute(level)
&& SelectedGadget is -1 or 3;
private static bool IsRoute(string level) => level is "LV1B" or "VR04" or "LEV1";
}