Inline UID

This commit is contained in:
Vera Aguilera Puerto
2021-12-03 15:53:09 +01:00
parent 2654775bf0
commit 5cd42c9ad6
803 changed files with 3613 additions and 3577 deletions

View File

@@ -17,7 +17,7 @@ namespace Content.Server.Body.Components
var old = BreathToolEntity;
BreathToolEntity = null;
if (old != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(old.Uid, out BreathToolComponent? breathTool) )
if (old != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(old, out BreathToolComponent? breathTool) )
{
breathTool.DisconnectInternals();
DisconnectTank();
@@ -26,7 +26,7 @@ namespace Content.Server.Body.Components
public void ConnectBreathTool(IEntity toolEntity)
{
if (BreathToolEntity != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(BreathToolEntity.Uid, out BreathToolComponent? tool))
if (BreathToolEntity != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(BreathToolEntity, out BreathToolComponent? tool))
{
tool.DisconnectInternals();
}
@@ -36,7 +36,7 @@ namespace Content.Server.Body.Components
public void DisconnectTank()
{
if (GasTankEntity != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(GasTankEntity.Uid, out GasTankComponent? tank))
if (GasTankEntity != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(GasTankEntity, out GasTankComponent? tank))
{
tank.DisconnectFromInternals(Owner);
}
@@ -49,7 +49,7 @@ namespace Content.Server.Body.Components
if (BreathToolEntity == null)
return false;
if (GasTankEntity != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(GasTankEntity.Uid, out GasTankComponent? tank))
if (GasTankEntity != null && IoCManager.Resolve<IEntityManager>().TryGetComponent(GasTankEntity, out GasTankComponent? tank))
{
tank.DisconnectFromInternals(Owner);
}
@@ -62,9 +62,9 @@ namespace Content.Server.Body.Components
{
return BreathToolEntity != null &&
GasTankEntity != null &&
IoCManager.Resolve<IEntityManager>().TryGetComponent(BreathToolEntity.Uid, out BreathToolComponent? breathTool) &&
IoCManager.Resolve<IEntityManager>().TryGetComponent(BreathToolEntity, out BreathToolComponent? breathTool) &&
breathTool.IsFunctional &&
IoCManager.Resolve<IEntityManager>().TryGetComponent(GasTankEntity.Uid, out GasTankComponent? gasTank) &&
IoCManager.Resolve<IEntityManager>().TryGetComponent(GasTankEntity, out GasTankComponent? gasTank) &&
gasTank.Air != null;
}