# SPDX-FileCopyrightText: 2019 Acruid <shatter66@gmail.com>
# SPDX-FileCopyrightText: 2019 L.E.D <10257081+unusualcrow@users.noreply.github.com>
# SPDX-FileCopyrightText: 2019 Pieter-Jan Briers <pieterjan.briers@gmail.com>
# SPDX-FileCopyrightText: 2020 GlassEclipse <tsymall5@gmail.com>
# SPDX-FileCopyrightText: 2020 Hugo Laloge <hugo.laloge@gmail.com>
# SPDX-FileCopyrightText: 2020 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Swept <jamesurquhartwebb@gmail.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2020 V�ctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 V�ctor Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Kara D <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2021 Leon Friedrich <60421075+leonsfriedrich@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 Paul <ritter.paul1+git@googlemail.com>
# SPDX-FileCopyrightText: 2021 Peptide90 <78795277+Peptide90@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 Visne <39844191+Visne@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Ygg01 <y.laughing.man.y@gmail.com>
# SPDX-FileCopyrightText: 2021 cyclowns <cyclowns@protonmail.ch>
# SPDX-FileCopyrightText: 2021 drongood12 <73915636+drongood12@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <notzombiedude@gmail.com>
# SPDX-FileCopyrightText: 2022 Charlese2 <knightside@hotmail.com>
# SPDX-FileCopyrightText: 2022 Cheackraze <71046427+Cheackraze@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 EmoGarbage404 <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Flipp Syder <76629141+vulppine@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Jacob Tong <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Moony <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <le0nel_1van@hotmail.com>
# SPDX-FileCopyrightText: 2022 Vera Aguilera Puerto <gradientvera@outlook.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2022 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 moonheart08 <moonheart08@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 wrexbe <81056464+wrexbe@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 AJCM <AJCM@tutanota.com>
# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 ElectroJr <leonsfriedrich@gmail.com>
# SPDX-FileCopyrightText: 2023 LankLTE <135308300+LankLTE@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Maxtone <124747282+MagnusCrowe@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 OctoRocket <88291550+OctoRocket@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Stanislav4ix <124695665+Stanislav4ix@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 T-Stalker <43253663+DogZeroX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Vordenburg <114301317+Vordenburg@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 vanx <61917534+Vaaankas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 vanx <vanx#5477>
# SPDX-FileCopyrightText: 2024 Arendian <137322659+Arendian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Boaz1111 <149967078+Boaz1111@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 BombasterDS <115770678+BombasterDS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Dae <60460608+ZeroDayDaemon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Icepick <122653407+Icepicked@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 MaloTV <70515562+MaloTV@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 PoTeletubby <ajcraigaz@gmail.com>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.co>
# SPDX-FileCopyrightText: 2024 Winkarst <74284083+Winkarst-cpu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 shibe <95730644+shibechef@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Aineias1 <dmitri.s.kiselev@gmail.com>
# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <aviu00@protonmail.com>
# SPDX-FileCopyrightText: 2025 Creatorbot01 <creatorbot02@gmail.com>
# SPDX-FileCopyrightText: 2025 FaDeOkno <143940725+FaDeOkno@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GaussiArson <193122004+GaussiArson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 McBosserson <148172569+McBosserson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Milon <plmilonpl@gmail.com>
# SPDX-FileCopyrightText: 2025 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Orion-416 <cliveocelot@gmail.com>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 PunishedJoe <PunishedJoeseph@proton.me>
# SPDX-FileCopyrightText: 2025 Rouden <149893554+Roudenn@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Solstice <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 SolsticeOfTheWinter <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 Southbridge <7013162+southbridge-fur@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 TheBorzoiMustConsume <197824988+TheBorzoiMustConsume@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 TytosB <54259736+TytosB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Unlumination <144041835+Unlumy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 chromiumboy <50505512+chromiumboy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 keronshb <54602815+keronshb@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
# SPDX-FileCopyrightText: 2025 thebiggestbruh <marcus2008stoke@gmail.com>
# SPDX-FileCopyrightText: 2025 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 whateverusername0 <whateveremail>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: MuzzleFlashEffect
  categories: [ HideSpawnMenu ]
  components:
  - type: TimedDespawn
    lifetime: 0.4
  - type: Sprite
    drawdepth: BelowMobs
    layers:
    - shader: unshaded
      map: ["enum.EffectLayers.Unshaded"]
      sprite: Objects/Weapons/Guns/Projectiles/projectiles.rsi
      state: muzzle_bullet
  - type: EffectVisuals
  - type: Tag
    tags:
      - HideContextMenu
  - type: AnimationPlayer

