using System.Collections.Generic;
using Cthangover.Core.UI;
using Cthangover.Mods.Interface.Base.Lists;
using Cthangover.Core.UI.Dialog;
using Cthangover.Core.UI.Event;
using Cthangover.Core.UI.Executable;
using Cthangover.Core.Scenarios;
using Cthangover.Core.Scenes;
using Cthangover.Core.Interactive;
namespace Cthangover.Mods.Dialog.Action
{
///
/// Full dialog action contract: extends IActionDestruct with construction,
/// execution (Run), and queryable state (WaitType, timing enums, delayed-destruct
/// dependencies). The ID property enables cross-action references (GoTo, If).
///
public interface IActionCommand : IActionDestruct
{
#region Properties
/// Unique action identifier, auto-generated GUID. Can be overridden for named GoTo targets.
string ID { get; set; }
/// Whether has completed.
bool IsConstructed { get; }
/// Whether has been called and the action is finished.
bool IsDestructed { get; }
/// Controls when construction fires relative to the action's lifecycle.
ConstructType ConstructType { get; }
/// Controls when destruction fires relative to the action's lifecycle.
DestructType DestructType { get; }
/// How the runtime should handle advancement past this action.
WaitType WaitType { get; }
/// IDs of actions whose Destruct should be called when this action destructs.
ISet DelayedDestruct { get; }
/// Duration in seconds when WaitType is WaitTime.
float WaitTime { get; }
/// Timestamp of the last call, in seconds since epoch.
float StartTime { get; }
///
/// 1-based line of the scenario text this action was parsed from, 0 for
/// actions built in code. Set by ;
/// debugging tools map the running action back to the script with it.
///
int SourceLine { get; set; }
#endregion
#region Methods
/// Called by the runtime to initialize the action before execution.
void Construct();
/// Called by the runtime to execute the action. Receives the runtime for context.
void Run(DialogRuntime runtime);
#endregion
}
}