- type: entity
  name: handcuffs
  description: Used to detain criminals and other assholes.
  id: BaseHandcuffs
  abstract: true
  parent: [BaseItem, BaseSecurityCommandContraband]
  components:
  - 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
    animation: WeaponArcDisarm
    damage:
      types:
        Blunt: 0
  - type: GuideHelp
    guides:
    - Security
    - Antagonists
  - type: UseDelay
    delay: 3

- type: entity
  name: handcuffs
  description: Used to detain criminals and other assholes.
  id: Handcuffs
  parent: BaseHandcuffs
  components:
  # Sunrise edit start
  - type: EmitSoundOnPickup
    sound:
      path: /Audio/_Sunrise/Items/Handcuffs/pickup.ogg
  - type: EmitSoundOnDrop
    sound:
      path: /Audio/_Sunrise/Items/Handcuffs/drop.ogg
  - type: EmitSoundOnLand
    sound:
      path: /Audio/_Sunrise/Items/Handcuffs/drop.ogg
  # Sunrise edit end

- type: entity
  name: makeshift handcuffs
  description: Homemade handcuffs crafted from spare cables.
  id: Cablecuffs
  parent: [BaseHandcuffs, BaseSecurityCommandContraband]
  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: BaseHandcuffs
  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: BaseHandcuffs
  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
  # Sunrise-Start
  - type: Tag
    tags:
    - FullBodyOuter
  # Sunrise-End
