Added sink (#14348)

This commit is contained in:
Topy
2023-07-01 00:10:47 +02:00
committed by GitHub
parent 7d89b9e253
commit b85c902189
36 changed files with 484 additions and 104 deletions

View File

@@ -25,6 +25,16 @@ public sealed class SolutionContainerVisualsSystem : VisualizerSystem<SolutionCo
protected override void OnAppearanceChange(EntityUid uid, SolutionContainerVisualsComponent component, ref AppearanceChangeEvent args)
{
// Check if the solution that was updated is the one set as represented
if (!string.IsNullOrEmpty(component.SolutionName))
{
if (AppearanceSystem.TryGetData<string>(uid, SolutionContainerVisuals.SolutionName, out var name,
args.Component) && name != component.SolutionName)
{
return;
}
}
if (!AppearanceSystem.TryGetData<float>(uid, SolutionContainerVisuals.FillFraction, out var fraction, args.Component))
return;