[Stable] Fix metabolism shuffle (#42795)

* yeah

* move up

* fssaf

---------

Co-authored-by: Princess Cheeseballs <66055347+Pronana@users.noreply.github.com>
This commit is contained in:
ScarKy0 2026-02-05 08:55:28 +01:00 committed by Coryler
parent df401ff47c
commit 57155b811d
1 changed files with 7 additions and 1 deletions

View File

@ -1,7 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using Content.Shared.Body.Events;
using Content.Shared.Body.Systems;
using Content.Shared.Body;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.Components.SolutionManager;
@ -16,6 +15,7 @@ using Content.Shared.EntityEffects.Effects.Solution;
using Content.Shared.FixedPoint;
using Content.Shared.Mobs.Systems;
using Robust.Shared.Collections;
using Robust.Shared.Network;
using Robust.Shared.Prototypes;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@ -32,6 +32,7 @@ public sealed class MetabolizerSystem : EntitySystem
[Dependency] private readonly SharedEntityConditionsSystem _entityConditions = default!;
[Dependency] private readonly SharedEntityEffectsSystem _entityEffects = default!;
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly INetManager _net = default!;
private EntityQuery<OrganComponent> _organQuery;
private EntityQuery<SolutionContainerManagerComponent> _solutionQuery;
@ -61,6 +62,11 @@ public sealed class MetabolizerSystem : EntitySystem
{
base.Update(frameTime);
// We only do this on the server to prevent the client from reshuffling metabolism during prediction.
// Should just be replaced with predicted random.
if (_net.IsClient)
return;
var metabolizers = new ValueList<(EntityUid Uid, MetabolizerComponent Component)>(Count<MetabolizerComponent>());
var query = EntityQueryEnumerator<MetabolizerComponent>();