- type: entity
  parent: MuzzleFlashEffect
  id: MuzzleFlashEffectOmnilaser
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    drawdepth: BelowMobs
    offset: 0.15, 0
    layers:
    - shader: unshaded
      map: ["enum.EffectLayers.Unshaded"]
      sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
      state: omnilaser_flash

- type: entity
  parent: MuzzleFlashEffect
  id: MuzzleFlashEffectHeavyLaser
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    drawdepth: BelowMobs
    offset: 0.15, 0
    layers:
    - shader: unshaded
      map: ["enum.EffectLayers.Unshaded"]
      sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
      state: heavylaser_flash

# One bullet to bring them all into the darkness and bind them
- type: entity
  id: BaseBullet
  name: BaseBullet
  description: If you can see this you're probably dead!
  abstract: true
  components:
  - type: Reflective
  - type: FlyBySound
  - type: Clickable
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: bullet
      shader: unshaded
  - type: Physics
    bodyType: Dynamic
    bodyStatus: InAir
    linearDamping: 0
    angularDamping: 0
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.10,0.1,0.30" # Goobstation - Fast Bullets
        hard: false
        mask:
        - Impassable
        - BulletImpassable
      fly-by: &flybyfixture
        shape: !type:PhysShapeCircle
          radius: 1.5
        layer:
        - Impassable
        - MidImpassable
        - HighImpassable
        - LowImpassable
        hard: False
  - type: Projectile
    impactEffect: BulletImpactEffect
    damage:
      types:
        Piercing: 14
    soundHit:
      path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
  - type: TimedDespawn
    lifetime: 10

- type: entity
  id: BaseBulletTrigger # Trigger-on-collide bullets
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: TriggerOnCollide
    fixtureID: projectile
  - type: Projectile
    damage:
      types:
        Blunt: 7 # more damage than a punch.
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.45,0.15,0.15"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture

- type: entity
  id: BaseBulletPractice
  name: base bullet practice
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: practice
  - type: Projectile
    damage:
      types:
        Blunt: 1

- type: entity
  id: BaseBulletIncendiary
  name: base bullet incendiary
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Blunt: 14
  - type: PointLight
    enabled: true
    color: "#ff4300"
    radius: 2.0
    energy: 7.0
  - type: IgniteOnCollide
    fireStacks: 0.5

- type: entity
  id: BaseBulletAP
  name: base bullet armor-piercing
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: piercing
  - type: Projectile
    damage:
      types:
        Piercing: 11 # 20% decrease
    ignoreResistances: true

- type: entity
  id: BaseBulletUranium
  name: base bullet uranium
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: uranium
  - type: Projectile
    damage:
      types:
        Radiation: 11

# Energy projectiles
- type: entity
  name: taser bolt
  id: BulletTaser
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    noRot: true
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    color: "#ffff33"
    layers:
    - state: spark
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.45,0.15,0.15"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
      fly-by: *flybyfixture
  - type: Ammo
  - type: Projectile
    damage:
      types:
        Heat: 5
    soundHit:
      path: "/Audio/Weapons/Guns/Hits/taser_hit.ogg"
    forceSound: true
  - type: StunOnCollide
    stunAmount: 5
    knockdownAmount: 5

