using Content.Server.StationEvents.Events;
using Content.Shared.Fax.Components;
using Content.Shared.Paper;
using Content.Shared.Research.Components;
using Content.Shared.Research.Prototypes;
using Robust.Shared.Prototypes;
namespace Content.Server.StationEvents.Components;
[RegisterComponent, Access(typeof(RandomFaxRule))]
public sealed partial class RandomFaxRuleComponent : Component
{
///
/// FaxPrintout fields. All strings apart from PrototypeId will be localized
///
[DataField(required: true)]
public string Name { get; private set; } = default!;
[DataField]
public string? Label { get; private set; }
[DataField(required: true)]
public string Content { get; private set; } = default!;
[DataField(required: true)]
public EntProtoId PrototypeId { get; private set; } = default!;
[DataField]
public string? StampState { get; private set; }
[DataField]
public List? StampedBy { get; private set; } = new();
[DataField]
public bool Locked { get; private set; }
[DataField]
public bool StampProtected { get; private set; }
[DataField]
public HashSet> BlueprintRecipes { get; private set; } = new();
///
/// The localized string
///
[DataField]
public string? FromAddress;
// TODO: run arbitrary functions
///
/// All the valid IWireActions currently in this layout.
///
[DataField]
public List? PreFaxActions { get; private set; }
///
/// All the valid IWireActions currently in this layout.
///
[DataField]
public List? PerRecipientActions { get; private set; }
///
/// Minimum faxes to send
///
[DataField]
public int MinFaxes { get; private set; } = 1;
///
/// Maximum faxes to send
///
[DataField]
public int MaxFaxes { get; private set; } = 1;
}
// TODO: relocate these definitions.
public interface IPreFaxAction
{
///
/// Initializes the action. Intended to setup resources, but the action should not be stateful.
///
public void Initialize();
///
/// Formats a fax printout with general information (target station)
///
public void Format(EntityUid station, ref EditableFaxPrintout printout, ref string? fromAddress);
}
public interface IRecipientFaxAction
{
///
/// Initializes the action. Intended to setup resources, but the action should not be stateful.
///
public void Initialize();
///
/// Formats a fax printout with recipient-specific information (target station, fax machine entity)
///
public void Format(EntityUid station, EntityUid fax, FaxMachineComponent faxComponent, ref EditableFaxPrintout printout, ref string? fromAddress);
}
public sealed partial class EditableFaxPrintout
{
public string Name = default!;
public string? Label;
public string Content = default!;
public string PrototypeId = default!;
public string? StampState;
public List StampedBy = new();
public bool Locked;
public bool StampProtected;
public HashSet> BlueprintRecipes = new();
}