mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 16:17:27 +00:00
* - rework a bunch of cargo orders to not send a crate with just one thing - instead sends the item, wrapped - add ability for cargo orders to wrap the item ordered in parcel wrap - cargo order name and descriptions are now localization strings, but still 99.99% of the time just get that info from the entity they're spawning - small refactor to how cargo orders move around in cargo code so that the actual order proto is kept around longer - small rework to certain restock cargo orders to halve the cost and number of items received in one order * oop * Suffering * Arbitrary containers for cargo products * I ran the tests locally and they passed, github please rerun :) * massage Slarti's work into this. Mainly by taking the API wrapping ability out back with the rifle q-q * testfail fake * wow `_applyingState` is useful, I wonder where I should've been using that in other PRs before :^) * pr comments * tfw the hook doesn't update the submodule * Update Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs Co-authored-by: āda <ss.adasts@gmail.com> * PR comments * fixies * Update Content.Client/Cargo/UI/CargoConsoleMenu.xaml.cs * Update Content.Shared/ParcelWrap/Systems/ParcelWrappingSystem.WrappedParcel.cs * fix wrapped parcel entity name + audio * Actually read PR comments * Apply suggestions from code review Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com> --------- Co-authored-by: āda <ss.adasts@gmail.com> Co-authored-by: ScarKy0 <106310278+ScarKy0@users.noreply.github.com>
54 lines
1.8 KiB
C#
54 lines
1.8 KiB
C#
using Content.Shared.Item;
|
|
using Content.Shared.ParcelWrap.Systems;
|
|
using Content.Shared.Whitelist;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.ParcelWrap.Components;
|
|
|
|
/// <summary>
|
|
/// This component gives its owning entity the ability to wrap items into parcels.
|
|
/// </summary>
|
|
/// <seealso cref="Components.WrappedParcelComponent"/>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
[Access] // Readonly, except for VV editing
|
|
public sealed partial class ParcelWrapComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The <see cref="EntityPrototype"/> of the parcel created by using this component.
|
|
/// </summary>
|
|
[DataField(required: true), AutoNetworkedField]
|
|
public EntProtoId<WrappedParcelComponent> ParcelPrototype;
|
|
|
|
/// <summary>
|
|
/// How long it takes to use this to wrap something.
|
|
/// </summary>
|
|
[DataField(required: true), AutoNetworkedField]
|
|
public TimeSpan WrapDelay = TimeSpan.FromSeconds(1);
|
|
|
|
/// <summary>
|
|
/// Sound played when this is used to wrap something.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public SoundSpecifier? WrapSound;
|
|
|
|
/// <summary>
|
|
/// Defines the set of things which can be wrapped (unless it fails the <see cref="Blacklist"/>).
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public EntityWhitelist? Whitelist;
|
|
|
|
/// <summary>
|
|
/// Defines the set of things which cannot be wrapped (even if it passes the <see cref="Whitelist"/>).
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public EntityWhitelist? Blacklist;
|
|
|
|
/// <summary>
|
|
/// If a player trapped inside this parcel can escape from it by unwrapping it.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public bool CanSelfUnwrap = true;
|
|
}
|