Files
tbd-station-14/Content.Shared/Delivery/DeliveryComponent.cs
ScarKy0 3281f408eb Cargo Mail System (#35429)
* shitcode init

* biocoding, SpawnTableOnUse, Moving shit to shared

* server :(

* fixes

* ok works

* Discard changes to Content.Shared/Interaction/Events/GettingUsedAttemptEvent.cs

* Discard changes to Content.Shared/Forensics/Components/FingerprintMaskComponent.cs

* Discard changes to Content.Shared/Forensics/Components/FingerprintComponent.cs

* Discard changes to Content.Server/Forensics/Systems/ForensicsSystem.cs

* Discard changes to Content.Server/StationRecords/Systems/StationRecordsSystem.cs

* Discard changes to Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs

* Discard changes to Content.Shared/Interaction/Events/GettingUsedAttemptEvent.cs

* big stuff

* preperation

* temperory spawning thing for testing

* Update CargoDeliveryDataComponent.cs

* kinda proper spawning idk god save me

* cleanup (kinda)

* preparation 2.0

* stuff i think

* entity table work

* renames

* spawn ratio based on players

* comment

* letter tables

* more spam

* package tables

* comment

* biocodedn't

* builds correctly

* cleaning

* Update deliveries_tables.yml

* labels

* package sprites

* mail teleporter

* revert testing value

* fix test

* fix other test

* i love tests

* mail teleporter enabled by default

* random cooldowns

* fixtures

* Discard changes to Content.Shared/FingerprintReader/FingerprintReaderComponent.cs

* Discard changes to Content.Shared/FingerprintReader/FingerprintReaderSystem.cs

* Discard changes to Content.Shared/Interaction/Events/GettingUsedAttemptEvent.cs

* Discard changes to Resources/Locale/en-US/fingerprint-reader/fingerprint-reader.ftl

* clean

* fuck paper scrap

* oops

* fuck SpawnTableOnUse

* mail teleporter board in QM locker + addressed review

* oops

* clean

* sound on delivery spawn

* address review

* partial review address

* partial review addressing

* addressing partial review

* pratarial revivew address

* misprediction hell

* stuff

* more stuff

* unrelated

* TODO

* link

* partial review

* DirtyField

---------

Co-authored-by: Milon <milonpl.git@proton.me>
2025-03-07 14:51:08 +01:00

69 lines
2.0 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Delivery;
/// <summary>
/// Component given to deliveries.
/// Means the entity is a delivery, which upon opening will grant a reward to cargo.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState(fieldDeltas: true)]
public sealed partial class DeliveryComponent : Component
{
/// <summary>
/// Whether this delivery has been opened before.
/// </summary>
[DataField, AutoNetworkedField]
public bool IsOpened;
/// <summary>
/// Whether this delivery is still locked using the fingerprint reader.
/// </summary>
[DataField, AutoNetworkedField]
public bool IsLocked = true;
/// <summary>
/// The amount of spesos that gets added to the station bank account on unlock.
/// </summary>
[DataField, AutoNetworkedField]
public int SpesoReward = 500;
/// <summary>
/// The name of the recipient of this delivery.
/// Used for the examine text.
/// </summary>
[DataField, AutoNetworkedField]
public string? RecipientName;
/// <summary>
/// The job of the recipient of this delivery.
/// Used for the examine text.
/// </summary>
[DataField, AutoNetworkedField]
public string? RecipientJobTitle;
/// <summary>
/// The EntityUid of the station this delivery was spawned on.
/// </summary>
[DataField, AutoNetworkedField]
public EntityUid? RecipientStation;
/// <summary>
/// The sound to play when the delivery is unlocked.
/// </summary>
[DataField]
public SoundSpecifier? UnlockSound = new SoundCollectionSpecifier("DeliveryUnlockSounds", AudioParams.Default.WithVolume(-10));
/// <summary>
/// The sound to play when the delivery is opened.
/// </summary>
[DataField]
public SoundSpecifier? OpenSound = new SoundCollectionSpecifier("DeliveryOpenSounds");
/// <summary>
/// The container with all the contents of the delivery.
/// </summary>
[DataField]
public string Container = "delivery";
}