# SPDX-FileCopyrightText: 2024 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Remuchi <72476615+Remuchi@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 pheenty <fedorlukin2006@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: TelescopicBaton
  parent: [BaseItem, BaseCommandContraband] # Goob edit
  name: telescopic baton
  description: A compact and harmless personal defense weapon. Sturdy enough to knock the feet out from under attackers. If you hit a person immediately after extending the baton, it will force them drop held items as well. # Goob edit
  components:
  - type: Sprite
    sprite: _Goobstation/Objects/Weapons/Melee/telebaton.rsi # Goob edit
    layers:
    - state: icon-off
      map: [ "enum.ItemToggleVisuals.Layer" ]
  - type: Item
    sprite: _Goobstation/Objects/Weapons/Melee/telebaton.rsi # Goob edit
    size: Small
    storedRotation: -45 # Goobstation
  - type: ItemToggle
    soundActivate:
      path: /Audio/Weapons/telescopicon.ogg
      params:
        volume: -2
    soundDeactivate:
      path: /Audio/Weapons/telescopicoff.ogg
      params:
        volume: -2
  - type: ComponentToggler # Goobstation
    components:
    - type: DisarmMalus
      malus: 0.6
  - type: ItemToggleMeleeWeapon
    activatedSoundOnHit:
      path: /Audio/_Goobstation/Weapons/Baton/woodhit.ogg
      params:
        variation: 0.250
    activatedDamage:
      types:
        Blunt: 12
      woundSeverityMultipliers: #Goob
        Blunt: 0.5 # Im tired of this shit breaking bones, its meant to be nonlethal
  - type: ItemToggleSize
    activatedSize: Normal
    activatedShape: # Goobstation
    - 0,0,0,3
  - type: UseDelay
    # Goob edit start
    delays:
      default:
        length: 1
      telebaton:
        length: 4
    # Goob edit end
  - type: TelescopicBaton
  - type: KnockdownOnHit
    duration: 1.5
    dropHeldItemsBehavior: DropIfStanding # Goob edit
  - type: MeleeWeapon
    wideAnimationRotation: -135
    bluntStaminaDamageFactor: 1.5
    angle: 0 # Goob edit
    damage:
      types:
        Blunt: 1
  - type: Appearance
  - type: ItemToggleVisuals # Goobstation
  - type: GenericVisualizer
    visuals:
      enum.ItemToggleVisuals.State:
        enum.ItemToggleVisuals.Layer:
          True: { state: icon }
          False: { state: icon-off }
  - type: Clothing # Goobstation
    sprite: _Goobstation/Objects/Weapons/Melee/telebaton.rsi
    slots:
    - Belt
  - type: UseDelayBlockMelee # Goobstation
    delays:
    - default
    - telebaton
