Fix trash bag visuals (#32386)
* First commit * Dont even look what I did at first I'm silly * more negative diff!!
This commit is contained in:
@@ -40,6 +40,7 @@ using Robust.Shared.Random;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Timing;
|
||||
using Robust.Shared.Utility;
|
||||
using Content.Shared.Rounding;
|
||||
|
||||
namespace Content.Shared.Storage.EntitySystems;
|
||||
|
||||
@@ -880,6 +881,12 @@ public abstract class SharedStorageSystem : EntitySystem
|
||||
_appearance.SetData(uid, StorageVisuals.Open, isOpen, appearance);
|
||||
_appearance.SetData(uid, SharedBagOpenVisuals.BagState, isOpen ? SharedBagState.Open : SharedBagState.Closed, appearance);
|
||||
|
||||
if (TryComp<StorageFillVisualizerComponent>(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)
|
||||
if (storage.HideStackVisualsWhenClosed)
|
||||
|
||||
Reference in New Issue
Block a user