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 deltanedas
parent 737d8322d3
commit 9d59c6ad72
1 changed files with 2 additions and 1 deletions

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;