- type: entity
  id: BaseBulletGrenade
  parent: BaseItem
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: grenade
  - type: Projectile
    damage:
      types:
        Blunt: 5
    deleteOnCollide: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: StartTimerOnShoot
  - type: TimerTrigger
    delay: 2
  - type: TimedDespawn
    lifetime: 6
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.25,-0.25,0.25,0.25"
        density: 50
        mask:
        - ItemMask
        restitution: 0.05
        friction: 0.5
# endregion Base Projectiles

- type: entity
  id: BulletMechWeakRocket
  parent: BulletWeakRocket
  categories: [ HideSpawnMenu ]
  components:
  - type: Explosive
    maxTileBreak: 0

- type: entity
  id: SunriseBulletDisposableTrainingRocket
  name: training rocket
  parent: BulletWeakRocket
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    scale: 1.5, 1.5
    layers:
    - state: smallfrag

- type: entity
  id: SunriseBulletDisposableEmpRocket
  name: EMP rocket
  parent: BulletWeakRocket
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    scale: 1.5, 1.5
    layers:
    - state: smallfrag
  - type: EmpOnTrigger
    range: 6.5
    energyConsumption: 50000
  - type: Ammo
    muzzleFlash: null

- type: entity
  id: SunriseBulletDisposableSmokeRocket
  name: smoke rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi
    rotation: -90
    layers:
    - state: rocket60mm
  - type: SmokeOnTrigger
    duration: 30
    spreadAmount: 50
  - type: EmitSoundOnTrigger
    sound: /Audio/Items/smoke_grenade_smoke.ogg
    positional: true
  - type: DeleteOnTrigger
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: gray
    energy: 0.5

- type: entity
  id: SunriseBulletDisposableIncendiaryRocket
  name: thermobaric rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi
    rotation: -90
    layers:
    - state: rocket60mm
  - type: SmokeOnTrigger
    duration: 30
    spreadAmount: 60
    solution:
      reagents:
      - ReagentId: PolytrinicAcid
        Quantity: 30
      - ReagentId: Napalm
        Quantity: 60
      - ReagentId: Phlogiston
        Quantity: 10
  - type: EmitSoundOnTrigger
    sound: /Audio/Items/smoke_grenade_smoke.ogg
    positional: true
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 0.01
    intensitySlope: 1
    maxIntensity: 0.01
    tileBreakScale: 0.01
  - type: DeleteOnTrigger
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: orange
    energy: 0.5

# region Sunrise ION
- type: entity
  id: BulletAcid2
  name: acid spit
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
    - type: Projectile
      damage:
        types:
          Caustic: 12
    - type: Sprite
      sprite: Objects/Weapons/Guns/Projectiles/xeno_toxic.rsi
      layers:
        - state: xeno_toxic
    - type: Ammo
      muzzleFlash: null

- type: entity
  name: EMP impulse
  parent: BaseBulletTrigger
  id: BulletEMP
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Effects/emp.rsi
    layers:
    - state: emp_pulse
  - type: Projectile
    damage:
      types:
        Shock: 5
  - type: EmpOnTrigger
    range: 2
    energyConsumption: 30000
    disableDuration: 10
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: blue
    energy: 0.5

- type: entity
  name: EMP impulse
  parent: BaseBulletTrigger
  id: BulletEMPMedium
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Effects/emp.rsi
    layers:
    - state: emp_pulse
  - type: Projectile
    damage:
      types:
        Shock: 15
        Structural: 5
  - type: EmpOnTrigger
    range: 6
    energyConsumption: 30000
    disableDuration: 15
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: blue
    energy: 0.75
  - type: RadarBlip
    color: "#55B8FF"
    scale: 1.1
    shape: Circle
    requireInSpace: true

- type: entity
  name: EMP impulse
  parent: BaseBulletTrigger
  id: BulletEMPLarge
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Effects/emp.rsi
    layers:
    - state: emp_pulse
  - type: Projectile
    damage:
      types:
        Shock: 30
        Structural: 15
  - type: EmpOnTrigger
    range: 10
    energyConsumption: 50000
    disableDuration: 30
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 4
    color: blue
    energy: 1
  - type: RadarBlip
    color: "#339CFF"
    scale: 1.35
    shape: Circle
    requireInSpace: true
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: BulletEMPMedium
    capacity: 6

