2021-12-21 13:07:17 +03:00
|
|
|
using Content.Server.Storage.EntitySystems;
|
|
|
|
|
using Content.Server.Toilet;
|
|
|
|
|
using Content.Shared.Containers.ItemSlots;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Item;
|
2021-12-21 13:07:17 +03:00
|
|
|
using Robust.Shared.Analyzers;
|
2021-03-01 15:24:46 -08:00
|
|
|
using Robust.Shared.Containers;
|
2021-01-20 10:02:34 +03:00
|
|
|
using Robust.Shared.GameObjects;
|
2021-03-05 01:08:38 +01:00
|
|
|
using Robust.Shared.Serialization.Manager.Attributes;
|
2021-01-20 10:02:34 +03:00
|
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
|
|
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]
|
2021-12-21 13:07:17 +03:00
|
|
|
[Friend(typeof(SecretStashSystem))]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed 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>
|
2021-12-21 13:07:17 +03:00
|
|
|
[ViewVariables] [DataField("maxItemSize")]
|
|
|
|
|
public int MaxItemSize = (int) ReferenceSizes.Pocket;
|
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>
|
2021-12-21 13:07:17 +03:00
|
|
|
[ViewVariables] [DataField("secretPartName")]
|
|
|
|
|
public string SecretPartName = "";
|
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
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|