mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-16 07:12:27 +02:00
47 lines
1.2 KiB
C#
47 lines
1.2 KiB
C#
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;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Component event for getting the component state for a specific player.
|
|
/// </summary>
|
|
[ByRefEvent]
|
|
public struct ComponentGetState
|
|
{
|
|
/// <summary>
|
|
/// Output parameter. Set this to the component's state for the player.
|
|
/// </summary>
|
|
public ComponentState? State { get; set; }
|
|
}
|
|
|
|
[ByRefEvent]
|
|
public struct ComponentGetStateAttemptEvent
|
|
{
|
|
/// <summary>
|
|
/// Input parameter. The player the state is being sent to.
|
|
/// </summary>
|
|
public readonly ICommonSession Player;
|
|
|
|
public bool Cancelled = false;
|
|
|
|
public ComponentGetStateAttemptEvent(ICommonSession player)
|
|
{
|
|
Player = player;
|
|
}
|
|
}
|
|
}
|