- type: entity
  name: tesla gun lightning
  id: TeslaGunBulletLarge
  parent: TeslaGunBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: TimedDespawn
    lifetime: 12
  - type: Sprite
    sprite: Structures/Power/Generation/Tesla/energy_miniball.rsi
    scale: 1.5, 1.5
    layers:
    - state: tesla_projectile
      shader: unshaded
  - type: StaminaDamageOnCollide
    damage: 85
  - type: Projectile
    deleteOnCollide: false
    damage:
      types:
        Shock: 50
        Structural: 25
    soundHit:
      path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
  - type: LightningArcShooter
    arcDepth: 2
    maxLightningArc: 4
    shootMinInterval: 1
    shootMaxInterval: 4
    shootRange: 6
    lightningPrototype: Lightning
  - type: Electrified
    requirePower: false
  - type: Tag
    tags:
      - HideContextMenu
  - type: EmitSoundOnSpawn
    sound: /Audio/Effects/tesla_collapse.ogg
  - type: AmbientSound
    enabled: true
    sound:
      path: /Audio/Effects/tesla.ogg
    range: 15
    volume: -5
  - type: RadarBlip
    color: "#2F8BFF"
    scale: 1.25
    shape: Circle
    requireInSpace: true

- type: entity
  id: TeslaGunBulletOrion
  parent: TeslaGunBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    shape: Circle

- type: entity
  parent: BaseBullet
  id: RadiationBullet
  name: radiation particle
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#32CD32"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
      - state: magicm_green
        shader: unshaded
  - type: Ammo
    muzzleFlash: null
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.2,-0.2,0.2,0.2"
        hard: false
        mask:
        - Opaque
  - type: Projectile
    damage:
      types:
        Radiation: 10
  - type: TimedDespawn
    lifetime: 2
  - type: Reflective
    reflective:
    - Energy

# endregion Sunrise ION

# region Mech Projectiles
- type: entity
  id: BulletfragRocket
  name: frag rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: frag
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 50
    intensitySlope: 1
    maxIntensity: 5
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: PelletClusterLessLethal
    capacity: 40
  - type: PointLight
    radius: 3.5
    color: orange
    energy: 0.5
  - type: AmbientSound
    enabled: true
    volume: 2
    range: 14
    sound:
      path: /Audio/Effects/Grenades/Supermatter/supermatter_loop.ogg

# endregion Mech Projectiles

# region Utility Shells

- type: entity
  id: BulletShellBatonArtillery
  name: baton shell
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: grenade
  - type: Projectile
    deleteOnCollide: false
    damage:
      types:
        Blunt: 1
    soundHit:
      path: /Audio/Effects/gen_hit.ogg
  - type: StaminaDamageOnCollide
    damage: 80

- type: entity
  id: BulletShellFlashArtillery
  name: flash shell
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: grenade
  - type: FlashOnTrigger
    range: 7
  - type: SpawnOnTrigger
    proto: GrenadeFlashEffect
    predicted: true
  - type: DeleteOnTrigger

- type: entity
  id: BulletShellEMPArtillery
  name: EMP shell
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
      - state: frag
  - type: EmpOnTrigger
    range: 15 #Sunrise-edit
    energyConsumption: 50000
    disableDuration: 20
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: blue
    energy: 0.5

# endregion Utility Shells

# region Hand Grenades
- type: entity
  id: BulletGrenadeExplosive
  name: explosive grenade
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/grenade.rsi
    layers:
      - state: primed
  - type: ExplodeOnTrigger
    keysIn:
    - timer
  - type: Explosive
    explosionType: Default
    maxIntensity: 10
    intensitySlope: 3
    totalIntensity: 120 # about a ~4 tile radius
    canCreateVacuum: false
  - type: EmitSoundOnTrigger
    keysIn:
    - timer
    sound:
      path: "/Audio/Weapons/Guns/Gunshots/batrifle.ogg"
  - type: EmitSoundOnSpawn
    sound:
      path: "/Audio/Effects/beep1.ogg"
      params:
        volume: 5
  - type: TimedDespawn
    lifetime: 3.55