- type: entity
  name : disabler bolt
  id: BulletDisabler
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque # Goobstation
      fly-by: *flybyfixture
  - type: Ammo
  - type: StaminaDamageOnCollide
    damage: 20 # Goob edit
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name : disabler bolt practice
  id: BulletDisablerPractice
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque # Goobstation
      fly-by: *flybyfixture
  - type: Ammo
  - type: StaminaDamageOnCollide
    damage: 1
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name: emitter bolt
  id: EmitterBolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Structures/Power/Generation/Singularity/emitter.rsi
    layers:
    - state: projectile
      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
      fly-by: *flybyfixture
  - type: Reflective # Goobstation - Make emitter bolts reflect as energy
    reflective:
    - Energy
  - type: Projectile
    #   soundHit:  Waiting on serv3
    damage:
      types:
        Heat: 14
  # mining laser real
  - type: GatheringProjectile
  - type: Tag
    tags:
    - EmitterBolt
  - type: TimedDespawn
    lifetime: 3
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  name: watcher bolt
  id: WatcherBolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      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
      fly-by: *flybyfixture
  - type: Projectile
    #   soundHit:  Waiting on serv3
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Cold: 10 # goob - to account for lower firerate and projectile speed. low dmg because nothing resists cold
  - type: TimedDespawn
    lifetime: 3
  - type: ChangeTemperatureOnCollide
    heat: -15000 # Lavaland Change

- type: entity
  name: magmawing watcher bolt
  id: WatcherBoltMagmawing
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser_greyscale
      shader: unshaded
      color: orangered
  - type: Ammo
    muzzleFlash: null
  - type: Projectile
    #   soundHit:  Waiting on serv3
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 30 # goob - to account for lower firerate and projectile speed. also so you can't just stand there and tank
  - type: ChangeTemperatureOnCollide
    heat: 20000 # Lavaland Change

- type: entity
  name: icewing watcher bolt
  id: WatcherBoltIcewing
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser_greyscale
      shader: unshaded
      color: darkblue
  - type: Ammo
    muzzleFlash: null
  - type: Projectile
    #   soundHit:  Waiting on serv3
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Cold: 15 # goob - matches magmawings in terms of damage
  - type: ChangeTemperatureOnCollide
    heat: -30000 # Lavaland Change

- type: entity
  parent: BaseBullet
  id: BasiliskRay
  name: basilisk ray
  categories: [ HideSpawnMenu ]
  components:
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: ice
      shader: unshaded
  - type: Ammo
    muzzleFlash: null
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.05,-0.05,0.05,0.05"
        hard: false
        mask:
        - Opaque
      fly-by: *flybyfixture
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Cold: 5
  - type: TimedDespawn
    lifetime: 3
  - type: ChangeTemperatureOnCollide
    heat: -50000

- type: entity
  id: BulletKinetic
  name: kinetic bolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  description: Not too bad, but you still don't want to get hit by it.
  components:
  - type: Reflective
    reflective:
    - NonEnergy
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: chronobolt
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Blunt: 40 # Lavaland Change - TOTAL PKA VICTORY
  #        Structural: 30 Lavaland Change - No easy break-ins :)
  # Short lifespan
  - type: TimedDespawn
    lifetime: 0.22 # roughly 5.5 tiles
  - type: GatheringProjectile

- type: entity
  id: BulletKineticShuttle
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: chronobolt
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Blunt: 80 # Goobstation edit
        # Structural: 35 # Goobstation edit
  - type: Ammo
    muzzleFlash: HitscanEffect
  - type: TimedDespawn
    lifetime: 0.3 # Goobstation edit
  - type: PointLight
    radius: 2.5
    color: white
    energy: 0.5
  - type: GatheringProjectile

- type: entity
  parent: BulletRocket
  id: BulletSingularityBusterRocket
  categories: [ HideSpawnMenu ]
  name: singularity buster rocket
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: buster
  - type: SinguloFood
    energy: -500
  - type: Explosive # Goob
    explosionType: Electrical
    maxIntensity: 10
    intensitySlope: 3
    totalIntensity: 150
    maxTileBreak: 1
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletCharge
  name: charge bolt
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  description: Marks a target for additional damage.
  components:
  - type: Reflective
    reflective:
    - NonEnergy
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: chronobolt
      shader: unshaded
  - type: GatheringProjectile
  - type: DamageMarkerOnCollide
    onlyWorkOnFauna: true # Lavaland Change
    whitelist:
      components:
      - MobState
    damage:
      types:
    # Lavaland Change start
        Blunt: 20 # 18 -> 20
        Slash: 5 # 4 -> 5
    effect: { sprite: /Textures/Objects/Weapons/effects.rsi, state: shield2 }
    sound: /Audio/Weapons/Guns/Gunshots/kinetic_accel.ogg
    # Lavaland change end
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Blunt: 0
  # Short lifespan
  - type: TimedDespawn
    lifetime: 0.4

  # Deals less damage, glaive has better HP recovery
