Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make shuttle walls/windows constructable (#19255) #849

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,
}
2 changes: 1 addition & 1 deletion Resources/Prototypes/Entities/Structures/Walls/girders.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
components:
- type: Transform
anchored: true
noRot: true
noRot: false
- type: Physics
bodyType: Static
- type: Fixtures
Expand Down
82 changes: 53 additions & 29 deletions Resources/Prototypes/Entities/Structures/Walls/walls.yml
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@
key: walls
base: plastitanium
- type: Reflect
reflectProb: 0.75
reflectProb: 0.1

- type: entity
parent: WallPlastitaniumIndestructible
Expand All @@ -466,7 +466,7 @@
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: Reflect
reflectProb: 0.15
reflectProb: 0.1

- type: entity
parent: WallShuttleDiagonal
Expand All @@ -490,7 +490,7 @@
sprite: Structures/Walls/plastitanium_diagonal.rsi
state: state0
- type: Reflect
reflectProb: 0.15
reflectProb: 0.1

- type: entity
parent: BaseWall
Expand All @@ -517,10 +517,15 @@
!type:DamageTrigger
damage: 600
behaviors:
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/metalbreak.ogg
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:DoActsBehavior
acts: ["Destruction"]
destroySound:
path: /Audio/Effects/metalbreak.ogg
- type: IconSmooth
key: walls
base: reinf_over
Expand Down Expand Up @@ -645,10 +650,11 @@
key: walls
base: silver

#shuttle walls
- type: entity
id: WallShuttleDiagonal
name: shuttle wall
suffix: diagonal
suffix: Diagonal
description: Keeps the air in and the greytide out.
placement:
mode: SnapgridCenter
Expand All @@ -674,7 +680,7 @@
state: state0
- type: Damageable
damageContainer: Inorganic
damageModifierSet: Metallic
damageModifierSet: StrongMetallic
- type: Physics
bodyType: Static
- type: Reflect
Expand Down Expand Up @@ -710,51 +716,69 @@
!type:DamageTrigger
damage: 300
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:PlaySoundBehavior
sound:
path: /Audio/Effects/metalbreak.ogg
- !type:DoActsBehavior
acts: ["Destruction"]
destroySound:
path: /Audio/Effects/metalbreak.ogg
- type: Construction
graph: Girder
node: diagonalshuttleWall

- type: entity
parent: BaseWall
parent: WallReinforced
id: WallShuttle
name: shuttle wall
suffix: Reinforced, Exterior
components:
- type: Tag
tags:
- Wall
- RCDDeconstructWhitelist
- type: Sprite
sprite: Structures/Walls/shuttle.rsi
- type: Icon
sprite: Structures/Walls/shuttle.rsi
- 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
state: full
- 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: 0.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: 0.1

- type: entity
parent: BaseWall
Expand Down
46 changes: 45 additions & 1 deletion Resources/Prototypes/Entities/Structures/Windows/shuttle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
sprite: Structures/Windows/shuttle_window.rsi
- type: Icon
sprite: Structures/Windows/shuttle_window.rsi
- type: Repairable
fuelCost: 15
doAfterDelay: 3
- type: Damageable
damageContainer: Inorganic
damageModifierSet: RGlass
Expand Down Expand Up @@ -38,6 +41,9 @@
acts: [ "Destruction" ]
- type: IconSmooth
base: swindow
- type: Construction
graph: Window
node: shuttleWindow
- type: Appearance
- type: DamageVisuals
thresholds: [4, 8, 12]
Expand All @@ -46,4 +52,42 @@
damageOverlay:
sprite: Structures/Windows/cracks.rsi
- type: StaticPrice
price: 25
price: 25 # Frontier - Note that upstream upped this from 25 to 100, its back to 25 here.

- type: entity
parent: ShuttleWindow
id: ShuttleWindowDiagonal
name: diagonal shuttle window
suffix: diagonal
placement:
mode: SnapgridCenter
snap:
- Window
components:
- type: Sprite
drawdepth: WallTops
sprite: Structures/Windows/shuttle_window_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: windows
base: state
- type: Icon
sprite: Structures/Windows/shuttle_window_diagonal.rsi
state: state0
- type: Fixtures
fixtures:
fix1:
shape:
!type:PolygonShape
vertices:
- "-0.5,-0.5"
- "0.5,0.5"
- "0.5,-0.5"
mask:
- FullTileMask
layer:
- GlassLayer
- type: DamageVisuals
damageOverlay:
sprite: Structures/Windows/cracks_diagonal.rsi
Loading
Loading