Files
tbd-station-14/Content.Shared/ParcelWrap/Components/WrappedParcelComponent.cs
Centronias 90582f27ee Adds Parcel Wrap (#34471)
* Parcel Wrap

* fix TG sprite licenses
update attribution on modified `unwrapped` sprite to better conform to CC's guidance

* ContainerContainer test failure fix

* Just easy changes for now.

* Imagine building your code before pushing it for review

* The rest of the PR comments

* PR comments

* more comments + cargo orderability

* whitespace: deduplicated.

* use limitedcharges
replace mostly-duped client/server with if(onserver)

* cabinet perspective sprites

* web edit detected

fite me

* @ps3moira 's new sprites for me :)

* add a touch of attribution

* EmoGarbage Review

* Merge with master

* Merge with master

---------

Co-authored-by: EmoGarbage404 <retron404@gmail.com>
2025-04-26 19:24:25 -04:00

47 lines
1.4 KiB
C#

using Content.Shared.ParcelWrap.Systems;
using Robust.Shared.Audio;
using Robust.Shared.Containers;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
namespace Content.Shared.ParcelWrap.Components;
/// <summary>
/// This component marks its owner as being a parcel created by wrapping another item up. It can be unwrapped,
/// destroying this entity and releasing <see cref="Contents"/>.
/// </summary>
/// <seealso cref="ParcelWrapComponent"/>
[RegisterComponent, NetworkedComponent, Access(typeof(ParcelWrappingSystem))]
public sealed partial class WrappedParcelComponent : Component
{
/// <summary>
/// The contents of this parcel.
/// </summary>
[ViewVariables(VVAccess.ReadOnly)]
public ContainerSlot Contents = default!;
/// <summary>
/// Specifies the entity to spawn when this parcel is unwrapped.
/// </summary>
[DataField]
public EntProtoId? UnwrapTrash;
/// <summary>
/// How long it takes to unwrap this parcel.
/// </summary>
[DataField(required: true)]
public TimeSpan UnwrapDelay = TimeSpan.FromSeconds(1);
/// <summary>
/// Sound played when unwrapping this parcel.
/// </summary>
[DataField]
public SoundSpecifier? UnwrapSound;
/// <summary>
/// The ID of <see cref="Contents"/>.
/// </summary>
[DataField, ViewVariables(VVAccess.ReadOnly)]
public string ContainerId = "contents";
}