using OpenTheBox.Core.Enums;
namespace OpenTheBox.Simulation.Actions;
///
/// Base type for all player-initiated actions in the game.
///
public abstract record GameAction
{
public DateTime Timestamp { get; init; } = DateTime.UtcNow;
}
///
/// Player opens a box from their inventory.
///
public sealed record OpenBoxAction(Guid BoxInstanceId) : GameAction
{
///
/// The definition id of the box being opened.
///
public string? BoxDefinitionId { get; init; }
}
///
/// Player uses an item from their inventory.
///
public sealed record UseItemAction(Guid ItemInstanceId) : GameAction;
///
/// Player crafts at a workstation using material items.
///
public sealed record CraftAction(WorkstationType Station, List MaterialIds) : GameAction;
///
/// Player starts an adventure.
///
public sealed record StartAdventureAction(AdventureTheme Theme) : GameAction;
///
/// Player changes the game locale.
///
public sealed record ChangeLocaleAction(Locale NewLocale) : GameAction;
///
/// Player equips a cosmetic item.
///
public sealed record EquipCosmeticAction(Guid ItemInstanceId) : GameAction;
///
/// Player saves the game to a named slot.
///
public sealed record SaveGameAction(string SlotName) : GameAction;