From d212f3cdae4a65186d6c330c5a4bda96765e0cb8 Mon Sep 17 00:00:00 2001
From: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Date: Sun, 26 Oct 2025 13:59:52 +0100
Subject: [PATCH] remove a bunch of redundant IsFirstTimePredicted checks
(#41119)
---
.../Singularity/EntitySystems/GravityWellSystem.cs | 3 ---
.../EntitySystems/SingularityAttractorSystem.cs | 3 ---
.../Singularity/EntitySystems/SingularitySystem.cs | 7 -------
Content.Server/Species/Systems/NymphSystem.cs | 7 +------
.../Xenoarchaeology/Artifact/XAE/XAEPortalSystem.cs | 3 ---
Content.Shared/Inventory/InventorySystem.Equip.cs | 4 +---
6 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs b/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs
index 6f2137b0d0..bf639746ba 100644
--- a/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs
+++ b/Content.Server/Singularity/EntitySystems/GravityWellSystem.cs
@@ -73,9 +73,6 @@ public sealed class GravityWellSystem : SharedGravityWellSystem
/// The time elapsed since the last set of updates.
public override void Update(float frameTime)
{
- if(!_timing.IsFirstTimePredicted)
- return;
-
var query = EntityQueryEnumerator();
while (query.MoveNext(out var uid, out var gravWell, out var xform))
{
diff --git a/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs b/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs
index 4b31d5f814..099b2d89b0 100644
--- a/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs
+++ b/Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs
@@ -36,9 +36,6 @@ public sealed class SingularityAttractorSystem : EntitySystem
/// The time elapsed since the last set of updates.
public override void Update(float frameTime)
{
- if (!_timing.IsFirstTimePredicted)
- return;
-
var query = EntityQueryEnumerator();
var now = _timing.CurTime;
while (query.MoveNext(out var uid, out var attractor, out var xform))
diff --git a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs
index f86faf9ee4..81612153cc 100644
--- a/Content.Server/Singularity/EntitySystems/SingularitySystem.cs
+++ b/Content.Server/Singularity/EntitySystems/SingularitySystem.cs
@@ -5,11 +5,8 @@ using Content.Shared.Singularity.Components;
using Content.Shared.Singularity.EntitySystems;
using Content.Shared.Singularity.Events;
using Robust.Server.GameStates;
-using Robust.Shared.Audio;
using Robust.Shared.Audio.Systems;
using Robust.Shared.GameStates;
-using Robust.Shared.Player;
-using Robust.Shared.Timing;
namespace Content.Server.Singularity.EntitySystems;
@@ -22,7 +19,6 @@ namespace Content.Server.Singularity.EntitySystems;
public sealed class SingularitySystem : SharedSingularitySystem
{
#region Dependencies
- [Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly SharedAudioSystem _audio = default!;
[Dependency] private readonly PvsOverrideSystem _pvs = default!;
#endregion Dependencies
@@ -70,9 +66,6 @@ public sealed class SingularitySystem : SharedSingularitySystem
/// The amount of time since the last set of updates.
public override void Update(float frameTime)
{
- if(!_timing.IsFirstTimePredicted)
- return;
-
var query = EntityQueryEnumerator();
while (query.MoveNext(out var uid, out var singularity))
{
diff --git a/Content.Server/Species/Systems/NymphSystem.cs b/Content.Server/Species/Systems/NymphSystem.cs
index 11493b65b3..f6477a7c8b 100644
--- a/Content.Server/Species/Systems/NymphSystem.cs
+++ b/Content.Server/Species/Systems/NymphSystem.cs
@@ -4,15 +4,13 @@ using Content.Shared.Body.Events;
using Content.Shared.Zombies;
using Content.Server.Zombies;
using Robust.Shared.Prototypes;
-using Robust.Shared.Timing;
namespace Content.Server.Species.Systems;
public sealed partial class NymphSystem : EntitySystem
{
- [Dependency] private readonly IPrototypeManager _protoManager= default!;
+ [Dependency] private readonly IPrototypeManager _protoManager = default!;
[Dependency] private readonly MindSystem _mindSystem = default!;
- [Dependency] private readonly IGameTiming _timing = default!;
[Dependency] private readonly ZombieSystem _zombie = default!;
public override void Initialize()
@@ -24,9 +22,6 @@ public sealed partial class NymphSystem : EntitySystem
private void OnRemovedFromPart(EntityUid uid, NymphComponent comp, ref OrganRemovedFromBodyEvent args)
{
- if (!_timing.IsFirstTimePredicted)
- return;
-
if (TerminatingOrDeleted(uid) || TerminatingOrDeleted(args.OldBody))
return;
diff --git a/Content.Server/Xenoarchaeology/Artifact/XAE/XAEPortalSystem.cs b/Content.Server/Xenoarchaeology/Artifact/XAE/XAEPortalSystem.cs
index acc36f0f8d..2de5dd0bfe 100644
--- a/Content.Server/Xenoarchaeology/Artifact/XAE/XAEPortalSystem.cs
+++ b/Content.Server/Xenoarchaeology/Artifact/XAE/XAEPortalSystem.cs
@@ -25,9 +25,6 @@ public sealed class XAEPortalSystem : BaseXAESystem
///
protected override void OnActivated(Entity ent, ref XenoArtifactNodeActivatedEvent args)
{
- if (!_timing.IsFirstTimePredicted)
- return;
-
var map = Transform(ent).MapID;
var validMinds = new ValueList();
var mindQuery = EntityQueryEnumerator();
diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs
index ae038b63f3..cb5ef864b9 100644
--- a/Content.Shared/Inventory/InventorySystem.Equip.cs
+++ b/Content.Shared/Inventory/InventorySystem.Equip.cs
@@ -16,7 +16,6 @@ using Content.Shared.Whitelist;
using Robust.Shared.Audio.Systems;
using Robust.Shared.Containers;
using Robust.Shared.Prototypes;
-using Robust.Shared.Timing;
using Robust.Shared.Utility;
namespace Content.Shared.Inventory;
@@ -31,7 +30,6 @@ public abstract partial class InventorySystem
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly SharedDoAfterSystem _doAfter = default!;
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
- [Dependency] private readonly IGameTiming _gameTiming = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly EntityWhitelistSystem _whitelistSystem = default!;
[Dependency] private readonly SharedStrippableSystem _strippable = default!;
@@ -468,7 +466,7 @@ public abstract partial class InventorySystem
// we check if any items were dropped, and make a popup if they were.
// the reason we check for > 1 is because the first item is always the one we are trying to unequip,
// whereas we only want to notify for extra dropped items.
- if (!silent && _gameTiming.IsFirstTimePredicted && firstRun && itemsDropped > 1)
+ if (!silent && firstRun && itemsDropped > 1)
_popup.PopupClient(Loc.GetString("inventory-component-dropped-from-unequip", ("items", itemsDropped - 1)), target, target);
// TODO: Inventory needs a hot cleanup hoo boy
--
2.51.2