Skip to content

Commit

Permalink
Fix shuttle structure construction (#1069)
Browse files Browse the repository at this point in the history
Co-authored-by: Velcroboy <velcroboy333@hotmail.com>
  • Loading branch information
IamVelcroboy and BurningRash authored Apr 10, 2024
1 parent f2c07ee commit f5c7808
Show file tree
Hide file tree
Showing 24 changed files with 154 additions and 166 deletions.
6 changes: 6 additions & 0 deletions Content.Client/Wall/ShuttleWallVisuals.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace Content.Client.Wall;

public enum ShuttleWallVisualLayers : byte
{
Deconstruction,
}
8 changes: 8 additions & 0 deletions Content.Shared/Wall/ShuttleWallVisuals.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
namespace Content.Shared.Wall;
using Robust.Shared.Serialization;

[Serializable, NetSerializable]
public enum ShuttleWallVisuals
{
DeconstructionStage,
}
70 changes: 35 additions & 35 deletions Resources/Prototypes/Entities/Structures/Walls/walls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -530,9 +530,6 @@
!type:DamageTrigger
damage: 600
behaviors:
- !type:PlaySoundBehavior #Nyano
sound:
collection: MetalBreak
- !type:DoActsBehavior
acts: ["Destruction"]
- !type:PlaySoundBehavior
Expand Down Expand Up @@ -793,65 +790,68 @@
!type:DamageTrigger
damage: 300
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- !type:DoActsBehavior
acts: ["Destruction"]
- trigger: #this trigger is a Nyano addition
!type:DamageTrigger
damage: 300
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:DoActsBehavior
acts: ["Destruction"]
destroySound:
collection: MetalBreak
- type: Construction
graph: Girder
node: diagonalshuttleWall

- type: entity
parent: WallReinforced #Nyano, basically Reinforced Wall (shuttle variant)
parent: WallReinforced
id: WallShuttle
name: shuttle wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/shuttle.rsi
- type: Icon
sprite: Structures/Walls/shuttle.rsi
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: Construction
graph: Girder
node: shuttleWall
- type: IconSmooth
key: walls
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: shuttleWall
node: shuttleInteriorWall
- type: IconSmooth
key: walls
base: state
- type: Reflect
reflectProb: 1

- type: entity
parent: BaseWall
Expand Down
Original file line number Diff line number Diff line change
@@ -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
parent: BaseWall
id: WallPaper
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,78 +15,3 @@
canBuildInImpassable: false
conditions:
- !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

Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
amount: 2
doAfter: 2

- to: shuttleInteriorWall #Nyano
- to: shuttleInteriorWall
completed:
- !type:SnapToGrid
southRotation: true
Expand Down Expand Up @@ -290,7 +290,7 @@
- tool: Prying
doAfter: 5

- node: shuttleInteriorWall #Nyano
- node: shuttleInteriorWall
entity: WallShuttleInterior
edges:
- to: girder
Expand Down Expand Up @@ -321,7 +321,7 @@
amount: 2
doAfter: 1

- to: shuttleWall #Nyano
- to: shuttleWall
completed:
- !type:SnapToGrid
southRotation: true
Expand All @@ -337,7 +337,7 @@
amount: 2
doAfter: 1

- to: diagonalshuttleWall #Nyano
- to: diagonalshuttleWall
completed:
- !type:SnapToGrid
southRotation: false
Expand Down Expand Up @@ -418,7 +418,7 @@
- tool: Cutting
doAfter: 1

- node: shuttleWall #Nyano
- node: shuttleWall
entity: WallShuttle
edges:
- to: reinforcedGirder
Expand All @@ -436,46 +436,46 @@
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 5
- tool: Screwing
doAfter: 2
- tool: Welding
doAfter: 5
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 4
- tool: Prying
doAfter: 2
- tool: Anchoring
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 3
- tool: Welding
doAfter: 10
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 2
- tool: Prying
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 1
- tool: Screwing
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 0
- tool: Cutting
doAfter: 4

- node: diagonalshuttleWall #Nyano
- node: diagonalshuttleWall
entity: WallShuttleDiagonal
edges:
- to: reinforcedGirder
Expand All @@ -487,48 +487,25 @@
prototype: SheetSteel1
amount: 1
steps:
#To-Do: Add deconstruct visuals
- tool: Welding
doAfter: 5
- tool: Cutting
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 5
- tool: Screwing
doAfter: 1
- tool: Welding
doAfter: 5
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 4
- tool: Prying
doAfter: 1
- tool: Anchoring
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 3
- tool: Welding
doAfter: 10
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 2
- tool: Prying
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 1
- tool: Screwing
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ReinforcedWallVisuals.DeconstructionStage"
data: 0
- tool: Cutting
doAfter: 1

Expand Down
Loading

0 comments on commit f5c7808

Please sign in to comment.