using Content.Server.Popups;
using Content.Server.Tabletop.Components;
+using Content.Shared.CCVar;
using Content.Shared.Hands.Components;
using Content.Shared.Interaction;
using Content.Shared.Item;
using Content.Shared.Verbs;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
+using Robust.Shared.Configuration;
using Robust.Shared.Enums;
using Robust.Shared.Map;
using Robust.Shared.Player;
[Dependency] private readonly EyeSystem _eye = default!;
[Dependency] private readonly ViewSubscriberSystem _viewSubscriberSystem = default!;
[Dependency] private readonly PopupSystem _popupSystem = default!;
+ [Dependency] private readonly IConfigurationManager _cfg = default!;
public override void Initialize()
{
private void OnInteractUsing(EntityUid uid, TabletopGameComponent component, InteractUsingEvent args)
{
+ if (!_cfg.GetCVar(CCVars.GameTabletopPlace))
+ return;
+
if (!EntityManager.TryGetComponent(args.User, out HandsComponent? hands))
return;
public static readonly CVarDef<bool> RoundEndPVSOverrides =
CVarDef.Create("game.round_end_pvs_overrides", true, CVar.SERVERONLY);
+ /// <summary>
+ /// If true, players can place objects onto tabletop games like chess boards.
+ /// </summary>
+ /// <remarks>
+ /// This feature is currently highly abusable and can easily be used to crash the server,
+ /// so it's off by default.
+ /// </remarks>
+ public static readonly CVarDef<bool> GameTabletopPlace =
+ CVarDef.Create("game.tabletop_place", false, CVar.SERVERONLY);
+
/*
* Discord
*/