Fix metamorphic glass name mispredict (#16550)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Rounding;
|
||||
using Robust.Client.GameObjects;
|
||||
@@ -64,17 +64,12 @@ public sealed class SolutionContainerVisualsSystem : VisualizerSystem<SolutionCo
|
||||
{
|
||||
_prototype.TryIndex<ReagentPrototype>(baseOverride, out var reagentProto);
|
||||
|
||||
var metadata = MetaData(uid);
|
||||
|
||||
if (reagentProto?.MetamorphicSprite is { } sprite)
|
||||
{
|
||||
args.Sprite.LayerSetSprite(baseLayer, sprite);
|
||||
args.Sprite.LayerSetVisible(fillLayer, false);
|
||||
if (hasOverlay)
|
||||
args.Sprite.LayerSetVisible(overlayLayer, false);
|
||||
metadata.EntityName = Loc.GetString(component.MetamorphicNameFull,
|
||||
("name", reagentProto.LocalizedName));
|
||||
metadata.EntityDescription = reagentProto.LocalizedDescription;
|
||||
return;
|
||||
}
|
||||
else
|
||||
@@ -82,8 +77,6 @@ public sealed class SolutionContainerVisualsSystem : VisualizerSystem<SolutionCo
|
||||
if (hasOverlay)
|
||||
args.Sprite.LayerSetVisible(overlayLayer, true);
|
||||
args.Sprite.LayerSetSprite(baseLayer, component.MetamorphicDefaultSprite);
|
||||
metadata.EntityName = component.InitialName;
|
||||
metadata.EntityDescription = component.InitialDescription;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user