CompFactory updates (#37559)
This commit is contained in:
@@ -103,7 +103,7 @@ namespace Content.IntegrationTests.Tests.Construction
|
||||
var protoMan = server.ResolveDependency<IPrototypeManager>();
|
||||
var compFact = server.ResolveDependency<IComponentFactory>();
|
||||
|
||||
var name = compFact.GetComponentName(typeof(ConstructionComponent));
|
||||
var name = compFact.GetComponentName<ConstructionComponent>();
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
foreach (var proto in protoMan.EnumeratePrototypes<EntityPrototype>())
|
||||
|
||||
@@ -77,7 +77,7 @@ public abstract partial class InteractionTest
|
||||
StackComponent? stack = null;
|
||||
await server.WaitPost(() =>
|
||||
{
|
||||
entProto.TryGetComponent(factory.GetComponentName(typeof(StackComponent)), out stack);
|
||||
entProto.TryGetComponent(factory.GetComponentName<StackComponent>(), out stack);
|
||||
});
|
||||
|
||||
if (stack != null)
|
||||
@@ -107,7 +107,7 @@ public abstract partial class InteractionTest
|
||||
StackComponent? stack = null;
|
||||
await Server.WaitPost(() =>
|
||||
{
|
||||
entProto.TryGetComponent(Factory.GetComponentName(typeof(StackComponent)), out stack);
|
||||
entProto.TryGetComponent(Factory.GetComponentName<StackComponent>(), out stack);
|
||||
});
|
||||
|
||||
if (stack != null)
|
||||
|
||||
@@ -134,7 +134,7 @@ public abstract partial class InteractionTest
|
||||
StackComponent? stack = null;
|
||||
await server.WaitPost(() =>
|
||||
{
|
||||
entProto.TryGetComponent(factory.GetComponentName(typeof(StackComponent)), out stack);
|
||||
entProto.TryGetComponent(factory.GetComponentName<StackComponent>(), out stack);
|
||||
});
|
||||
|
||||
if (stack == null)
|
||||
|
||||
@@ -63,11 +63,11 @@ public sealed class MaterialArbitrageTest
|
||||
|
||||
Assert.That(mapSystem.IsInitialized(testMap.MapId));
|
||||
|
||||
var constructionName = compFact.GetComponentName(typeof(ConstructionComponent));
|
||||
var compositionName = compFact.GetComponentName(typeof(PhysicalCompositionComponent));
|
||||
var materialName = compFact.GetComponentName(typeof(MaterialComponent));
|
||||
var destructibleName = compFact.GetComponentName(typeof(DestructibleComponent));
|
||||
var refinableName = compFact.GetComponentName(typeof(ToolRefinableComponent));
|
||||
var constructionName = compFact.GetComponentName<ConstructionComponent>();
|
||||
var compositionName = compFact.GetComponentName<PhysicalCompositionComponent>();
|
||||
var materialName = compFact.GetComponentName<MaterialComponent>();
|
||||
var destructibleName = compFact.GetComponentName<DestructibleComponent>();
|
||||
var refinableName = compFact.GetComponentName<ToolRefinableComponent>();
|
||||
|
||||
// get the inverted lathe recipe dictionary
|
||||
var latheRecipes = latheSys.InverseRecipes;
|
||||
|
||||
@@ -18,7 +18,7 @@ public sealed class RoleTests
|
||||
{
|
||||
await using var pair = await PoolManager.GetServerClient();
|
||||
|
||||
var jobComp = pair.Server.ResolveDependency<IComponentFactory>().GetComponentName(typeof(JobRoleComponent));
|
||||
var jobComp = pair.Server.ResolveDependency<IComponentFactory>().GetComponentName<JobRoleComponent>();
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
@@ -49,7 +49,7 @@ public sealed class RoleTests
|
||||
{
|
||||
await using var pair = await PoolManager.GetServerClient();
|
||||
|
||||
var mindCompId = pair.Server.ResolveDependency<IComponentFactory>().GetComponentName(typeof(MindRoleComponent));
|
||||
var mindCompId = pair.Server.ResolveDependency<IComponentFactory>().GetComponentName<MindRoleComponent>();
|
||||
|
||||
Assert.Multiple(() =>
|
||||
{
|
||||
@@ -73,7 +73,7 @@ public sealed class RoleTests
|
||||
await using var pair = await PoolManager.GetServerClient();
|
||||
|
||||
var refMan = pair.Server.ResolveDependency<IReflectionManager>();
|
||||
var mindCompId = pair.Server.ResolveDependency<IComponentFactory>().GetComponentName(typeof(MindRoleComponent));
|
||||
var mindCompId = pair.Server.ResolveDependency<IComponentFactory>().GetComponentName<MindRoleComponent>();
|
||||
|
||||
var compTypes = refMan.GetAllChildren(typeof(BaseMindRoleComponent))
|
||||
.Append(typeof(RoleBriefingComponent))
|
||||
|
||||
@@ -85,7 +85,7 @@ namespace Content.IntegrationTests.Tests
|
||||
var entMan = server.ResolveDependency<IEntityManager>();
|
||||
var protoMan = server.ResolveDependency<IPrototypeManager>();
|
||||
var compFact = server.ResolveDependency<IComponentFactory>();
|
||||
var id = compFact.GetComponentName(typeof(StorageFillComponent));
|
||||
var id = compFact.GetComponentName<StorageFillComponent>();
|
||||
|
||||
var itemSys = entMan.System<SharedItemSystem>();
|
||||
|
||||
@@ -173,7 +173,7 @@ namespace Content.IntegrationTests.Tests
|
||||
var entMan = server.ResolveDependency<IEntityManager>();
|
||||
var protoMan = server.ResolveDependency<IPrototypeManager>();
|
||||
var compFact = server.ResolveDependency<IComponentFactory>();
|
||||
var id = compFact.GetComponentName(typeof(StorageFillComponent));
|
||||
var id = compFact.GetComponentName<StorageFillComponent>();
|
||||
|
||||
var itemSys = entMan.System<SharedItemSystem>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user