Files
wwdpublic/Content.Shared/Nutrition/Components/SealableComponent.cs
Tayrtahn b39407bae3 Add verbs to Open/Close Openable containers, and add optional seals (#24780)
* Implement closing; add open/close verbs

* Add breakable seals

* Allow custom verb names; make condiment bottles closeable

* Remove pointless VV annotations and false defaults

* Split Sealable off into a new component

* Should have a Closed event too

* Oh hey, there are icons I could use

* Ternary operator

* Add support for seal visualizers

* Moved Sealable to Shared, added networking

* Replaced bottle_close1.ogg

(cherry picked from commit 75e47fff9e5150a4de37e4d3c8a8b278f0a1a2cd)
2024-02-18 23:02:49 +01:00

33 lines
1.0 KiB
C#

using Content.Shared.Nutrition.EntitySystems;
using Robust.Shared.GameStates;
namespace Content.Shared.Nutrition.Components;
/// <summary>
/// Represents a tamper-evident seal on an Openable.
/// Only affects the Examine text.
/// Once the seal has been broken, it cannot be resealed.
/// </summary>
[NetworkedComponent, AutoGenerateComponentState]
[RegisterComponent, Access(typeof(SealableSystem))]
public sealed partial class SealableComponent : Component
{
/// <summary>
/// Whether the item's seal is intact (i.e. it has never been opened)
/// </summary>
[DataField, AutoNetworkedField]
public bool Sealed = true;
/// <summary>
/// Text shown when examining and the item's seal has not been broken.
/// </summary>
[DataField]
public LocId ExamineTextSealed = "drink-component-on-examine-is-sealed";
/// <summary>
/// Text shown when examining and the item's seal has been broken.
/// </summary>
[DataField]
public LocId ExamineTextUnsealed = "drink-component-on-examine-is-unsealed";
}