From 94c00dda9524e283f718503d301f56fcdab1e6c4 Mon Sep 17 00:00:00 2001 From: Ephememory Date: Thu, 21 Nov 2019 17:46:37 -0500 Subject: [PATCH] Fix various bugs with construction (#446) --- Content.Client/Construction/ConstructionMenu.cs | 14 +++++++------- .../Construction/ConstructionComponent.cs | 11 ++++++++++- Resources/Prototypes/Construction/structures.yml | 8 +++++--- Resources/Prototypes/Construction/weapons.yml | 3 ++- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Content.Client/Construction/ConstructionMenu.cs b/Content.Client/Construction/ConstructionMenu.cs index 5e0c359b02..c5c727f091 100644 --- a/Content.Client/Construction/ConstructionMenu.cs +++ b/Content.Client/Construction/ConstructionMenu.cs @@ -161,17 +161,17 @@ namespace Content.Client.Construction { case ConstructionStepMaterial.MaterialType.Metal: icon = ResourceCache.GetResource( - "/Textures/Objects/sheet_metal.png"); + "/Textures/Objects/Materials/sheet_metal.png"); text = $"Metal x{mat.Amount}"; break; case ConstructionStepMaterial.MaterialType.Glass: icon = ResourceCache.GetResource( - "/Textures/Objects/sheet_glass.png"); + "/Textures/Objects/Materials/sheet_glass.png"); text = $"Glass x{mat.Amount}"; break; case ConstructionStepMaterial.MaterialType.Cable: icon = ResourceCache.GetResource( - "/Textures/Objects/cable_coil.png"); + "/Textures/Objects/Tools/cable_coil.png"); text = $"Cable Coil x{mat.Amount}"; break; default: @@ -183,16 +183,16 @@ namespace Content.Client.Construction switch (tool.Tool) { case ConstructionStepTool.ToolType.Wrench: - icon = ResourceCache.GetResource("/Textures/Objects/wrench.png"); + icon = ResourceCache.GetResource("/Textures/Objects/Tools/wrench.png"); text = "Wrench"; break; case ConstructionStepTool.ToolType.Crowbar: - icon = ResourceCache.GetResource("/Textures/Objects/crowbar.png"); + icon = ResourceCache.GetResource("/Textures/Objects/Tools/crowbar.png"); text = "Crowbar"; break; case ConstructionStepTool.ToolType.Screwdriver: icon = ResourceCache.GetResource( - "/Textures/Objects/screwdriver.png"); + "/Textures/Objects/Tools/screwdriver.png"); text = "Screwdriver"; break; case ConstructionStepTool.ToolType.Welder: @@ -202,7 +202,7 @@ namespace Content.Client.Construction break; case ConstructionStepTool.ToolType.Wirecutters: icon = ResourceCache.GetResource( - "/Textures/Objects/wirecutter.png"); + "/Textures/Objects/Tools/wirecutter.png"); text = "Wirecutters"; break; default: diff --git a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs index a44c4b8e27..8f197e01ac 100644 --- a/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs +++ b/Content.Server/GameObjects/Components/Construction/ConstructionComponent.cs @@ -91,7 +91,16 @@ namespace Content.Server.GameObjects.Components.Construction { Prototype = prototype; Stage = 1; - Sprite.AddLayerWithSprite(prototype.Stages[1].Icon); + if(prototype.Stages[1].Icon != null) + { + Sprite.AddLayerWithSprite(prototype.Stages[1].Icon); + } + else + { + Sprite.AddLayerWithSprite(prototype.Icon); + } + + } bool TryProcessStep(ConstructionStep step, IEntity slapped) diff --git a/Resources/Prototypes/Construction/structures.yml b/Resources/Prototypes/Construction/structures.yml index 75622bbf9a..94afc1dd03 100644 --- a/Resources/Prototypes/Construction/structures.yml +++ b/Resources/Prototypes/Construction/structures.yml @@ -4,10 +4,10 @@ category: Structures description: Keeps the air in and the greytide out. icon: - sprite: Buildings/wall.rsi + sprite: Buildings/Walls/solid.rsi state: full objecttype: Structure - result: wall + result: solid_wall placementmode: SnapgridCenter steps: - material: Metal @@ -25,7 +25,9 @@ name: Table id: table category: Structures - icon: Objects/Furniture/worktop_single.png + icon: + sprite: Buildings/table_solid.rsi + state: plain_preview result: table placementmode: SnapgridCenter steps: diff --git a/Resources/Prototypes/Construction/weapons.yml b/Resources/Prototypes/Construction/weapons.yml index 8c985cc808..d563418fce 100644 --- a/Resources/Prototypes/Construction/weapons.yml +++ b/Resources/Prototypes/Construction/weapons.yml @@ -5,6 +5,7 @@ keywords: [melee] description: A crude spear for when you need to put holes in somebody. icon: Objects/Melee/spear.rsi/spear.png + result: Spear objecttype: Item steps: - material: Metal @@ -15,4 +16,4 @@ # Should probably use a shard but y'know. - material: Glass - amount: 1 + amount: 1 \ No newline at end of file