Destructible component rework (#157)

* Walls are destructible now
* Added girders that spawn after wall’s destruction
* Girders drop metal sheet on destruction
This commit is contained in:
Injazz
2019-03-26 02:27:03 +05:00
committed by Pieter-Jan Briers
parent 9a224398d3
commit 4a5168f14c
5 changed files with 47 additions and 23 deletions

View File

@@ -34,19 +34,19 @@ entities:
pos: 4.5,-0.5
rot: -1.570796 rad
type: Transform
- type: wall
- type: girder
components:
- grid: 0
pos: -7,6
rot: -1.570796 rad
type: Transform
- type: wall
- type: girder
components:
- grid: 0
pos: -7,-4
rot: -1.570796 rad
type: Transform
- type: wall
- type: girder
components:
- grid: 0
pos: -7,-3
@@ -178,13 +178,13 @@ entities:
pos: -7,-6
rot: -1.570796 rad
type: Transform
- type: wall
- type: girder
components:
- grid: 0
pos: -4,-6
rot: -1.570796 rad
type: Transform
- type: wall
- type: girder
components:
- grid: 0
pos: -4,-5

View File

@@ -0,0 +1,22 @@
- type: entity
id: girder
name: Girder
components:
- type: Clickable
- type: Sprite
texture: Buildings/wall_girder.png
- type: Icon
texture: Buildings/wall_girder.png
- type: BoundingBox
- type: Collidable
- type: Damageable
- type: Destructible
thresholdvalue: 50
spawnondestroy: SteelSheet1
- type: SnapGrid
offset: Edge
placement:
snap:
- Wall

View File

@@ -15,6 +15,10 @@
- type: BoundingBox
- type: Collidable
- type: Damageable
- type: Destructible
thresholdvalue: 100
spawnondestroy: girder
- type: Occluder
sizeX: 32
sizeY: 32