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

@@ -48,6 +48,8 @@
steps:
- material: Glass
amount: 2
reverse:
tool: Screwing
- type: construction
name: low wall

View File

@@ -10,10 +10,16 @@
steps:
- material: Metal
amount: 1
reverse:
tool: Screwing
- material: Cable
amount: 3
reverse:
tool: Screwing
# Should probably use a shard but y'know.
- material: Glass
amount: 1
reverse:
tool: Screwing

View File

@@ -82,6 +82,14 @@
bounds:
all: -0.15,-0.15,0.15,0.15
- type: entity
id: CableStack1
name: cable stack 1
parent: CableStack
components:
- type: Stack
count: 1
- type: entity
id: HVWireStack
name: HV Wire Coil