From: Velcroboy <107660393+IamVelcroboy@users.noreply.github.com> Date: Fri, 16 May 2025 13:17:21 +0000 (-0500) Subject: Wall inheritance cleanup (#37436) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=d5ef9b7345b69109061dc2575ea83758b7446378;p=space-station-14.git Wall inheritance cleanup (#37436) * Cleanup walls.yml * quick check * Fix tilewall cmd * More Cleanup * Arrnrtrayiage * Remove double parenting --------- Co-authored-by: Velcroboy --- diff --git a/Content.Server/Construction/Commands/TileWallsCommand.cs b/Content.Server/Construction/Commands/TileWallsCommand.cs index 001b33913b..a27caec423 100644 --- a/Content.Server/Construction/Commands/TileWallsCommand.cs +++ b/Content.Server/Construction/Commands/TileWallsCommand.cs @@ -25,6 +25,7 @@ public sealed class TileWallsCommand : IConsoleCommand [ValidatePrototypeId] 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(child); if (!childTransform.Anchored) diff --git a/Resources/Prototypes/Entities/Structures/Walls/walls.yml b/Resources/Prototypes/Entities/Structures/Walls/walls.yml index 3c2f8c1de1..b690769fd8 100644 --- a/Resources/Prototypes/Entities/Structures/Walls/walls.yml +++ b/Resources/Prototypes/Entities/Structures/Walls/walls.yml @@ -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 + parent: WallDiagonalBase + id: WallPlastitaniumDiagonalIndestructible + name: plastitanium 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 - placement: - mode: SnapgridCenter - snap: - - Wall 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