diff --git a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs index 5018be46ce1f60..04e70c52418159 100644 --- a/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs +++ b/Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs @@ -740,11 +740,11 @@ private void OnInsertAttempt(EntityUid uid, StorageComponent component, Containe } } - public void UpdateAppearance(Entity entity) + public void UpdateAppearance(Entity entity) { // TODO STORAGE remove appearance data and just use the data on the component. - var (uid, storage, appearance, storageFillVis) = entity; - if (!Resolve(uid, ref storage, ref appearance, ref storageFillVis, false)) + var (uid, storage, appearance) = entity; + if (!Resolve(uid, ref storage, ref appearance, false)) return; // ReSharper disable once ConditionIsAlwaysTrueOrFalseAccordingToNullableAPIContract @@ -753,7 +753,6 @@ public void UpdateAppearance(Entity(uid, out var storageFillVisualizerComp)) + { + var level = ContentHelpers.RoundToLevels(used, capacity, storageFillVisualizerComp.MaxFillLevels); + _appearance.SetData(uid, StorageFillVisuals.FillLevel, level, appearance); + } // HideClosedStackVisuals true sets the StackVisuals.Hide to the open state of the storage. // This is for containers that only show their contents when open. (e.g. donut boxes)