Deconstruction Features (#1242)

* ConstructionSystem now detects when a tool is used on an arbitrary entity.

* Refactored building logic from ConstructionComponent to ConstructionSystem.

* Add OnDeconstruct events so that deconstruction can be blocked if prerequisites are not met.

* Multi-step deconstruction works.
Windows can be deconstructed using a screwdriver.

* In-hand construction and deconstruction works.

* Intermediate entities now have a better name assigned to them when created.

* Removed a question mark to appease Jenkins.

* Instead of running ExposeData on the existing ItemComponent of an intermediateFrame, the system will now replace the existing ItemComponent with a new one, and run ExposeData on the new one.
This commit is contained in:
Acruid
2020-07-02 14:50:57 -07:00
committed by GitHub
parent 6c205c4a79
commit 3ee480a3b1
8 changed files with 480 additions and 162 deletions

View File

@@ -15,8 +15,14 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Interactable
{
public interface IToolComponent
{
ToolQuality Qualities { get; set; }
}
[RegisterComponent]
public class ToolComponent : SharedToolComponent
[ComponentReference(typeof(IToolComponent))]
public class ToolComponent : SharedToolComponent, IToolComponent
{
protected ToolQuality _qualities = ToolQuality.None;