Add item sprite test (#21599)

This commit is contained in:
Leon Friedrich
2023-11-18 19:26:08 +13:00
committed by GitHub
parent 3439cdf03e
commit 69af567269
10 changed files with 115 additions and 25 deletions

View File

@@ -425,25 +425,6 @@ we are just going to end this here to save a lot of time. This is the exception
Assert.That(passed);
}
/// <summary>
/// Helper method that retrieves all entity prototypes that have some component.
/// </summary>
public static List<EntityPrototype> GetPrototypesWithComponent<T>(RobustIntegrationTest.IntegrationInstance instance) where T : IComponent
{
var protoMan = instance.ResolveDependency<IPrototypeManager>();
var compFact = instance.ResolveDependency<IComponentFactory>();
var id = compFact.GetComponentName(typeof(T));
var list = new List<EntityPrototype>();
foreach (var ent in protoMan.EnumeratePrototypes<EntityPrototype>())
{
if (ent.Components.ContainsKey(id))
list.Add(ent);
}
return list;
}
/// <summary>
/// Initialize the pool manager.
/// </summary>