2023-06-22 07:49:33 -04:00
|
|
|
using Content.Shared.Cargo;
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.Cargo.Components;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Stores all active cargo bounties for a particular station.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class StationCargoBountyDatabaseComponent : Component
|
2023-06-22 07:49:33 -04:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Maximum amount of bounties a station can have.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("maxBounties"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public int MaxBounties = 3;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A list of all the bounties currently active for a station.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("bounties"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public List<CargoBountyData> Bounties = new();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Used to determine unique order IDs
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("totalBounties")]
|
|
|
|
|
public int TotalBounties;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-07-15 14:15:12 -04:00
|
|
|
/// The minimum amount of time the bounty lasts before being removed.
|
2023-06-22 07:49:33 -04:00
|
|
|
/// </summary>
|
2023-07-15 14:15:12 -04:00
|
|
|
[DataField("minBountyTime"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float MinBountyTime = 600f;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
2023-11-04 09:19:23 -04:00
|
|
|
/// The maximum amount of time the bounty lasts before being removed.
|
2023-07-15 14:15:12 -04:00
|
|
|
/// </summary>
|
|
|
|
|
[DataField("maxBountyTime"), ViewVariables(VVAccess.ReadWrite)]
|
|
|
|
|
public float MaxBountyTime = 905f;
|
2023-11-04 09:19:23 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A list of bounty IDs that have been checked this tick.
|
|
|
|
|
/// Used to prevent multiplying bounty prices.
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField]
|
|
|
|
|
public HashSet<int> CheckedBounties = new();
|
2023-06-22 07:49:33 -04:00
|
|
|
}
|