Remove placing items on tabletop boards. (#29513)
This feature should never have been merged, it can be trivially abused to break the entire server. It's behind a CVar because honestly that's the easiest way to 1984 the feature.
This commit is contained in:
committed by
GitHub
parent
849a790617
commit
0896edf06c
@@ -1,5 +1,6 @@
|
||||
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;
|
||||
@@ -9,6 +10,7 @@ using Content.Shared.Tabletop.Events;
|
||||
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;
|
||||
@@ -23,6 +25,7 @@ namespace Content.Server.Tabletop
|
||||
[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()
|
||||
{
|
||||
@@ -73,6 +76,9 @@ namespace Content.Server.Tabletop
|
||||
|
||||
private void OnInteractUsing(EntityUid uid, TabletopGameComponent component, InteractUsingEvent args)
|
||||
{
|
||||
if (!_cfg.GetCVar(CCVars.GameTabletopPlace))
|
||||
return;
|
||||
|
||||
if (!EntityManager.TryGetComponent(args.User, out HandsComponent? hands))
|
||||
return;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user