Make shuttle walls/windows constructable (#19255)

This commit is contained in:
Velcroboy
2023-11-20 19:20:24 -06:00
committed by GitHub
parent 646aee0b7a
commit a698a85f34
25 changed files with 409 additions and 32 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

@@ -6,7 +6,7 @@
components: components:
- type: Transform - type: Transform
anchored: true anchored: true
noRot: true noRot: false
- type: Physics - type: Physics
bodyType: Static bodyType: Static
- type: Fixtures - type: Fixtures

View File

@@ -514,10 +514,15 @@
!type:DamageTrigger !type:DamageTrigger
damage: 600 damage: 600
behaviors: behaviors:
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/metalbreak.ogg
- !type:ChangeConstructionNodeBehavior - !type:ChangeConstructionNodeBehavior
node: girder node: girder
- !type:DoActsBehavior - !type:DoActsBehavior
acts: ["Destruction"] acts: ["Destruction"]
destroySound:
path: /Audio/Effects/metalbreak.ogg
- type: IconSmooth - type: IconSmooth
key: walls key: walls
base: reinf_over base: reinf_over
@@ -642,10 +647,11 @@
key: walls key: walls
base: silver base: silver
#shuttle walls
- type: entity - type: entity
id: WallShuttleDiagonal id: WallShuttleDiagonal
name: shuttle wall name: shuttle wall
suffix: diagonal suffix: Diagonal
description: Keeps the air in and the greytide out. description: Keeps the air in and the greytide out.
placement: placement:
mode: SnapgridCenter mode: SnapgridCenter
@@ -671,7 +677,7 @@
state: state0 state: state0
- type: Damageable - type: Damageable
damageContainer: Inorganic damageContainer: Inorganic
damageModifierSet: Metallic damageModifierSet: StrongMetallic
- type: Physics - type: Physics
bodyType: Static bodyType: Static
- type: Reflect - type: Reflect
@@ -707,6 +713,8 @@
!type:DamageTrigger !type:DamageTrigger
damage: 300 damage: 300
behaviors: behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:PlaySoundBehavior - !type:PlaySoundBehavior
sound: sound:
path: /Audio/Effects/metalbreak.ogg path: /Audio/Effects/metalbreak.ogg
@@ -714,44 +722,60 @@
acts: ["Destruction"] acts: ["Destruction"]
destroySound: destroySound:
path: /Audio/Effects/metalbreak.ogg path: /Audio/Effects/metalbreak.ogg
- type: Construction
graph: Girder
node: diagonalshuttleWall
- type: entity - type: entity
parent: BaseWall parent: WallReinforced
id: WallShuttle id: WallShuttle
name: shuttle wall name: shuttle wall
suffix: Reinforced, Exterior
components: components:
- type: Tag
tags:
- Wall
- RCDDeconstructWhitelist
- 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
- type: Destructible state: full
thresholds: - type: Construction
- trigger: graph: Girder
!type:DamageTrigger node: shuttleWall
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: 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

@@ -8,6 +8,9 @@
sprite: Structures/Windows/shuttle_window.rsi sprite: Structures/Windows/shuttle_window.rsi
- type: Icon - type: Icon
sprite: Structures/Windows/shuttle_window.rsi sprite: Structures/Windows/shuttle_window.rsi
- type: Repairable
fuelCost: 15
doAfterDelay: 3
- type: Damageable - type: Damageable
damageContainer: Inorganic damageContainer: Inorganic
damageModifierSet: RGlass damageModifierSet: RGlass
@@ -38,6 +41,9 @@
acts: [ "Destruction" ] acts: [ "Destruction" ]
- type: IconSmooth - type: IconSmooth
base: swindow base: swindow
- type: Construction
graph: Window
node: shuttleWindow
- type: Appearance - type: Appearance
- type: DamageVisuals - type: DamageVisuals
thresholds: [4, 8, 12] thresholds: [4, 8, 12]
@@ -46,7 +52,7 @@
damageOverlay: damageOverlay:
sprite: Structures/Windows/cracks.rsi sprite: Structures/Windows/cracks.rsi
- type: StaticPrice - type: StaticPrice
price: 75 price: 100
- type: entity - type: entity
parent: ShuttleWindow parent: ShuttleWindow

View File

@@ -43,7 +43,7 @@
- to: reinforcedGirder - to: reinforcedGirder
completed: completed:
- !type:SnapToGrid - !type:SnapToGrid
southRotation: true southRotation: false
conditions: conditions:
- !type:EntityAnchored {} - !type:EntityAnchored {}
steps: steps:
@@ -145,6 +145,22 @@
amount: 2 amount: 2
doAfter: 2 doAfter: 2
- to: shuttleInteriorWall
completed:
- !type:SnapToGrid
southRotation: true
conditions:
- !type:EntityAnchored { }
steps:
- material: MetalRod
amount: 2
doAfter: 1
- tool: Screwing
doAfter: 1
- material: Steel
amount: 2
doAfter: 1
- node: wall - node: wall
entity: WallSolid entity: WallSolid
edges: edges:
@@ -263,6 +279,23 @@
- tool: Prying - tool: Prying
doAfter: 5 doAfter: 5
- node: shuttleInteriorWall
entity: WallShuttleInterior
edges:
- to: girder
completed:
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 2
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 2
steps:
- tool: Welding
doAfter: 10
- tool: Screwing
doAfter: 1
- node: reinforcedGirder - node: reinforcedGirder
entity: ReinforcedGirder entity: ReinforcedGirder
edges: edges:
@@ -277,6 +310,38 @@
amount: 2 amount: 2
doAfter: 1 doAfter: 1
- to: shuttleWall
completed:
- !type:SnapToGrid
southRotation: true
conditions:
- !type:EntityAnchored { }
steps:
- material: MetalRod
amount: 4
doAfter: 1
- tool: Screwing
doAfter: 2
- material: Plasteel
amount: 2
doAfter: 1
- to: diagonalshuttleWall
completed:
- !type:SnapToGrid
southRotation: false
conditions:
- !type:EntityAnchored { }
steps:
- material: Steel
amount: 1
doAfter: 1
- tool: Welding
doAfter: 4
- material: Plasteel
amount: 1
doAfter: 1
- to: girder - to: girder
completed: completed:
- !type:SnapToGrid - !type:SnapToGrid
@@ -342,6 +407,97 @@
- tool: Cutting - tool: Cutting
doAfter: 1 doAfter: 1
- node: shuttleWall
entity: WallShuttle
edges:
- to: reinforcedGirder
completed:
- !type:SpawnPrototype
prototype: SheetPlasteel1
amount: 2
- !type:SpawnPrototype
prototype: PartRodMetal1
amount: 4
steps:
- tool: Welding
doAfter: 10
- tool: Cutting
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 5
- tool: Screwing
doAfter: 2
- tool: Welding
doAfter: 5
completed:
- !type:VisualizerDataInt
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 4
- tool: Prying
doAfter: 2
- tool: Anchoring
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 3
- tool: Welding
doAfter: 10
completed:
- !type:VisualizerDataInt
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 2
- tool: Prying
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 1
- tool: Screwing
doAfter: 1
completed:
- !type:VisualizerDataInt
key: "enum.ShuttleWallVisuals.DeconstructionStage"
data: 0
- tool: Cutting
doAfter: 4
- node: diagonalshuttleWall
entity: WallShuttleDiagonal
edges:
- to: reinforcedGirder
completed:
- !type:SpawnPrototype
prototype: SheetPlasteel1
amount: 1
- !type:SpawnPrototype
prototype: SheetSteel1
amount: 1
steps:
#To-Do: Add deconstruct visuals
- tool: Welding
doAfter: 5
- tool: Cutting
doAfter: 1
- tool: Screwing
doAfter: 1
- tool: Welding
doAfter: 5
- tool: Prying
doAfter: 1
- tool: Anchoring
doAfter: 1
- tool: Welding
doAfter: 10
- tool: Prying
doAfter: 1
- tool: Screwing
doAfter: 1
- tool: Cutting
doAfter: 1
- node: wallrust - node: wallrust
entity: WallSolidRust entity: WallSolidRust
edges: edges:

View File

@@ -46,6 +46,14 @@
amount: 2 amount: 2
doAfter: 3 doAfter: 3
- to: shuttleWindow
steps:
- material: Plasteel
amount: 2
- material: ReinforcedGlass
amount: 2
doAfter: 4
- node: window - node: window
entity: Window entity: Window
edges: edges:
@@ -186,3 +194,34 @@
doAfter: 2 doAfter: 2
- tool: Anchoring - tool: Anchoring
doAfter: 3 doAfter: 3
- node: shuttleWindow
entity: ShuttleWindow
edges:
- to: start
completed:
- !type:SpawnPrototype
prototype: SheetRGlass1
amount: 2
- !type:SpawnPrototype
prototype: SheetPlasteel1
amount: 2
- !type:DeleteEntity {}
steps:
#To-Do: Add deconstruct visuals
- tool: Welding
doAfter: 6
- tool: Screwing
doAfter: 2
- tool: Prying
doAfter: 3
- tool: Welding
doAfter: 5
- tool: Screwing
doAfter: 1
- tool: Prying
doAfter: 2
- tool: Welding
doAfter: 4
- tool: Anchoring
doAfter: 1

View File

@@ -178,6 +178,61 @@
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
@@ -381,6 +436,25 @@
canRotate: false canRotate: false
- type: construction - 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
name: diagonal plasma window name: diagonal plasma window
id: PlasmaWindowDiagonal id: PlasmaWindowDiagonal
graph: WindowDiagonal graph: WindowDiagonal

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

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@@ -0,0 +1,46 @@
{
"version": 1,
"size": {
"x": 32,
"y": 32
},
"license": "CC-BY-SA-3.0",
"copyright": "https://github.com/tgstation/tgstation/blob/9ddb8cf084e292571d4e9c79745db25befbd82fe/icons/turf/walls/shuttle_wall.dmi",
"states": [
{
"name": "full"
},
{
"name": "state0",
"directions": 4
},
{
"name": "state1",
"directions": 4
},
{
"name": "state2",
"directions": 4
},
{
"name": "state3",
"directions": 4
},
{
"name": "state4",
"directions": 4
},
{
"name": "state5",
"directions": 4
},
{
"name": "state6",
"directions": 4
},
{
"name": "state7",
"directions": 4
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 651 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 881 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 704 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 388 B