- type: entity
  id: BulletGrenadeExplosiveShrapnel
  name: explosive grenade
  parent: BulletGrenadeExplosive
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Grenades/grenade.rsi
    layers:
      - state: primed
  - type: ProjectileGrenade
    fillPrototype: PelletClusterLessLethal
    capacity: 30

- type: entity
  id: BulletSmokeGrenade
  name: Smoke grenade
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/smoke.rsi
    layers:
      - state: primed
  - type: SmokeOnTrigger
    keysIn:
    - timer
    duration: 45
    spreadAmount: 50
  - type: Ammo
    muzzleFlash: null
  - type: EmitSoundOnTrigger
    keysIn:
    - timer
    sound:
      path: /Audio/_Sunrise/sg_explode.ogg
  - type: EmitSoundOnSpawn
    sound:
      path: /Audio/Items/smoke_grenade_prime.ogg
      params:
        volume: 15
  - type: TimedDespawn
    lifetime: 3

- type: entity
  id: BulletSmokeGrenadeQuick
  name: quick smoke grenade
  parent: BulletSmokeGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: SmokeOnTrigger
    keysIn:
    - timer
    duration: 10
    spreadAmount: 20
  - type: TimedDespawn
    lifetime: 3

- type: entity
  id: BulletAirGrenade
  parent: BaseBulletGrenade
  name: air grenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/airboom.rsi
    layers:
      - state: active
  - type: EmitSoundOnSpawn
    sound: /Audio/Items/smoke_grenade_smoke.ogg
  - type: TimerTriggerVisuals
    primingSound:
      path: /Audio/Items/smoke_grenade_prime.ogg
  - type: TimerTrigger
    delay: 2
  - type: ReleaseGasOnTrigger
    keysIn:
    - timer
    removeFraction: 0.25
    air:
      volume: 1000
      moles: # Target is 3117.84 mols total for filling 30 tiles (goal is 101.325 kPa @ 20C)
      - 654.7464 # oxygen
      - 2463.0936 # nitrogen
      temperature: 293.15
  - type: TimedDespawn
    lifetime: 5

- type: entity
  id: BulletTearGasGrenade
  name: tear gase grenade
  parent: BulletSmokeGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/tear_gas.rsi
    layers:
      - state: primed
  - type: SmokeOnTrigger
    keysIn:
    - timer
    duration: 10
    spreadAmount: 30
    smokePrototype: TearGasSmokeWhite
    solution:
      reagents:
      - ReagentId: TearGas
        Quantity: 20

- type: entity
  id: BulletToxGasGrenade
  name: tox gase grenade
  parent: BulletSmokeGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/tear_gas.rsi
    layers:
      - state: primed
  - type: SmokeOnTrigger
    keysIn:
    - timer
    duration: 10
    spreadAmount: 30
    smokePrototype: TearGasSmokeWhite #TearGasSmoke
    solution:
      reagents:
      - ReagentId: TearGas
        Quantity: 10
      - ReagentId: PolytrinicAcid
        Quantity: 15
      - ReagentId: Lead
        Quantity: 10
      - ReagentId: Phlogiston
        Quantity: 10

- type: entity
  id: BulletCleanerGrenade
  name: tear gase grenade
  parent: BulletSmokeGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/janitor.rsi
    layers:
      - state: primed
  - type: SmokeOnTrigger
    keysIn:
    - timer
    duration: 10 # Для баланса вселенной
    spreadAmount: 50
    smokePrototype: Foam
    solution:
      reagents:
      - ReagentId: SpaceCleaner
        Quantity: 30
  - type: TimedDespawn
    lifetime: 2.75

- type: entity
  id: BulletMetalFoamGrenade
  name: metal foam grenade
  parent: BulletSmokeGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/metalfoam.rsi
    layers:
      - state: primed
  - type: TimerTrigger
    delay: 2
  - type: SmokeOnTrigger
    keysIn:
    - timer
    duration: 10
    spreadAmount: 20
    smokePrototype: AluminiumMetalFoam
  - type: TimedDespawn
    lifetime: 2.75