- type: entity
  id: BulletChargeGlaive
  name: leech bolt
  parent: BulletCharge
  components:
  - type: DamageMarkerOnCollide
    whitelist:
      components:
        - MobState
    damage:
      types:
        Blunt: 1
        Slash: 5

- type: entity
  parent: BaseBullet
  id: AnomalousParticleDelta
  name: delta particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#c2385d"
    radius: 2.0
    energy: 7.0
  - type: AnomalousParticle
    particleType: Delta
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: magicm_red
      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
      fly-by: *flybyfixture
  - type: Projectile
    damage:
      types:
        Heat: 5
  - type: TimedDespawn
    lifetime: 3
  - type: Reflective
    reflective:
    - Energy
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleDeltaStrong
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Delta
    severityPerSeverityHit: 0.05
    stabilityPerDestabilizingHit: 0.08
    healthPerWeakeningeHit: -0.1
    stabilityPerWeakeningeHit: -0.2
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleEpsilon
  name: epsilon particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#38c296"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    layers:
    - state: magicm_cyan
      shader: unshaded
  - type: AnomalousParticle
    particleType: Epsilon
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleEpsilon
  id: AnomalousParticleEpsilonStrong
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Epsilon
    severityPerSeverityHit: 0.05
    stabilityPerDestabilizingHit: 0.08
    healthPerWeakeningeHit: -0.1
    stabilityPerWeakeningeHit: -0.2
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleZeta
  name: zeta particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#b9c238"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    layers:
    - state: magicm_yellow
      shader: unshaded
  - type: AnomalousParticle
    particleType: Zeta
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleZeta
  id: AnomalousParticleZetaStrong
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Zeta
    severityPerSeverityHit: 0.05
    stabilityPerDestabilizingHit: 0.08
    healthPerWeakeningeHit: -0.1
    stabilityPerWeakeningeHit: -0.2
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleOmegaStrong
  name: omega particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#38c24f"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/magic.rsi
    layers:
    - state: magicm_green
      shader: unshaded
  - type: AnomalousParticle
    particleType: Default
    severityOverride: true
    severityPerSeverityHit: 0.1
    stabilityPerDestabilizingHit: 0.05
    healthPerWeakeningeHit: 1
    stabilityPerWeakeningeHit: -0.05
  - type: Projectile
    impactEffect: BulletImpactEffectKinetic
    damage:
      types:
        Heat: 20
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleDelta
  id: AnomalousParticleSigma
  name: sigma particles
  categories: [ HideSpawnMenu ]
  components:
  - type: PointLight
    enabled: true
    color: "#8d38c2"
    radius: 2.0
    energy: 7.0
  - type: Sprite
    layers:
    - state: magicm
      shader: unshaded
  - type: AnomalousParticle
    particleType: Sigma
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: AnomalousParticleSigma
  id: AnomalousParticleSigmaStrong
  name: sigma particles
  categories: [ HideSpawnMenu ]
  components:
  - type: AnomalousParticle
    particleType: Sigma
  - type: SmartLinkBlacklist  # Goobstation

# Launcher projectiles (grenade / rocket)
- type: entity
  id: BulletRocket
  name: rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: frag
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    maxIntensity: 40
    intensitySlope: 6
    totalIntensity: 200
    maxTileBreak: 1
  - type: PointLight
    radius: 3.5
    color: orange
    energy: 0.5
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletWeakRocket
  name: weak rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: frag
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    maxIntensity: 2 # max 30 per tile
    intensitySlope: 1
    totalIntensity: 4 # 60 total damage to distribute over tiles
    maxTileBreak: 1
  - type: PointLight
    radius: 3.5
    color: orange
    energy: 0.5
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletGrenadeBaton
  name: baton grenade
  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
    overtime: 50 # Goobstation
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletGrenadeBlast
  name: blast grenade
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: grenade
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 150 # a ~2 tile radius
    intensitySlope: 5
    maxIntensity: 10
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletGrenadeFlash
  name: flash grenade
  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
  - type: ActiveTimerTrigger
    timeRemaining: 0.3
  - type: DeleteOnTrigger
  - type: Flashbang # Goobstation
    minProtectionRange: 7 # Can't stun/knockdown people wearing any ear protection
  - type: SmartLinkBlacklist  # Goobstation

