# SPDX-FileCopyrightText: 2021 20kdc <asdd2808@gmail.com>
# SPDX-FileCopyrightText: 2021 DrSmugleaf <DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Metal Gear Sloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2021 Paul <ritter.paul1+git@googlemail.com>
# SPDX-FileCopyrightText: 2021 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2021 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 Vera Aguilera Puerto <zddm@outlook.es>
# SPDX-FileCopyrightText: 2021 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2022 ElectroJr <leonsfriedrich@gmail.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 T-Stalker <43253663+DogZeroX@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 T-Stalker <le0nel_1van@hotmail.com>
# SPDX-FileCopyrightText: 2022 metalgearsloth <metalgearsloth@gmail.com>
# SPDX-FileCopyrightText: 2023 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 Naive817 <31364560+Naive817@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 TemporalOroboros <TemporalOroboros@gmail.com>
# SPDX-FileCopyrightText: 2024 Arendian <137322659+Arendian@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ed <96445749+TheShuEd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 ScarKy0 <scarky0@onet.eu>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: particles
  description: Accelerated particles.
  id: ParticlesProjectile
  parent: BaseBullet
  categories: [ HideSpawnMenu ]
  components:
    - type: Sprite
      layers:
      - sprite: Structures/Power/Generation/PA/particle.rsi
        state: particle0
        shader: unshaded
        map: [ "unshaded" ]
    - type: Projectile
      deleteOnCollide: false
      impactEffect: null
      soundHit:
        path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
      damage:
        types:
          Radiation: 25
    - type: Physics
    - type: Fixtures
      fixtures:
        projectile:
          shape:
            !type:PhysShapeAabb
            bounds: "-0.48,-0.48,0.48,0.48"
          hard: false
          layer: [None]
          mask:
          # Has to hit mobs, singularity, and singularity generator
          - Opaque
          - FullTileMask
    - type: ParticleProjectile
    - type: SinguloFood
      # Energy is setup by the PA particle fire function.
    - type: TimedDespawn
      lifetime: 3.0
    - type: Appearance
    - type: GenericVisualizer
      visuals:
        enum.ParticleAcceleratorVisuals.VisualState:
          unshaded:
            Level0: {state: particle0}
            Level1: {state: particle1}
            Level2: {state: particle2}
            Level3: {state: particle3}
    - type: GuideHelp # why does this even have a guidebook link in the first place
      guides:
      - SingularityTeslaEngine
      - Power

- type: entity
  name: anti particles
  description: Accelerated negative particles.
  id: AntiParticlesProjectile
  parent: ParticlesProjectile
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    layers:
    - sprite: Structures/Power/Generation/PA/particle.rsi
      color: red
      state: particle0
      shader: unshaded
      map: [ "unshaded" ]
  - type: Reflective
    reflective:
    - Energy
  - type: Projectile
    deleteOnCollide: false
    impactEffect: null
    soundHit:
      path: /Audio/Weapons/Guns/Hits/bullet_hit.ogg
    damage:
      types:
        Radiation: 10
  - type: TimedDespawn
    lifetime: 0.6
  - type: SinguloFood
    energy: -10
    energyFactor: 0.97
