using Robust.Shared.Serialization;
using Content.Shared.Cargo.Prototypes;
using Robust.Shared.Prototypes;
namespace Content.Shared.Cargo;
///
/// A data structure for storing currently available bounties.
///
[DataDefinition, NetSerializable, Serializable]
public readonly partial record struct CargoBountyData
{
///
/// A unique id used to identify the bounty
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string Id { get; init; } = string.Empty;
///
/// The prototype containing information about the bounty.
///
[ViewVariables(VVAccess.ReadWrite)]
[DataField(required: true)]
public ProtoId Bounty { get; init; } = string.Empty;
public CargoBountyData(CargoBountyPrototype bounty, int uniqueIdentifier)
{
Bounty = bounty.ID;
Id = $"{bounty.IdPrefix}{uniqueIdentifier:D3}";
}
}