# This is supposed to spawn shrapnel and stuff so uhh... TODO?
- type: entity
  id: BulletGrenadeFrag
  name: frag grenade
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: grenade
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 175 # about a ~6 tile radius
    intensitySlope: 1
    maxIntensity: 10
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  parent: BaseBulletTrigger
  id: BulletGrenadeCleanade
  name: cleanade grenade round
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: cleanade
  - type: ActiveTimerTrigger
    timeRemaining: 0.3
  - type: SmokeOnTrigger
    duration: 3.5
    spreadAmount: 30
    smokePrototype: Foam
    solution:
      reagents:
      - ReagentId: SpaceCleaner
        Quantity: 30
  - type: SoundOnTrigger
    sound: /Audio/Items/smoke_grenade_smoke.ogg
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    totalIntensity: 0.01 # a little pop
    intensitySlope: 1
    maxIntensity: 0.01
    tileBreakScale: 0.01
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletGrenadeEMP
  name: EMP rocket
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: frag
  - type: EmpOnTrigger
    range: 3 # Goobstation
    energyConsumption: 360 # Goobstation
    disableDuration: 10
  - type: Ammo
    muzzleFlash: null
  - type: PointLight
    radius: 3.5
    color: blue
    energy: 0.5
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletCap
  name: cap bullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Fun/capgun.rsi
    layers:
    - state: capbullet
  - type: Projectile
    deleteOnCollide: true
    damage:
      types:
        Piercing: 0
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletAcid
  name: acid spit
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Caustic: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/xeno_toxic.rsi
    layers:
    - state: xeno_toxic
  - type: Ammo
    muzzleFlash: null
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletWaterShot
  name: water
  categories: [ HideSpawnMenu ]
  components:
  - type: Clickable
  - type: Physics
    bodyType: Dynamic
    linearDamping: 0
    angularDamping: 0
  - type: TimedDespawn
    lifetime: 10
  - type: Projectile
    damage:
      types:
        Blunt: 0 #it's just water, bro
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/water_shot.rsi
    layers:
    - state: icon
      map: ["enum.VaporVisualLayers.Base"]
  - type: Ammo
    muzzleFlash: null
  - type: SolutionContainerManager
    solutions:
      vapor:
        maxVol: 50
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.10,-0.30,0.10,0.15"
        hard: false
        mask:
        - Impassable
        - BulletImpassable
  - type: Vapor
    active: true
    transferAmountPercentage: 1
  - type: Appearance
  - type: VaporVisuals
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: BulletHivebot
  name: hivebot bullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Projectile
    damage:
      types:
        Piercing: 10

- type: entity
  id: BulletCannonBall
  name: cannonball
  parent: BaseBulletTrigger
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles2.rsi
    layers:
    - state: ball
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: DemolitionCharge
    maxIntensity: 9
    intensitySlope: 6
    totalIntensity: 60
    maxTileBreak: 0
  - type: PointLight
    radius: 1
    color: orange
    energy: 0.5
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  id: GrapplingHook
  name: grappling hook
  categories: [ HideSpawnMenu ]
  components:
  - type: EmbeddableProjectile
    deleteOnRemove: true
  - type: Clickable
  - type: InteractionOutline
  - type: Sprite
    noRot: false
    sprite: Objects/Weapons/Guns/Launchers/grappling_gun.rsi
    layers:
    - state: hook
  - type: Physics
    bodyType: Dynamic
    linearDamping: 0
    angularDamping: 0
  - type: Projectile
    deleteOnCollide: false
    damage:
      types:
        Blunt: 0
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.1,-0.1,0.1,0.1"
        hard: false
        mask:
        - Impassable
        - HighImpassable
  - type: GrapplingProjectile
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  name : disabler bolt smg
  id: BulletDisablerSmg
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque # Goobstation
      fly-by: *flybyfixture
  - type: Ammo
  - type: StaminaDamageOnCollide
    damage: 12 # Goob edit
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name : energy bolt
  id: BulletEnergyTurretBase
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: heavylaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque
      fly-by: *flybyfixture
  - type: Ammo

