# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2024 Dakamakat <52600490+dakamakat@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@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 slarticodefast <161409025+slarticodefast@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Piras314 <p1r4s@proton.me>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  parent: [BaseItem, BaseMinorContraband]
  id: ThrowingStar
  name: throwing star
  description: An ancient weapon still used to this day, due to its ease of lodging itself into its victim's body parts.
  components:
  - type: Sprite
    sprite: Objects/Weapons/Throwable/throwing_star.rsi
    layers:
    - state: icon
      map: ["base"]
  - type: Appearance
  - type: HolidayVisuals
    holidays:
      festive:
      - FestiveSeason
  - type: GenericVisualizer
    visuals:
      enum.HolidayVisuals.Holiday:
        base:
          festive: { state: festive }
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PhysShapeCircle
          radius: 0.2
        density: 5
        mask:
        - ItemMask
        restitution: 0.3
        friction: 0.2
  - type: EmbeddableProjectile
    sound: /Audio/Weapons/star_hit.ogg
  - type: LandAtCursor
  - type: DamageOtherOnHit
    damage:
      types:
        Slash: 8
        Piercing: 10
  - type: StaminaDamageOnCollide
    damage: 45
  - type: StaminaDamageOnEmbed
    damage: 10
  - type: ThrowableBlocked # Goobstation

- type: entity
  parent: ThrowingStar
  id: ThrowingStarNinja
  name: ninja throwing star
  components:
  # prevent ninja crashing server + filling bag with 20 stars to instakill a single person
  # also limits the crew's use
  - type: TimedDespawn
    lifetime: 30