- type: entity
  id: Bookshelf
  parent: BaseStructure
  name: "bookshelf"
  description: Mostly filled with books.
  components:
  - type: Sprite
    sprite: Structures/Furniture/bookshelf.rsi
    snapCardinals: true
    layers:
      - state: base
      - state: book-0
      - map: ["enum.StorageFillLayers.Fill"]
  - type: Appearance
  - type: StorageFillVisualizer
    maxFillLevels: 21
    fillBaseName: book
  - type: Damageable
    damageModifierSet: Wood
    damageContainer: StructuralInorganic
  - type: Destructible
    thresholds:
    - trigger: # Excess damage, don't spawn entities
        !type:DamageTrigger
        damage: 100
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroyHeavy
      - !type:DoActsBehavior
        acts: ["Destruction"]
    - trigger:
        !type:DamageTrigger
        damage: 30
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: WoodDestroyHeavy
      - !type:SpawnEntitiesBehavior
        spawn:
          MaterialWoodPlank:
            min: 2
            max: 3
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Tag
    tags:
    - Structure
    - Wooden
  - type: Transform
    anchored: true
    noRot: true
  - type: Physics
    bodyType: Static
  - type: Anchorable
  - type: Pullable
  - type: Occluder
  - type: Storage
    grid:
    - 0,0,9,3
    maxItemSize: Normal
    whitelist:
      tags:
        - Document
        - Folder
        - Write
        - Book
        - Spellbook
  - type: UserInterface
    interfaces:
      enum.StorageUiKey.Key:
        type: StorageBoundUserInterface
  - type: InteractionOutline
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
  - type: Construction
    graph: Bookshelf
    node: bookshelf
  - type: BlockWeather
