# SPDX-FileCopyrightText: 2023 IProduceWidgets <107586145+IProduceWidgets@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <39013340+deltanedas@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 deltanedas <@deltanedas:kde.org>
# SPDX-FileCopyrightText: 2023 kxv <136233650+kxvvv@users.noreply.github.com>
# SPDX-FileCopyrightText: 2023 lzk <124214523+lzk228@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Emisse <99158783+Emisse@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 EmoGarbage404 <retron404@gmail.com>
# SPDX-FileCopyrightText: 2024 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 Kara <lunarautomaton6@gmail.com>
# SPDX-FileCopyrightText: 2024 Nemanja <98561806+EmoGarbage404@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 themias <89101928+themias@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  name: pen
  suffix: Exploding
  # Goobstation - Return pen embeddability
  parent: Pen
  description: A dark ink pen.
  id: PenExploding
  components:
  - type: OnUseTimerTrigger
    delay: 4
    examinable: false
  - type: Explosive
    explosionType: Default
    maxIntensity: 8
    intensitySlope: 5
    totalIntensity: 20
    canCreateVacuum: false
  - type: ActivateOnPaperOpened
  - type: ExplodeOnTrigger
  - type: TriggerOnSignal
  - type: DeviceLinkSink # This should be changed into separate behavior where triggering via signal makes beep, while triggering manually is quiet, when that functionality is supported.
    ports:
    - Trigger
  - type: EmitSoundOnUse
    handle: false # don't want the sound to stop the explosion from triggering

- type: entity
  parent: [BaseItem, BaseSyndicateContraband]
  id: PenExplodingBox
  name: exploding pen box
  description: A small box containing an exploding pen. Packaging disintegrates when opened, leaving no evidence behind.
  components:
  - type: Item
    size: Tiny
  - type: Sprite
    sprite: Objects/Storage/penbox.rsi
    state: exploding_pen
  - type: SpawnItemsOnUse
    items:
    - id: PenExploding
    sound:
      path: /Audio/Effects/unwrap.ogg