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

View File

@@ -28,6 +28,37 @@
offset: Center
- 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
id: Table
parent: TableBase
@@ -55,37 +86,9 @@
max: 1
- !type:DoActsBehavior
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
graph: Tables
node: TableFrame
graph: table
node: Table
- type: entity
id: TableBar
@@ -112,8 +115,14 @@
SheetSteel1:
min: 1
max: 1
MaterialCloth1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: table
node: TableBar
- type: entity
id: TableMetal
@@ -142,12 +151,9 @@
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: Tables
node: MetalTable
- type: entity
id: TableR
id: TableReinforced
parent: TableBase
name: "reinforced table"
description: "A square piece of metal standing on four metal legs. Extra robust."
@@ -169,13 +175,13 @@
- !type:SpawnEntitiesBehavior
spawn:
SheetSteel1:
min: 1
max: 1
min: 2
max: 2
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: Tables
node: ReinforcedTable
graph: table
node: TableReinforced
- type: entity
id: TableGlass
@@ -205,11 +211,11 @@
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: Tables
node: GlassTable
graph: table
node: TableGlass
- type: entity
id: TableGlassR
id: TableReinforcedGlass
parent: TableBase
name: "reinforced glass table"
description: "A square piece of glass, standing on four metal legs. Extra robust."
@@ -233,11 +239,14 @@
ShardGlass:
min: 1
max: 1
PartRodMetal1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: Tables
node: RGlassTable
graph: table
node: TableReinforcedGlass
- type: entity
id: TableWood
@@ -267,8 +276,8 @@
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: Tables
node: WoodTable
graph: table
node: TableWood
- type: entity
id: TableCarpet
@@ -295,11 +304,14 @@
MaterialWoodPlank:
min: 1
max: 1
MaterialCloth1:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Construction
graph: Tables
node: PokerTable
graph: table
node: TableCarpet
- type: entity
id: TableStone

View File

@@ -1,8 +1,10 @@
- type: constructionGraph
id: Tables
id: table
start: start
graph:
- node: start
actions:
- !type:DeleteEntity {}
edges:
- to: TableFrame
completed:
@@ -13,9 +15,6 @@
amount: 2
doAfter: 1
- node: PokerTable
entity: TableCarpet
- node: TableFrame
entity: TableFrame
edges:
@@ -24,60 +23,132 @@
- !type:SpawnPrototype
prototype: PartRodMetal
amount: 2
- !type:DeleteEntity {}
steps:
- tool: Anchoring
doAfter: 1
- to: MetalTable
- to: Table
steps:
- material: Steel
amount: 1
doAfter: 1
- to: ReinforcedTable
- to: TableReinforced
steps:
- material: Plasteel
amount: 1
doAfter: 1
- to: GlassTable
- to: TableGlass
steps:
- material: Glass
amount: 1
doAfter: 1
- to: WoodTable
steps:
- material: WoodPlank
amount: 1
doAfter: 1
- to: RGlassTable
- to: TableReinforcedGlass
steps:
- material: ReinforcedGlass
amount: 1
doAfter: 1
- node: MetalTable
entity: TableMetal
- node: ReinforcedTable
entity: TableR
- node: GlassTable
entity: TableGlass
- node: WoodTable
entity: TableWood
edges:
- to: PokerTable
- to: TableWood
steps:
- material: WoodPlank
amount: 1
doAfter: 1
- node: RGlassTable
entity: TableGlassR
- node: Table
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:
- !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
name: 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 {}