neon-sprawl/server/NeonSprawl.Server/Game/Gigs/IPlayerGigProgressionStore.cs

15 lines
731 B
C#

namespace NeonSprawl.Server.Game.Gigs;
/// <summary>Persisted totals of gig XP per player (NEO-44); level is derived when gig curves exist.</summary>
public interface IPlayerGigProgressionStore
{
/// <summary>Keyed by gig id; omitted gigs imply XP 0.</summary>
IReadOnlyDictionary<string, int> GetXpTotals(string playerId);
/// <summary>
/// Adds <paramref name="amount"/> to <paramref name="gigId"/> for <paramref name="playerId"/>.
/// Returns <c>false</c> when the player cannot be written (e.g. in-memory store has no bucket; Postgres player missing from <c>player_position</c>).
/// </summary>
bool TryApplyXpDelta(string playerId, string gigId, int amount, out int previousXp, out int newXp);
}