- type: entity
  name: book
  parent: BaseItem
  id: BookBase
  description: A hardcover book.
  components:
  - type: Sprite
    sprite: Objects/Misc/books.rsi
    layers:
    - state: paper
    - state: cover_base
      color: "#332d27"
      map: [ "cover" ]
    - state: decor_wingette
      color: "#453f3a"
      map: [ "decor" ]
    - state: icon_text
      map: [ "icon" ]
    - state: overlay_null
      map: [ "overlay" ]
  - type: Paper
    contentSize: 12000
  - type: ActivatableUI
    key: enum.PaperUiKey.Key
    requiresComplex: false
  - type: UserInterface
    interfaces:
      enum.PaperUiKey.Key:
        type: PaperBoundUserInterface
  - type: Tag
    tags:
    - Book
  - type: PaperVisuals
    backgroundImagePath: "/Textures/Interface/Paper/paper_background_book.svg.96dpi.png"
    backgroundPatchMargin: 23.0, 16.0, 14.0, 15.0
    contentMargin: 20.0, 20.0, 20.0, 20.0
  - type: MeleeWeapon  # This was originally a feature exclusive to the law book but maintainers decided it should apply to all books for consistency. I frankly disagree but :P
    soundHit:
      collection: Punch
    damage:
      types:
        Blunt: 1
  - type: DamageOtherOnHit
    damage:
      types:
        Blunt: 1

- type: entity
  parent: BaseItem
  id: BaseGuidebook
  abstract: true
  suffix: guidebook
  components:
  - type: Sprite
    sprite: Objects/Misc/books.rsi
  - type: Tag
    tags:
    - Book
  - type: GuideHelp
    openOnActivation: true
    guides:
    - SS14
  - type: MeleeWeapon  # Should write it again since BaseGuidebook doesn't inherit BookBase
    soundHit:
      collection: Punch
    damage:
      types:
        Blunt: 1
  - type: DamageOtherOnHit
    damage:
      types:

- type: entity
  id: BookSpaceEncyclopedia
  parent: BaseGuidebook
  name: space encyclopedia
  description: An encyclopedia containing all the knowledge. The author of this encyclopedia is unknown.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#0a2a6b"
    - state: decor_wingette
      color: "#082561"
    - state: icon_text
      color: gold
    - state: icon_planet
      color: "#42b6f5"
  - type: GuideHelp
    guides:
    - SS14

- type: entity
  id: BookTheBookOfControl
  parent: BaseGuidebook
  name: the book of control
  description: Essential to become robust.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: black
    - state: decor_wingette
      color: "#bbbbbb"
    - state: icon_glow
      color: red
    - state: icon_corner
      color: red
  - type: GuideHelp
    guides:
    - Controls

- type: entity
  id: BookBartendersManual
  parent: BaseGuidebook
  name: bartender's manual
  description: This manual is stained with beer.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#004848"
    - state: decor_wingette
      color: "#006666"
    - state: icon_bar
  - type: GuideHelp
    guides:
    - Bartender
    - Drinks

- type: entity
  id: BookHowToCookForFortySpaceman
  parent: BaseGuidebook
  name: How To Cook For Forty Spacemen
  description: A book about cooking written by a space chef.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#e22541"
    - state: decor_wingette
    - state: icon_apple
  - type: GuideHelp
    guides:
    - Chef
    - FoodRecipes

- type: entity
  id: BookLeafLoversSecret
  parent: BaseGuidebook
  name: leaf lover's secret
  description: It has the strong smell of dirt. It motivates you to feed and seed. # starcup: rewritten for tone
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#0e5a24"
    - state: decor_wingette
      color: "#2fa151"
    - state: icon_cabbage
    - state: icon_corner
      color: gold
  - type: GuideHelp
    guides:
    - Botany
    - Chemicals

- type: entity
  id: BookEngineersHandbook
  parent: BaseGuidebook
  name: engineer's handbook
  description: A handbook about engineering prepared by Electra Dynamics. # starcup - NT-SC swap
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#6c4718"
    - state: decor_wingette
      color: "#b5913c"
    - state: icon_wrench
    - state: icon_corner
      color: gold
  - type: GuideHelp
    guides:
    - Engineering

- type: entity
  id: BookScientistsGuidebook
  parent: BaseGuidebook
  name: scientist's guidebook
  description: A guidebook about science prepared by Cybersun Industries. # starcup - NT-SC swap
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#542485"
    - state: decor_wingette_circle
      color: "#be69f0"
    - state: icon_dna
  - type: GuideHelp
    guides:
    - Science

- type: entity
  id: BookSecurity
  parent: BaseGuidebook
  name: security 101
  description: A book about security written by SyndComm. There's a bit of blood along the spine, quite possibly belonging to the previous owner. # starcup: rewritten for tone
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#ab1515"
    - state: decor_wingette
      color: "#e05334"
    - state: icon_stunbaton
  - type: MeleeWeapon
    wideAnimationRotation: 180
    damage:
      types:
        Blunt: 6
  - type: GuideHelp
    guides:
    - Security
    - Antagonists

- type: entity
  id: BookHowToKeepStationClean
  parent: BaseGuidebook
  name: how to keep station clean
  description: This book is very clean.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#550c82"
    - state: decor_wingette
    - state: icon_bucket
  - type: GuideHelp
    guides:
    - Janitorial

- type: entity
  id: BookHowToRockAndStone
  parent: BaseGuidebook
  name: how to rock and stone
  description: A very detailed guide about salvage written by Karl, a legendary space miner, however he's missing. It motivates you to rock and stone.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#52320b"
    - state: decor_wingette
      color: "#e69a3e"
    - state: icon_glow
    - state: icon_diamond
    - state: icon_text
      color: "#fcdf74"
  - type: GuideHelp
    guides:
    - Salvage

