Add text coloring for inspected solution containers, code cleanup (#2010)

* Initial commit

* remove helper

* fixes

* small fix
This commit is contained in:
nuke
2020-09-09 18:32:31 -04:00
committed by GitHub
parent f7a5bad839
commit 753a627c75
56 changed files with 981 additions and 726 deletions

View File

@@ -45,16 +45,16 @@ namespace Content.Server.GameObjects.Components.Fluids
set => _sprayVelocity = value;
}
public ReagentUnit CurrentVolume => Owner.GetComponentOrNull<SolutionComponent>()?.CurrentVolume ?? ReagentUnit.Zero;
public ReagentUnit CurrentVolume => Owner.GetComponentOrNull<SolutionContainerComponent>()?.CurrentVolume ?? ReagentUnit.Zero;
public override void Initialize()
{
base.Initialize();
if (!Owner.EnsureComponent(out SolutionComponent _))
if (!Owner.EnsureComponent(out SolutionContainerComponent _))
{
Logger.Warning(
$"Entity {Owner.Name} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionComponent)}");
$"Entity {Owner.Name} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionContainerComponent)}");
}
}
@@ -78,7 +78,7 @@ namespace Content.Server.GameObjects.Components.Fluids
if (eventArgs.ClickLocation.GetGridId(_serverEntityManager) != playerPos.GetGridId(_serverEntityManager))
return;
if (!Owner.TryGetComponent(out SolutionComponent contents))
if (!Owner.TryGetComponent(out SolutionContainerComponent contents))
return;
var direction = (eventArgs.ClickLocation.Position - playerPos.Position).Normalized;