- type: entity # не работает флеш тригер
  id: BulletGrenadeFlashBang
  name: flashbang
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/flashbang.rsi
    layers:
      - state: primed
  - type: TimerTrigger
    delay: 1.5
  - type: FlashOnTrigger
    keysIn:
    - timer
    range: 7
  - type: EmitSoundOnTrigger
    keysIn:
    - timer
    sound:
      path: "/Audio/_Sunrise/flashbang.ogg"
      params:
        volume: 20
  - type: SpawnOnTrigger
    keysIn:
    - timer
    proto: GrenadeFlashEffect
  - type: DeleteOnTrigger
    keysIn:
    - timer
  - type: EmitSoundOnSpawn
    sound:
      path: /Audio/Effects/countdown.ogg

# endregion Hand Grenades

# region Pellet Grenades
- type: entity
  id: BulletGrenadeIncendiary
  name: incendiary grenade
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/pyrogrenade.rsi
    layers:
      - state: primed
  - type: ProjectileGrenade
    fillPrototype: PelletClusterIncendiary
    capacity: 30
  - type: EmitSoundOnTrigger
    keysIn:
    - timer
    sound:
      path: "/Audio/Weapons/Guns/Gunshots/batrifle.ogg"
  - type: SpawnOnTrigger
    keysIn:
    - timer
    proto: GrenadeFlashEffect
  - type: TimerTrigger
    delay: 1.75
  - type: EmitSoundOnSpawn
    sound:
      path: "/Audio/Effects/beep1.ogg"
      params:
        volume: 5
  - type: TimedDespawn
    lifetime: 2

- type: entity
  id: BulletGrenadeShrapnel
  name: shrapnel grenade
  parent: BulletGrenadeIncendiary
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/shrapnelgrenade.rsi
    layers:
      - state: primed
  - type: ProjectileGrenade
    fillPrototype: PelletClusterLethal
    capacity: 30

- type: entity
  id: BulletGrenadeStinger
  name: stinger grenade
  parent: BulletGrenadeIncendiary
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Grenades/stingergrenade.rsi
    layers:
      - state: primed
  - type: ProjectileGrenade
    fillPrototype: PelletClusterRubber
    capacity: 30

# endregion Pellet Grenades

# region Timed Grenades & Artillery

- type: entity
  id: BulletFireBomb
  name: fire bomb
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Bombs/ied.rsi
    layers:
      - state: primed
      - state: wires
  - type: ProjectileGrenade
    fillPrototype: PelletClusterIncendiary
    capacity: 10
  - type: Explosive
    explosionType: FireBomb
    totalIntensity: 25
    intensitySlope: 5
    maxIntensity: 3
    canCreateVacuum: false
  - type: ExplodeOnTrigger
    keysIn:
    - timer
  - type: TimerTrigger
    delay: 3
  - type: EmitSoundOnSpawn
    sound:
      path: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg
      params:
        volume: 1
  - type: AmbientSound
    range: 8
    volume: 1
    sound:
      path: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg
  - type: DeleteOnTrigger
    keysIn:
    - timer

- type: entity
  id: BulletKineticTrash
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    noRot: false
    sprite: _Sunrise/Objects/Weapons/Projectiles/projectiles.rsi
    layers:
    - state: bullet_trash
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Blunt: 20
        Structural: 25
  - type: Ammo
    muzzleFlash: HitscanEffect
  - type: TimedDespawn
    lifetime: 1.5
  - type: PointLight
    radius: 2.5
    color: white
    energy: 0.5
  - type: GatheringProjectile

- type: entity
  id: BulletGrenadeBlastTimer
  name: blast grenade
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: grenade
  - type: ExplodeOnTrigger
    keysIn:
    - timer
  - type: Explosive
    explosionType: Default
    totalIntensity: 150 # a ~2 tile radius
    intensitySlope: 5
    maxIntensity: 10
    canCreateVacuum: false
  - type: DeleteOnTrigger
    keysIn:
    - timer

- type: entity
  id: BulletFuzeCannonBall
  name: blast grenade
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi
    layers:
    - state: primed
  - type: ExplodeOnTrigger
    keysIn:
    - timer
  - type: Explosive
    explosionType: Default
    totalIntensity: 150 # a ~2 tile radius
    intensitySlope: 5
    maxIntensity: 10
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    fillPrototype: PelletClusterLessLethal
    capacity: 20

