CompFactory updates (#37559)

This commit is contained in:
metalgearsloth
2025-05-20 15:08:55 +10:00
committed by GitHub
parent bc0139f961
commit 0d4f9640b5
38 changed files with 70 additions and 102 deletions

View File

@@ -21,7 +21,6 @@ public sealed class PayloadSystem : EntitySystem
[Dependency] private readonly SharedSolutionContainerSystem _solutionContainerSystem = default!;
[Dependency] private readonly TransformSystem _transform = default!;
[Dependency] private readonly IAdminLogManager _adminLogger = default!;
[Dependency] private readonly IComponentFactory _componentFactory = default!;
[Dependency] private readonly ISerializationManager _serializationManager = default!;
private static readonly ProtoId<TagPrototype> PayloadTag = "Payload";
@@ -92,13 +91,13 @@ public sealed class PayloadSystem : EntitySystem
// ANY payload trigger that gets inserted can grant components. It is up to the construction graphs to determine trigger capacity.
foreach (var (name, data) in trigger.Components)
{
if (!_componentFactory.TryGetRegistration(name, out var registration))
if (!Factory.TryGetRegistration(name, out var registration))
continue;
if (HasComp(uid, registration.Type))
continue;
if (_componentFactory.GetComponent(registration.Type) is not Component component)
if (Factory.GetComponent(registration.Type) is not Component component)
continue;
var temp = (object) component;