- type: entity
  parent: WallBrick
  id: WallBrick106
  components:
  - type: RCDDeconstructable
    cost: 666
    delay: 666
    fx: EffectRCDDeconstruct8
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 9999
      behaviors:
      - !type:SpawnEntitiesBehavior
        spawn:
          Girder:
            min: 1
            max: 1
      - !type:DoActsBehavior
        acts: [ "Destruction" ]

- type: entityTable
  id: BackroomsEntrance
  table: !type:GroupSelector
    children:
    - id: CableApcExtension
      amount: 1
    - id: ScpAirlockGlass
      amount: 1

- type: entityTable
  id: BackroomsWalls
  table: !type:GroupSelector
    children:
    - id: ExtinguisherCabinetFilled
      amount: 1
      prob: 0.05
    - id: RandomPainting
      amount: 1
      prob: 0.05
    - id: IntercomCommon
      amount: 1
      prob: 0.05

- type: entityTable
  id: BackroomsMobs
  table: !type:GroupSelector
    children:
    - id: MobScp106Monster
      amount: 2
    - id: MobScp106BigMonster
      amount: 1

- type: entityTable
  id: BaseAirlockScp
  table: !type:GroupSelector
    children:
    - id: CableApcExtension
    - id: ScpAirlockMaint

- type: dungeonConfig
  id: BackroomsBase
  layers:
  - !type:PrefabDunGen
    presets:
    - Bucket
    - Wow
    - SpaceShip
    - Tall
    fallbackTile: FloorConcreteSmooth
    roomWhitelist:
      tags:
      - SnowyLabs
      - BackroomsMineshaft

  - !type:CorridorDunGen
    width: 3
    tile: FloorConcreteSmooth

  - !type:RoomEntranceDunGen
    tile: FloorConcreteSmooth
    contents: BackroomsEntrance

  - !type:WallMountDunGen
    contents: BackroomsWalls
    tile: FloorConcreteSmooth

  - !type:BoundaryWallDunGen
    wall: WallBrick106
    cornerWall: WallBrick106
    tile: FloorConcreteSmooth

  - !type:JunctionDunGen
    width: 1
    tile: FloorConcreteSmooth
    contents: BaseAirlockScp

  - !type:AutoCablingDunGen
    entity: CableApcExtension

  - !type:CornerClutterDunGen
    contents: BaseClutter

  - !type:LimitedEntityDunGen
    entity: Scp106Backrooms
    limit: 4

  - !type:LimitedEntityDunGen
    entity: StairsUp106

  - !type:LimitedEntityDunGen
    entity: StairsDown106

  - !type:MobsDunGen
    minCount: 4
    maxCount: 9
    contents: VGRoidExteriorDungeonsMobs

  # TODO: Add Mobs/Items.
  # For items -> LimitedEntityDunGen
  # For mobs -> MobsDunGen

- type: dungeonConfig
  id: Backrooms
  layers:
  - !type:PrototypeDunGen
    proto: BackroomsBase
