neon-sprawl/server/NeonSprawl.Server/Game/Gathering/ResourceNodeInstanceMutatio...

22 lines
978 B
C#

namespace NeonSprawl.Server.Game.Gathering;
/// <summary>Result of <see cref="ResourceNodeInstanceOperations.TryCommitSuccessfulGatherDecrement"/> (NEO-61).</summary>
public enum ResourceNodeInstanceMutationKind
{
/// <summary>Validation or depletion deny — capacity unchanged when already depleted.</summary>
Denied,
/// <summary>Decrement applied and persisted.</summary>
Applied,
}
/// <summary>
/// Result of <see cref="ResourceNodeInstanceOperations.TryCommitSuccessfulGatherDecrement"/> (NEO-61).
/// <see cref="ReasonCode"/> is populated when <see cref="Kind"/> is <see cref="ResourceNodeInstanceMutationKind.Denied"/>.
/// <see cref="Snapshot"/> is the authoritative snapshot after apply, or the current snapshot on depletion deny; null for unknown node.
/// </summary>
public readonly record struct ResourceNodeInstanceMutationOutcome(
ResourceNodeInstanceMutationKind Kind,
string? ReasonCode,
ResourceNodeInstanceSnapshot? Snapshot);