# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Fenn <162015305+TooSillyFennec@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Ps3Moira <113228053+ps3moira@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: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 Eagle <lincoln.mcqueen@gmail.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 SolsticeOfTheWinter <solsticeofthewinter@gmail.com>
# SPDX-FileCopyrightText: 2025 VMSolidus <evilexecutive@gmail.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@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
  parent: BaseItem
  id: Cane
  name: cane
  description: A standard wooden cane. Can help disabled people move easier. # Goobstation
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/cane.rsi
    state: cane
  - type: Item
    size: Normal
    sprite: Objects/Weapons/Melee/cane.rsi
  - type: Appearance
  - type: MeleeWeapon
    animationRotation: -45 # WWDP
    wideAnimationRotation: 45
    damage:
      types:
        Blunt: 5
  - type: StaminaDamageOnHit
    damage: 5
  - type: Wieldable
  - type: IncreaseDamageOnWield
    damage:
      types:
        Blunt: 3
  - type: UseDelay
    delay: 1
  - type: MovementImpairedCorrection # Goobstation

- type: entity
  name: cane blade
  parent: [BaseItem, BaseSyndicateContraband]
  id: CaneBlade
  description: A sharp blade with a cane shaped hilt. Enchanted with fire powers by a fellow book lover. # Goobstation
  components:
  - type: Sharp
  - type: Sprite
    sprite: Objects/Weapons/Melee/cane_blade.rsi
    state: icon
  - type: MeleeWeapon
    animationRotation: 45 # WWDP
    wideAnimationRotation: 65
    attackRate: 1.5
    damage:
      types:
        Slash: 16 # Goobstation
    soundHit:
        path: /Audio/Weapons/bladeslice.ogg
  - type: Item
    size: Normal
    sprite: Objects/Weapons/Melee/cane_blade.rsi
  - type: Tag
    tags:
      - CaneBlade
  - type: DisarmMalus
  - type: IgniteOnMeleeHit # Goobstation
    fireStacks: 0.5

- type: entity
  parent: Cane
  id: CaneSheath
  suffix: Empty
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/cane.rsi
    state: cane-empty
  - type: ContainerContainer
    containers:
      storagebase: !type:Container
        ents: []
      item: !type:ContainerSlot
  - type: UserInterface
    interfaces:
      enum.StorageUiKey.Key:
        type: StorageBoundUserInterface
  - type: ItemSlots
    slots:
      item:
        name: CaneBlade
        insertVerbText: sheath-insert-verb
        ejectVerbText: sheath-eject-verb
        whitelist:
          tags:
          - CaneBlade
        insertSound: /Audio/Items/sheath.ogg
        ejectSound: /Audio/Items/unsheath.ogg
  - type: ItemMapper
    mapLayers:
      cane:
        whitelist:
          tags:
          - CaneBlade
  - type: HideContrabandContent #Goobstation-Contraband detector
  - type: MovementImpairedCorrection # Goobstation

- type: entity
  id: CaneSheathFilled
  parent: CaneSheath
  suffix: Filled
  components:
  - type: ContainerFill
    containers:
      item:
      - CaneBlade
