Cleanup: Pass in `IComponentFactory in EntityPrototype.TryGetComponent calls inside ImmovableRodRule` (#35462)

Cleanup
This commit is contained in:
Winkarst
2025-02-24 20:57:39 +03:00
committed by GitHub
parent 22398ea342
commit 45e7891706

View File

@@ -26,7 +26,8 @@ public sealed class ImmovableRodRule : StationEventSystem<ImmovableRodRuleCompon
var proto = _prototypeManager.Index<EntityPrototype>(protoName);
if (proto.TryGetComponent<ImmovableRodComponent>(out var rod) && proto.TryGetComponent<TimedDespawnComponent>(out var despawn))
if (proto.TryGetComponent<ImmovableRodComponent>(out var rod, EntityManager.ComponentFactory) &&
proto.TryGetComponent<TimedDespawnComponent>(out var despawn, EntityManager.ComponentFactory))
{
if (!TryFindRandomTile(out _, out _, out _, out var targetCoords))
return;