mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-15 14:52:35 +02:00
Remove Debug asserts
This commit is contained in:
@@ -76,22 +76,16 @@ namespace Robust.Shared.GameObjects
|
||||
|
||||
public T GetComponent<T>()
|
||||
{
|
||||
DebugTools.Assert(!((!IoCManager.Resolve<IEntityManager>().EntityExists(Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Uid).EntityLifeStage) >= EntityLifeStage.Deleted), "Tried to get component on a deleted entity.");
|
||||
|
||||
return IoCManager.Resolve<IEntityManager>().GetComponent<T>(Uid);
|
||||
}
|
||||
|
||||
public IComponent GetComponent(Type type)
|
||||
{
|
||||
DebugTools.Assert(!((!IoCManager.Resolve<IEntityManager>().EntityExists(Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Uid).EntityLifeStage) >= EntityLifeStage.Deleted), "Tried to get component on a deleted entity.");
|
||||
|
||||
return IoCManager.Resolve<IEntityManager>().GetComponent(Uid, type);
|
||||
}
|
||||
|
||||
public bool TryGetComponent<T>([NotNullWhen(true)] out T? component) where T : class
|
||||
{
|
||||
DebugTools.Assert(!((!IoCManager.Resolve<IEntityManager>().EntityExists(Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Uid).EntityLifeStage) >= EntityLifeStage.Deleted), "Tried to get component on a deleted entity.");
|
||||
|
||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(Uid, out component);
|
||||
}
|
||||
|
||||
@@ -102,8 +96,6 @@ namespace Robust.Shared.GameObjects
|
||||
|
||||
public bool TryGetComponent(Type type, [NotNullWhen(true)] out IComponent? component)
|
||||
{
|
||||
DebugTools.Assert(!((!IoCManager.Resolve<IEntityManager>().EntityExists(Uid) ? EntityLifeStage.Deleted : IoCManager.Resolve<IEntityManager>().GetComponent<MetaDataComponent>(Uid).EntityLifeStage) >= EntityLifeStage.Deleted), "Tried to get component on a deleted entity.");
|
||||
|
||||
return IoCManager.Resolve<IEntityManager>().TryGetComponent(Uid, type, out component);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user