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

@@ -19,7 +19,6 @@ namespace Content.Server.UserInterface;
public sealed class StatValuesCommand : IConsoleCommand
{
[Dependency] private readonly EuiManager _eui = default!;
[Dependency] private readonly IComponentFactory _factory = default!;
[Dependency] private readonly IEntityManager _entManager = default!;
[Dependency] private readonly IPrototypeManager _proto = default!;
@@ -174,7 +173,7 @@ public sealed class StatValuesCommand : IConsoleCommand
private StatValuesEuiMessage GetMelee()
{
var values = new List<string[]>();
var meleeName = _factory.GetComponentName(typeof(MeleeWeaponComponent));
var meleeName = _entManager.ComponentFactory.GetComponentName<MeleeWeaponComponent>();
foreach (var proto in _proto.EnumeratePrototypes<EntityPrototype>())
{
@@ -257,7 +256,7 @@ public sealed class StatValuesCommand : IConsoleCommand
private StatValuesEuiMessage GetDrawRateMessage()
{
var values = new List<string[]>();
var powerName = _factory.GetComponentName(typeof(ApcPowerReceiverComponent));
var powerName = _entManager.ComponentFactory.GetComponentName<ApcPowerReceiverComponent>();
foreach (var proto in _proto.EnumeratePrototypes<EntityPrototype>())
{