* trading portal replace traveling storeship * clean up content * clean up content 2 * seel and buy realization * fixes * Update migration.yml * Update migration.yml * Update dev_map.yml * Update dev_map.yml * thats work correctly now * bugfies and visual * factions * faction restruct + name reduce * unnesting sell cargo positions * unnesting cargo positions * more cargo content * Update buy.yml * improve tradeportal visual * Update migration.yml * Bank ad Commandant removal * merchant objectives * finish * clean up content * Update migration.yml * fix goal calculation * Update comoss.yml * Update dev_map.yml
64 lines
1.9 KiB
C#
64 lines
1.9 KiB
C#
using Content.Shared._CP14.Cargo.Prototype;
|
|
using Content.Shared.Destructible.Thresholds;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Map;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared._CP14.Cargo;
|
|
|
|
/// <summary>
|
|
/// Add to the station so ...
|
|
/// </summary>
|
|
[NetworkedComponent, RegisterComponent, AutoGenerateComponentPause, AutoGenerateComponentState]
|
|
public sealed partial class CP14TradingPortalComponent : Component
|
|
{
|
|
[DataField(required: true), AutoNetworkedField]
|
|
public ProtoId<CP14StoreFactionPrototype> Faction = default;
|
|
|
|
[DataField]
|
|
public EntityCoordinates? TradingPosition = null;
|
|
|
|
[DataField, AutoNetworkedField]
|
|
public TimeSpan Delay = TimeSpan.FromSeconds(3f);
|
|
|
|
[DataField, AutoNetworkedField]
|
|
[AutoPausedField]
|
|
public TimeSpan ProcessFinishTime = TimeSpan.Zero;
|
|
|
|
/// <summary>
|
|
/// Available to random selecting and pusharing
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<CP14StoreBuyPositionPrototype> AvailableBuyPosition = new();
|
|
|
|
/// <summary>
|
|
/// Available to random selecting and pusharing
|
|
/// </summary>
|
|
[DataField]
|
|
public HashSet<CP14StoreSellPositionPrototype> AvailableSellPosition = new();
|
|
|
|
/// <summary>
|
|
/// Fixed prices and positions of the current flight
|
|
/// </summary>
|
|
[DataField]
|
|
public Dictionary<CP14StoreBuyPositionPrototype, int> CurrentBuyPositions = new(); //Proto, price
|
|
|
|
[DataField]
|
|
public Dictionary<CP14StoreBuyPositionPrototype, int> CurrentSpecialBuyPositions = new(); //Proto, price
|
|
|
|
[DataField]
|
|
public int SpecialBuyPositionCount = 2;
|
|
|
|
[DataField]
|
|
public Dictionary<CP14StoreSellPositionPrototype, int> CurrentSellPositions = new(); //Proto, price
|
|
|
|
[DataField]
|
|
public Dictionary<CP14StoreSellPositionPrototype, int> CurrentSpecialSellPositions = new(); //Proto, price
|
|
|
|
[DataField]
|
|
public int SpecialSellPositionCount = 2;
|
|
|
|
[DataField]
|
|
public int Balance = 0;
|
|
}
|