diff --git a/Content.Client/GameObjects/Components/Kitchen/MicrowaveBoundUserInterface.cs b/Content.Client/GameObjects/Components/Kitchen/MicrowaveBoundUserInterface.cs index 759db29e68..b838914889 100644 --- a/Content.Client/GameObjects/Components/Kitchen/MicrowaveBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Kitchen/MicrowaveBoundUserInterface.cs @@ -4,6 +4,7 @@ using Content.Shared.Chemistry; using Content.Shared.Kitchen; using Robust.Client.GameObjects; using Robust.Client.GameObjects.Components.UserInterface; +using Robust.Client.Graphics; using Robust.Client.Graphics.Drawing; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; @@ -109,11 +110,21 @@ namespace Content.Client.GameObjects.Components.Kitchen { return; } - if (entity.Deleted || !entity.TryGetComponent(out SpriteComponent spriteComponent)) + if (entity.Deleted) { continue; } - var solidItem = _menu.IngredientsList.AddItem(entity.Name, spriteComponent.Icon); + + Texture texture; + if (entity.TryGetComponent(out IconComponent iconComponent)) + { + texture = iconComponent.Icon?.Default; + }else if (entity.TryGetComponent(out SpriteComponent spriteComponent)) + { + texture = spriteComponent.Icon?.Default; + }else{continue;} + + var solidItem = _menu.IngredientsList.AddItem(entity.Name, texture); var solidIndex = _menu.IngredientsList.IndexOf(solidItem); _solids.Add(solidIndex, containedSolids[j]); diff --git a/Content.Client/VendingMachines/VendingMachineMenu.cs b/Content.Client/VendingMachines/VendingMachineMenu.cs index 5f9e14aa53..821fde51b3 100644 --- a/Content.Client/VendingMachines/VendingMachineMenu.cs +++ b/Content.Client/VendingMachines/VendingMachineMenu.cs @@ -50,7 +50,7 @@ namespace Content.Client.VendingMachines Texture icon = null; if(_prototypeManager.TryIndex(entry.ID, out EntityPrototype prototype)) { - icon = SpriteComponent.GetPrototypeIcon(prototype, _resourceCache); + icon = SpriteComponent.GetPrototypeIcon(prototype, _resourceCache)?.Default; } _items.AddItem($"{itemName} ({entry.Amount} left)", icon); } diff --git a/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml b/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml index 6ea909588f..fc27376454 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml @@ -10,7 +10,6 @@ netsync: false drawdepth: Mobs # They're on the same layer as mobs, perspective. sprite: Constructible/Structures/Doors/airlock_basic.rsi - preview_state: closed layers: - state: closed map: ["enum.DoorVisualLayers.Base"] @@ -24,7 +23,9 @@ map: ["enum.DoorVisualLayers.BaseBolted"] - state: panel_open map: ["enum.WiresVisualLayers.MaintenancePanel"] - + - type: Icon + sprite: Constructible/Structures/Doors/airlock_basic.rsi + state: closed - type: Collidable shapes: - !type:PhysShapeAabb diff --git a/Resources/Prototypes/Entities/Constructible/Ground/catwalk.yml b/Resources/Prototypes/Entities/Constructible/Ground/catwalk.yml index 3a67fefe2e..70f932672b 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/catwalk.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/catwalk.yml @@ -9,9 +9,10 @@ - type: Sprite netsync: false sprite: Constructible/Tiles/catwalk.rsi - preview_state: catwalk_preview drawdepth: FloorTiles - + - type: Icon + sprite: Constructible/Tiles/catwalk.rsi + state: catwalk_preview - type: SnapGrid offset: Center - type: IconSmooth diff --git a/Resources/Prototypes/Entities/Constructible/Ground/table.yml b/Resources/Prototypes/Entities/Constructible/Ground/table.yml index 139173b503..6933c0a044 100644 --- a/Resources/Prototypes/Entities/Constructible/Ground/table.yml +++ b/Resources/Prototypes/Entities/Constructible/Ground/table.yml @@ -9,7 +9,9 @@ - type: Sprite netsync: false sprite: Constructible/Structures/Tables/generic.rsi - + - type: Icon + sprite: Constructible/Structures/Tables/generic.rsi + state: plain_preview - type: Collidable shapes: - !type:PhysShapeAabb @@ -38,6 +40,9 @@ netsync: false sprite: Constructible/Structures/Tables/wood.rsi preview_state: icon + - type: Icon + sprite: Constructible/Structures/Tables/wood.rsi + state: icon - type: Collidable shapes: - !type:PhysShapeAabb diff --git a/Resources/Prototypes/Entities/Constructible/Walls/walls.yml b/Resources/Prototypes/Entities/Constructible/Walls/walls.yml index ffe1e0f3a1..c4697594a7 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/walls.yml @@ -14,7 +14,8 @@ - type: Sprite netsync: false drawdepth: Walls - + - type: Icon + state: full - type: Collidable shapes: - !type:PhysShapeAabb @@ -34,7 +35,6 @@ - type: SnapGrid offset: Center - type: Airtight - - type: IconSmooth key: walls base: solid @@ -46,7 +46,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/brick.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/brick.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -62,7 +63,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/clock.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/clock.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -78,7 +80,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/clown.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/clown.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -95,7 +98,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/cult.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/cult.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -111,7 +115,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/debug.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/debug.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -127,7 +132,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/diamond.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/diamond.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -144,7 +150,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/gold.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/gold.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -160,7 +167,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/ice.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/ice.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -176,7 +184,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/metal.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/metal.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -192,7 +201,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/plasma.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/plasma.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -208,7 +218,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/plastic.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/plastic.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -225,7 +236,9 @@ - type: Sprite color: "#889192" sprite: Constructible/Structures/Walls/solid.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/solid.rsi + state: rgeneric - type: Destructible deadThreshold: 600 spawnOnDestroy: Girder @@ -243,7 +256,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/riveted.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/riveted.rsi - type: Destructible deadThreshold: 1000 spawnOnDestroy: Girder @@ -259,7 +273,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/sandstone.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/sandstone.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -275,7 +290,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/silver.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/silver.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -292,7 +308,8 @@ - type: Sprite color: "#889192" sprite: Constructible/Structures/Walls/solid.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/solid.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -309,7 +326,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/uranium.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/uranium.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder @@ -325,7 +343,8 @@ components: - type: Sprite sprite: Constructible/Structures/Walls/wood.rsi - + - type: Icon + sprite: Constructible/Structures/Walls/wood.rsi - type: Destructible deadThreshold: 300 spawnOnDestroy: Girder diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index eec6108039..48db003704 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -32,6 +32,9 @@ - type: Inventory - type: Clickable - type: InteractionOutline + - type: Icon + sprite: Mobs/Species/Human/parts.rsi + state: full - type: Sprite netsync: false drawdepth: Mobs @@ -209,6 +212,9 @@ components: - type: Hands - type: Inventory + - type: Icon + sprite: Mobs/Species/Human/parts.rsi + state: full - type: Sprite netsync: false drawdepth: Mobs