- type: entity
  categories: [ HideSpawnMenu ]
  parent: BaseBullet
  id: BulletAntiMaterielCannonBall
  name: plasteel cannonball
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Ammunition/Explosives/explosives.rsi
    layers:
    - state: ball
  - type: Projectile
    damage:
      types:
        Piercing: 75
        Blunt: 25
        Structural: 800
    penetrationThreshold: 1200
    penetrationDamageTypeRequirement:
    - Structural
  - type: StaminaDamageOnCollide
    damage: 80
# endregion Timed Grenades And Artillery

- type: entity
  id: BulletCannonBallTracked
  parent: BulletCannonBall
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#FFDD00"
    scale: 1
    shape: Circle
    requireInSpace: true

- type: entity
  id: BulletEMPCannonBallTracked
  parent: BulletEMP
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#44B7FF"
    scale: 1
    shape: Circle
    requireInSpace: true

- type: entity
  id: BulletFuzeCannonBallTracked
  parent: BulletFuzeCannonBall
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#FFDD00"
    scale: 1
    shape: Circle
    requireInSpace: true

- type: entity
  id: BulletAntiMaterielCannonBallTracked
  parent: BulletAntiMaterielCannonBall
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#FF6666"
    scale: 1
    shape: Circle
    requireInSpace: true

- type: entity
  id: PelletGrapeshotSpreadTracked
  parent: PelletGrapeshotSpread
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#FF6666"
    scale: 0.5
    shape: Circle
    requireInSpace: true

# region Timed Utility Grenades
- type: entity
  id: BulletGrenadeFragTimer
  name: frag grenade
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: grenade
  - type: ExplodeOnTrigger
    keysIn:
    - timer
  - type: Explosive
    explosionType: Default
    totalIntensity: 50
    intensitySlope: 1
    maxIntensity: 5
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    fillPrototype: PelletClusterLessLethal
    capacity: 30
  - type: DeleteOnTrigger
    keysIn:
    - timer

- type: entity
  id: BulletGrenadeEMPTimer
  name: EMP rocket
  parent: BaseBulletGrenade
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: grenade
  - type: EmpOnTrigger
    keysIn:
    - timer
    range: 10
    energyConsumption: 50000
    disableDuration: 10
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: blue
    energy: 0.5
  - type: DeleteOnTrigger
    keysIn:
    - timer

- type: entity
  id: BulletArtilleryShapnel
  name: bullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Piercing: 40
        Structural: 40
  - type: StaminaDamageOnCollide
    damage: 50
  - type: RadarBlip
    color: "#FF6A6A"
    scale: 0.1
    shape: Triangle
    requireInSpace: true
  - type: TimedDespawn
    lifetime: 3

- type: entity
  id: BulletArtilleryShapnelShort
  name: bullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Piercing: 40
        Structural: 40
  - type: StaminaDamageOnCollide
    damage: 50
  - type: RadarBlip
    color: "#FF6A6A"
    scale: 0.1
    shape: Triangle
    requireInSpace: true
  - type: TimedDespawn
    lifetime: 0.5
# endregion Timed Utility Grenades

# region Anti-Materiel Grenade Bullets
- type: entity
  id: BulletAntiMaterielFrag
  name: frag bullet
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    scale: 0.5, 0.5
    layers:
      - state: grenade
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 25
    intensitySlope: 4
    maxIntensity: 8
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: PelletClusterLessLethal
    capacity: 10
  - type: RadarBlip
    color: "#9ACD32"
    scale: 0.3
    shape: Square
    requireInSpace: true

- type: entity
  id: BulletAntiMaterielBlast
  name: blast bullet
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    scale: 0.5, 0.5
    layers:
      - state: grenade
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 50 # a ~1.5 tile radius
    intensitySlope: 4
    maxIntensity: 10
    canCreateVacuum: false
  - type: RadarBlip
    color: "#FFAA33"
    scale: 0.3
    shape: Square
    requireInSpace: true

- type: entity
  id: BulletAntiMaterielEMP
  name: EMP bullet
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    scale: 0.5, 0.5
    layers:
      - state: grenade
  - type: EmpOnTrigger
    range: 3
    energyConsumption: 10000
    disableDuration: 10
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 1.5
    color: blue
    energy: 0.5
  - type: DeleteOnTrigger
  - type: Projectile
    damage:
      types:
        Shock: 15
  - type: RadarBlip
    color: "#4DB8FF"
    scale: 0.3
    shape: Square
    requireInSpace: true

