# SPDX-FileCopyrightText: 2022 CrudeWax <75271456+CrudeWax@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 theashtronaut <112137107+theashtronaut@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Echo <SammyPawsM@gmail.com>
# SPDX-FileCopyrightText: 2023 dontbetank <59025279+dontbetank@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 eclips_e <67359748+Just-a-Unity-Dev@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 end <72604018+laok233@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 eoineoineoin <eoin.mcloughlin+gh@gmail.com>
# SPDX-FileCopyrightText: 2023 notquitehadouken <1isthisameme>
# SPDX-FileCopyrightText: 2023 vanx <61917534+Vaaankas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 vanx <vanx#5477>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 KonstantinAngelov <168754339+KonstantinAngelov@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Moomoobeef <62638182+Moomoobeef@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PoTeletubby <ajcraigaz@gmail.com>
# SPDX-FileCopyrightText: 2024 PotentiallyTom <67602105+PotentiallyTom@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Tayrtahn <tayrtahn@gmail.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: book
  parent: BaseItem
  id: BookBase
  description: A hardcover book.
  components:
   # Goobstation edit start
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Goobstation/Items/handling/book_pickup.ogg
      params:
        volume: -4
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/_Goobstation/Items/handling/book_drop.ogg
      params:
        volume: -4
  - type: EmitSoundOnLand
    sound:
      path: /Audio/_Goobstation/Items/handling/book_drop.ogg
      params:
        volume: -4
  # Goobstation edit end
  - 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
    - Paper # Goobstation - Moth food
  - 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
  # Goobstation Edit Start - Moth food
  - type: Food
    requiresSpecialDigestion: true
    delay: 15
    forceFeedDelay: 15
  - type: BadFood
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Fiber
          Quantity: 10
  - type: FlavorProfile
    flavors:
    - paper
    ignoreReagents:
    - Fiber
  # Goobstation Edit End

- type: entity
  parent: BaseItem
  id: BaseGuidebook
  abstract: true
  suffix: guidebook
  components:
  - type: Sprite
    sprite: Objects/Misc/books.rsi
  - type: Tag
    tags:
    - Book
    - Paper # Goobstation - Moth food
  - 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:
  # Goobstation Edit Start - Moth food
  - type: Food
    requiresSpecialDigestion: true
    delay: 15
    forceFeedDelay: 15
  - type: BadFood
  - type: SolutionContainerManager
    solutions:
      food:
        maxVol: 10
        reagents:
        - ReagentId: Fiber
          Quantity: 10
  - type: FlavorProfile
    flavors:
    - paper
    ignoreReagents:
    - Fiber
  # Goobstation Edit End

- 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 a strong weed smell. It motivates you to feed and seed.
  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 written by Nanotrasen.
  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 written by Nanotrasen.
  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 Nanotrasen. The book is stained with blood. It seems to have been used more as a weapon than reading material.
  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: BookSpaceLaw
  parent: BaseGuidebook
  name: space law
  description: A set of Nanotrasen guidelines for keeping law and order on their space stations.
  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
