Cleanup construction component
This commit is contained in:
@@ -144,46 +144,10 @@ namespace Content.Server.GameObjects.Components.Construction
|
|||||||
case ConstructionStepTool toolStep:
|
case ConstructionStepTool toolStep:
|
||||||
if (!slapped.TryGetComponent<ToolComponent>(out var tool))
|
if (!slapped.TryGetComponent<ToolComponent>(out var tool))
|
||||||
return false;
|
return false;
|
||||||
switch (toolStep.Tool)
|
if (toolStep.Tool != tool.Behavior) return false;
|
||||||
{
|
|
||||||
case Tool.Crowbar:
|
|
||||||
if (tool.Behavior == Tool.Crowbar)
|
|
||||||
{
|
|
||||||
tool.PlayUseSound();
|
tool.PlayUseSound();
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case Tool.Welder:
|
|
||||||
if (tool.Behavior == Tool.Welder && tool.TryWeld(toolStep.Amount))
|
|
||||||
{
|
|
||||||
tool.PlayUseSound();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case Tool.Wrench:
|
|
||||||
if (tool.Behavior == Tool.Wrench)
|
|
||||||
{
|
|
||||||
tool.PlayUseSound();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case Tool.Screwdriver:
|
|
||||||
if (tool.Behavior == Tool.Screwdriver)
|
|
||||||
{
|
|
||||||
tool.PlayUseSound();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
case Tool.Wirecutter:
|
|
||||||
if (tool.Behavior == Tool.Wirecutter)
|
|
||||||
{
|
|
||||||
tool.PlayUseSound();
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
default:
|
|
||||||
throw new NotImplementedException();
|
|
||||||
}
|
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user