- type: entity
  id: BookMedicalReferenceBook
  parent: BaseGuidebook
  name: medical reference book
  description: A reference book about medical written by an old doctor. The handwriting is barely comprehensible.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#cccccc"
    - state: decor_wingette
      color: "#f7f7f7"
    - state: icon_medical
      color: "#58abcc"
  - type: GuideHelp
    guides:
    - Medical

- type: entity
  id: BookHowToSurvive
  parent: BaseGuidebook
  name: how to survive
  description: Ironically the author of this book is dead.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_old
      color: "#6c4718"
    - state: decor_wingette
      color: "#b5913c"
    - state: icon_glow
      color: red
    - state: icon_wrench
    - state: overlay_blood
  - type: GuideHelp
    guides:
    - Survival

- type: entity
  id: BookChemicalCompendium
  parent: BaseGuidebook
  name: chempendium
  description: A comprehensive guide written by some old skeleton of a professor about chemical synthesis.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#2a7b74"
    - state: decor_wingette
      color: "#2a7b74"
    - state: icon_chemical
  - type: GuideHelp
    guides:
    - Chemicals
    - Chemist

- type: entity
  id: BookAILawCompendium
  parent: BaseGuidebook
  name: My, Robot
  description: A dictionary of all the ways silicons can go wrong. By Isaac Crewsimov.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_strong
      color: "#A8162B"
    - state: icon_borg
      color: "#916161"
    - state: detail_rivets
      color: "#DDDDDD"
  - type: GuideHelp
    guides:
    - Lawsets

- type: entity
  id: BookSpaceLaw
  parent: BaseGuidebook
  name: space law
  description: A set of SyndComm guidelines for maintaining fairness, justice, and control on their space stations. # starcup - NT-SC swap
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_strong
      color: "#87011c"
    - state: icon_law
      color: "#f7d61a"
  - type: GuideHelp
    guides:
    - SpaceLaw

- type: entity
  parent: BookBase
  id: BookRandom
  suffix: random visual
  description: Each book is unique! What is hidden in this one?
  components:
  - type: RandomMetadata
    nameSegments:
    - BookHintAppearances
    - BookTypes
    nameFormat: name-format-book
  - type: RandomSprite
    available:
      - cover:
          cover_base: Sixteen
          cover_old: Sixteen
          cover_strong: Sixteen
        decor:
          decor_wingette: Sixteen
          decor_wingette_circle: Sixteen
          decor_bottom: Sixteen
          decor_middle: Sixteen
          decor_spine: Sixteen
          decor_diagonal: Sixteen
          decor_vertical_middle: Sixteen
          icon_corner: Sixteen
          icon_mount: ""
        icon:
          icon_biohazard: Sixteen
          icon_borg: ""
          icon_banana: ""
          icon_glow: Sixteen
          icon_hacking: ""
          icon_law: Sixteen
          icon_magnifier: ""
          icon_nuclear: ""
          icon_time: Sixteen
          icon_aurora: Sixteen
          icon_briefcase: ""
          icon_eye: ""
          icon_letter_N: ""
          icon_letter_P: ""
          icon_lightning: ""
          icon_planet: ""
          icon_possum: ""
          icon_question: Sixteen
          icon_scmmd: ""
          icon_stars: Sixteen
          icon_stars2: Sixteen
          icon_temple: Sixteen
          icon_tree: ""
          icon_pentagramm: Sixteen
          icon_fish: ""
          icon_origami: ""
          icon_skull: ""
          icon_text: ""
          icon_text2: ""
          icon_text3: ""
        overlay:
          overlay_blood: ""
          overlay_dirt: Sixteen
          detail_bookmark: Sixteen
          detail_rivets: Sixteen
          overlay_null: ""

- type: entity
  parent: BookRandom
  id: BookRandomStory
  suffix: random visual, random story
  components:
  - type: PaperRandomStory
    template: GenericStory

- type: entity
  parent: BookBase
  id: BookAtmosDistro
  name: "Newton's Guide to Atmos: The Distro"
  description: There are endless illegible notes scribbled in the margins. Most of the text is covered in handwritten question marks.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#366ed6"
    - state: decor_wingette
      color: "#2739b0"
    - state: icon_atmos
    - state: icon_corner
      color: gold
  - type: Paper
    content: book-text-atmos-distro

- type: entity
  parent: BookBase
  id: BookAtmosWaste
  name: "Newton's Guide to Atmos: Waste"
  description: There are endless illegible notes scribbled in the margins. Most of the text is covered in handwritten question marks.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#db233f"
    - state: decor_wingette
      color: "#ab0730"
    - state: icon_atmos
    - state: icon_corner
      color: gold
  - type: Paper
    content: book-text-atmos-waste

- type: entity
  parent: BookBase
  id: BookAtmosAirAlarms
  name: "Newton's Guide to Atmos: Air Alarms"
  description: There are endless illegible notes scribbled in the margins. Most of the text is covered in handwritten question marks.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#bfb328"
    - state: decor_wingette
      color: "#9c7c14"
    - state: icon_atmos
    - state: icon_corner
      color: gold
  - type: Paper
    content: book-text-atmos-alarms

- type: entity
  parent: BookBase
  id: BookAtmosVentsMore
  name: "Newton's Guide to Atmos: Vents and More"
  description: There are endless illegible notes scribbled in the margins. Most of the text is covered in handwritten question marks.
  components:
  - type: Sprite
    layers:
    - state: paper
    - state: cover_base
      color: "#3ec78e"
    - state: decor_wingette
      color: "#28a15a"
    - state: icon_atmos
    - state: icon_corner
      color: gold
  - type: Paper
    content: book-text-atmos-vents
