Fix shuttle structure construction (#1069)

Co-authored-by: Velcroboy <velcroboy333@hotmail.com>
This commit is contained in:
Velcroboy 2024-04-09 22:12:36 -05:00 committed by GitHub
parent f2c07ee837
commit f5c7808446
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
24 changed files with 155 additions and 167 deletions

View File

@ -0,0 +1,6 @@
namespace Content.Client.Wall;
public enum ShuttleWallVisualLayers : byte
{
Deconstruction,
}

View File

@ -0,0 +1,8 @@
namespace Content.Shared.Wall;
using Robust.Shared.Serialization;
[Serializable, NetSerializable]
public enum ShuttleWallVisuals
{
DeconstructionStage,
}

View File

@ -530,9 +530,6 @@
!type:DamageTrigger !type:DamageTrigger
damage: 600 damage: 600
behaviors: behaviors:
- !type:PlaySoundBehavior #Nyano
sound:
collection: MetalBreak
- !type:DoActsBehavior - !type:DoActsBehavior
acts: ["Destruction"] acts: ["Destruction"]
- !type:PlaySoundBehavior - !type:PlaySoundBehavior
@ -793,19 +790,13 @@
!type:DamageTrigger !type:DamageTrigger
damage: 300 damage: 300
behaviors: behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:PlaySoundBehavior - !type:PlaySoundBehavior
sound: sound:
collection: MetalSlam collection: MetalSlam
- !type:DoActsBehavior - !type:DoActsBehavior
acts: ["Destruction"] acts: ["Destruction"]
- trigger: #this trigger is a Nyano addition
!type:DamageTrigger
damage: 300
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:DoActsBehavior
acts: ["Destruction"]
destroySound: destroySound:
collection: MetalBreak collection: MetalBreak
- type: Construction - type: Construction
@ -813,45 +804,54 @@
node: diagonalshuttleWall node: diagonalshuttleWall
- type: entity - type: entity
parent: WallReinforced #Nyano, basically Reinforced Wall (shuttle variant) parent: WallReinforced
id: WallShuttle id: WallShuttle
name: shuttle wall name: shuttle wall
components: components:
- type: Tag
tags:
- Wall
- type: Sprite - type: Sprite
sprite: Structures/Walls/shuttle.rsi sprite: Structures/Walls/shuttle.rsi
- type: Icon - type: Icon
sprite: Structures/Walls/shuttle.rsi sprite: Structures/Walls/shuttle.rsi
state: full state: full
# - type: Destructible
# thresholds:
# - trigger:
# !type:DamageTrigger
# damage: 1000
# behaviors:
# - !type:DoActsBehavior
# acts: [ "Destruction" ]
# - trigger:
# !type:DamageTrigger
# damage: 500
# behaviors:
# - !type:PlaySoundBehavior
# sound:
# path: /Audio/Effects/metalbreak.ogg
# - !type:DoActsBehavior
# acts: ["Destruction"]
# destroySound:
# path: /Audio/Effects/metalbreak.ogg
- type: Reflect
reflectProb: 1
- type: Construction - type: Construction
graph: Girder graph: Girder
node: shuttleWall node: shuttleWall
- type: IconSmooth - type: IconSmooth
key: walls key: walls
base: state base: state
- type: Appearance
- type: GenericVisualizer
visuals:
enum.ShuttleWallVisuals.DeconstructionStage:
ShuttleWallVisualLayers.Deconstruction:
-1: { visible: false }
0: { state: shuttle_construct-0, visible: true}
1: { state: shuttle_construct-1, visible: true}
2: { state: shuttle_construct-2, visible: true}
3: { state: shuttle_construct-3, visible: true}
4: { state: shuttle_construct-4, visible: true}
5: { state: shuttle_construct-5, visible: true}
- type: Reflect
reflectProb: 1
- type: entity
parent: WallSolid
id: WallShuttleInterior
name: shuttle wall
suffix: Interior
components:
- type: Sprite
sprite: Structures/Walls/shuttleinterior.rsi
- type: Icon
sprite: Structures/Walls/shuttleinterior.rsi
- type: Construction
graph: Girder
node: shuttleInteriorWall
- type: IconSmooth
key: walls
base: state
- type: Reflect
reflectProb: 1
- type: entity - type: entity
parent: BaseWall parent: BaseWall

View File

@ -1,22 +1,3 @@
- type: entity
parent: WallSolid #basically non-Reinforced Wall (shuttle variant)
id: WallShuttleInterior
name: shuttle wall
suffix: Interior
components:
- type: Sprite
sprite: Nyanotrasen/Structures/Walls/shuttleinterior.rsi
- type: Icon
sprite: Nyanotrasen/Structures/Walls/shuttleinterior.rsi
- type: Construction
graph: Girder
node: shuttleInteriorWall
- type: IconSmooth
key: walls
base: state
- type: Reflect
reflectProb: 1
- type: entity - type: entity
parent: BaseWall parent: BaseWall
id: WallPaper id: WallPaper

View File

@ -15,78 +15,3 @@
canBuildInImpassable: false canBuildInImpassable: false
conditions: conditions:
- !type:TileNotBlocked - !type:TileNotBlocked
- type: construction
name: shuttle wall
id: ShuttleWall
graph: Girder
startNode: start
targetNode: shuttleWall
category: construction-category-structures
description: Keeps the air in and the greytide out.
icon:
sprite: Structures/Walls/shuttle.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canRotate: false
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: interior shuttle wall
id: InteriorShuttleWall
graph: Girder
startNode: start
targetNode: shuttleInteriorWall
category: construction-category-structures
description: Keeps the air in and the greytide out.
icon:
sprite: Nyanotrasen/Structures/Walls/shuttleinterior.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canRotate: false
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: diagonal shuttle wall
id: DiagonalShuttleWall
graph: Girder
startNode: start
targetNode: diagonalshuttleWall
category: construction-category-structures
description: Keeps the air in and the greytide out.
icon:
sprite: Structures/Walls/shuttle_diagonal.rsi
state: state0
objectType: Structure
placementMode: SnapgridCenter
canRotate: true
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: shuttle window
id: ShuttleWindow
graph: Window
startNode: start
targetNode: shuttleWindow
category: construction-category-structures
canBuildInImpassable: true
description: Extra sturdy to resist the pressure of FTL or sustain damage from munitions.
conditions:
- !type:EmptyOrWindowValidInTile
- !type:NoWindowsInTile
icon:
sprite: Structures/Windows/shuttle_window.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canRotate: false

View File

@ -156,7 +156,7 @@
amount: 2 amount: 2
doAfter: 2 doAfter: 2
- to: shuttleInteriorWall #Nyano - to: shuttleInteriorWall
completed: completed:
- !type:SnapToGrid - !type:SnapToGrid
southRotation: true southRotation: true
@ -290,7 +290,7 @@
- tool: Prying - tool: Prying
doAfter: 5 doAfter: 5
- node: shuttleInteriorWall #Nyano - node: shuttleInteriorWall
entity: WallShuttleInterior entity: WallShuttleInterior
edges: edges:
- to: girder - to: girder
@ -321,7 +321,7 @@
amount: 2 amount: 2
doAfter: 1 doAfter: 1
- to: shuttleWall #Nyano - to: shuttleWall
completed: completed:
- !type:SnapToGrid - !type:SnapToGrid
southRotation: true southRotation: true
@ -337,7 +337,7 @@
amount: 2 amount: 2
doAfter: 1 doAfter: 1
- to: diagonalshuttleWall #Nyano - to: diagonalshuttleWall
completed: completed:
- !type:SnapToGrid - !type:SnapToGrid
southRotation: false southRotation: false
@ -418,7 +418,7 @@
- tool: Cutting - tool: Cutting
doAfter: 1 doAfter: 1
- node: shuttleWall #Nyano - node: shuttleWall
entity: WallShuttle entity: WallShuttle
edges: edges:
- to: reinforcedGirder - to: reinforcedGirder
@ -436,7 +436,7 @@
doAfter: 1 doAfter: 1
completed: completed:
- !type:VisualizerDataInt - !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage" key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 5 data: 5
- tool: Screwing - tool: Screwing
doAfter: 2 doAfter: 2
@ -444,7 +444,7 @@
doAfter: 5 doAfter: 5
completed: completed:
- !type:VisualizerDataInt - !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage" key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 4 data: 4
- tool: Prying - tool: Prying
doAfter: 2 doAfter: 2
@ -452,30 +452,30 @@
doAfter: 1 doAfter: 1
completed: completed:
- !type:VisualizerDataInt - !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage" key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 3 data: 3
- tool: Welding - tool: Welding
doAfter: 10 doAfter: 10
completed: completed:
- !type:VisualizerDataInt - !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage" key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 2 data: 2
- tool: Prying - tool: Prying
doAfter: 1 doAfter: 1
completed: completed:
- !type:VisualizerDataInt - !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage" key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 1 data: 1
- tool: Screwing - tool: Screwing
doAfter: 1 doAfter: 1
completed: completed:
- !type:VisualizerDataInt - !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage" key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 0 data: 0
- tool: Cutting - tool: Cutting
doAfter: 4 doAfter: 4
- node: diagonalshuttleWall #Nyano - node: diagonalshuttleWall
entity: WallShuttleDiagonal entity: WallShuttleDiagonal
edges: edges:
- to: reinforcedGirder - to: reinforcedGirder
@ -487,48 +487,25 @@
prototype: SheetSteel1 prototype: SheetSteel1
amount: 1 amount: 1
steps: steps:
#To-Do: Add deconstruct visuals
- tool: Welding - tool: Welding
doAfter: 5 doAfter: 5
- tool: Cutting - tool: Cutting
doAfter: 1 doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 5
- tool: Screwing - tool: Screwing
doAfter: 1 doAfter: 1
- tool: Welding - tool: Welding
doAfter: 5 doAfter: 5
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 4
- tool: Prying - tool: Prying
doAfter: 1 doAfter: 1
- tool: Anchoring - tool: Anchoring
doAfter: 1 doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 3
- tool: Welding - tool: Welding
doAfter: 10 doAfter: 10
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 2
- tool: Prying - tool: Prying
doAfter: 1 doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 1
- tool: Screwing - tool: Screwing
doAfter: 1 doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 0
- tool: Cutting - tool: Cutting
doAfter: 1 doAfter: 1

View File

@ -214,6 +214,60 @@
conditions: conditions:
- !type:TileNotBlocked - !type:TileNotBlocked
- type: construction
name: shuttle wall
id: ShuttleWall
graph: Girder
startNode: start
targetNode: shuttleWall
category: construction-category-structures
description: Keeps the air in and the greytide out.
icon:
sprite: Structures/Walls/shuttle.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canRotate: false
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: interior shuttle wall
id: InteriorShuttleWall
graph: Girder
startNode: start
targetNode: shuttleInteriorWall
category: construction-category-structures
description: Keeps the air in and the greytide out.
icon:
sprite: Structures/Walls/shuttleinterior.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canRotate: false
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction
name: diagonal shuttle wall
id: DiagonalShuttleWall
graph: Girder
startNode: start
targetNode: diagonalshuttleWall
category: construction-category-structures
description: Keeps the air in and the greytide out.
icon:
sprite: Structures/Walls/shuttle_diagonal.rsi
state: state0
objectType: Structure
placementMode: SnapgridCenter
canRotate: true
canBuildInImpassable: false
conditions:
- !type:TileNotBlocked
- type: construction - type: construction
name: bananium wall name: bananium wall
id: ClownWall id: ClownWall
@ -488,6 +542,25 @@
placementMode: SnapgridCenter placementMode: SnapgridCenter
canRotate: false canRotate: false
- type: construction
name: shuttle window
id: ShuttleWindow
graph: Window
startNode: start
targetNode: shuttleWindow
category: construction-category-structures
canBuildInImpassable: true
description: Extra sturdy to resist the pressure of FTL or sustain damage from munitions.
conditions:
- !type:EmptyOrWindowValidInTile
- !type:NoWindowsInTile
icon:
sprite: Structures/Windows/shuttle_window.rsi
state: full
objectType: Structure
placementMode: SnapgridCenter
canRotate: false
- type: construction - type: construction
name: diagonal plasma window name: diagonal plasma window
id: PlasmaWindowDiagonal id: PlasmaWindowDiagonal

View File

@ -41,6 +41,24 @@
{ {
"name": "state7", "name": "state7",
"directions": 4 "directions": 4
},
{
"name": "shuttle_construct-0"
},
{
"name": "shuttle_construct-1"
},
{
"name": "shuttle_construct-2"
},
{
"name": "shuttle_construct-3"
},
{
"name": "shuttle_construct-4"
},
{
"name": "shuttle_construct-5"
} }
] ]
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 632 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 689 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 690 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 675 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 671 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB