2021-12-21 13:07:17 +03:00
|
|
|
using Content.Server.Storage.EntitySystems;
|
|
|
|
|
using Content.Shared.Containers.ItemSlots;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Item;
|
2023-01-13 16:57:10 -08:00
|
|
|
using Content.Shared.Toilet;
|
2021-03-01 15:24:46 -08:00
|
|
|
using Robust.Shared.Containers;
|
2023-11-06 02:20:50 -05:00
|
|
|
using Robust.Shared.Prototypes;
|
2021-01-20 10:02:34 +03:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Storage.Components
|
2021-01-20 10:02:34 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-12-21 13:07:17 +03:00
|
|
|
/// Logic for a secret slot stash, like plant pot or toilet cistern.
|
|
|
|
|
/// Unlike <see cref="ItemSlotsComponent"/> it doesn't have interaction logic or verbs.
|
|
|
|
|
/// Other classes like <see cref="ToiletComponent"/> should implement it.
|
2021-01-20 10:02:34 +03:00
|
|
|
/// </summary>
|
|
|
|
|
[RegisterComponent]
|
2022-06-07 15:26:28 +02:00
|
|
|
[Access(typeof(SecretStashSystem))]
|
2023-08-22 18:14:33 -07:00
|
|
|
public sealed partial class SecretStashComponent : Component
|
2021-01-20 10:02:34 +03:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-12-21 13:07:17 +03:00
|
|
|
/// Max item size that can be fitted into secret stash.
|
2021-01-20 10:02:34 +03:00
|
|
|
/// </summary>
|
2022-11-16 20:22:11 +01:00
|
|
|
[DataField("maxItemSize")]
|
2023-11-06 02:20:50 -05:00
|
|
|
public ProtoId<ItemSizePrototype> MaxItemSize = "Small";
|
2021-01-20 10:02:34 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
2021-12-21 13:07:17 +03:00
|
|
|
/// IC secret stash name. For example "the toilet cistern".
|
|
|
|
|
/// If empty string, will replace it with entity name in init.
|
2021-01-20 10:02:34 +03:00
|
|
|
/// </summary>
|
2022-11-16 20:22:11 +01:00
|
|
|
[DataField("secretPartName", readOnly: true)]
|
2022-12-20 23:25:34 +01:00
|
|
|
public string SecretPartName { get; set; } = "";
|
2021-01-20 10:02:34 +03:00
|
|
|
|
|
|
|
|
/// <summary>
|
2021-12-21 13:07:17 +03:00
|
|
|
/// Container used to keep secret stash item.
|
2021-01-20 10:02:34 +03:00
|
|
|
/// </summary>
|
2021-12-21 13:07:17 +03:00
|
|
|
[ViewVariables]
|
|
|
|
|
public ContainerSlot ItemContainer = default!;
|
2021-01-20 10:02:34 +03:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|