- type: entity
  name: pen
  parent: BaseItem
  id: Pen
  description: A dark ink pen.
  components:
  - type: Sprite
    sprite: Objects/Misc/pens.rsi
    state: pen
  - type: Item
    sprite: Objects/Misc/pens.rsi
    heldPrefix: pen
    size: Tiny
  - type: Tag
    tags:
    - Write
    - Pen
  - type: PhysicalComposition
    materialComposition:
      Steel: 25
  - type: EmitSoundOnUse
    sound:
      path: /Audio/Items/pen_click.ogg
      params:
        volume: -4
        maxDistance: 2
  - type: UseDelay
    delay: 1.5
  - type: Fixtures
    fixtures:
      fix1:
        shape: !type:PolygonShape
          vertices:
          - -0.3,0.1
          - -0.1,0.3
          - 0.3,-0.1
          - 0.1,-0.3
        density: 20 # derived from base_item
        mask:
        - ItemMask
        restitution: 0.3
        friction: 0.2

- type: entity
  parent: Pen
  id: PenEmbeddable
  abstract: true
  components:
  - type: EmbeddableProjectile
    offset: 0.3,0.0
    removalTime: 0.0
  - type: ThrowingAngle
    angle: 315
  - type: LandAtCursor
  - type: DamageOtherOnHit
    damage:
      types:
        Piercing: 3

#TODO: I want the luxury pen to write a cool font like Merriweather in the future.

- type: entity
  name: luxury pen
  parent: Pen
  id: LuxuryPen
  description: A fancy and expensive pen that you only deserve to own if you're qualified to handle vast amounts of paperwork.
  components:
  - type: Sprite
    state: luxury_pen
  - type: Item
    heldPrefix: luxury_pen

- type: entity
  id: BaseAdvancedPen
  parent: PenEmbeddable
  abstract: true
  components:
  - type: Tag
    tags:
    - Write
    - WriteIgnoreStamps
    - Pen
  - type: MeleeWeapon
    wideAnimationRotation: -45
    damage:
      types:
        Piercing: 15
    soundHit:
      path: /Audio/Weapons/bladeslice.ogg
  - type: Tool
    qualities:
    - Screwing
    useSound:
      collection: Screwdriver

- type: entity
  name: Cybersun pen
  parent: [BaseAdvancedPen, BaseSyndicateContraband]
  id: CyberPen
  description: A high-tech pen straight from Cybersun's legal department, capable of refracting hard-light at impossible angles through its diamond tip in order to write. So powerful, it's even able to rewrite officially stamped documents should the need arise.
  components:
  - type: Sprite
    state: overpriced_pen
  - type: Item
    heldPrefix: overpriced_pen
  - type: StaticPrice
    price: 500

- type: entity
  name: CentComm pen
  parent: [BaseAdvancedPen, BaseCentcommContraband]
  id: PenCentcom
  description: In an attempt to keep up with the "power" of the cybersun bureaucracy, NT made a replica of cyber pen, in their corporate style.
  components:
  - type: Sprite
    state: pen_centcom
  - type: Item
    heldPrefix: pen_centcom

- type: entity
  name: captain's fountain pen
  parent: PenEmbeddable
  id: PenCap
  description: A luxurious fountain pen for the captain of the station.
  components:
  - type: Sprite
    state: pen_cap

- type: entity
  name: HoP's fountain pen
  parent: PenEmbeddable
  id: PenHop
  description: A luxurious fountain pen for the HoP of the station.
  components:
  - type: Sprite
    state: pen_hop

- type: entity
  name: wizard's magical pen
  parent: [ PenEmbeddable, BaseMagicalContraband ]
  id: PenWiz
  description: A luxurious fountain pen. Seems to have a magical crystal eraser.
  components:
  - type: Sprite
    state: pen_wizard
  - type: Tag
    tags:
    - WriteIgnoreStamps
    - Write
    - Pen
