# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2025 Ted Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Theodore Lukin <66275205+pheenty@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: wonderprod
  parent: [BaseItem, BaseMajorContraband]
  id: Wonderprod
  description: Universal tool of the abductor agent.
  components:
  - type: Item
    sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
    heldPrefix: stun
    size: Large
    storedRotation: -90
    shape:
    - 0,0,2,2
  - type: Clothing
    sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
    quickEquip: false
    equippedPrefix: stun
    slots:
    - Back
    - suitStorage
  - type: Sprite
    sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
    state: icon
  - type: GuideHelp
    guides:
    - Abductors
  - type: MeleeWeapon
    wideAnimationRotation: -135
    attackRate: 0.5
    damage:
      types:
        Shock: 0
    angle: 60
    animation: WeaponArcThrust
  - type: StaminaDamageOnHit
    damage: 50
    sound: /Audio/Weapons/Guns/Hits/taser_hit.ogg
#  - type: RestrictMeleeByUserTag
#    contains:
#    - Abductor
#    messages:
#    - abductors-weapon-restricted-1
#    - abductors-weapon-restricted-2
#    - abductors-weapon-restricted-3
#    - abductors-weapon-restricted-4
  - type: DisarmMalus
  - type: ItemSwitch
    state: stun
    showLabel: true
    states:
      stun: !type:ItemSwitchState
        verb: stun
        sprite:
          sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
          state: stun-icon
        components:
        - type: MeleeWeapon
          wideAnimationRotation: -135
          attackRate: 0.5
          damage:
            types:
              Shock: 0
          angle: 60
          animation: WeaponArcThrust
        - type: StaminaDamageOnHit
          damage: 50
          sound: /Audio/Weapons/Guns/Hits/taser_hit.ogg
        soundStateActivate:
          collection: sparks
          params:
            variation: 0.250

      cuffs: !type:ItemSwitchState
        verb: cuffs
        sprite:
          sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
          state: cuffs-icon
        components:
        - type: MeleeWeapon
          wideAnimationRotation: -135
          attackRate: 0.5
          damage:
            types:
              Shock: 0
          angle: 60
          animation: WeaponArcThrust
        - type: CuffsOnHit
          proto: Cablecuffs

      sleep: !type:ItemSwitchState
        verb: sleep
        sprite:
          sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
          state: sleep-icon
        components:
        - type: MeleeWeapon
          wideAnimationRotation: -135
          attackRate: 1
          damage:
            types:
              Shock: 0
          angle: 60
          animation: WeaponArcThrust
        - type: InjectOnHit
          reagents:
          - ReagentId: NocturineWonderprod
            Quantity: 5
          limit: 20
          needsRestrain: true

      damage: !type:ItemSwitchState
        verb: damage
        sprite:
          sprite: _Shitmed/Objects/Weapons/Melee/wonderprod.rsi
          state: damage-icon
        components:
        - type: MeleeWeapon
          wideAnimationRotation: -135
          attackRate: 0.75
          angle: 60
          animation: WeaponArcThrust
          damage:
            types:
              Heat: 30
