diff --git a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs index 65195fcfca..8b0b1e41cf 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/EntityStorageComponent.cs @@ -31,6 +31,7 @@ namespace Content.Server.GameObjects.Components private Container Contents; private IEntityQuery entityQuery; private bool _locked; + private bool _showContents; /// /// Determines if the storage is locked, meaning it cannot be opened. @@ -42,12 +43,28 @@ namespace Content.Server.GameObjects.Components set => _locked = value; } + /// + /// Determines if the container contents should be drawn when the container is closed. + /// + [ViewVariables(VVAccess.ReadWrite)] + public bool ShowContents + { + get => _showContents; + set + { + _showContents = value; + Contents.ShowContents = _showContents; + } + } + /// public override void Initialize() { base.Initialize(); Contents = ContainerManagerComponent.Ensure(nameof(EntityStorageComponent), Owner); entityQuery = new IntersectingEntityQuery(Owner); + + Contents.ShowContents = _showContents; } /// @@ -58,6 +75,7 @@ namespace Content.Server.GameObjects.Components serializer.DataField(ref StorageCapacityMax, "Capacity", 30); serializer.DataField(ref IsCollidableWhenOpen, "IsCollidableWhenOpen", false); serializer.DataField(ref _locked, "locked", false); + serializer.DataField(ref _showContents, "showContents", false); } [ViewVariables] diff --git a/RobustToolbox b/RobustToolbox index 9b5b8205b9..8d30bcb041 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 9b5b8205b906190092f9b62f59fad0f00858b0b7 +Subproject commit 8d30bcb041a815a5a740d2a56d5007bf5ed2c105