using Content.Shared.Chemistry.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Containers.ItemSlots;
+using Content.Shared.Destructible;
using Content.Shared.FixedPoint;
using Content.Shared.Interaction;
using Content.Shared.Kitchen;
if (solution.Volume > containerSolution.AvailableVolume)
continue;
+ var dev = new DestructionEventArgs();
+ RaiseLocalEvent(item, dev);
+
QueueDel(item);
}
using Content.Shared.Containers.ItemSlots;
using Robust.Server.GameObjects;
using Content.Shared.Whitelist;
+using Content.Shared.Destructible;
namespace Content.Server.Nutrition.EntitySystems;
if (ev.Cancelled)
return;
+ var dev = new DestructionEventArgs();
+ RaiseLocalEvent(food, dev);
+
if (component.Trash.Count == 0)
{
QueueDel(food);
--- /dev/null
+using Content.Shared.Whitelist;
+using Robust.Shared.GameStates;
+
+namespace Content.Shared.ChangeNameInContainer;
+
+/// <summary>
+/// An entity with this component will get its name and verb chaned to the container it's inside of. E.g, if your a
+/// pAI that has this component and are inside a lizard plushie, your name when talking will be "lizard plushie".
+/// </summary>
+[RegisterComponent, NetworkedComponent, Access(typeof(ChangeNameInContainerSystem))]
+public sealed partial class ChangeVoiceInContainerComponent : Component
+{
+ /// <summary>
+ /// A whitelist of containers that will change the name.
+ /// </summary>
+ [DataField]
+ public EntityWhitelist? Whitelist;
+}
--- /dev/null
+using Content.Shared.Chat;
+using Robust.Shared.Containers;
+using Content.Shared.Whitelist;
+using Content.Shared.Speech;
+
+namespace Content.Shared.ChangeNameInContainer;
+
+public sealed partial class ChangeNameInContainerSystem : EntitySystem
+{
+ [Dependency] private readonly SharedContainerSystem _container = default!;
+ [Dependency] private readonly EntityWhitelistSystem _whitelist = default!;
+
+ public override void Initialize()
+ {
+ base.Initialize();
+ SubscribeLocalEvent<ChangeVoiceInContainerComponent, TransformSpeakerNameEvent>(OnTransformSpeakerName);
+ }
+
+ private void OnTransformSpeakerName(Entity<ChangeVoiceInContainerComponent> ent, ref TransformSpeakerNameEvent args)
+ {
+ if (!_container.TryGetContainingContainer((ent, null, null), out var container)
+ || _whitelist.IsWhitelistFail(ent.Comp.Whitelist, container.Owner))
+ return;
+
+ args.VoiceName = Name(container.Owner);
+ if (TryComp<SpeechComponent>(container.Owner, out var speechComp))
+ args.SpeechVerb = speechComp.SpeechVerb;
+ }
+
+}
using Content.Shared.DoAfter;
using Robust.Shared.Serialization;
using Robust.Shared.Audio;
+using Content.Shared.Whitelist;
namespace Content.Shared.Storage.Components
{
[DataField("maxItemSize")]
public ProtoId<ItemSizePrototype> MaxItemSize = "Small";
+ /// <summary>
+ /// Entity blacklist for secret stashes.
+ /// </summary>
+ [DataField]
+ public EntityWhitelist? Blacklist;
+
/// <summary>
/// This sound will be played when you try to insert an item in the stash.
/// The sound will be played whether or not the item is actually inserted.
using Content.Shared.Verbs;
using Content.Shared.IdentityManagement;
using Content.Shared.Tools.EntitySystems;
+using Content.Shared.Whitelist;
namespace Content.Shared.Storage.EntitySystems;
[Dependency] private readonly SharedItemSystem _item = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly ToolOpenableSystem _toolOpenableSystem = default!;
-
+ [Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
public override void Initialize()
{
return false;
}
- // check if item is too big to fit into secret stash
- if (_item.GetSizePrototype(itemComp.Size) > _item.GetSizePrototype(entity.Comp.MaxItemSize))
+ // check if item is too big to fit into secret stash or is in the blacklist
+ if (_item.GetSizePrototype(itemComp.Size) > _item.GetSizePrototype(entity.Comp.MaxItemSize) ||
+ _whitelistSystem.IsBlacklistPass(entity.Comp.Blacklist, itemToHideUid))
{
var msg = Loc.GetString("comp-secret-stash-action-hide-item-too-big",
("item", itemToHideUid), ("stashname", GetStashName(entity)));
### Stash names
secret-stash-plant = plant
secret-stash-toilet = toilet cistern
+secret-stash-plushie = plushie
Searching: { state: pai-searching-overlay }
On: { state: pai-on-overlay }
- type: StationMap
+ - type: ChangeVoiceInContainer
+ whitelist:
+ components:
+ - SecretStash
- type: entity
parent: [ PersonalAI, BaseSyndicateContraband]
reagents:
- ReagentId: Fiber
Quantity: 10
+ - type: ContainerContainer
+ containers:
+ stash: !type:ContainerSlot {}
+ - type: Speech
+ speechVerb: Default # for pais (In the secret stash)
+ - type: SecretStash
+ secretStashName: secret-stash-plushie
+ blacklist:
+ components:
+ - SecretStash # Prevents being able to insert plushies inside each other (infinite plush)!
+ - NukeDisk # Could confuse the nukies if they don't know that plushies have a stash.
+ tags:
+ - QuantumSpinInverter # It will cause issues with the grinder...
+ - FakeNukeDisk # So you can't tell if the nuke disk is real or fake depending on if it can be inserted or not.
+ - type: ToolOpenable
+ openToolQualityNeeded: Slicing
+ closeToolQualityNeeded: Slicing # Should probably be stitching or something if that gets added
+ name: secret-stash-plushie
- type: entity
parent: BasePlushie
equippedPrefix: lizard
slots:
- HEAD
+ - type: Speech
+ speechVerb: Reptilian # for pais (In the secret stash)
- type: entity
parent: PlushieLizard
state: icon
- type: StaticPrice
price: 1 # it's worth even less than normal items. Perfection.
+ - type: Tag
+ tags:
+ - FakeNukeDisk
offset: "0.0,0.3"
sprite: Structures/Furniture/potted_plants.rsi
noRot: true
+ - type: Speech
+ speechVerb: Plant # for pais (In the secret stash)
- type: SecretStash
tryInsertItemSound: /Audio/Effects/plant_rustle.ogg
tryRemoveItemSound: /Audio/Effects/plant_rustle.ogg
- type: Tag
id: Nugget # for chicken nuggets
+- type: Tag
+ id: FakeNukeDisk
+
- type: Tag
id: NukeOpsUplink
- type: Tag
id: SecureWindoor
-- type: Tag
+- type: Tag
id: SecurityHelmet
- type: Tag