- type: entity
  abstract: true
  parent: BaseStructure
  id: BaseStructureWall
  name: basewall
  description: Keeps the air in and the greytide out.
  placement:
    mode: SnapgridCenter
    snap:
    - Wall
  components:
  - type: Anchorable
    flags:
    - Anchorable
  - type: Rotatable
  - type: RangedDamageSound
    soundGroups:
      Brute:
        collection:
          MetalBulletImpact
    soundTypes:
      Heat:
        collection:
          MetalLaserImpact
  - type: Tag
    tags:
    - Wall
  - type: IsRoof
  - type: Sprite
    drawdepth: Walls
  - type: Icon
    state: full
  - type: PlacementReplacement
    key: walls
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: StructuralMetallic
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - WallLayer
        density: 1000
  - type: Airtight
  - type: StaticPrice
    price: 75
  - type: RadiationBlocker
    resistance: 2
  - 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
  name: brick wall
  components:
  - type: Sprite
    sprite: Structures/Walls/brick.rsi
  - type: Icon
    sprite: Structures/Walls/brick.rsi
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: brick

- type: entity
  parent: BaseWall
  id: WallClock
  name: clock wall
  components:
  - type: Sprite
    sprite: Structures/Walls/clock.rsi
  - type: Icon
    sprite: Structures/Walls/clock.rsi
  - type: Construction
    graph: ClockworkGirder
    node: clockworkWall
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          ClockworkGirder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: clock

- type: entity
  parent: BaseWall
  id: WallClown
  name: bananium wall
  components:
  - type: Sprite
    sprite: Structures/Walls/clown.rsi
  - type: Icon
    sprite: Structures/Walls/clown.rsi
  - type: Construction
    graph: Girder
    node: bananiumWall
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: clown
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - WallLayer
        density: 8000 # really good ramming wall, bananium is rare so it's probably fine

- type: entity
  parent: BaseWall
  id: WallMeat
  name: meat wall
  description: Sticky.
  components:
  - type: Tag
    tags:
      - Wall
      - Structure
  - type: Sprite
    sprite: Structures/Walls/meat.rsi
  - type: Icon
    sprite: Structures/Walls/meat.rsi
  - type: Construction
    graph: Girder
    node: meatWall
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100 # weak
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: meat

- type: entity
  parent: BaseWall
  id: WallCult
  name: cult wall
  components:
  - type: Sprite
    sprite: Structures/Walls/cult.rsi
  - type: Icon
    sprite: Structures/Walls/cult.rsi
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: cult

- type: entity
  parent: BaseWall
  id: WallDebug
  name: debug wall
  suffix: DEBUG
  components:
  - type: Tag
    tags:
      - Wall
  - type: Sprite
    sprite: Structures/Walls/debug.rsi
  - type: Icon
    sprite: Structures/Walls/debug.rsi
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: debug

- type: entity
  parent: BaseWall
  id: WallDiamond
  name: diamond wall
  components:
  - type: Sprite
    sprite: Structures/Walls/diamond.rsi
  - type: Icon
    sprite: Structures/Walls/diamond.rsi
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: diamond

- type: entity
  parent: BaseWall
  id: WallGold
  name: gold wall
  components:
  - type: Sprite
    sprite: Structures/Walls/gold.rsi
  - type: Icon
    sprite: Structures/Walls/gold.rsi
  - type: Construction
    graph: Girder
    node: goldWall
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - WallLayer
        density: 4000
  - type: IconSmooth
    key: walls
    base: gold

- type: entity
  parent: BaseWall
  id: WallIce
  name: ice wall
  components:
  - type: Sprite
    sprite: Structures/Walls/ice.rsi
  - type: Icon
    sprite: Structures/Walls/ice.rsi
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: ice

- type: entity
  parent: BaseWall
  id: WallPlasma
  name: plasma wall
  components:
  - type: Sprite
    sprite: Structures/Walls/plasma.rsi
  - type: Icon
    sprite: Structures/Walls/plasma.rsi
  - type: Construction
    graph: Girder
    node: plasmaWall
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: IconSmooth
    key: walls
    base: plasma
  - type: RadiationBlocker
    resistance: 5

- type: entity
  parent: BaseWall
  id: WallPlastic
  name: plastic wall
  components:
  - type: Sprite
    sprite: Structures/Walls/plastic.rsi
  - type: Icon
    sprite: Structures/Walls/plastic.rsi
  - type: Construction
    graph: Girder
    node: plasticWall
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: IconSmooth
    key: walls
    base: plastic

