diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs index 223e45252c..08675cd6f3 100644 --- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Stack; using Content.Shared.Chemistry.Components; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Containers.ItemSlots; +using Content.Shared.Destructible; using Content.Shared.FixedPoint; using Content.Shared.Interaction; using Content.Shared.Kitchen; @@ -125,6 +126,9 @@ namespace Content.Server.Kitchen.EntitySystems if (solution.Volume > containerSolution.AvailableVolume) continue; + var dev = new DestructionEventArgs(); + RaiseLocalEvent(item, dev); + QueueDel(item); } diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index 35ed1e38bf..572d5f2559 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -14,6 +14,7 @@ using Content.Shared.Chemistry; using Content.Shared.Chemistry.EntitySystems; using Content.Shared.Containers.ItemSlots; using Content.Shared.Database; +using Content.Shared.Destructible; using Content.Shared.DoAfter; using Content.Shared.FixedPoint; using Content.Shared.Hands.Components; @@ -385,6 +386,9 @@ public sealed class FoodSystem : EntitySystem if (ev.Cancelled) return; + var dev = new DestructionEventArgs(); + RaiseLocalEvent(food, dev); + if (component.Trash.Count == 0) { QueueDel(food); diff --git a/Content.Shared/ChangeNameInContainer/ChangeNameInContainerComponent.cs b/Content.Shared/ChangeNameInContainer/ChangeNameInContainerComponent.cs new file mode 100644 index 0000000000..dca8f5b29b --- /dev/null +++ b/Content.Shared/ChangeNameInContainer/ChangeNameInContainerComponent.cs @@ -0,0 +1,18 @@ +using Content.Shared.Whitelist; +using Robust.Shared.GameStates; + +namespace Content.Shared.ChangeNameInContainer; + +/// +/// 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". +/// +[RegisterComponent, NetworkedComponent, Access(typeof(ChangeNameInContainerSystem))] +public sealed partial class ChangeVoiceInContainerComponent : Component +{ + /// + /// A whitelist of containers that will change the name. + /// + [DataField] + public EntityWhitelist? Whitelist; +} diff --git a/Content.Shared/ChangeNameInContainer/ChangeNameInContainerSystem.cs b/Content.Shared/ChangeNameInContainer/ChangeNameInContainerSystem.cs new file mode 100644 index 0000000000..f9abda3ec2 --- /dev/null +++ b/Content.Shared/ChangeNameInContainer/ChangeNameInContainerSystem.cs @@ -0,0 +1,30 @@ +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(OnTransformSpeakerName); + } + + private void OnTransformSpeakerName(Entity 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(container.Owner, out var speechComp)) + args.SpeechVerb = speechComp.SpeechVerb; + } + +} diff --git a/Content.Shared/Storage/Components/SecretStashComponent.cs b/Content.Shared/Storage/Components/SecretStashComponent.cs index 9263328fc8..0c6899d251 100644 --- a/Content.Shared/Storage/Components/SecretStashComponent.cs +++ b/Content.Shared/Storage/Components/SecretStashComponent.cs @@ -9,6 +9,7 @@ using Content.Shared.DoAfter; using Content.Shared.Toilet.Components; using Robust.Shared.Serialization; using Robust.Shared.Audio; +using Content.Shared.Whitelist; namespace Content.Shared.Storage.Components { @@ -27,6 +28,12 @@ namespace Content.Shared.Storage.Components [DataField("maxItemSize")] public ProtoId MaxItemSize = "Small"; + /// + /// Entity blacklist for secret stashes. + /// + [DataField] + public EntityWhitelist? Blacklist; + /// /// 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. diff --git a/Content.Shared/Storage/EntitySystems/SecretStashSystem.cs b/Content.Shared/Storage/EntitySystems/SecretStashSystem.cs index 901d744df5..08a69c345f 100644 --- a/Content.Shared/Storage/EntitySystems/SecretStashSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SecretStashSystem.cs @@ -13,6 +13,7 @@ using Robust.Shared.Audio.Systems; using Content.Shared.Verbs; using Content.Shared.IdentityManagement; using Content.Shared.Tools.EntitySystems; +using Content.Shared.Whitelist; namespace Content.Shared.Storage.EntitySystems; @@ -27,7 +28,7 @@ public sealed class SecretStashSystem : EntitySystem [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() { @@ -90,8 +91,9 @@ public sealed class SecretStashSystem : EntitySystem 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))); diff --git a/Resources/Locale/en-US/storage/components/secret-stash-component.ftl b/Resources/Locale/en-US/storage/components/secret-stash-component.ftl index 3689242807..16e575c0f1 100644 --- a/Resources/Locale/en-US/storage/components/secret-stash-component.ftl +++ b/Resources/Locale/en-US/storage/components/secret-stash-component.ftl @@ -22,3 +22,4 @@ comp-secret-stash-verb-open = Open ### Stash names secret-stash-plant = plant secret-stash-toilet = toilet cistern +secret-stash-plushie = plushie diff --git a/Resources/Prototypes/Entities/Objects/Fun/pai.yml b/Resources/Prototypes/Entities/Objects/Fun/pai.yml index ca94f7482c..fbf5f69fee 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/pai.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/pai.yml @@ -74,6 +74,10 @@ Searching: { state: pai-searching-overlay } On: { state: pai-on-overlay } - type: StationMap + - type: ChangeVoiceInContainer + whitelist: + components: + - SecretStash - type: LanguageKnowledge speaks: - TauCetiBasic diff --git a/Resources/Prototypes/Entities/Objects/Fun/toys.yml b/Resources/Prototypes/Entities/Objects/Fun/toys.yml index 013d4c7607..e462ea664a 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/toys.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/toys.yml @@ -54,6 +54,24 @@ 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 @@ -333,6 +351,8 @@ equippedPrefix: lizard slots: - HEAD + - type: Speech + speechVerb: Reptilian # for pais (In the secret stash) - type: entity parent: PlushieLizard diff --git a/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml b/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml index de15fa2c36..ca575b3e89 100644 --- a/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml +++ b/Resources/Prototypes/Entities/Objects/Misc/dat_fukken_disk.yml @@ -41,6 +41,9 @@ state: icon - type: StaticPrice price: 1 # it's worth even less than normal items. Perfection. + - type: Tag + tags: + - FakeNukeDisk - type: EmitSoundOnPickup sound: /Audio/SimpleStation14/Items/Handling/disk_pickup.ogg - type: EmitSoundOnDrop diff --git a/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml b/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml index 61edb22d22..e47a63ab73 100644 --- a/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml +++ b/Resources/Prototypes/Entities/Structures/Furniture/potted_plants.yml @@ -25,6 +25,8 @@ 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 diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 55cc1ef59f..afba5ba895 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -985,6 +985,9 @@ - type: Tag id: Nugget # for chicken nuggets +- type: Tag + id: FakeNukeDisk + - type: Tag id: NukeOpsUplink