26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
using System.Diagnostics.CodeAnalysis;
|
|
|
|
namespace NeonSprawl.Server.Game.Npc;
|
|
|
|
/// <summary>
|
|
/// Session in-memory NPC runtime behavior state (NEO-93).
|
|
/// HTTP projection lands in NEO-94; lazy tick advance reads/writes rows here.
|
|
/// </summary>
|
|
public interface INpcRuntimeStateStore
|
|
{
|
|
/// <summary>UTC instant of the last successful <see cref="NpcRuntimeOperations.AdvanceAll"/> call.</summary>
|
|
DateTimeOffset LastAdvancedUtc { get; set; }
|
|
|
|
/// <summary>Reads runtime state for a known prototype NPC instance. Lazy-initializes an idle row.</summary>
|
|
bool TryGet(string? npcInstanceId, [NotNullWhen(true)] out NpcRuntimeStateSnapshot snapshot);
|
|
|
|
/// <summary>Writes runtime state for a known prototype NPC instance.</summary>
|
|
bool TryWrite(string? npcInstanceId, in NpcRuntimeStateSnapshot snapshot);
|
|
|
|
/// <summary>Resets one prototype NPC runtime row to idle with no active telegraph.</summary>
|
|
bool TryResetPrototypeRow(string? npcInstanceId);
|
|
|
|
/// <summary>Resets all prototype NPC runtime rows to idle.</summary>
|
|
void ResetAllPrototypeRows();
|
|
}
|