Add table deconstruction and fix table destructible spawns (#3705)

* Add table deconstruction and fix table destructible spawns

* Change table names to match and add construction recipes

* Fix reinforced table and table frame destruction not dropping metal rods
This commit is contained in:
ShadowCommander
2021-03-24 15:34:07 -07:00
committed by GitHub
parent 6dab384c5d
commit 4efa9afa85
5 changed files with 306 additions and 139 deletions

View File

@@ -969,7 +969,7 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 117 - uid: 117
type: TableR type: TableReinforced
components: components:
- pos: -13.5,16.5 - pos: -13.5,16.5
parent: 853 parent: 853
@@ -5291,14 +5291,14 @@ entities:
- bodyType: Dynamic - bodyType: Dynamic
type: Physics type: Physics
- uid: 578 - uid: 578
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: -8.5,6.5 pos: -8.5,6.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 579 - uid: 579
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: -9.5,6.5 pos: -9.5,6.5
@@ -5978,7 +5978,7 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 662 - uid: 662
type: TableR type: TableReinforced
components: components:
- pos: -11.5,16.5 - pos: -11.5,16.5
parent: 853 parent: 853
@@ -13097,14 +13097,14 @@ entities:
- airBlocked: False - airBlocked: False
type: Airtight type: Airtight
- uid: 1032 - uid: 1032
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 0.5,-14.5 pos: 0.5,-14.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1033 - uid: 1033
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 0.5,-15.5 pos: 0.5,-15.5
@@ -13159,21 +13159,21 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1040 - uid: 1040
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 6.5,28.5 pos: 6.5,28.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1041 - uid: 1041
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: -2.5,28.5 pos: -2.5,28.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1042 - uid: 1042
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 5.5,28.5 pos: 5.5,28.5
@@ -13275,35 +13275,35 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1052 - uid: 1052
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: -7.5,7.5 pos: -7.5,7.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1053 - uid: 1053
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: -7.5,8.5 pos: -7.5,8.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1054 - uid: 1054
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 9.5,28.5 pos: 9.5,28.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1055 - uid: 1055
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 8.5,28.5 pos: 8.5,28.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1056 - uid: 1056
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 7.5,28.5 pos: 7.5,28.5
@@ -14303,7 +14303,7 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1170 - uid: 1170
type: TableGlassR type: TableReinforcedGlass
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 18.5,1.5 pos: 18.5,1.5
@@ -14316,7 +14316,7 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 1172 - uid: 1172
type: TableGlassR type: TableReinforcedGlass
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 18.5,0.5 pos: 18.5,0.5
@@ -14662,7 +14662,7 @@ entities:
light_bulb: !type:ContainerSlot {} light_bulb: !type:ContainerSlot {}
type: ContainerContainer type: ContainerContainer
- uid: 1212 - uid: 1212
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 1.5,28.5 pos: 1.5,28.5
@@ -14791,7 +14791,7 @@ entities:
ents: [] ents: []
type: ContainerContainer type: ContainerContainer
- uid: 1224 - uid: 1224
type: TableR type: TableReinforced
components: components:
- pos: -13.5,15.5 - pos: -13.5,15.5
parent: 853 parent: 853
@@ -24336,21 +24336,21 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 2467 - uid: 2467
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 0.5,28.5 pos: 0.5,28.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 2468 - uid: 2468
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: -0.5,28.5 pos: -0.5,28.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 2469 - uid: 2469
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: -1.5,28.5 pos: -1.5,28.5
@@ -41120,7 +41120,7 @@ entities:
- sleepTime: 57.249184 - sleepTime: 57.249184
type: Physics type: Physics
- uid: 4138 - uid: 4138
type: TableR type: TableReinforced
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 15.5,8.5 pos: 15.5,8.5
@@ -41383,14 +41383,14 @@ entities:
parent: 853 parent: 853
type: Transform type: Transform
- uid: 4167 - uid: 4167
type: TableMetal type: Table
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 14.5,-13.5 pos: 14.5,-13.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 4168 - uid: 4168
type: TableMetal type: Table
components: components:
- rot: 4.371139006309477E-08 rad - rot: 4.371139006309477E-08 rad
pos: 15.5,-13.5 pos: 15.5,-13.5
@@ -42110,14 +42110,14 @@ entities:
light_bulb: !type:ContainerSlot {} light_bulb: !type:ContainerSlot {}
type: ContainerContainer type: ContainerContainer
- uid: 4259 - uid: 4259
type: TableMetal type: Table
components: components:
- rot: 1.5707963705062866 rad - rot: 1.5707963705062866 rad
pos: -14.5,18.5 pos: -14.5,18.5
parent: 853 parent: 853
type: Transform type: Transform
- uid: 4260 - uid: 4260
type: TableMetal type: Table
components: components:
- rot: 1.5707963705062866 rad - rot: 1.5707963705062866 rad
pos: -14.5,19.5 pos: -14.5,19.5

View File

@@ -28,6 +28,37 @@
offset: Center offset: Center
- type: Climbable - type: Climbable
- type: entity
id: TableFrame
parent: TableBase
name: "table frame"
description: Pieces of metal that make the frame of a table.
components:
- type: Sprite
sprite: Constructible/Structures/Tables/frame.rsi
- type: Icon
sprite: Constructible/Structures/Tables/frame.rsi
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 1
behaviors:
- !type:PlaySoundBehavior
sound: /Audio/Effects/metalbreak.ogg
- !type:SpawnEntitiesBehavior
spawn:
PartRodMetal1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: table
node: TableFrame
- type: entity - type: entity
id: Table id: Table
parent: TableBase parent: TableBase
@@ -55,37 +86,9 @@
max: 1 max: 1
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: entity
id: TableFrame
parent: TableBase
name: "table frame"
description: Pieces of metal that make the frame of a table.
components:
- type: Sprite
sprite: Constructible/Structures/Tables/frame.rsi
- type: Icon
sprite: Constructible/Structures/Tables/frame.rsi
- type: Damageable
resistances: metallicResistances
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 1
behaviors:
- !type:PlaySoundBehavior
sound: /Audio/Effects/metalbreak.ogg
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction - type: Construction
graph: Tables graph: table
node: TableFrame node: Table
- type: entity - type: entity
id: TableBar id: TableBar
@@ -112,8 +115,14 @@
SheetSteel1: SheetSteel1:
min: 1 min: 1
max: 1 max: 1
MaterialCloth1:
min: 1
max: 1
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Construction
graph: table
node: TableBar
- type: entity - type: entity
id: TableMetal id: TableMetal
@@ -142,12 +151,9 @@
max: 1 max: 1
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Construction
graph: Tables
node: MetalTable
- type: entity - type: entity
id: TableR id: TableReinforced
parent: TableBase parent: TableBase
name: "reinforced table" name: "reinforced table"
description: "A square piece of metal standing on four metal legs. Extra robust." description: "A square piece of metal standing on four metal legs. Extra robust."
@@ -169,13 +175,13 @@
- !type:SpawnEntitiesBehavior - !type:SpawnEntitiesBehavior
spawn: spawn:
SheetSteel1: SheetSteel1:
min: 1 min: 2
max: 1 max: 2
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Construction - type: Construction
graph: Tables graph: table
node: ReinforcedTable node: TableReinforced
- type: entity - type: entity
id: TableGlass id: TableGlass
@@ -205,11 +211,11 @@
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Construction - type: Construction
graph: Tables graph: table
node: GlassTable node: TableGlass
- type: entity - type: entity
id: TableGlassR id: TableReinforcedGlass
parent: TableBase parent: TableBase
name: "reinforced glass table" name: "reinforced glass table"
description: "A square piece of glass, standing on four metal legs. Extra robust." description: "A square piece of glass, standing on four metal legs. Extra robust."
@@ -233,11 +239,14 @@
ShardGlass: ShardGlass:
min: 1 min: 1
max: 1 max: 1
PartRodMetal1:
min: 1
max: 1
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Construction - type: Construction
graph: Tables graph: table
node: RGlassTable node: TableReinforcedGlass
- type: entity - type: entity
id: TableWood id: TableWood
@@ -267,8 +276,8 @@
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Construction - type: Construction
graph: Tables graph: table
node: WoodTable node: TableWood
- type: entity - type: entity
id: TableCarpet id: TableCarpet
@@ -295,11 +304,14 @@
MaterialWoodPlank: MaterialWoodPlank:
min: 1 min: 1
max: 1 max: 1
MaterialCloth1:
min: 1
max: 1
- !type:DoActsBehavior - !type:DoActsBehavior
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: Construction - type: Construction
graph: Tables graph: table
node: PokerTable node: TableCarpet
- type: entity - type: entity
id: TableStone id: TableStone

View File

@@ -1,8 +1,10 @@
- type: constructionGraph - type: constructionGraph
id: Tables id: table
start: start start: start
graph: graph:
- node: start - node: start
actions:
- !type:DeleteEntity {}
edges: edges:
- to: TableFrame - to: TableFrame
completed: completed:
@@ -13,9 +15,6 @@
amount: 2 amount: 2
doAfter: 1 doAfter: 1
- node: PokerTable
entity: TableCarpet
- node: TableFrame - node: TableFrame
entity: TableFrame entity: TableFrame
edges: edges:
@@ -24,60 +23,132 @@
- !type:SpawnPrototype - !type:SpawnPrototype
prototype: PartRodMetal prototype: PartRodMetal
amount: 2 amount: 2
- !type:DeleteEntity {}
steps: steps:
- tool: Anchoring - tool: Anchoring
doAfter: 1 doAfter: 1
- to: MetalTable - to: Table
steps: steps:
- material: Steel - material: Steel
amount: 1 amount: 1
doAfter: 1 doAfter: 1
- to: ReinforcedTable - to: TableReinforced
steps: steps:
- material: Plasteel - material: Plasteel
amount: 1 amount: 1
doAfter: 1 doAfter: 1
- to: GlassTable - to: TableGlass
steps: steps:
- material: Glass - material: Glass
amount: 1 amount: 1
doAfter: 1 doAfter: 1
- to: WoodTable - to: TableReinforcedGlass
steps:
- material: WoodPlank
amount: 1
doAfter: 1
- to: RGlassTable
steps: steps:
- material: ReinforcedGlass - material: ReinforcedGlass
amount: 1 amount: 1
doAfter: 1 doAfter: 1
- to: TableWood
- node: MetalTable
entity: TableMetal
- node: ReinforcedTable
entity: TableR
- node: GlassTable
entity: TableGlass
- node: WoodTable
entity: TableWood
edges:
- to: PokerTable
steps: steps:
- material: WoodPlank - material: WoodPlank
amount: 1 amount: 1
doAfter: 1 doAfter: 1
- node: RGlassTable - node: Table
entity: TableGlassR entity: Table
edges:
- to: TableFrame
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 1
steps:
- tool: Anchoring
doAfter: 1
- to: TableBar
steps:
- material: Cloth
amount: 1
doAfter: 1
- node: TableBar
entity: TableBar
edges:
- to: Table
completed:
- !type:SpawnPrototype
prototype: MaterialCloth1
amount: 1
steps:
- tool: Prying
doAfter: 1
- node: TableReinforced
entity: TableReinforced
edges:
- to: TableFrame
completed:
- !type:SpawnPrototype
prototype: SheetPlasteel1
amount: 1
steps:
- tool: Anchoring
doAfter: 1
- node: TableGlass
entity: TableGlass
edges:
- to: TableFrame
completed:
- !type:SpawnPrototype
prototype: SheetGlass1
amount: 1
steps:
- tool: Anchoring
doAfter: 1
- node: TableReinforcedGlass
entity: TableReinforcedGlass
edges:
- to: TableFrame
completed:
- !type:SpawnPrototype
prototype: SheetRGlass1
amount: 1
steps:
- tool: Anchoring
doAfter: 1
- node: TableWood
entity: TableWood
edges:
- to: TableFrame
completed:
- !type:SpawnPrototype
prototype: MaterialWoodPlank1
amount: 1
steps:
- tool: Prying
doAfter: 1
- to: TableCarpet
steps:
- material: Cloth
amount: 1
doAfter: 1
- node: TableCarpet
entity: TableCarpet
edges:
- to: TableWood
completed:
- !type:SpawnPrototype
prototype: MaterialCloth1
amount: 1
steps:
- tool: Prying
doAfter: 1

View File

@@ -141,40 +141,6 @@
conditions: conditions:
- !type:TileNotBlocked {} - !type:TileNotBlocked {}
- type: construction
name: Table Frame
id: TableFrame
graph: Tables
startNode: start
targetNode: TableFrame
category: Structures
description: A sturdy frame used in the construction of tables
icon:
sprite: Constructible/Structures/Tables/frame.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction
name: Poker Table
id: PokerTable
graph: Tables
startNode: start
targetNode: PokerTable
category: Structures
description: A square piece of wood standing on four legs. (What did you expect?)
icon:
sprite: Constructible/Structures/Tables/carpet.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction - type: construction
name: Catwalk name: Catwalk
id: Catwalk id: Catwalk

View File

@@ -0,0 +1,118 @@
- type: construction
name: table
id: Table
graph: table
startNode: start
targetNode: Table
category: Structures
description: A square piece of metal standing on four metal legs.
icon:
sprite: Constructible/Structures/Tables/carpet.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction
name: bar table
id: TableBar
graph: table
startNode: start
targetNode: TableBar
category: Structures
description: A fancy table. Perfect for serving drinks.
icon:
sprite: Constructible/Structures/Tables/bar.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction
name: reinforced table
id: TableReinforced
graph: table
startNode: start
targetNode: TableReinforced
category: Structures
description: A square piece of metal standing on four metal legs. Extra robust.
icon:
sprite: Constructible/Structures/Tables/reinforced.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction
name: glass table
id: TableGlass
graph: table
startNode: start
targetNode: TableGlass
category: Structures
description: A square piece of glass, standing on four metal legs.
icon:
sprite: Constructible/Structures/Tables/glass.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction
name: reinforced glass table
id: TableReinforcedGlass
graph: table
startNode: start
targetNode: TableReinforcedGlass
category: Structures
description: A square piece of glass, standing on four metal legs. Extra robust.
icon:
sprite: Constructible/Structures/Tables/r_glass.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction
name: wood table
id: TableWood
graph: table
startNode: start
targetNode: TableWood
category: Structures
description: Do not apply fire to this. Rumour says it burns easily.
icon:
sprite: Constructible/Structures/Tables/wood.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}
- type: construction
name: poker table
id: TableCarpet
graph: table
startNode: start
targetNode: TableCarpet
category: Structures
description: A square piece of wood standing on four legs covered by a cloth. (What did you expect?)
icon:
sprite: Constructible/Structures/Tables/carpet.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked {}