# When adding new crayons, also add it to id: AllCrayonsTable

- type: entity
  abstract: true
  parent: BaseItem
  id: CrayonInedible
  name: crayon
  description: A colourful crayon. A forbidden flavor.
  components:
  - type: Sprite
    sprite: Objects/Fun/crayons.rsi
  - type: Item
    sprite: Objects/Fun/crayons.rsi
    size: Tiny
  - type: Tag
    tags:
    - Write
    - Crayon
    - Trash
    - Recyclable
  - type: SpaceGarbage
  - type: UserInterface
    interfaces:
      enum.CrayonUiKey.Key:
        type: CrayonBoundUserInterface
  - type: Crayon
    selectedState: like
  - type: LimitedCharges
    maxCharges: 25
  - type: StaticPrice
    price: 5

- type: entity
  abstract: true
  parent: CrayonInedible
  id: Crayon
  description: A colourful crayon. Looks tasty. Mmmm...
  components:
  - type: Edible
  - type: FlavorProfile
    flavors:
    - chewy
    - bitter
  - type: SolutionContainerManager
    solutions:
      food:
        reagents:
        - ReagentId: Nutriment
          Quantity: 3
        - ReagentId: MindbreakerToxin
          Quantity: 2

# special crayons

- type: entity
  parent: Crayon
  id: CrayonMime
  name: mime crayon
  components:
  - type: Sprite
    state: mime
  - type: Item
    heldPrefix: mime
  - type: Crayon
    color: white
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonWhite
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonRainbow
  name: rainbow crayon
  components:
  - type: Sprite
    state: rainbow
  - type: Item
    heldPrefix: rainbow
  - type: Crayon
    color: Red
    selectableColor: true
  - type: LimitedCharges
    maxCharges: 30

- type: entity
  parent: CrayonRainbow
  id: CrayonInfinite # should not be player available to prevent decal spam
  categories: [ DoNotMap ]
  name: infinite crayon
  components:
  - type: Crayon
    deleteEmpty: false
  - type: AutoRecharge
    rechargeDuration: 5

- type: entity
  parent: CrayonInedible
  id: CrayonBorg
  name: electric crayon
  description: Supposedly the most delicious crayon type in all the universes; unfortunately, you cannot eat.
  components:
  - type: Sprite
    state: electric
  - type: Item
    heldPrefix: electric
  - type: Crayon
    deleteEmpty: false
    color: Red
    selectableColor: true
  - type: AutoRecharge
    rechargeDuration: 5

# monocolor crayons

- type: entity
  parent: Crayon
  id: CrayonWhite
  name: white crayon
  components:
  - type: Sprite
    state: white
  - type: Item
    heldPrefix: white
  - type: Crayon
    color: white
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonWhite
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonBlack
  name: black crayon
  components:
  - type: Sprite
    state: black
  - type: Item
    heldPrefix: black
  - type: Crayon
    color: black
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonBlack
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonRed
  name: red crayon
  components:
  - type: Sprite
    state: red
  - type: Item
    heldPrefix: red
  - type: Crayon
    color: red
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonRed
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonOrange
  name: orange crayon
  components:
  - type: Sprite
    state: orange
  - type: Item
    heldPrefix: orange
  - type: Crayon
    color: orange
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonOrange
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonYellow
  name: yellow crayon
  components:
  - type: Sprite
    state: yellow
  - type: Item
    heldPrefix: yellow
  - type: Crayon
    color: yellow
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonYellow
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonGreen
  name: green crayon
  components:
  - type: Sprite
    state: green
  - type: Item
    heldPrefix: green
  - type: Crayon
    color: "#A8E61D"
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonGreen
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonBlue
  name: blue crayon
  components:
  - type: Sprite
    state: blue
  - type: Item
    heldPrefix: blue
  - type: Crayon
    color: "#00B7EF"
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonBlue
    - Recyclable
    - Trash

- type: entity
  parent: Crayon
  id: CrayonPurple
  name: purple crayon
  components:
  - type: Sprite
    state: purple
  - type: Item
    heldPrefix: purple
  - type: Crayon
    color: purple
  - type: Tag
    tags:
    - Write
    - Crayon
    - CrayonPurple
    - Recyclable
    - Trash

- type: entity
  parent: BoxCardboard
  id: CrayonBoxEmpty
  name: crayon box
  description: It's a box of crayons.
  components:
  - type: Sprite
    sprite: Objects/Fun/crayons.rsi
    state: box
  - type: Storage
    grid:
    - 0,0,7,0
    maxItemSize: Tiny
  - type: Item
    sprite: Objects/Fun/crayons.rsi
    size: Small
    shape:
    - 0,0,1,1
    heldPrefix: box
  - type: ItemMapper
    mapLayers:
      black_box:
        whitelist:
          tags:
          - CrayonBlack
      blue_box:
        whitelist:
          tags:
          - CrayonBlue
      green_box:
        whitelist:
          tags:
          - CrayonGreen
      orange_box:
        whitelist:
          tags:
          - CrayonOrange
      purple_box:
        whitelist:
          tags:
          - CrayonPurple
      red_box:
        whitelist:
          tags:
          - CrayonRed
      yellow_box:
        whitelist:
          tags:
          - CrayonYellow
      white_box:
        whitelist:
          tags:
          - CrayonWhite
  - type: Appearance

- type: entity
  parent: CrayonBoxEmpty
  id: CrayonBox
  suffix: Filled
  components:
  - type: EntityTableContainerFill
    containers:
      storagebase: !type:AllSelector
        children:
        - id: CrayonRed
        - id: CrayonOrange
        - id: CrayonYellow
        - id: CrayonGreen
        - id: CrayonBlue
        - id: CrayonPurple
        - id: CrayonBlack
        - id: CrayonWhite
