namespace AcDream.Runtime; public enum RuntimeCommandStatus { Accepted, Inactive, StaleGeneration, Unsupported, Rejected, } public readonly record struct RuntimeCommandResult( RuntimeCommandStatus Status, RuntimeGenerationToken Generation, uint ResultObjectId = 0u) { public bool Accepted => Status == RuntimeCommandStatus.Accepted; } public enum RuntimeSessionStartStatus { Disabled, MissingCredentials, NoCharacters, Connected, Deferred, Failed, Inactive, StaleGeneration, } public readonly record struct RuntimeSessionStartResult( RuntimeSessionStartStatus Status, RuntimeGenerationToken Generation, uint CharacterId = 0u, string CharacterName = "", Exception? Error = null); public enum RuntimeSelectionCommand { SelectClosestHostile, SelectPrevious, ExamineSelected, UseSelected, PickUpSelected, } public enum RuntimeCombatCommand { ToggleMode, } public enum RuntimeMovementCommand { ToggleRunLock, Stop, Ready, Sit, Crouch, Sleep, } public enum RuntimeChatChannel { Say, Tell, Fellowship, Allegiance, Vassals, Patron, Monarch, CoVassals, General, Trade, LookingForGroup, Roleplay, Society, Olthoi, } public readonly record struct RuntimeChatCommand( RuntimeChatChannel Channel, string Text, string? TargetName = null); public enum RuntimePortalCommand { RecallLifestone, RecallMarketplace, RecallHouse, RecallMansion, } public interface IRuntimeSessionCommands { RuntimeSessionStartResult Start(RuntimeGenerationToken expectedGeneration); RuntimeSessionStartResult Reconnect(RuntimeGenerationToken expectedGeneration); RuntimeTeardownAcknowledgement Stop(RuntimeGenerationToken expectedGeneration); } public interface IRuntimeSelectionCommands { RuntimeCommandResult Execute( RuntimeGenerationToken expectedGeneration, RuntimeSelectionCommand command); } public interface IRuntimeCombatCommands { RuntimeCommandResult Execute( RuntimeGenerationToken expectedGeneration, RuntimeCombatCommand command); } public interface IRuntimeMovementCommands { RuntimeCommandResult Execute( RuntimeGenerationToken expectedGeneration, RuntimeMovementCommand command); } public interface IRuntimeChatCommands { RuntimeCommandResult Execute( RuntimeGenerationToken expectedGeneration, in RuntimeChatCommand command); } public interface IRuntimePortalCommands { RuntimeCommandResult Execute( RuntimeGenerationToken expectedGeneration, RuntimePortalCommand command); } public interface IGameRuntimeCommands { IRuntimeSessionCommands Session { get; } IRuntimeSelectionCommands Selection { get; } IRuntimeCombatCommands Combat { get; } IRuntimeMovementCommands Movement { get; } IRuntimeChatCommands Chat { get; } IRuntimePortalCommands Portal { get; } }