- type: entity
  parent: BaseWall
  id: WallPlastitaniumIndestructible
  name: plastitanium wall
  suffix: indestructible
  components:
    - type: Sprite
      sprite: Structures/Walls/plastitanium.rsi
    - type: Icon
      sprite: Structures/Walls/plastitanium.rsi
    - type: IconSmooth
      key: walls
      base: plastitanium
    - type: Fixtures
      fixtures:
        fix1:
          shape:
            !type:PhysShapeAabb
            bounds: "-0.5,-0.5,0.5,0.5"
          mask:
          - FullTileMask
          layer:
          - WallLayer
          density: 4000
    - type: Damageable
      damageContainer: StructuralInorganic
      damageModifierSet: StructuralMetallicStrong
    - type: RadiationBlocker
      resistance: 5

- type: entity
  parent: WallPlastitaniumIndestructible
  id: WallPlastitanium
  name: plastitanium wall
  suffix: ""
  components:
    - type: Destructible
      thresholds:
        - trigger:
            !type:DamageTrigger
            damage: 1000
          behaviors:
            - !type:SpawnEntitiesBehavior
              spawn:
                Girder:
                  min: 1
                  max: 1
            - !type:DoActsBehavior
              acts: [ "Destruction" ]

- type: entity
  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
  components:
  - type: Sprite
    drawdepth: Walls
    sprite: Structures/Walls/plastitanium_diagonal.rsi
    state: state0
  - type: Icon
    sprite: Structures/Walls/plastitanium_diagonal.rsi
    state: state0
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1000
      behaviors:
        - !type:SpawnEntitiesBehavior
          spawn:
            Girder:
              min: 1
              max: 1
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
        - !type:PlaySoundBehavior
          sound:
            collection: MetalSlam

- type: entity
  parent: BaseWall
  id: WallReinforced
  name: reinforced wall
  components:
  - type: Sprite
    sprite: Structures/Walls/solid.rsi
  - type: Icon
    sprite: Structures/Walls/solid.rsi
    state: rgeneric
  - type: Construction
    graph: Girder
    node: reinforcedWall
  - 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: 400
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: IconSmooth
    key: walls
    base: reinf_over
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ReinforcedWallVisuals.DeconstructionStage:
        ReinforcedWallVisualLayers.Deconstruction:
          -1: { visible: false }
          0: { state: reinf_construct-0, visible: true}
          1: { state: reinf_construct-1, visible: true}
          2: { state: reinf_construct-2, visible: true}
          3: { state: reinf_construct-3, visible: true}
          4: { state: reinf_construct-4, visible: true}
          5: { state: reinf_construct-5, visible: true}
  - type: ReinforcedWallReplacementMarker
  - type: StaticPrice
    price: 250
  - type: RadiationBlocker
    resistance: 5
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - WallLayer
        density: 2000

- type: entity
  parent: WallReinforced
  id: WallReinforcedRust
  suffix: rusted
  components:
  - type: Sprite
    sprite: Structures/Walls/solid_rust.rsi
  - type: Icon
    sprite: Structures/Walls/solid_rust.rsi
    state: rgeneric
  - type: Construction
    graph: Girder
    node: reinforcedWallRust
  - type: IconSmooth
    key: walls
    base: reinf_over
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 500
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
    - trigger:
        !type:DamageTrigger
        damage: 350
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]

- type: entity
  parent: WallDiagonalBase
  id: WallReinforcedDiagonal
  name: reinforced wall
  components:
  - type: Sprite
    drawdepth: Walls
    sprite: Structures/Walls/reinforced_diagonal.rsi
    state: state0
  - 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
  parent: BaseWall
  id: WallRiveted
  name: riveted wall
  components:
  - type: Sprite
    sprite: Structures/Walls/riveted.rsi
  - type: Icon
    sprite: Structures/Walls/riveted.rsi
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: StructuralMetallicStrong
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1000
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: riveted
  - type: StaticPrice
    price: 150

- type: entity
  parent: BaseWall
  id: WallSandstone
  name: sandstone wall
  components:
  - type: Sprite
    sprite: Structures/Walls/sandstone.rsi
  - type: Icon
    sprite: Structures/Walls/sandstone.rsi
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: sandstone

