# Starlight EMP Rocket Ammunition

# EMP rocket projectile - delivers an electromagnetic pulse on impact, no explosive damage.
- type: entity
  parent: BaseBulletTrigger
  id: Bullet60mmRocketEMP
  name: EMP rocket
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Starlight/Objects/Weapons/Guns/Projectiles/emp_rocket_projectile.rsi
    layers:
      - state: frag-emp
  - type: EmpOnTrigger
    range: 4.0
    energyConsumption: 20000
    disableDuration: 5.0
  - type: SpawnOnTrigger
    proto: EmpRocketImpactEffect
  - type: DeleteOnTrigger
  - type: PointLight
    radius: 3.0
    color: "#2244FF"
    energy: 0.6
  - type: RadarBlip
    color: "#4488FF"
    scale: 1.2
    shape: Circle
    requireInSpace: true
  - type: Ammo
    muzzleFlash: null
  - type: PDTarget

# Visual effect spawned at impact point when the EMP rocket detonates.
- type: entity
  id: EmpRocketImpactEffect
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Starlight/Objects/Weapons/Guns/Projectiles/emp_rocket_projectile.rsi
    layers:
    - state: ball-emp-unlit
      shader: unshaded
  - type: PointLight
    radius: 6.0
    color: "#2255FF"
    energy: 3.0
    netsync: false
  - type: LightFade
    duration: 0.6
  - type: TimedDespawn
    lifetime: 0.6

# EMP Rocket Cartridge - fits the RPG-7 launcher (uses CartridgeRocket tag)
- type: entity
  parent: [BaseItem, BaseMajorContraband]
  id: CartridgeRocketEMP
  name: EMP rocket grenade
  description: A PG-7 EMP warhead designed for the RPG-7 launcher. Delivers a focused electromagnetic pulse on impact, disrupting electronics and power systems without causing structural damage. Does not explode.
  components:
  - type: Tag
    tags:
      - CartridgeRocket
  - type: Item
    size: Small
  - type: CartridgeAmmo
    proto: Bullet60mmRocketEMP
    deleteOnSpawn: true
  - type: Sprite
    sprite: _Starlight/Objects/Weapons/Guns/Projectiles/emp_rocket_projectile.rsi
    state: frag-emp
  - type: StaticPrice
    price: 30

# EMP Grenade Round - fits the SSG-TARNYX and any grenade-tag launcher
- type: entity
  parent: [BaseItem, BaseMajorContraband]
  id: GrenadeEMPTarnyx
  name: EMP artillery grenade
  description: A large EMP grenade cartridge designed for the SSG-TARNYX cannon. Releases a powerful electromagnetic pulse on impact, disrupting ship electronics across a wide area. Does not cause structural damage.
  components:
  - type: Tag
    tags:
      - Grenade
  - type: Item
    size: Normal
  - type: CartridgeAmmo
    proto: BulletGrenadeEMPTarnyx
    deleteOnSpawn: true
  - type: Sprite
    sprite: _Starlight/Objects/Weapons/Guns/Projectiles/emp_rocket_projectile.rsi
    layers:
    - state: frag-emp
      map: ["enum.AmmoVisualLayers.Base"]
  - type: Appearance
  - type: StaticPrice
    price: 50

# Projectile for GrenadeEMPTarnyx - has a blue radar blip
- type: entity
  parent: BaseBulletTrigger
  id: BulletGrenadeEMPTarnyx
  name: EMP artillery shell
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: _Starlight/Objects/Weapons/Guns/Projectiles/emp_rocket_projectile.rsi
    layers:
      - state: frag-emp
  - type: EmpOnTrigger
    range: 5.0
    energyConsumption: 25000
    disableDuration: 6.0
  - type: SpawnOnTrigger
    proto: EmpRocketImpactEffect
  - type: DeleteOnTrigger
  - type: PointLight
    radius: 3.5
    color: "#2244FF"
    energy: 0.6
  - type: RadarBlip
    color: "#4488FF"
    scale: 1.2
    shape: Circle
    requireInSpace: true
  - type: Ammo
    muzzleFlash: null
