# SPDX-FileCopyrightText: 2023 Darkie <darksaiyanis@gmail.com>
# SPDX-FileCopyrightText: 2023 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 IlyaElDunaev <154531074+IlyaElDunaev@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 kxv <136233650+kxvvv@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 notquitehadouken <1isthisameme>
# SPDX-FileCopyrightText: 2024 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Armok <155400926+ARMOKS@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <aviu00@protonmail.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 SX-7 <sn1.test.preria.2002@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: stun prod
  parent: [BaseItem, BaseMinorContraband]
  id: Stunprod
  description: A stun prod for illegal incapacitation.
  components:
  - type: Tag # goob edit
    tags:
    - Stunbaton
  - type: Sprite
    sprite: Objects/Weapons/Melee/stunprod.rsi
    layers:
    - state: stunprod_off
      map: [ "enum.ToggleableVisuals.Layer" ]
  - type: ItemToggle
    soundActivate:
      collection: sparks
      params:
        variation: 0.250
    soundDeactivate:
      collection: sparks
      params:
        variation: 0.250
    soundFailToActivate:
      path: /Audio/Machines/button.ogg
      params:
        variation: 0.250
  - type: ItemToggleMeleeWeapon
    activatedDamage:
      types:
        Shock: 5
  - type: Stunbaton
    energyPerUse: 120
    lightAttackEnergyMultiplier: 1.5 # Goob edit
  - type: MeleeWeapon # goob edited
    angle: 0
    wideAnimationRotation: -135
    damage:
      types:
        Blunt: 9
    animation: WeaponArcThrust
  - type: StaminaDamageOnHit # goob edited
    damage: 15
    overtime: 40
    lightAttackDamageMultiplier: 4
    lightAttackOvertimeDamageMultiplier: 0
    sound: /Audio/Weapons/egloves.ogg
  - type: DelayedKnockdownOnHit # Goobstation
    useDelay: stunbaton
  - type: UseDelayBlockMelee # Goobstation
    delays:
    - stunbaton
  - type: LandAtCursor # it deals stamina damage when thrown
  - type: Battery
    maxCharge: 360
    startingCharge: 360
  - type: UseDelay
    delays: # Goobstation
      stunbaton:
        length: 2.5
  - type: Item
    heldPrefix: off
    size: Normal
  - type: Clothing
    sprite: Objects/Weapons/Melee/stunprod.rsi
    quickEquip: false
    slots:
    - back
  - type: DisarmMalus
    malus: 0.225
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ToggleableVisuals.Enabled:
        enum.ToggleableVisuals.Layer:
          True: {state: stunprod_on}
          False: {state: stunprod_off}
  - type: StaticPrice
    price: 100
  - type: Construction
    graph: makeshiftstunprod
    node: msstunprod
