Remove some unnecessary EntityQuery<T> and warns (#4167)

This commit is contained in:
metalgearsloth
2023-07-02 01:12:45 +10:00
committed by GitHub
parent d4902a9714
commit e763d59617
19 changed files with 386 additions and 373 deletions

View File

@@ -26,6 +26,7 @@ using Robust.Shared.Physics.Systems;
using Robust.Shared.Prototypes;
using Robust.Shared.Reflection;
using Robust.Shared.Utility;
using EyeComponent = Robust.Server.GameObjects.EyeComponent;
namespace Robust.UnitTesting
{
@@ -127,6 +128,11 @@ namespace Robust.UnitTesting
// Why are we still here? Just to suffer? Why can't we just use [RegisterComponent] magic?
var compFactory = deps.Resolve<IComponentFactory>();
if (!compFactory.AllRegisteredTypes.Contains(typeof(EyeComponent)))
{
compFactory.RegisterClass<EyeComponent>();
}
if (!compFactory.AllRegisteredTypes.Contains(typeof(MapComponent)))
{
compFactory.RegisterClass<MapComponent>();