# SPDX-FileCopyrightText: 2020 AJCM-git <60196617+AJCM-git@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 Paul Ritter <ritter.paul1@googlemail.com>
# SPDX-FileCopyrightText: 2020 Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
# SPDX-FileCopyrightText: 2020 nuke <47336974+nuke-makes-games@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Galactic Chimp <GalacticChimpanzee@gmail.com>
# SPDX-FileCopyrightText: 2021 Mith-randalf <84274729+Mith-randalf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 SETh lafuente <cetaciocascarudo@gmail.com>
# SPDX-FileCopyrightText: 2021 SethLafuente <84478872+SethLafuente@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 Swept <sweptwastaken@protonmail.com>
# SPDX-FileCopyrightText: 2021 ZeroDayDaemon <60460608+ZeroDayDaemon@users.noreply.github.com>
# SPDX-FileCopyrightText: 2021 mirrorcult <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2022 Errant <35878406+dmnct@users.noreply.github.com>
# SPDX-FileCopyrightText: 2022 Morb <14136326+Morb0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 brainfood1183 <113240905+brainfood1183@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 crazybrain23 <44417085+crazybrain23@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 jicksaw <jicksaw@pm.me>
# SPDX-FileCopyrightText: 2024 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2024 Alzore <140123969+Blackern5000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Brandon Hu <103440971+Brandon-Huu@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CaasGit <87243814+CaasGit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 CatMagic <135462166+CatMagic1@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Chief-Engineer <119664036+Chief-Engineer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Cojoke <83733158+Cojoke-dot@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DarkDanss14 <156617183+DarkDanss14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <10968691+DrSmugleaf@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 DrSmugleaf <DrSmugleaf@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 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Eoin Mcloughlin <helloworld@eoinrul.es>
# SPDX-FileCopyrightText: 2024 Errant <35878406+Errant-4@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Flareguy <78941145+Flareguy@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Hrosts <35345601+Hrosts@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 I.K <45953835+notquitehadouken@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ian <ignaz.k@live.de>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Joel Zimmerman <JoelZimmerman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 JustCone <141039037+JustCone14@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kira Bridgeton <161087999+Verbalase@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ko4ergaPunk <62609550+Ko4ergaPunk@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kukutis96513 <146854220+Kukutis96513@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Leon Friedrich <60421075+ElectroJr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Lye <128915833+Lyroth001@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MerrytheManokit <167581110+MerrytheManokit@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Mervill <mervills.email@gmail.com>
# SPDX-FileCopyrightText: 2024 Mr. 27 <45323883+Dutch-VanDerLinde@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 MureixloI <132683811+MureixloI@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NakataRin <45946146+NakataRin@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 OrangeMoronage9622 <whyteterry0092@gmail.com>
# SPDX-FileCopyrightText: 2024 PJBot <pieterjan.briers+bot@gmail.com>
# SPDX-FileCopyrightText: 2024 Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
# SPDX-FileCopyrightText: 2024 Piras314 <p1r4s@proton.me>
# SPDX-FileCopyrightText: 2024 Plykiya <58439124+Plykiya@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Preston Smith <92108534+thetolbean@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Psychpsyo <60073468+Psychpsyo@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Repo <47093363+Titian3@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 RiceMar1244 <138547931+RiceMar1244@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 ShadowCommander <10494922+ShadowCommander@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Simon <63975668+Simyon264@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 SlamBamActionman <83650252+SlamBamActionman@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Stalen <33173619+stalengd@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TakoDragon <69509841+BackeTako@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Thomas <87614336+Aeshus@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 TsjipTsjip <19798667+TsjipTsjip@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ubaser <134914314+UbaserB@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Unkn0wn_Gh0st <shadowstalkermll@gmail.com>
# SPDX-FileCopyrightText: 2024 Vasilis <vasilis@pikachu.systems>
# SPDX-FileCopyrightText: 2024 Vigers Ray <60344369+VigersRay@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Whisper <121047731+QuietlyWhisper@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 beck-thompson <107373427+beck-thompson@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deathride58 <deathride58@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 dffdff2423 <dffdff2423@gmail.com>
# SPDX-FileCopyrightText: 2024 eoineoineoin <github@eoinrul.es>
# SPDX-FileCopyrightText: 2024 foboscheshir <156405958+foboscheshir@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 metalgearsloth <comedian_vs_clown@hotmail.com>
# SPDX-FileCopyrightText: 2024 nikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 plykiya <plykiya@protonmail.com>
# SPDX-FileCopyrightText: 2024 saintmuntzer <47153094+saintmuntzer@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 shamp <140359015+shampunj@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 strO0pwafel <153459934+strO0pwafel@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 stroopwafel <j.o.luijkx@student.tudelft.nl>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 to4no_fix <156101927+chavonadelal@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 username <113782077+whateverusername0@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 voidnull000 <18663194+voidnull000@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 whateverusername0 <whateveremail>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Eagle <lincoln.mcqueen@gmail.com>
# SPDX-FileCopyrightText: 2025 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 gus <august.eymann@gmail.com>
# SPDX-FileCopyrightText: 2025 vanx <61917534+Vaaankas@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: handcuffs
  description: Used to detain criminals and other assholes.
  id: Handcuffs
  parent: [BaseItem, BaseSecurityCommandContraband]
  components:
  # Goobstation edit start
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Goobstation/Items/other/Handcuffs/pickup.ogg
      params:
        volume: -4
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/_Goobstation/Items/other/Handcuffs/drop.ogg
      params:
        volume: -4
  # Goobstation edit end
  - type: Item
    size: Small
    storedRotation: 90
  - type: Handcuff
    cuffedRSI: Objects/Misc/handcuffs.rsi
    bodyIconState: body-overlay
  - type: Sprite
    sprite: Objects/Misc/handcuffs.rsi
    state: handcuff
  - type: Tag
    tags:
    - Handcuffs
  - type: MeleeWeapon
    wideAnimationRotation: 90
    resetOnHandSelected: false
    # animation: WeaponArcDisarm # WWDP replaced with animation
    damage:
      types:
        Blunt: 0
  - type: GuideHelp
    guides:
    - Security
    - Antagonists
  - type: UseDelay
    delay: 3