- type: entity
  id: BulletAntiMaterielTracked
  parent: BulletAntiMateriel
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#FF6A6A"
    scale: 0.3
    shape: Triangle
    requireInSpace: true

- type: entity
  id: BulletAntiMaterielHP
  name: bullet (15mm hollow point)
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Piercing: 75
        Slash: 20
  - type: StaminaDamageOnCollide
    damage: 40

- type: entity
  id: BulletGrenadeFragArtillery
  parent: BulletGrenadeFrag
  categories: [ HideSpawnMenu ]
  components:
  - type: SpawnOnDespawn
    prototype: BulletGrenadeFragArtillerySelfExplode
  - type: RadarBlip
    color: "#9ACD32"
    scale: 0.6
    shape: Square
    requireInSpace: true

- type: entity
  id: BulletGrenadeBatonArtillery
  parent: BulletGrenadeBaton
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#FF6A6A"
    scale: 0.6
    shape: Square
    requireInSpace: true

- type: entity
  id: BulletGrenadeBlastArtillery
  parent: BulletGrenadeBlast
  categories: [ HideSpawnMenu ]
  components:
  - type: SpawnOnDespawn
    prototype: BulletGrenadeBlastArtillerySelfExplode
  - type: RadarBlip
    color: "#FFAA33"
    scale: 0.6
    shape: Square
    requireInSpace: true

- type: entity
  id: BulletGrenadeFragArtillerySelfExplode
  name: frag grenade
  suffix: self-explode, NOW
  categories: [ HideSpawnMenu ]
  components:
  - type: TriggerOnSpawn
    keyOut: trigger
  - type: ExplodeOnTrigger
    keysIn:
    - trigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 50
    intensitySlope: 1
    maxIntensity: 5
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: BulletArtilleryShapnelShort
    capacity: 30
  - type: TimedDespawn
    lifetime: 0.25

- type: entity
  id: BulletGrenadeBlastArtillerySelfExplode
  name: blast grenade
  suffix: self-explode, NOW
  categories: [ HideSpawnMenu ]
  components:
  - type: TriggerOnSpawn
    keyOut: trigger
  - type: ExplodeOnTrigger
    keysIn:
    - trigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 150
    intensitySlope: 5
    maxIntensity: 10
    canCreateVacuum: false
  - type: TimedDespawn
    lifetime: 0.25

- type: entity
  id: BulletGrenadeFlashArtillery
  parent: BulletGrenadeFlash
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#FF6A6A"
    scale: 0.6
    shape: Square
    requireInSpace: true

- type: entity
  id: BulletGrenadeEMPArtillery
  parent: BulletGrenadeEMP
  categories: [ HideSpawnMenu ]
  components:
  - type: RadarBlip
    color: "#4DB8FF"
    scale: 0.6
    shape: Square
    requireInSpace: true

# endregion Anti-Materiel Grenade Bullets

# region Energy Projectiles

- type: entity
  id: BulletPlasma
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: arcane_barrage
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Heat: 11
        Slash: 11
        Structural: 28
    penetrationThreshold: 300
    penetrationDamageTypeRequirement:
    - Structural
  - type: Ammo
    muzzleFlash: HitscanEffect
  - type: TimedDespawn
    lifetime: 0.3
  - type: PointLight
    radius: 2.5
    color: "#dd16d395"
    energy: 0.5

- type: entity
  name: wide plasma barrage
  id: BulletPlasmaSpread
  categories: [ HideSpawnMenu ]
  parent: BulletPlasma
  components:
  - type: ProjectileSpread
    proto: BulletPlasma
    count: 3
    spread: 25

# endregion Energy Projectiles

# region Improvised Grenade Projectiles

- type: entity
  id: BulletImprovisedGrenadeFirebomb
  name: firebomb
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Bombs/ied.rsi
    layers:
      - state: primed
      - state: wires
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 25
    intensitySlope: 5
    maxIntensity: 3
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: PelletClusterIncendiary
    capacity: 10
  - type: AmbientSound
    range: 8
    volume: 1
    sound:
      path: /Audio/Weapons/Guns/MagOut/pistol_magout.ogg

