- type: entity
  name: explosive grenade
  description: Grenade that creates a small but devastating explosion.
  parent: BaseItem
  id: ExGrenade
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/grenade.rsi
    layers:
    - state: icon
      map: ["enum.TriggerVisualLayers.Base"]
  - type: Clothing
    sprite: Objects/Weapons/Grenades/grenade.rsi
    size: 5
    quickEquip: false
    Slots:
    - Belt
  - type: OnUseTimerTrigger
    delay: 3.5
  - type: Explosive
    explosionType: Default
    maxIntensity: 10
    intensitySlope: 3
    totalIntensity: 120 # about a ~4 tile radius
  - type: ExplodeOnTrigger
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Appearance
    visuals:
    - type: TimerTriggerVisualizer

- type: entity
  name: flashbang
  description: Eeeeeeeeeeeeeeeeeeeeee
  parent: BaseItem
  id: GrenadeFlashBang
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/flashbang.rsi
    layers:
    - state: icon
      map: ["enum.TriggerVisualLayers.Base"]
  - type: Clothing
    sprite: Objects/Weapons/Grenades/flashbang.rsi
    size: 5
    quickEquip: false
    Slots:
    - Belt
  - type: OnUseTimerTrigger
    delay: 3.5
  - type: FlashOnTrigger
    range: 7
  - type: EmitSoundOnTrigger
    sound:
      path: "/Audio/Effects/flash_bang.ogg"
  - type: DeleteOnTrigger
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Appearance
    visuals:
    - type: TimerTriggerVisualizer
      countdown_sound:
        path: /Audio/Effects/countdown.ogg

- type: entity
  name: Syndicate minibomb
  description: A syndicate manufactured explosive used to sow destruction and chaos.
  parent: BaseItem
  id: SyndieMiniBomb
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/syndgrenade.rsi
    layers:
    - state: icon
      map: ["enum.TriggerVisualLayers.Base"]
  - type: Item
    size: 5
  - type: OnUseTimerTrigger
    delay: 5
  - type: Explosive
    explosionType: Default
    # About a 3-3.5 tile radius, strong enough to break reinforced walls near centre.
    # Currently a big spacing hazzard.
    totalIntensity: 800
    intensitySlope: 15
    maxIntensity: 45
  - type: ExplodeOnTrigger
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 10
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Appearance
    visuals:
    - type: TimerTriggerVisualizer

- type: entity
  name: the nuclear option
  description: Please don't throw it, think of the children.
  parent: BaseItem
  id: NuclearGrenade
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/nukenade.rsi
    layers:
    - state: icon
      map: ["enum.TriggerVisualLayers.Base"]
  - type: Item
    size: 5
  - type: OnUseTimerTrigger
    delay: 5
  - type: Explosive
    explosionType: Default
    totalIntensity: 20000 # ~15 tile radius.
    intensitySlope: 5
    maxIntensity: 50
  - type: ExplodeOnTrigger
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Appearance
    visuals:
    - type: TimerTriggerVisualizer
      countdown_sound:
        path: /Audio/Effects/countdown.ogg

- type: entity
  name: modular grenade
  description: A grenade casing. Requires a trigger and a payload.
  parent: BaseItem
  id: ModularGrenade
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/modular.rsi
    state: empty
  - type: Item
    size: 8
  - type: PayloadCase
  - type: Construction
    graph: ModularGrenadeGraph
    node: emptyCase
  - type: Damageable
    damageContainer: Inorganic
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 50
      behaviors:
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: Appearance
    visuals:
    - type: GenericEnumVisualizer
      key: enum.Trigger.TriggerVisuals.VisualState
      states:
        enum.Trigger.TriggerVisualState.Primed: primed
        enum.Trigger.TriggerVisualState.Unprimed: complete
