Wall inheritance cleanup (#37436)

* Cleanup walls.yml

* quick check

* Fix tilewall cmd

* More Cleanup

* Arrnrtrayiage

* Remove double parenting

---------

Co-authored-by: Velcroboy <velcroboy333@hotmail.com>
This commit is contained in:
Velcroboy
2025-05-16 08:17:21 -05:00
committed by GitHub
parent 4b575c6729
commit d5ef9b7345
2 changed files with 168 additions and 205 deletions

View File

@@ -25,6 +25,7 @@ public sealed class TileWallsCommand : IConsoleCommand
[ValidatePrototypeId<TagPrototype>]
public const string WallTag = "Wall";
public const string DiagonalTag = "Diagonal";
public void Execute(IConsoleShell shell, string argStr, string[] args)
{
@@ -85,6 +86,11 @@ public sealed class TileWallsCommand : IConsoleCommand
continue;
}
if (tagSystem.HasTag(child, DiagonalTag))
{
continue;
}
var childTransform = _entManager.GetComponent<TransformComponent>(child);
if (!childTransform.Anchored)

View File

@@ -1,7 +1,7 @@
- type: entity
abstract: true
parent: BaseStructure
id: BaseWall
id: BaseStructureWall
name: basewall
description: Keeps the air in and the greytide out.
placement:
@@ -44,7 +44,6 @@
layer:
- WallLayer
density: 1000
- type: Occluder
- type: Airtight
- type: StaticPrice
price: 75
@@ -53,6 +52,46 @@
- type: BlockWeather
- type: SunShadowCast
- type: entity
abstract: true
parent: BaseStructureWall
id: BaseWall
components:
- type: Occluder # Breaks on diagonal walls
- type: entity
abstract: true
parent: BaseStructureWall
id: WallDiagonalBase
suffix: Diagonal
components:
- type: Tag
tags:
- Wall
- Diagonal
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Airtight
noAirWhenFullyAirBlocked: false
airBlockedDirection:
- South
- East
- type: Fixtures
fixtures:
fix1:
shape:
!type:PolygonShape
vertices:
- "-0.5,-0.5"
- "0.5,0.5"
- "0.5,-0.5"
mask:
- FullTileMask
layer:
- WallLayer
- type: entity
parent: BaseWall
id: WallBrick
@@ -79,7 +118,6 @@
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- type: IconSmooth
key: walls
base: brick
@@ -89,9 +127,6 @@
id: WallClock
name: clock wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/clock.rsi
- type: Icon
@@ -121,9 +156,6 @@
id: WallClown
name: bananium wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/clown.rsi
- type: Icon
@@ -191,9 +223,6 @@
id: WallCult
name: cult wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/cult.rsi
- type: Icon
@@ -251,9 +280,6 @@
id: WallDiamond
name: diamond wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/diamond.rsi
- type: Icon
@@ -284,9 +310,6 @@
id: WallGold
name: gold wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/gold.rsi
- type: Icon
@@ -329,9 +352,6 @@
id: WallIce
name: ice wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/ice.rsi
- type: Icon
@@ -358,9 +378,6 @@
id: WallPlasma
name: plasma wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/plasma.rsi
- type: Icon
@@ -405,9 +422,6 @@
id: WallPlastic
name: plastic wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/plastic.rsi
- type: Icon
@@ -451,9 +465,6 @@
name: plastitanium wall
suffix: indestructible
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/plastitanium.rsi
- type: Icon
@@ -461,6 +472,11 @@
- type: IconSmooth
key: walls
base: plastitanium
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: RadiationBlocker
resistance: 5
- type: entity
parent: WallPlastitaniumIndestructible
@@ -468,9 +484,6 @@
name: plastitanium wall
suffix: ""
components:
- type: Tag
tags:
- Wall
- type: Destructible
thresholds:
- trigger:
@@ -486,23 +499,34 @@
acts: [ "Destruction" ]
- type: entity
parent: WallShuttleDiagonal
id: WallPlastitaniumDiagonal
parent: WallDiagonalBase
id: WallPlastitaniumDiagonalIndestructible
name: plastitanium wall
suffix: diagonal
placement:
mode: SnapgridCenter
snap:
- Wall
suffix: diagonal, indestructible
components:
- type: Sprite
drawdepth: Walls
sprite: Structures/Walls/plastitanium_diagonal.rsi
state: state0
- type: Icon
sprite: Structures/Walls/plastitanium_diagonal.rsi
state: state0
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: RadiationBlocker
resistance: 5
- type: entity
parent: WallPlastitaniumDiagonalIndestructible
id: WallPlastitaniumDiagonal
name: plastitanium wall
suffix: diagonal
components:
- type: Sprite
drawdepth: Walls
sprite: Structures/Walls/plastitanium_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Icon
sprite: Structures/Walls/plastitanium_diagonal.rsi
state: state0
@@ -510,73 +534,18 @@
thresholds:
- trigger:
!type:DamageTrigger
damage: 2000
damage: 1000
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
Girder:
min: 1
max: 1
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- trigger:
!type:DamageTrigger
damage: 1000
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- !type:DoActsBehavior
acts: ["Destruction"]
- type: entity
id: WallPlastitaniumDiagonalIndestructible
name: plastitanium wall
suffix: diagonal, indestructible
description: Keeps the air in and the greytide out.
placement:
mode: SnapgridCenter
snap:
- Wall
components:
- type: Transform
anchored: true
- type: Clickable
- type: Tag
tags:
- Wall
- Diagonal
- type: Sprite
drawdepth: Walls
sprite: Structures/Walls/plastitanium_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Icon
sprite: Structures/Walls/plastitanium_diagonal.rsi
state: state0
- type: Physics
bodyType: Static
- type: Airtight
noAirWhenFullyAirBlocked: false
airBlockedDirection:
- South
- East
- type: Fixtures
fixtures:
fix1:
shape:
!type:PolygonShape
vertices:
- "-0.5,-0.5"
- "0.5,0.5"
- "0.5,-0.5"
mask:
- FullTileMask
layer:
- WallLayer
- type: entity
parent: BaseWall
@@ -676,31 +645,45 @@
- !type:DoActsBehavior
acts: ["Destruction"]
- type: entity
parent: WallShuttleDiagonal
parent: WallDiagonalBase
id: WallReinforcedDiagonal
name: reinforced wall
suffix: diagonal
placement:
mode: SnapgridCenter
snap:
- Wall
components:
- type: Tag
tags:
- Diagonal
- type: Sprite
drawdepth: Walls
sprite: Structures/Walls/reinforced_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Icon
sprite: Structures/Walls/reinforced_diagonal.rsi
state: state0
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 600
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- !type:DoActsBehavior
acts: ["Destruction"]
- type: RadiationBlocker
resistance: 5
# Riveting
- type: entity
@@ -708,9 +691,6 @@
id: WallRiveted
name: riveted wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/riveted.rsi
- type: Icon
@@ -742,9 +722,6 @@
id: WallSandstone
name: sandstone wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/sandstone.rsi
- type: Icon
@@ -775,9 +752,6 @@
id: WallSilver
name: silver wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/silver.rsi
- type: Icon
@@ -817,59 +791,22 @@
#shuttle walls
- type: entity
parent: WallDiagonalBase
id: WallShuttleDiagonal
name: shuttle wall
suffix: Diagonal
description: Keeps the air in and the greytide out.
placement:
mode: SnapgridCenter
snap:
- Wall
components:
- type: Transform
anchored: true
- type: Clickable
- type: Tag
tags:
- Wall
- Diagonal
- type: Sprite
drawdepth: Walls
sprite: Structures/Walls/shuttle_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Icon
sprite: Structures/Walls/shuttle_diagonal.rsi
state: state0
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallic
- type: Physics
bodyType: Static
- type: Reflect
reflectProb: 1
- type: Pullable
- type: Airtight
noAirWhenFullyAirBlocked: false
airBlockedDirection:
- South
- East
- type: Fixtures
fixtures:
fix1:
shape:
!type:PolygonShape
vertices:
- "-0.5,-0.5"
- "0.5,0.5"
- "0.5,-0.5"
mask:
- FullTileMask
layer:
- WallLayer
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: Destructible
thresholds:
- trigger:
@@ -895,6 +832,10 @@
- type: Construction
graph: Girder
node: diagonalshuttleWall
- type: RadiationBlocker
resistance: 5
- type: StaticPrice
price: 200
- type: entity
parent: BaseWall
@@ -961,9 +902,6 @@
id: WallSolid
name: solid wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/solid.rsi
- type: WallReplacementMarker
@@ -1003,26 +941,39 @@
base: solid
- type: entity
parent: WallShuttleDiagonal
parent: WallDiagonalBase
id: WallSolidDiagonal
name: solid wall
suffix: diagonal
placement:
mode: SnapgridCenter
snap:
- Wall
components:
- type: Sprite
drawdepth: Walls
sprite: Structures/Walls/solid_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Icon
sprite: Structures/Walls/solid_diagonal.rsi
state: state0
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 400
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- trigger:
!type:DamageTrigger
damage: 200
behaviors:
- !type:ChangeConstructionNodeBehavior
node: girder
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- !type:DoActsBehavior
acts: ["Destruction"]
- type: entity
parent: WallSolid
@@ -1148,7 +1099,6 @@
name: web wall
description: Keeps the spiders in and the greytide out.
components:
- type: Clickable
- type: MeleeSound
soundGroups:
Brute:
@@ -1156,9 +1106,6 @@
"/Audio/Weapons/slash.ogg"
- type: Damageable
damageModifierSet: Web
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/web.rsi
- type: Icon
@@ -1194,9 +1141,6 @@
id: WallNecropolis
name: stone wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/necropolis.rsi
- type: Icon
@@ -1218,9 +1162,6 @@
id: WallMining
name: mining wall
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/mining.rsi
- type: Icon
@@ -1243,26 +1184,45 @@
- type: Appearance
- type: entity
parent: WallShuttleDiagonal
parent: WallDiagonalBase
id: WallMiningDiagonal
name: mining wall
suffix: diagonal
placement:
mode: SnapgridCenter
snap:
- Wall
components:
- type: Sprite
drawdepth: Walls
sprite: Structures/Walls/mining_diagonal.rsi
state: state0
- type: IconSmooth
mode: Diagonal
key: walls
base: state
- type: Icon
sprite: Structures/Walls/mining_diagonal.rsi
state: state0
- type: Damageable
damageContainer: StructuralInorganic
damageModifierSet: StructuralMetallicStrong
- type: Destructible
thresholds:
- trigger:
!type:DamageTrigger
damage: 600
behaviors:
- !type:DoActsBehavior
acts: [ "Destruction" ]
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- trigger:
!type:DamageTrigger
damage: 300
behaviors:
- !type:SpawnEntitiesBehavior
spawn:
Girder:
min: 1
max: 1
- !type:PlaySoundBehavior
sound:
collection: MetalSlam
- !type:DoActsBehavior
acts: ["Destruction"]
# Vault Walls
@@ -1372,9 +1332,6 @@
name: cobblestone brick wall
description: Stone by stone, perfectly fitted together to form a wall.
components:
- type: Tag
tags:
- Wall
- type: Sprite
sprite: Structures/Walls/cobblebrick.rsi
- type: Icon