]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
remove a bunch of redundant IsFirstTimePredicted checks (#41119)
authorslarticodefast <161409025+slarticodefast@users.noreply.github.com>
Sun, 26 Oct 2025 12:59:52 +0000 (13:59 +0100)
committerGitHub <noreply@github.com>
Sun, 26 Oct 2025 12:59:52 +0000 (12:59 +0000)
Content.Server/Singularity/EntitySystems/GravityWellSystem.cs
Content.Server/Singularity/EntitySystems/SingularityAttractorSystem.cs
Content.Server/Singularity/EntitySystems/SingularitySystem.cs
Content.Server/Species/Systems/NymphSystem.cs
Content.Server/Xenoarchaeology/Artifact/XAE/XAEPortalSystem.cs
Content.Shared/Inventory/InventorySystem.Equip.cs

index 6f2137b0d0a38d9444b3a8e6d5e6c0636bc684f8..bf639746bad51c5852b5f2d8b225f2bfdfefeda0 100644 (file)
@@ -73,9 +73,6 @@ public sealed class GravityWellSystem : SharedGravityWellSystem
     /// <param name="frameTime">The time elapsed since the last set of updates.</param>
     public override void Update(float frameTime)
     {
-        if(!_timing.IsFirstTimePredicted)
-            return;
-
         var query = EntityQueryEnumerator<GravityWellComponent, TransformComponent>();
         while (query.MoveNext(out var uid, out var gravWell, out var xform))
         {
index 4b31d5f8144061ad763ce271092f083a074279bb..099b2d89b06b8e269c4f0ac016a2b6dd97cbfb70 100644 (file)
@@ -36,9 +36,6 @@ public sealed class SingularityAttractorSystem : EntitySystem
     /// <param name="frameTime">The time elapsed since the last set of updates.</param>
     public override void Update(float frameTime)
     {
-        if (!_timing.IsFirstTimePredicted)
-            return;
-
         var query = EntityQueryEnumerator<SingularityAttractorComponent, TransformComponent>();
         var now = _timing.CurTime;
         while (query.MoveNext(out var uid, out var attractor, out var xform))
index f86faf9ee4871683edddf6182dc44baf6fc6f373..81612153ccf3bc857fbffdfae56e1b2bcefd81fd 100644 (file)
@@ -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
     /// <param name="frameTime">The amount of time since the last set of updates.</param>
     public override void Update(float frameTime)
     {
-        if(!_timing.IsFirstTimePredicted)
-            return;
-
         var query = EntityQueryEnumerator<SingularityComponent>();
         while (query.MoveNext(out var uid, out var singularity))
         {
index 11493b65b3ee81054cf5d6e1ef542d62c69f6274..f6477a7c8bb9591420c0b508a7cb2e0c3e03b572 100644 (file)
@@ -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;
 
index acc36f0f8d016ab198578b853ea88a0f13e6c8cc..2de5dd0bfe5f56e1d5ba76a87253a41720a88aaf 100644 (file)
@@ -25,9 +25,6 @@ public sealed class XAEPortalSystem : BaseXAESystem<XAEPortalComponent>
     /// <inheritdoc />
     protected override void OnActivated(Entity<XAEPortalComponent> ent, ref XenoArtifactNodeActivatedEvent args)
     {
-        if (!_timing.IsFirstTimePredicted)
-            return;
-
         var map = Transform(ent).MapID;
         var validMinds = new ValueList<EntityUid>();
         var mindQuery = EntityQueryEnumerator<MindContainerComponent, MobStateComponent, TransformComponent, MetaDataComponent>();
index ae038b63f3e1da4ec086412a388955b086399b54..cb5ef864b961bec456f2ba61154b2aee93c7b712 100644 (file)
@@ -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