- type: entity
  parent: BaseWall
  id: WallSilver
  name: silver wall
  components:
  - type: Sprite
    sprite: Structures/Walls/silver.rsi
  - type: Icon
    sprite: Structures/Walls/silver.rsi
  - type: Construction
    graph: Girder
    node: silverWall
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: IconSmooth
    key: walls
    base: silver

#shuttle walls
- type: entity
  parent: WallDiagonalBase
  id: WallShuttleDiagonal
  name: shuttle wall
  components:
  - type: Sprite
    drawdepth: Walls
    sprite: Structures/Walls/shuttle_diagonal.rsi
    state: state0
  - type: Icon
    sprite: Structures/Walls/shuttle_diagonal.rsi
    state: state0
  - 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
        density: 2000
  - 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: Construction
    graph: Girder
    node: diagonalshuttleWall
  - type: RadiationBlocker
    resistance: 5
  - type: StaticPrice
    price: 200

- type: entity
  parent: BaseWall
  id: WallShuttle
  name: shuttle wall
  components:
  - 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: 400
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: StaticPrice
    price: 250
  - type: RadiationBlocker
    resistance: 5
  - type: Sprite
    sprite: Structures/Walls/shuttle.rsi
  - type: Icon
    sprite: Structures/Walls/shuttle.rsi
    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: 1
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - WallLayer
        density: 2000

- type: entity
  parent: BaseWall
  id: WallSolid
  name: solid wall
  components:
  - type: Sprite
    sprite: Structures/Walls/solid.rsi
  - type: WallReplacementMarker
  - type: Construction
    graph: Girder
    node: wall
  - type: Icon
    sprite: Structures/Walls/solid.rsi
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - 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:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: IconSmooth
    key: walls
    base: solid

- type: entity
  parent: WallDiagonalBase
  id: WallSolidDiagonal
  name: solid wall
  components:
  - type: Sprite
    drawdepth: Walls
    sprite: Structures/Walls/solid_diagonal.rsi
    state: state0
  - 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
  id: WallSolidRust
  suffix: rusted
  components:
  - type: Sprite
    sprite: Structures/Walls/solid_rust.rsi
  - type: Icon
    sprite: Structures/Walls/solid_rust.rsi
    state: full
  - type: Construction
    graph: Girder
    node: wallrust
  - type: IconSmooth
    key: walls
    base: solid
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]

- type: entity
  parent: BaseWall
  id: WallSolidChitin
  name: solid chitin
  components:
  - type: Tag
    tags:
      - Wall
  - 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:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Sprite
    sprite: Structures/Walls/xeno.rsi
  - type: Icon
    sprite: Structures/Walls/xeno.rsi
  - type: IconSmooth
    key: chitin
    base: solid
  - type: Construction
    graph: Girder
    node: wallChitin
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8

- type: entity
  parent: BaseWall
  id: WallReinforcedChitin
  name: reinforced chitin
  components:
  - type: Sprite
    sprite: Structures/Walls/xeno.rsi
  - type: Icon
    sprite: Structures/Walls/xeno.rsi
    state: rgeneric
  - 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: 400
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ReinforcedWallVisuals.DeconstructionStage:
        ReinforcedWallVisualLayers.Deconstruction:
          -1: { visible: false }
          0: { state: reinf_construct-0, visible: true}
          1: { state: reinf_construct-1, visible: true}
          2: { state: reinf_construct-2, visible: true}
          3: { state: reinf_construct-3, visible: true}
          4: { state: reinf_construct-4, visible: true}
          5: { state: reinf_construct-5, visible: true}
  - type: StaticPrice
    price: 250
  - type: RadiationBlocker
    resistance: 5
  - type: IconSmooth
    key: chitin
    base: reinf_over
  - type: Construction
    graph: Girder
    node: reinforcedWallChitin

- type: entity
  parent: WallPlastitanium
  id: WallXenoborg
  name: xenoborg wall
  components:
  - type: Sprite
    sprite: Structures/Walls/xenoborg.rsi
  - type: Icon
    sprite: Structures/Walls/xenoborg.rsi
  - type: IconSmooth
    key: walls
    base: xenoborg

