- type: entity
  abstract: true
  parent: [SolutionWelder, BaseItem]
  id: BaseLighter
  name: basic lighter
  components:
  - type: IgnitionSource
    ignited: false
  - type: ItemToggle
    predictable: false
    soundActivate:
      collection: lighterOnSounds
    soundDeactivate:
      collection: lighterOffSounds
  - type: ItemToggleMeleeWeapon
    activatedDamage:
      types:
        Heat: 1
  - type: ItemToggleSize
    activatedSize: Small
  - type: ItemToggleHot
  - type: Appearance
  - type: Item
    size: Tiny
  - type: UseDelay
  - type: RefillableSolution
    solution: Welder
  - type: MeleeWeapon
    wideAnimationRotation: 180
    damage:
      types:
        Blunt: 0
  - type: Welder
    fuelConsumption: 0.01
    fuelLitCost: 0.1
    tankSafe: true
  - type: PointLight
    enabled: false
    netsync: false
    radius: 1.1 #smallest possible
    color: orange
  - type: ItemTogglePointLight
  - type: PhysicalComposition

- type: entity
  abstract: true
  parent: [SolutionWelder, SolutionToolVeryTiny]
  id: SolutionLighter
  components:
  - type: Solution
    solution:
      reagents:
      - ReagentId: WeldingFuel
        Quantity: 7.5

## Basic

- type: entity
  parent: [SolutionLighter, BaseLighter]
  id: Lighter
  name: basic lighter
  description: A simple plastic cigarette lighter.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/lighters.rsi
    layers:
    - state: icon_map
    - state: cheap_icon_base
      map: [ "skin" ]
    - state: basic_icon_top
    - state: lighter_flame
      visible: false
      shader: unshaded
      map: [ "flame" ]
  - type: RandomSprite
    available:
      - skin:
          basic_icon_base-1: ""
          basic_icon_base-2: ""
          basic_icon_base-3: ""
          basic_icon_base-4: ""
          basic_icon_base-5: ""
          basic_icon_base-6: ""
          basic_icon_base-7: ""
          basic_icon_base-8: ""
          basic_icon_base-9: ""
          basic_icon_base-10: ""
          basic_icon_base-11: ""
  - type: ToggleableVisuals
    spriteLayer: flame
    inhandVisuals:
      left:
      - state: inhand-left-flame
        shader: unshaded
      right:
      - state: inhand-right-flame
        shader: unshaded
  - type: Item
    sprite: Objects/Tools/Lighters/lighters.rsi

- type: entity
  parent: Lighter
  id: CheapLighter
  name: cheap lighter
  description: "A dangerously inexpensive plastic lighter. Don't burn your thumb!"
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/lighters.rsi
    layers:
    - state: icon_map
    - state: cheap_icon_base
      map: [ "skin" ]
    - state: cheap_icon_top
    - state: lighter_flame
      visible: false
      shader: unshaded
      map: [ "flame" ]
  - type: RandomSprite
    available:
      - skin:
          cheap_icon_base: Rainbow
  - type: Welder
    fuelConsumption: 0.02
    fuelLitCost: 0.2

- type: entity
  parent: [ SolutionLighter, BaseLighter ]
  id: DiscountDanLighter
  name: Discount Dan's lighter
  description: The worst lighter ever produced. Lighter burn is inevitable, do not refuel while lit.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/lighters.rsi
    layers:
    - state: icon_map
    - state: discount_icon_base
    - state: basic_icon_top
    - state: lighter_flame
      visible: false
      shader: unshaded
      map: [ "flame" ]
  - type: Welder # the single worst lighter invented by mankind
    fuelConsumption: 0.4
    fuelLitCost: 0.2
    tankSafe: false
  - type: Item
    sprite: Objects/Tools/Lighters/lighters.rsi
  - type: ToggleableVisuals
    spriteLayer: flame
    inhandVisuals:
      left:
      - state: inhand-left-flame
        shader: unshaded
      right:
      - state: inhand-right-flame
        shader: unshaded
  - type: PointLight
    radius: 1.5
    color: yellow
  - type: ComponentToggler
    components:
    - type: DamageOnHolding # todo this needs to make a sound or something to tell people it's burning them
      damage:
        types:
          Heat: 2

## Flippos

- type: entity
  abstract: true
  parent: [SolutionToolWelderMini, BaseLighter]
  id: BaseBrandedLighter
  components:
  - type: ItemToggle
    predictable: false
    soundActivate:
      path: /Audio/Items/Lighters/zippo_open.ogg
      params:
        volume: -5
    soundDeactivate:
      path: /Audio/Items/Lighters/zippo_close.ogg
      params:
        volume: -5
  - type: Sprite
    layers:
    - state: icon
      map: [ "base" ]
    - state: top
      map: [ "top" ]
      visible: false
    - state: open
      map: [ "open" ]
      visible: false
    - state: flame
      map: [ "flame" ]
      visible: false
      shader: unshaded
  - type: GenericVisualizer
    visuals:
      enum.ToggleableVisuals.Enabled:
        open:
          True: { visible: true }
          False: { visible: false }
        top:
          True: { visible: true }
          False: { visible: false }
        base:
          True: { visible: false }
          False: { visible: true }
  - type: ToggleableVisuals
    spriteLayer: flame
    inhandVisuals:
      left:
      - state: inhand-left-lit
        shader: unshaded
      right:
      - state: inhand-right-lit
        shader: unshaded
  - type: PointLight
    radius: 1.5 #slightly stronger than the other lighters

