- type: entity
  parent: BaseItem
  id: Cane
  name: cane
  description: A wooden cane.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/cane.rsi
    state: cane
  - type: Item
    size: Normal
    sprite: Objects/Weapons/Melee/cane.rsi
  - type: Appearance
  - type: MobilityAid
  - type: MeleeWeapon
    wideAnimationRotation: 45
    damage:
      types:
        Blunt: 5
  - type: StaminaDamageOnHit
    damage: 5
  - type: Wieldable
  - type: IncreaseDamageOnWield
    damage:
      types:
        Blunt: 3
  - type: UseDelay
    delay: 1

- type: entity
  name: cane blade
  parent: [BaseSword, BaseSyndicateContraband]
  id: CaneBlade
  description: A sharp blade with a cane shaped hilt.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Melee/cane_blade.rsi
  - type: MeleeWeapon
    wideAnimationRotation: 65
    attackRate: 1.5
    damage:
      types:
        Slash: 17
    soundHit:
        path: /Audio/Weapons/bladeslice.ogg
  - type: Item
    sprite: Objects/Weapons/Melee/cane_blade.rsi
  - type: Tag
    tags:
      - CaneBlade
  - type: DisarmMalus

- type: entity
  parent: [Cane, SelectableLock]
  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: ItemSlotsLock
    slots:
    - item
  - 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
        priority: 3
  - type: ItemMapper
    mapLayers:
      cane:
        whitelist:
          tags:
          - CaneBlade

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

- type: entity
  parent: WeaponFlareGun #VoiceLock
  id: CaneShotgun
  name: cane
  description: A wooden cane.
  components:
  - type: Sprite
    sprite: _Sunrise/Objects/Weapons/Guns/Shotguns/cane_shotgun.rsi
    layers:
      - state: base
        map: ["enum.GunVisualLayers.Base"]
  - type: Item
    size: Normal
    shape:
    - 0,0,1,1
    sprite: _Sunrise/Objects/Weapons/Guns/Shotguns/cane_shotgun.rsi
  - type: Appearance
  - type: Gun
    fireRate: 4
    useKey: true
    selectedMode: SemiAuto
  - type: StaminaDamageOnHit
    damage: 5
  - type: Wieldable
  - type: IncreaseDamageOnWield
    damage:
      types:
        Blunt: 3
  - type: MeleeWeapon
    wideAnimationRotation: 45
    damage:
      types:
        Blunt: 5
    bluntStaminaDamageFactor: 2.0
    attackRate: 1
    autoAttack: false
  - type: AltFireMelee
    attackType: Heavy
  - type: ItemSlots
    slots:
      gun_chamber:
        name: Chamber
        startingItem: ShellShotgunBooze
        priority: 1
        whitelist:
          tags:
            - ShellShotgun
  - type: UseDelay
    delay: 1