- type: entity
  id: BulletImprovisedGrenadePipeBomb
  name: pipebomb
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Bombs/pipebomb.rsi
    layers:
      - state: primed
      - state: wires
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 50
    intensitySlope: 5
    maxIntensity: 6
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: PelletClusterLessLethal
    capacity: 6
  - type: AmbientSound
    range: 8
    volume: 1
    sound:
      path: /Audio/Effects/lightburn.ogg

- type: entity
  id: BulletImprovisedGrenadeGlass
  name: glass
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Ammunition/Casings/explosives.rsi
    layers:
      - state: glass
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 5
    intensitySlope: 1
    maxIntensity: 5
    canCreateVacuum: false
  - type: ContainerContainer
    containers:
      cluster-payload: !type:Container
  - type: ProjectileGrenade
    triggerKey: trigger
    fillPrototype: PelletClusterLessLethal
    capacity: 16

- type: entity
  id: BulletImprovisedGrenadeGlassShrapnel
  name: glass shrapnel grenade
  parent: BulletGrenadeShrapnel
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Ammunition/Casings/explosives.rsi
    layers:
      - state: glass
  - type: ProjectileGrenade
    fillPrototype: PelletClusterLessLethal
    capacity: 16

# endregion Improvised Grenade Projectiles

# region Special Utility Projectiles

- type: entity
  parent: BaseBullet
  id: EnergyCrossbowBoltLarge
  categories: [ HideSpawnMenu ]
  name: energy bolt
  description: This'll hurt.
  components:
  - type: Reflective
    reflective:
    - NonEnergy
  - type: Ammo
    muzzleFlash: null
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: crossbowbolt
      shader: unshaded
  - type: Projectile
    damage:
      types:
        Piercing: 2
  - type: StunOnCollide #somewhat mirror to taser stats, meant to be tot 'sidegrade'
    stunAmount: 0
    knockdownAmount: 2.5
    slowdownAmount: 2.5
    walkSpeedModifier: 0.2
    sprintSpeedModifier: 0.2
    drop: false
  - type: StaminaDamageOnCollide #additional stam damage to make repeated pushups less of a viable counter
    damage: 45
  - type: SolutionContainerManager
    solutions:
      bolt:
        maxVol: 3
        reagents:
        - ReagentId: Toxin
          Quantity: 1.5
        - ReagentId: Lead
          Quantity: 1.5
  - type: SolutionInjectOnProjectileHit
    transferAmount: 3
    solution: bolt

# endregion Special Utility Projectiles

# region Rubber Bullets

- type: entity
  parent: BaseBulletRubber
  id: BulletMagnumProjectileRubber
  categories: [ HideSpawnMenu ]
  name: bullet (.45 magnum rubber)
  components:
  - type: Projectile
    damage:
      types:
        Blunt: 5
  - type: StaminaDamageOnCollide
    damage: 20

- type: entity
  parent: BaseBulletRubber
  id: BulletPistolProjectileRubber
  categories: [ HideSpawnMenu ]
  name: bullet (.35 auto rubber)
  components:
  - type: Projectile
    damage:
      types:
        Blunt: 3
  - type: StaminaDamageOnCollide
    damage: 9

# endregion Rubber Bullets

# region PKA bullets
- type: entity
  id: BulletKineticWeak
  parent: BulletKinetic
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    noRot: false
    scale: 0.8,0.8
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: chronobolt
      shader: unshaded
  - type: Projectile
    damage:
      types:
        Blunt: 5
        Structural: 5
  - type: TimedDespawn
    lifetime: 0.22 # roughly 5.5 tiles
  - type: GatheringProjectile
    chance: 0.5
  - type: StaminaDamageOnCollide
    damage: 5

- type: entity
  id: PelletKineticWeak
  parent: BulletKineticWeak
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Blunt: 10
        Structural: 10
  - type: GatheringProjectile
    chance: 0.2
  - type: StaminaDamageOnCollide
    damage: 3

- type: entity
  id: BulletKineticWeakSpread
  categories: [ HideSpawnMenu ]
  parent: PelletKineticWeak
  components:
  - type: ProjectileSpread
    proto: PelletKineticWeak
    count: 6
    spread: 20
# end region PKA