- type: entity
  name : laser bolt
  id: BulletEnergyTurretLaser
  parent: BulletEnergyTurretBase
  categories: [ HideSpawnMenu ]
  components:
  - type: Ammo
    muzzleFlash: MuzzleFlashEffectHeavyLaser
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: heavylaser
      shader: unshaded
  - type: Projectile
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 28

- type: entity
  name : disabler bolt
  id: BulletEnergyTurretDisabler
  parent: BulletEnergyTurretBase
  categories: [ HideSpawnMenu ]
  components:
  - type: Ammo
    muzzleFlash: MuzzleFlashEffectOmnilaser
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: omnilaser
      shader: unshaded
  - type: StaminaDamageOnCollide
    damage: 30
  - type: Projectile
    impactEffect: BulletImpactEffectDisabler
    damage:
      types:
        Heat: 0
    soundHit:
      collection: WeakHit
    forceSound: true

- type: entity
  name: tesla gun lightning
  id: TeslaGunBullet
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: TimedDespawn
    lifetime: 5
  - type: Sprite
    sprite: Structures/Power/Generation/Tesla/energy_miniball.rsi
    layers:
    - state: tesla_projectile
      shader: unshaded
  - type: StaminaDamageOnCollide
    damage: 15
  - type: EmbeddableProjectile
  - type: Projectile
    deleteOnCollide: false
    soundHit:
      path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
  - type: LightningArcShooter
    arcDepth: 1
    maxLightningArc: 3
    shootMinInterval: 2.5
    shootMaxInterval: 4.5
    shootRange: 5
    lightningPrototype: Lightning
  - type: Electrified
    requirePower: false
  - type: Tag
    tags:
    - HideContextMenu
  - type: Ammo # Goobstation
    muzzleFlash: null
  - type: SmartLinkBlacklist  # Goobstation

- type: entity
  name: laser bolt
  id: BulletLaser
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
  - type: Reflective
    reflective:
    - Energy
  - type: FlyBySound
    sound:
      collection: EnergyMiss
      params:
        volume: 5
  - type: Sprite
    sprite: Objects/Weapons/Guns/Projectiles/projectiles_tg.rsi
    layers:
    - state: heavylaser
      shader: unshaded
  - type: Physics
  - type: Fixtures
    fixtures:
      projectile:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.15,-0.3,0.15,0.3"
        hard: false
        mask:
        - Opaque # Goob edit
      fly-by: *flybyfixture
  - type: Ammo
  - type: Projectile
    impactEffect: BulletImpactEffectOrangeDisabler
    damage:
      types:
        Heat: 13

- type: entity
  name: wide laser barrage
  id: BulletLaserSpread
  categories: [ HideSpawnMenu ]
  parent: BulletLaser
  components:
  - type: ProjectileSpread
    proto: BulletLaser
    count: 5 #65 heat damage if you hit all your shots, but wide spread
    spread: 30

- type: entity
  name: narrow laser barrage
  id: BulletLaserSpreadNarrow
  categories: [ HideSpawnMenu ]
  parent: BulletLaser
  components:
  - type: ProjectileSpread
    proto: BulletLaser
    count: 4 #52 heat damage if you hit all your shots, but narrower spread
    spread: 10

- type: entity
  name: disabling laser barrage
  id: BulletDisablerSmgSpread
  categories: [ HideSpawnMenu ]
  parent: BulletDisablerSmg
  components:
  - type: ProjectileSpread
    proto: BulletDisablerSmg
    count: 3 #bit stronger than a disabler if you hit your shots you goober, still not a 2 hit stun though
    spread: 9
