- type: entity
  name: emergency flare # todo: we need some sort of IgnitionSourceComponent we can add to this, so when it's lit it will cause fires when touching fuel
  parent: BaseItem
  id: Flare
  description: A flare that produces a very bright light for a short while. Point the flame away from yourself.
  components:
  - type: Tag
    tags:
    - Flare
    - Recyclable
    - Trash
  - type: Recyclable
  - type: ExpendableLight
    spentName: spent flare
    spentDesc: It looks like this flare has burnt out. What a bummer.
    glowDuration: 165
    fadeOutDuration: 15
    iconStateOn: flare_unlit
    iconStateSpent: flare_spent
    turnOnBehaviourID: turn_on
    fadeOutBehaviourID: fade_out
    litSound:
      path: /Audio/Items/Flare/flare_on.ogg
    loopedSound: /Audio/Items/Flare/flare_burn.ogg
  - type: Sprite
    sprite: Objects/Misc/flare.rsi
    layers:
      - state: flare_base
      - state: flare_burn
        color: "#FFFFFF"
        visible: false
        shader: unshaded
      - state: flare_unlit
        color: "#FF0000"
  - type: Icon
    sprite: Objects/Misc/flare.rsi
    state: icon
  - type: Item
    sprite: Objects/Misc/flare.rsi
    color: "#FF0000"
    HeldPrefix: unlit
  - type: Appearance
    visuals:
      - type: ExpendableLightVisualizer
  - type: PointLight
    enabled: false
    color: "#FF8080"
    radius: 1.0
    energy: 9.0
  - type: LightBehaviour
    behaviours:
      - !type:RandomizeBehaviour # immediately make it bright and flickery
        id: turn_on
        interpolate: Nearest
        minDuration: 0.001
        maxDuration: 0.001
        startValue: 6.0
        endValue: 15.0
        property: Energy
        isLooped: true
      - !type:FadeBehaviour # have the radius start small and get larger as it starts to burn
        id: turn_on
        interpolate: Linear
        maxDuration: 45.0 #duration of light
        startValue: 2.5
        endValue: 10.0
        property: Radius
      - !type:RandomizeBehaviour # weaker flicker as it fades out
        id: fade_out
        interpolate: Nearest
        minDuration: 0.001
        maxDuration: 0.001
        startValue: 4.0
        endValue: 8.0
        property: Energy
        isLooped: true
      - !type:FadeBehaviour # fade out radius as it burns out
        id: fade_out
        interpolate: Linear
        maxDuration: 15.0
        startValue: 8.0
        endValue: 1.0
        property: Radius
