Fix various bugs with construction (#446)
This commit is contained in:
committed by
Pieter-Jan Briers
parent
0595088409
commit
94c00dda95
@@ -161,17 +161,17 @@ namespace Content.Client.Construction
|
||||
{
|
||||
case ConstructionStepMaterial.MaterialType.Metal:
|
||||
icon = ResourceCache.GetResource<TextureResource>(
|
||||
"/Textures/Objects/sheet_metal.png");
|
||||
"/Textures/Objects/Materials/sheet_metal.png");
|
||||
text = $"Metal x{mat.Amount}";
|
||||
break;
|
||||
case ConstructionStepMaterial.MaterialType.Glass:
|
||||
icon = ResourceCache.GetResource<TextureResource>(
|
||||
"/Textures/Objects/sheet_glass.png");
|
||||
"/Textures/Objects/Materials/sheet_glass.png");
|
||||
text = $"Glass x{mat.Amount}";
|
||||
break;
|
||||
case ConstructionStepMaterial.MaterialType.Cable:
|
||||
icon = ResourceCache.GetResource<TextureResource>(
|
||||
"/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<TextureResource>("/Textures/Objects/wrench.png");
|
||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/Tools/wrench.png");
|
||||
text = "Wrench";
|
||||
break;
|
||||
case ConstructionStepTool.ToolType.Crowbar:
|
||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/crowbar.png");
|
||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/Tools/crowbar.png");
|
||||
text = "Crowbar";
|
||||
break;
|
||||
case ConstructionStepTool.ToolType.Screwdriver:
|
||||
icon = ResourceCache.GetResource<TextureResource>(
|
||||
"/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<TextureResource>(
|
||||
"/Textures/Objects/wirecutter.png");
|
||||
"/Textures/Objects/Tools/wirecutter.png");
|
||||
text = "Wirecutters";
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user