diff --git a/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs b/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs index 035fe4e6ce..d66758f9a5 100644 --- a/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs +++ b/Content.Client/GameObjects/Components/Storage/BagOpenCloseVisualizer.cs @@ -7,6 +7,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.Log; using Robust.Shared.Utility; using YamlDotNet.RepresentationModel; +using static Robust.Shared.Utility.SpriteSpecifier; namespace Content.Client.GameObjects.Components.Storage { @@ -34,11 +35,12 @@ namespace Content.Client.GameObjects.Components.Storage { base.InitializeEntity(entity); - if (_openIcon != null && entity.TryGetComponent(out var spriteComponent)) + if (_openIcon != null && + entity.TryGetComponent(out var spriteComponent) && + spriteComponent.BaseRSI?.Path != null) { - var rsiPath = spriteComponent.BaseRSI!.Path!; spriteComponent.LayerMapReserveBlank(OpenIcon); - spriteComponent.LayerSetSprite(OpenIcon, new SpriteSpecifier.Rsi(rsiPath, _openIcon)); + spriteComponent.LayerSetSprite(OpenIcon, new Rsi(spriteComponent.BaseRSI.Path, _openIcon)); spriteComponent.LayerSetVisible(OpenIcon, false); } } diff --git a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml index 6d6f33657a..79ac055ba7 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/Smokeables/Cigarettes/packs.yml @@ -4,9 +4,6 @@ name: cigarette pack abstract: true components: - - type: Sprite - netsync: false - state: closed - type: Storage capacity: 6 - type: Item @@ -38,6 +35,7 @@ description: "A label on the packaging reads, 'Wouldn't a slow death make a change?'" components: - type: Sprite + netsync: false sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/green.rsi layers: - state: closed @@ -52,6 +50,7 @@ description: "The most popular brand of Space Cigarettes, sponsors of the Space Olympics." components: - type: Sprite + netsync: false sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/red.rsi layers: - state: closed @@ -66,6 +65,7 @@ description: "For those who somehow want to obtain the record for the most amount of cancerous tumors." components: - type: Sprite + netsync: false sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/blue.rsi layers: - state: closed @@ -80,6 +80,7 @@ description: "Nomads's extra strong, for when your life is more extra hard." components: - type: Sprite + netsync: false sprite: Objects/Consumable/Smokeables/Cigarettes/Packs/black.rsi layers: - state: closed