- 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: FlareBase
  description: A flare that produces a very bright light for a short while. Point the flame away from yourself.
  components:
    - type: ExpendableLight
      spentName: spent flare
      spentDesc: It looks like this flare has burnt out. What a bummer.
      glowDuration: 400
      fadeOutDuration: 4
      iconStateOn: flare_unlit
      iconStateSpent: flare_spent
      turnOnBehaviourID: turn_on
      fadeOutBehaviourID: fade_out
      litSound: /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: off
    - type: LoopingSound
    - 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.02
          maxDuration: 0.06
          startValue: 6.0
          endValue: 9.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: 8.0
          startValue: 1.0
          endValue: 6.0
          property: Radius
        - !type:RandomizeBehaviour # weaker flicker as it fades out
          id: fade_out
          interpolate: Nearest
          minDuration: 0.02
          maxDuration: 0.06
          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: 4.0
          startValue: 6.0
          endValue: 1.0
          property: Radius
