From 59bfbc466bba95bc5ab30dce6f5accca0239ae4b Mon Sep 17 00:00:00 2001 From: Winkarst <74284083+Winkarst-cpu@users.noreply.github.com> Date: Mon, 24 Feb 2025 20:57:39 +0300 Subject: [PATCH] Cleanup: Pass in ``IComponentFactory`` in ``EntityPrototype.TryGetComponent`` calls inside ``ImmovableRodRule`` (#35462) Cleanup (cherry picked from commit 45e7891706dea63db3c6edafbedf8afbef44f531) --- Content.Server/StationEvents/Events/ImmovableRodRule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Content.Server/StationEvents/Events/ImmovableRodRule.cs b/Content.Server/StationEvents/Events/ImmovableRodRule.cs index d4158dea66..5e324a529b 100644 --- a/Content.Server/StationEvents/Events/ImmovableRodRule.cs +++ b/Content.Server/StationEvents/Events/ImmovableRodRule.cs @@ -3,6 +3,7 @@ using Content.Server.GameTicking.Rules.Components; using Content.Server.ImmovableRod; using Content.Server.StationEvents.Components; using Content.Server.Weapons.Ranged.Systems; +using Content.Shared.GameTicking.Components; using Content.Shared.Storage; using Robust.Shared.Prototypes; using Robust.Shared.Random; @@ -25,7 +26,8 @@ public sealed class ImmovableRodRule : StationEventSystem(protoName); - if (proto.TryGetComponent(out var rod) && proto.TryGetComponent(out var despawn)) + if (proto.TryGetComponent(out var rod, EntityManager.ComponentFactory) && + proto.TryGetComponent(out var despawn, EntityManager.ComponentFactory)) { if (!TryFindRandomTile(out _, out _, out _, out var targetCoords)) return;