- type: entity
  name: makeshift handcuffs
  description: Homemade handcuffs crafted from spare cables.
  id: Cablecuffs
  parent: Handcuffs
  components:
  - type: Handcuff
    breakoutTime: 3
    cuffedRSI: Objects/Misc/cablecuffs.rsi
    bodyIconState: body-overlay
    color: forestgreen
    breakOnRemove: true
    brokenPrototype: CablecuffsBroken
    startCuffSound:
      path: /Audio/Items/Handcuffs/rope_start.ogg
    endCuffSound:
      path: /Audio/Items/Handcuffs/rope_end.ogg
    startUncuffSound:
      path: /Audio/Items/Handcuffs/rope_start.ogg
    endUncuffSound:
      path: /Audio/Items/Handcuffs/rope_breakout.ogg
    startBreakoutSound:
      path: /Audio/Items/Handcuffs/rope_takeoff.ogg
  - type: Construction
    graph: makeshifthandcuffs
    node: cuffscable
  - type: Item
    inhandVisuals:
      left:
        - state: inhand-left
          color: forestgreen
      right:
        - state: inhand-right
          color: forestgreen
  - type: Sprite
    sprite: Objects/Misc/cablecuffs.rsi
    state: cuff
    color: forestgreen

- type: entity
  name: zipties
  description: Tough single-use plastic zipties, ideal for restraining rowdy prisoners.
  id: Zipties
  parent: Handcuffs
  components:
  - type: Item
    size: Tiny
    storedRotation: 0
  - type: Handcuff
    breakoutTime: 3
    cuffedRSI: Objects/Misc/cablecuffs.rsi  # cablecuffs will look fine
    bodyIconState: body-overlay
    breakOnRemove: true
    brokenPrototype: ZiptiesBroken
    startCuffSound:
      path: /Audio/Items/Handcuffs/ziptie_start.ogg
    endCuffSound:
      path: /Audio/Items/Handcuffs/ziptie_end.ogg
    startUncuffSound:
      path: /Audio/Items/Handcuffs/rope_start.ogg
    endUncuffSound:
      path: /Audio/Items/Handcuffs/rope_breakout.ogg
    startBreakoutSound:
      path: /Audio/Items/Handcuffs/rope_takeoff.ogg
  - type: Sprite
    sprite: Objects/Misc/zipties.rsi
    state: cuff

- type: entity
  id: BaseHandcuffsBroken
  parent: BaseItem
  abstract: true
  components:
  - type: Item
    size: Small
  - type: Tag
    tags:
    - Trash
  - type: PhysicalComposition
    materialComposition:
      Plastic: 25

- type: entity
  name: broken zipties
  description: These zipties look like they tried to manage the wrong cables.
  id: ZiptiesBroken
  parent: BaseHandcuffsBroken
  components:
  - type: Sprite
    sprite: Objects/Misc/zipties.rsi
    state: cuff-broken

- type: entity
  name: broken cables
  description: These cables are broken in several places and don't seem very useful.
  id: CablecuffsBroken
  parent: BaseHandcuffsBroken
  components:
  - type: Sprite
    sprite: Objects/Misc/cablecuffs.rsi
    state: cuff-broken
    color: forestgreen
  - type: Item
    inhandVisuals:
      left:
        - state: inhand-left
          color: forestgreen
      right:
        - state: inhand-right
          color: forestgreen

- type: entity
  parent: Handcuffs
  id: ClothingOuterStraightjacket
  name: straitjacket
  description: Used to restrain those who may cause harm to themselves or others.
  components:
  - type: Item
    size: Normal
  - type: Handcuff
    cuffedRSI: Clothing/OuterClothing/Misc/straight_jacket.rsi
    breakoutTime: 100
    cuffTime: 10
    uncuffTime: 10
    stunBonus: 4
  - type: Sprite
    sprite: Clothing/OuterClothing/Misc/straight_jacket.rsi
    state: icon