- type: entity
  parent: WallPlastitaniumDiagonal
  id: WallXenoborgDiagonal
  name: xenoborg wall
  suffix: diagonal
  components:
  - type: Sprite
    drawdepth: Walls
    sprite: Structures/Walls/xenoborg_diagonal.rsi
    state: state0
  - type: Icon
    sprite: Structures/Walls/xenoborg_diagonal.rsi
    state: state0

- type: entity
  parent: BaseWall
  id: WallUranium
  name: uranium wall
  components:
  - type: Sprite
    sprite: Structures/Walls/uranium.rsi
  - type: Icon
    sprite: Structures/Walls/uranium.rsi
  - type: Construction
    graph: Girder
    node: uraniumWall
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
      - !type:ChangeConstructionNodeBehavior
        node: girder
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - WallLayer
        density: 6000
  - type: IconSmooth
    key: walls
    base: uranium
  - type: RadiationBlocker
    resistance: 6

- type: entity
  parent: BaseWall
  id: WallWood
  name: wood wall
  description: The traditional greytide defense.
  components:
  - type: Sprite
    sprite: Structures/Walls/wood.rsi
  - type: Icon
    sprite: Structures/Walls/wood.rsi
  - type: Construction
    graph: Barricade
    node: woodWall
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroyHeavy
    - trigger:
        !type:DamageTrigger
        damage: 150
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroyHeavy
      - !type:ChangeConstructionNodeBehavior
        node: Barricade
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: IconSmooth
    key: woods
    base: wood

- type: entity
  parent: BaseWall
  id: WallWeb
  name: web wall
  description: Keeps the spiders in and the greytide out.
  components:
  - type: MeleeSound
    soundGroups:
      Brute:
        path:
          "/Audio/Weapons/slash.ogg"
  - type: Damageable
    damageModifierSet: Web
  - type: Sprite
    sprite: Structures/Walls/web.rsi
  - type: Icon
    sprite: Structures/Walls/web.rsi
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 30
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWebSilk:
            min: 1
            max: 1
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroy
  - type: IconSmooth
    key: webs
    base: wall
  - type: Construction
    graph: WebStructures
    node: wall


# Lavalend Walls

- type: entity
  parent: BaseWall
  id: WallNecropolis
  name: stone wall
  components:
  - type: Sprite
    sprite: Structures/Walls/necropolis.rsi
  - type: Icon
    sprite: Structures/Walls/necropolis.rsi
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 1000
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: necropolis

- type: entity
  parent: BaseWall
  id: WallMining
  name: mining wall
  components:
  - type: Sprite
    sprite: Structures/Walls/mining.rsi
  - type: Icon
    sprite: Structures/Walls/mining.rsi
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 700
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: walls
    base: mining
  - type: RandomIconSmooth
    randomStates:
    - mining
    - miningB
  - type: Appearance

- type: entity
  parent: WallDiagonalBase
  id: WallMiningDiagonal
  name: mining wall
  components:
  - type: Sprite
    drawdepth: Walls
    sprite: Structures/Walls/mining_diagonal.rsi
    state: state0
  - 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

- type: entity
  parent: BaseWall
  id: WallVaultAlien
  name: alien vault wall
  description: A mysterious ornate looking wall. There may be ancient dangers inside.
  components:
  - type: Sprite
    sprite: Structures/Walls/vault.rsi
    state: alienvault
  - type: Icon
    sprite: Structures/Walls/vault.rsi
    state: alienvault
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 500
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entity
  parent: WallVaultAlien
  id: WallVaultRock
  name: rock vault wall
  components:
  - type: Sprite
    sprite: Structures/Walls/vault.rsi
    state: rockvault
  - type: Icon
    sprite: Structures/Walls/vault.rsi
    state: rockvault

- type: entity
  parent: WallVaultAlien
  id: WallVaultSandstone
  name: sandstone vault wall
  components:
  - type: Sprite
    sprite: Structures/Walls/vault.rsi
    state: sandstonevault
  - type: Icon
    sprite: Structures/Walls/vault.rsi
    state: sandstonevault

# Mime

- type: entity
  id: WallInvisible
  name: invisible wall
  components:
  - type: TimedDespawn
    lifetime: 15
  - type: Tag
    tags:
      - Wall
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
            bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - GlassLayer
  - type: Airtight

