Finish refactoring tools. Add multitools. (as in multiple tools in one)

This commit is contained in:
zumorica
2020-04-29 13:43:07 +02:00
parent ca5638badf
commit ff5549a0d1
37 changed files with 840 additions and 467 deletions

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Shared.GameObjects.Components.Interactable;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
@@ -138,7 +139,7 @@ namespace Content.Shared.Construction
if (step.TryGetNode("tool", out node))
{
return new ConstructionStepTool(
node.AsEnum<ConstructionStepTool.ToolType>(),
node.AsEnum<Tool>(),
amount
);
}
@@ -190,21 +191,12 @@ namespace Content.Shared.Construction
public class ConstructionStepTool : ConstructionStep
{
public readonly ToolType Tool;
public readonly Tool Tool;
public ConstructionStepTool(ToolType tool, int amount) : base(amount)
public ConstructionStepTool(Tool tool, int amount) : base(amount)
{
Tool = tool;
}
public enum ToolType
{
Wrench,
Welder,
Screwdriver,
Crowbar,
Wirecutters,
}
}
public class ConstructionStepMaterial : ConstructionStep