diff --git a/Content.Client/DebugMon/DebugMonitorSystem.cs b/Content.Client/DebugMon/DebugMonitorManager.cs
similarity index 51%
rename from Content.Client/DebugMon/DebugMonitorSystem.cs
rename to Content.Client/DebugMon/DebugMonitorManager.cs
index fb5cd4f51a4..7e1dca0d6f0 100644
--- a/Content.Client/DebugMon/DebugMonitorSystem.cs
+++ b/Content.Client/DebugMon/DebugMonitorManager.cs
@@ -1,23 +1,28 @@
-using Content.Client.Administration.Managers;
+using Content.Client.Administration.Managers;
using Content.Shared.CCVar;
+using Robust.Client;
using Robust.Client.UserInterface;
using Robust.Shared.Configuration;
-
namespace Content.Client.DebugMon;
///
-/// This handles preventing certain debug monitors from appearing.
+/// This handles preventing certain debug monitors from being usable by non-admins.
///
-public sealed class DebugMonitorSystem : EntitySystem
+internal sealed class DebugMonitorManager
{
[Dependency] private readonly IConfigurationManager _cfg = default!;
[Dependency] private readonly IClientAdminManager _admin = default!;
[Dependency] private readonly IUserInterfaceManager _userInterface = default!;
+ [Dependency] private readonly IBaseClient _baseClient = default!;
- public override void FrameUpdate(float frameTime)
+ public void FrameUpdate()
{
- if (!_admin.IsActive() && _cfg.GetCVar(CCVars.DebugCoordinatesAdminOnly))
+ if (_baseClient.RunLevel == ClientRunLevel.InGame
+ && !_admin.IsActive()
+ && _cfg.GetCVar(CCVars.DebugCoordinatesAdminOnly))
+ {
_userInterface.DebugMonitors.SetMonitor(DebugMonitor.Coords, false);
+ }
}
}
diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs
index c43b7312909..0364e1f931f 100644
--- a/Content.Client/Entry/EntryPoint.cs
+++ b/Content.Client/Entry/EntryPoint.cs
@@ -1,6 +1,7 @@
using Content.Client.Administration.Managers;
using Content.Client.Changelog;
using Content.Client.Chat.Managers;
+using Content.Client.DebugMon;
using Content.Client.Corvax.TTS;
using Content.Client.Options;
using Content.Client.Eui;
@@ -35,6 +36,7 @@
using Robust.Shared.ContentPack;
using Robust.Shared.Prototypes;
using Robust.Shared.Replays;
+using Robust.Shared.Timing;
namespace Content.Client.Entry
{
@@ -70,6 +72,7 @@ public sealed class EntryPoint : GameClient
[Dependency] private readonly IReplayLoadManager _replayLoad = default!;
[Dependency] private readonly ILogManager _logManager = default!;
[Dependency] private readonly ContentReplayPlaybackManager _replayMan = default!;
+ [Dependency] private readonly DebugMonitorManager _debugMonitorManager = default!;
public override void Init()
{
@@ -208,5 +211,13 @@ private void SwitchToDefaultState(bool disconnected = false)
_stateManager.RequestStateChange();
}
}
+
+ public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs)
+ {
+ if (level == ModUpdateLevel.FramePreEngine)
+ {
+ _debugMonitorManager.FrameUpdate();
+ }
+ }
}
}
diff --git a/Content.Client/IoC/ClientContentIoC.cs b/Content.Client/IoC/ClientContentIoC.cs
index f79f8b916a1..a1cba2ed3fb 100644
--- a/Content.Client/IoC/ClientContentIoC.cs
+++ b/Content.Client/IoC/ClientContentIoC.cs
@@ -3,6 +3,7 @@
using Content.Client.Chat.Managers;
using Content.Client.Clickable;
using Content.Client.Corvax.TTS;
+using Content.Client.DebugMon;
using Content.Client.Eui;
using Content.Client.GhostKick;
using Content.Client.Launcher;
@@ -49,6 +50,7 @@ public static void Register()
collection.Register();
collection.Register();
collection.Register();
+ collection.Register();
}
}
}
diff --git a/Content.Server/Tabletop/TabletopSystem.cs b/Content.Server/Tabletop/TabletopSystem.cs
index caa319a0b71..f152648e214 100644
--- a/Content.Server/Tabletop/TabletopSystem.cs
+++ b/Content.Server/Tabletop/TabletopSystem.cs
@@ -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.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 @@ public sealed partial class TabletopSystem : SharedTabletopSystem
[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 @@ private void OnTabletopRequestTakeOut(TabletopRequestTakeOut msg, EntitySessionE
private void OnInteractUsing(EntityUid uid, TabletopGameComponent component, InteractUsingEvent args)
{
+ if (!_cfg.GetCVar(CCVars.GameTabletopPlace))
+ return;
+
if (!EntityManager.TryGetComponent(args.User, out HandsComponent? hands))
return;
diff --git a/Content.Shared.Database/LogType.cs b/Content.Shared.Database/LogType.cs
index 33a5d30c6a9..eb2b8e1f6f9 100644
--- a/Content.Shared.Database/LogType.cs
+++ b/Content.Shared.Database/LogType.cs
@@ -105,4 +105,9 @@ public enum LogType
/// This is a default value used by PlayerRateLimitManager, though users can use different log types.
///
RateLimited = 91,
+
+ ///
+ /// A player did an item-use interaction of an item they were holding onto another object.
+ ///
+ InteractUsing = 92,
}
diff --git a/Content.Shared/CCVar/CCVars.cs b/Content.Shared/CCVar/CCVars.cs
index ef3615f103b..a0e9157e922 100644
--- a/Content.Shared/CCVar/CCVars.cs
+++ b/Content.Shared/CCVar/CCVars.cs
@@ -440,6 +440,16 @@ public static readonly CVarDef
public static readonly CVarDef RoundEndPVSOverrides =
CVarDef.Create("game.round_end_pvs_overrides", true, CVar.SERVERONLY);
+ ///
+ /// If true, players can place objects onto tabletop games like chess boards.
+ ///
+ ///
+ /// This feature is currently highly abusable and can easily be used to crash the server,
+ /// so it's off by default.
+ ///
+ public static readonly CVarDef GameTabletopPlace =
+ CVarDef.Create("game.tabletop_place", false, CVar.SERVERONLY);
+
/*
* Discord
*/
diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs
index 1e4c49211f5..48076ca360f 100644
--- a/Content.Shared/Interaction/SharedInteractionSystem.cs
+++ b/Content.Shared/Interaction/SharedInteractionSystem.cs
@@ -486,6 +486,21 @@ public void InteractHand(EntityUid user, EntityUid target)
public void InteractUsingRanged(EntityUid user, EntityUid used, EntityUid? target,
EntityCoordinates clickLocation, bool inRangeUnobstructed)
{
+ if (target != null)
+ {
+ _adminLogger.Add(
+ LogType.InteractUsing,
+ LogImpact.Low,
+ $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target} using {ToPrettyString(used):used}");
+ }
+ else
+ {
+ _adminLogger.Add(
+ LogType.InteractUsing,
+ LogImpact.Low,
+ $"{ToPrettyString(user):user} interacted with *nothing* using {ToPrettyString(used):used}");
+ }
+
if (RangedInteractDoBefore(user, used, target, clickLocation, inRangeUnobstructed))
return;
@@ -926,6 +941,11 @@ public void InteractUsing(
if (checkCanUse && !_actionBlockerSystem.CanUseHeldEntity(user, used))
return;
+ _adminLogger.Add(
+ LogType.InteractUsing,
+ LogImpact.Low,
+ $"{ToPrettyString(user):user} interacted with {ToPrettyString(target):target} using {ToPrettyString(used):used}");
+
if (RangedInteractDoBefore(user, used, target, clickLocation, true))
return;
diff --git a/Resources/Changelog/Changelog.yml b/Resources/Changelog/Changelog.yml
index 8d6ce1e4577..69de6e7a900 100644
--- a/Resources/Changelog/Changelog.yml
+++ b/Resources/Changelog/Changelog.yml
@@ -1,19 +1,4 @@
Entries:
-- author: Killerqu00
- changes:
- - message: Quartermasters can now skip a single bounty in the list once every 15
- minutes.
- type: Add
- id: 6325
- time: '2024-04-09T22:18:07.0000000+00:00'
- url: https://github.com/space-wizards/space-station-14/pull/26537
-- author: SkaldetSkaeg
- changes:
- - message: The Flippo lighter is now quieter and has a delay on use.
- type: Tweak
- id: 6326
- time: '2024-04-09T22:20:57.0000000+00:00'
- url: https://github.com/space-wizards/space-station-14/pull/26846
- author: notquitehadouken
changes:
- message: Gave botanists droppers for easier chemical moving.
@@ -3831,3 +3816,18 @@
id: 6824
time: '2024-06-27T02:08:57.0000000+00:00'
url: https://github.com/space-wizards/space-station-14/pull/29499
+- author: PJB3005
+ changes:
+ - message: You can no longer place items onto tabletop games. The feature could
+ be easily abused to crash the server.
+ type: Remove
+ id: 6825
+ time: '2024-06-27T14:57:55.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/29513
+- author: KonstantinAngelov
+ changes:
+ - message: Chef's Cookbook has a more IC name.
+ type: Tweak
+ id: 6826
+ time: '2024-06-27T15:11:33.0000000+00:00'
+ url: https://github.com/space-wizards/space-station-14/pull/29467
diff --git a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml
index faf5bc5ea57..85a941f27be 100644
--- a/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml
+++ b/Resources/Prototypes/Catalog/Fills/Books/bookshelf.yml
@@ -15,7 +15,7 @@
orGroup: BookPool
- id: BookBartendersManual
orGroup: BookPool
- - id: BookChefGaming
+ - id: BookHowToCookForFortySpaceman
orGroup: BookPool
- id: BookLeafLoversSecret
orGroup: BookPool
diff --git a/Resources/Prototypes/Catalog/Fills/Crates/service.yml b/Resources/Prototypes/Catalog/Fills/Crates/service.yml
index 1876de6a53b..f4c47cfe9e4 100644
--- a/Resources/Prototypes/Catalog/Fills/Crates/service.yml
+++ b/Resources/Prototypes/Catalog/Fills/Crates/service.yml
@@ -173,7 +173,7 @@
- id: BookSpaceEncyclopedia
- id: BookTheBookOfControl
- id: BookBartendersManual
- - id: BookChefGaming
+ - id: BookHowToCookForFortySpaceman
- id: BookLeafLoversSecret
- id: BookEngineersHandbook
- id: BookScientistsGuidebook
diff --git a/Resources/Prototypes/Entities/Objects/Misc/books.yml b/Resources/Prototypes/Entities/Objects/Misc/books.yml
index 3fc90048dd5..fd4cac781ba 100644
--- a/Resources/Prototypes/Entities/Objects/Misc/books.yml
+++ b/Resources/Prototypes/Entities/Objects/Misc/books.yml
@@ -110,10 +110,10 @@
- Bartender
- type: entity
- id: BookChefGaming
+ id: BookHowToCookForFortySpaceman
parent: BaseItem
- name: chef gaming
- description: A book about cooking written by a gamer chef.
+ name: How To Cook For Forty Spacemen
+ description: A book about cooking written by a space chef.
components:
- type: Sprite
sprite: Objects/Misc/books.rsi
diff --git a/Resources/migration.yml b/Resources/migration.yml
index bc428cf1f68..961a9ea3657 100644
--- a/Resources/migration.yml
+++ b/Resources/migration.yml
@@ -358,3 +358,7 @@ ClothingOuterCoatInspector: ClothingOuterCoatDetectiveLoadout
# 2024-06-23
FloorTileItemReinforced: PartRodMetal1
+
+
+#2024-06-25
+BookChefGaming: BookHowToCookForFortySpaceman