- type: entity
  id: WallForce
  name: force wall
  components:
  - type: TimedDespawn
    lifetime: 10
  - type: Tag
    tags:
    - Wall
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - SpecialWallLayer
        layer:
        - SpecialWallLayer
  - type: Airtight
  - type: Sprite
    sprite: Structures/Magic/forcewall.rsi
    state: forcewall
  - type: Icon
    sprite: Structures/Magic/forcewall.rsi
    state: forcewall

- type: entity
  parent: BaseWall
  id: WallCobblebrick
  name: cobblestone brick wall
  description: Stone by stone, perfectly fitted together to form a wall.
  components:
  - type: Sprite
    sprite: Structures/Walls/cobblebrick.rsi
  - type: Icon
    sprite: Structures/Walls/cobblebrick.rsi
  - type: RCDDeconstructable
    cost: 6
    delay: 8
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: cobblebricks
    base: cobblebrick

- type: entity
  parent: WallCobblebrick
  id: WallBasaltCobblebrick
  name: basalt brick wall
  components:
  - type: Sprite
    sprite: Structures/Walls/cobblebrick_basalt.rsi
  - type: Icon
    sprite: Structures/Walls/cobblebrick_basalt.rsi
  - type: IconSmooth
    key: cobblebricks
    base: cobblebrick

- type: entity
  parent: WallCobblebrick
  id: WallSnowCobblebrick
  name: snow brick wall
  description: A cold, not-so-impenetrable wall.
  components:
  - type: Sprite
    sprite: Structures/Walls/cobblebrick_snow.rsi
  - type: Icon
    sprite: Structures/Walls/cobblebrick_snow.rsi
  - type: IconSmooth
    key: cobblebricks
    base: cobblebrick

- type: entity
  parent: WallCobblebrick
  id: WallAsteroidCobblebrick
  name: asteroid stone brick wall
  components:
  - type: Sprite
    sprite: Structures/Walls/cobblebrick_asteroid.rsi
  - type: Icon
    sprite: Structures/Walls/cobblebrick_asteroid.rsi
  - type: IconSmooth
    key: cobblebricks
    base: cobblebrick

- type: entity
  parent: WallCobblebrick
  id: WallSandCobblebrick
  name: sandstone brick wall
  components:
  - type: Sprite
    sprite: Structures/Walls/cobblebrick_sand.rsi
  - type: Icon
    sprite: Structures/Walls/cobblebrick_sand.rsi
  - type: IconSmooth
    key: cobblebricks
    base: cobblebrick

- type: entity
  parent: WallCobblebrick
  id: WallChromiteCobblebrick
  name: chromite brick wall
  components:
  - type: Sprite
    sprite: Structures/Walls/cobblebrick_chromite.rsi
  - type: Icon
    sprite: Structures/Walls/cobblebrick_chromite.rsi
  - type: IconSmooth
    key: cobblebricks
    base: cobblebrick

- type: entity
  parent: WallCobblebrick
  id: WallAndesiteCobblebrick
  name: andesite brick wall
  components:
  - type: Sprite
    sprite: Structures/Walls/cobblebrick_andesite.rsi
  - type: Icon
    sprite: Structures/Walls/cobblebrick_andesite.rsi
  - type: IconSmooth
    key: cobblebricks
    base: cobblebrick

# Cardboard

- type: entity
  id: Cardwall
  parent: BaseStructure
  name: cardboard wall
  description: Budget cuts are hitting hard.
  placement:
    mode: SnapgridCenter
    snap:
    - Wall
  components:
  - type: MeleeSound
    soundGroups:
      Brute:
        path:
          "/Audio/Weapons/pierce.ogg"
  - type: Tag
    tags:
    - Wall
  - type: Sprite
    drawdepth: SmallObjects #so bullets pass 'through'
    sprite: Structures/Walls/card.rsi
  - type: Icon
    sprite: Structures/Walls/card.rsi
    state: full
  - type: Construction
    graph: Cardwall
    node: cardwall
    deconstructionTarget: start
  - type: Damageable
    damageContainer: StructuralInorganic
    damageModifierSet: Card
  - type: Physics
    bodyType: Static
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.5,-0.5,0.5,0.5"
        mask:
        - FullTileMask
        layer:
        - FlimsyLayer
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 80 #excess damage (nuke?). avoid computational cost of spawning entities.
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 40
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialCardboard:
            min: 1
            max: 2
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: IconSmooth
    key: cards
    base: card
  - type: Occluder
  - type: BlockWeather
  - type: SunShadowCast
