using Robust.Shared.GameObjects;
using Robust.Shared.Players;
namespace Robust.Shared.GameStates
{
[ByRefEvent]
public readonly struct ComponentHandleState
{
public ComponentState? Current { get; }
public ComponentState? Next { get; }
public ComponentHandleState(ComponentState? current, ComponentState? next)
{
Current = current;
Next = next;
}
}
///
/// Component event for getting the component state for a specific player.
///
[ByRefEvent]
public struct ComponentGetState
{
///
/// Output parameter. Set this to the component's state for the player.
///
public ComponentState? State { get; set; }
}
[ByRefEvent]
public struct ComponentGetStateAttemptEvent
{
///
/// Input parameter. The player the state is being sent to.
///
public readonly ICommonSession Player;
public bool Cancelled = false;
public ComponentGetStateAttemptEvent(ICommonSession player)
{
Player = player;
}
}
}