Files
tbd-station-14/Content.Server/Cargo/Components/StationCargoBountyDatabaseComponent.cs
Nemanja 0d878751fa Salvage Job Board (#37549)
* Salvage Job Board

* More development

* Small boy

* Computer yaml (partial)

* UI

* Rank unlock logic

* Job label printing

* appraisal tool integration

* Jobs

* add board to QM locker

* boom!

* command desc

* mild rewording

* ackh, mein pr ist brohken
2025-05-18 14:02:52 +10:00

64 lines
1.8 KiB
C#

using Content.Shared.Cargo;
using Content.Shared.Cargo.Prototypes;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Server.Cargo.Components;
/// <summary>
/// Stores all active cargo bounties for a particular station.
/// </summary>
[RegisterComponent]
public sealed partial class StationCargoBountyDatabaseComponent : Component
{
/// <summary>
/// Maximum amount of bounties a station can have.
/// </summary>
[DataField]
public int MaxBounties = 6;
/// <summary>
/// A list of all the bounties currently active for a station.
/// </summary>
[DataField]
public List<CargoBountyData> Bounties = new();
/// <summary>
/// A list of all the bounties that have been completed or
/// skipped for a station.
/// </summary>
[DataField]
public List<CargoBountyHistoryData> History = new();
/// <summary>
/// Used to determine unique order IDs
/// </summary>
[DataField]
public int TotalBounties;
/// <summary>
/// A list of bounty IDs that have been checked this tick.
/// Used to prevent multiplying bounty prices.
/// </summary>
[DataField]
public HashSet<string> CheckedBounties = new();
/// <summary>
/// The group that bounties are pulled from.
/// </summary>
[DataField]
public ProtoId<CargoBountyGroupPrototype> Group = "StationBounty";
/// <summary>
/// The time at which players will be able to skip the next bounty.
/// </summary>
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
public TimeSpan NextSkipTime = TimeSpan.Zero;
/// <summary>
/// The time between skipping bounties.
/// </summary>
[DataField]
public TimeSpan SkipDelay = TimeSpan.FromMinutes(15);
}