- type: entity
  parent: BaseBrandedLighter
  id: FlippoLighter
  name: flippo lighter
  description: A rugged metal lighter that lasts quite a while.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/lighters.rsi
    layers:
    - state: zippo_icon_base
      map: ["base"]
    - state: zippo_top
      map: ["top"]
      visible: false
    - state: zippo_open
      map: ["open"]
      visible: false
    - state: lighter_flame
      map: ["flame"]
      visible: false
      shader: unshaded
  - type: Item
    sprite: Objects/Tools/Lighters/lighters.rsi
    heldPrefix: zippo
  - type: ToggleableVisuals
    inhandVisuals:
      left:
      - state: zippo-inhand-left-flame
        shader: unshaded
      right:
      - state: zippo-inhand-right-flame
        shader: unshaded

- type: entity
  parent: FlippoLighter
  id: FlippoEngravedLighter
  name: flippo engraved lighter
  description: A rugged golden lighter that lasts quite a while. Engravings serve no tactical advantage whatsoever.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/lighters.rsi
    layers:
    - state: zippo_engraved_icon_base
      map: ["base"]
    - state: zippo_top
      map: ["top"]
      visible: false
    - state: zippo_engraved_open
      map: ["open"]
      visible: false
    - state: lighter_flame
      map: ["flame"]
      visible: false
      shader: unshaded
  - type: StealTarget
    stealGroup: FlippoEngravedLighter

- type: entity
  parent: [BaseBrandedLighter, BaseSyndicateContraband]
  id: SyndicateFlippo
  name: Blood-red flippo
  description: "A 'Valid' choice in lighters. Contains no copper."
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/syndielighter.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/syndielighter.rsi
  - type: PointLight
    color: green

- type: entity
  parent: [BaseBrandedLighter, BaseSyndicateContraband]
  id: CybersunFlippo
  name: CyberSun Flippo
  description: A sleek black and magenta flippo lighter, bearing the logo and iconography of CyberSun Industries.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/cybersun.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/cybersun.rsi
  - type: PointLight
    color: magenta

- type: entity
  parent: [BaseBrandedLighter, BaseSyndicateContraband]
  id: InterdyneFlippo
  name: Interdyne Flippo
  description: "A deep blue flippo lighter, decorated with the logo of Interdyne Pharmaceuticals' 'Gene Clean' clinics. Become the master of your own cigarette."
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/interdyne.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/interdyne.rsi
  - type: ItemToggleMeleeWeapon
    activatedDamage:
      types:
        Radiation: 1
  - type: PointLight
    color: cyan

- type: entity
  parent: [BaseBrandedLighter]
  id: NanotrasenFlippo
  name: Nanotrasen Flippo
  description: A navy blue luxury flippo, generally handed out to loyal heads of staff instead of a pay raise. Fueled with liquid plasma.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/nanotrasen.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/nanotrasen.rsi
  - type: Welder
    fuelConsumption: 0.005
    fuelLitCost: 1
    fuelReagent: Plasma
  - type: PointLight
    color: blue
  - type: Solution
    solution:
      reagents:
      - ReagentId: Plasma
        Quantity: 15

- type: entity
  parent: [SolutionToolWelderExperimental, BaseBrandedLighter, BaseCentcommContraband]
  id: CentCommFlippo
  name: Gilded CentComm Flippo
  description: An Ornate, jade embossed and gilded flippo frame containing a bluespace powered jet. The latch is secured by a miniature access reader that only responds to CentComm officials. The nicest lighter known to man.
  suffix: DO NOT MAP
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/centcomm.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/centcomm.rsi
  - type: ItemToggleRequiresLock
    requireLocked: false
  - type: Welder
    fuelConsumption: 0.0
    fuelLitCost: 10
    fuelReagent: Plasma
  - type: PointLight
    radius: 4 #Excessively powerful
    color: Gold
  - type: Tool
    useSound:
      collection: Welder
    qualities: Welding
  - type: Lock
  - type: AccessReader
    access: [["CentralCommand"]]

- type: entity
  parent: [BaseBrandedLighter, BaseMajorContraband]
  id: SpiderclanFlippo
  name: Spider-Clan lighter
  description: A high tech jet lighter, engineered to function even in deep space. Runs on a tiny microfusion cell.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/spiderclan.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/spiderclan.rsi
  - type: Welder
    fuelConsumption: 0
    fuelLitCost: 0
  - type: PointLight
    color: green

- type: entity
  parent: [BaseBrandedLighter, BaseSyndicateContraband]
  id: WaffleCoFlippo
  name: Waffle Co. flippo
  description: A robust mass produced lighter. The Waffle Co. logo turns the spark wheel when pushed up, minimising risk of lighter burns for even the most inept user.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/waffleco.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/waffleco.rsi
  - type: PointLight
    color: brown

- type: entity
  parent: [BaseBrandedLighter]
  id: HonkCoFlippo
  name: Honk Co. flippo
  description: A gag lighter hidden inside of a banana peel. Produced by Honk Co.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/honkco.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/honkco.rsi
  - type: Welder
    fuelConsumption: 0.1
    fuelLitCost: 1
    # Used to be slippery while lit, but worked very poorly and caused the fixtures to disappear
  - type: PointLight
    color: yellow

- type: entity
  parent: [SolutionLighter, BaseBrandedLighter]
  id: DonkcoLighter
  name: Donk Co. flippo
  description: The flippo of choice for the seasoned traitor. An edible novelty lighter made by Donk Co.
  components:
  - type: Sprite
    sprite: Objects/Tools/Lighters/donkco.rsi
  - type: Item
    sprite: Objects/Tools/Lighters/donkco.rsi
  - type: PointLight
    color: orange
  - type: Tag
    tags:
    - DonkPocket
    - Meat
  - type: SolutionManager
    solutions:
    - SolutionFoodDonkpocketWarm
  - type: FlavorProfile
    flavors:
    - bread
    - meaty
    - cheap
  - type: Edible
    trash:
    - DiscountDanLighter # A prize hidden inside the donk!
