- type: entityTable
  id: FilingCabinetFillTable
  table: !type:AllSelector
    children:
    - !type:GroupSelector
      rolls: !type:RangeNumberSelector
        range: 2, 4
      children:
      - id: BoxFolderBase
      - id: BoxFolderRed
      - id: BoxFolderBlue
      - id: BoxFolderYellow
      - id: BoxFolderGrey
      - id: BoxFolderBlack
      - id: BoxFolderGreen
    - !type:GroupSelector
      rolls: !type:RangeNumberSelector
        range: 0, 3
      children:
      - id: Paper
      - id: PaperOffice
    - !type:GroupSelector
      prob: .3
      rolls: !type:ConstantNumberSelector
        value: 2
      children:
      - id: Pen
    - !type:GroupSelector
      prob: 0.15
      children:
      - !type:AllSelector
        weight: 0.2
        children:
        - id: RubberStampApproved
        - id: RubberStampDenied
      - id: RubberStampGreytide
        weight: 0.1
      - id: LuxuryPen
      - id: NanoTaskCartridge

- type: entity
  parent: [ BaseStructureDynamic, BaseBagOpenClose, StructureHealthContainerWeak ]
  id: BaseFilingCabinet
  description: A cabinet for all your filing needs.
  suffix: Empty
  abstract: true
  components:
  - type: Storage
    grid:
    - 0,0,9,3
    maxItemSize: Normal
  - type: Sprite
    sprite: Structures/Storage/cabinets.rsi
    noRot: true
  - type: Appearance
  - type: UserInterface
    interfaces:
      enum.StorageUiKey.Key:
        type: StorageBoundUserInterface
  - type: Transform
    noRot: true
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.18,-0.48,0.18,0.48"
        density: 200
        mask:
        - MachineMask
        layer:
        - MachineLayer
  - type: InteractionOutline
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
  - type: Damageable
    damageModifierSet: SteelMod
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 60
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 2
  - type: StaticPrice
    price: 80
  - type: Construction
    graph: FilingCabinet

- type: entity
  name: filing cabinet
  parent: BaseFilingCabinet
  id: filingCabinet
  components:
  - type: Sprite
    state: filingcabinet
    layers:
    - state: filingcabinet
    - state: filingcabinet-open
      map: ["openLayer"]
  - type: Construction
    node: filingCabinet

- type: entity
  name: tall cabinet
  parent: BaseFilingCabinet
  id: filingCabinetTall
  components:
  - type: Sprite
    state: tallcabinet
    layers:
    - state: tallcabinet
    - state: tallcabinet-open
      map: ["openLayer"]
  - type: Construction
    node: tallCabinet

- type: entity
  name: chest drawer
  parent: BaseFilingCabinet
  id: filingCabinetDrawer
  description: A small drawer for all your filing needs, Now with wheels!
  components:
  - type: Sprite
    state: chestdrawer
    layers:
    - state: chestdrawer
    - state: chestdrawer-open
      map: ["openLayer"]
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.22,-0.42,0.22,0.34"
        density: 210
        mask:
        - MachineMask
        layer:
        - MachineLayer
  - type: Construction
    node: chestDrawer
  - type: RequireProjectileTarget

- type: entity
  abstract: true
  id: BaseBureaucraticStorageFill
  suffix: Filled
  components:
  - type: EntityTableContainerFill
    containers:
      storagebase: !type:NestedSelector
        tableId: FilingCabinetFillTable

- type: entity
  parent: [BaseBureaucraticStorageFill, filingCabinet]
  id: filingCabinetRandom

- type: entity
  parent: [BaseBureaucraticStorageFill, filingCabinetTall]
  id: filingCabinetTallRandom

- type: entity
  parent: [BaseBureaucraticStorageFill, filingCabinetDrawer]
  id: filingCabinetDrawerRandom
