using Content.Server.StationEvents.Events;
using Content.Shared.Cargo.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.Dictionary;
namespace Content.Server.StationEvents.Components;
///
/// Used an event that gifts the station with certian cargo
///
[RegisterComponent, Access(typeof(CargoGiftsRule))]
public sealed class CargoGiftsRuleComponent : Component
{
///
/// The base announcement string (which then incorporates the strings below)
///
[DataField("announce"), ViewVariables(VVAccess.ReadWrite)]
public string Announce = "cargo-gifts-event-announcement";
///
/// What is being sent
///
[DataField("description"), ViewVariables(VVAccess.ReadWrite)]
public string Description = "cargo-gift-default-description";
///
/// Sender of the gifts
///
[DataField("sender"), ViewVariables(VVAccess.ReadWrite)]
public string Sender = "cargo-gift-default-sender";
///
/// Destination of the gifts (who they get sent to on the station)
///
[DataField("dest"), ViewVariables(VVAccess.ReadWrite)]
public string Dest = "cargo-gift-default-dest";
///
/// Cargo that you would like gifted to the station, with the quantity for each
/// Use Ids from cargoProduct Prototypes
///
[DataField("gifts", required: true, customTypeSerializer:typeof(PrototypeIdDictionarySerializer)), ViewVariables(VVAccess.ReadWrite)]
public Dictionary Gifts = new();
///
/// How much space (minimum) you want to leave in the order database for supply to actually do their work
///
[DataField("orderSpaceToLeave"), ViewVariables(VVAccess.ReadWrite)]
public int OrderSpaceToLeave = 5;
///
/// Time until we consider next lot of gifts (if supply is overflowing with orders)
///
[DataField("timeUntilNextGifts"), ViewVariables(VVAccess.ReadWrite)]
public float TimeUntilNextGifts = 10.0f;
}