using Content.Shared.ActionBlocker; using Content.Shared.Verbs; using Robust.Shared.GameObjects; using Robust.Shared.Localization; namespace Content.Server.Tabletop.Components { /// /// A component that makes an object playable as a tabletop game. /// [RegisterComponent] public class TabletopGameComponent : Component { public override string Name => "TabletopGame"; /// /// A verb that allows the player to start playing a tabletop game. /// [Verb] public class PlayVerb : Verb { protected override void GetData(IEntity user, TabletopGameComponent component, VerbData data) { if (!EntitySystem.Get().CanInteract(user)) { data.Visibility = VerbVisibility.Invisible; return; } data.Text = Loc.GetString("tabletop-verb-play-game"); data.IconTexture = "/Textures/Interface/VerbIcons/die.svg.192dpi.png"; } protected override void Activate(IEntity user, TabletopGameComponent component) { EntitySystem.Get().OpenTable(user, component.Owner); } } } }