2023-06-22 07:49:33 -04:00
|
|
|
using Content.Shared.Cargo;
|
2024-04-10 00:18:07 +02:00
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
2023-06-22 07:49:33 -04:00
|
|
|
|
|
|
|
|
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>
|
2024-01-03 19:34:47 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2024-03-17 12:06:16 -05:00
|
|
|
public int MaxBounties = 6;
|
2023-06-22 07:49:33 -04:00
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// A list of all the bounties currently active for a station.
|
|
|
|
|
/// </summary>
|
2024-01-03 19:34:47 -05:00
|
|
|
[DataField, ViewVariables(VVAccess.ReadWrite)]
|
2023-06-22 07:49:33 -04:00
|
|
|
public List<CargoBountyData> Bounties = new();
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Used to determine unique order IDs
|
|
|
|
|
/// </summary>
|
2024-01-03 19:34:47 -05:00
|
|
|
[DataField]
|
2023-06-22 07:49:33 -04:00
|
|
|
public int TotalBounties;
|
|
|
|
|
|
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]
|
2024-01-03 19:34:47 -05:00
|
|
|
public HashSet<string> CheckedBounties = new();
|
2024-04-10 00:18:07 +02:00
|
|
|
|
|
|
|
|
/// <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);
|
2023-06-22 07:49:33 -04:00
|
|
|
}
|