- type: entity
  name: pinpointer
  description: A handheld tracking device. While typically far more capable, this one has been configured to lock onto certain signals. Keep upright to retain accuracy.
  parent: BaseItem
  id: PinpointerBase
  abstract: true
  components:
  - type: Transform
    noRot: True
  - type: Sprite
    noRot: True
    sprite: Objects/Devices/pinpointer.rsi
    layers:
    - state: pinpointer
      map: ["enum.PinpointerLayers.Base"]
    - state: pinonnull
      map: ["enum.PinpointerLayers.Screen"]
      shader: unshaded
      visible: false
  - type: Icon
    sprite: Objects/Devices/pinpointer.rsi
    state: pinpointer
  - type: Item
    sprite: Objects/Devices/pinpointer.rsi
    inhandVisuals:
      left:
      - state: inhand-left-base
        color: "#8e1518"
      - state: inhand-left-stripe
        color: "#8e1518"
      - state: inhand-left-top
      right:
      - state: inhand-right-base
        color: "#8e1518"
      - state: inhand-right-stripe
        color: "#8e1518"
      - state: inhand-right-top
  - type: Pinpointer
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.PinpointerVisuals.IsActive:
        enum.PinpointerLayers.Screen:
          True: { visible: True }
          False: { visible: False }
      enum.PinpointerVisuals.TargetDistance:
        enum.PinpointerLayers.Screen:
          Unknown: { state: pinonnull }
          Reached: { state: pinondirect }
          Close: { state: pinonclose }
          Medium: { state: pinonmedium }
          Far: { state: pinonfar }
  - type: AnimationPlayer

- type: entity
  name: pinpointer
  id: PinpointerNuclear
  parent: [ PinpointerBase, BaseCommandContraband ]
  components:
  - type: Pinpointer
    component: NukeDisk
    targetName: nuclear authentication disk

- type: entity
  name: syndicate pinpointer
  description: Produced specifically for nuclear operative missions, get that disk!
  id: PinpointerSyndicateNuclear
  parent: [ PinpointerBase, BaseSyndicateContraband ]
  components:
  - type: Sprite
    layers:
    - state: pinpointer-syndicate
      map: ["enum.PinpointerLayers.Base"]
    - state: pinonnull
      map: ["enum.PinpointerLayers.Screen"]
      shader: unshaded
      visible: false
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-base
        color: "#202020"
      - state: inhand-left-stripe
        color: "#6c0014"
      - state: inhand-left-top
      right:
      - state: inhand-right-base
        color: "#202020"
      - state: inhand-right-stripe
        color: "#6c0014"
      - state: inhand-right-top
  - type: Icon
    state: pinpointer-syndicate
  - type: Pinpointer
    component: NukeDisk
    targetName: nuclear authentication disk

- type: entity
  name: universal pinpointer
  description: A handheld tracking device that locks onto any physical entity while off. Keep upright to retain accuracy.
  id: PinpointerUniversal
  parent: PinpointerBase
  components:
  - type: Sprite
    layers:
    - state: pinpointer-way
      map: ["enum.PinpointerLayers.Base"]
    - state: pinonnull
      map: ["enum.PinpointerLayers.Screen"]
      shader: unshaded
      visible: false
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-base
        color: "#606060"
      - state: inhand-left-stripe
        color: "#606060"
      - state: inhand-left-top
      right:
      - state: inhand-right-base
        color: "#606060"
      - state: inhand-right-stripe
        color: "#606060"
      - state: inhand-right-top
  - type: Icon
    state: pinpointer-way
  - type: Pinpointer
    updateTargetName: true
    canRetarget: true

- type: entity
  parent: PinpointerBase
  name: station pinpointer
  description: A handheld tracking device that leads to the direction of any nearby station.
  id: PinpointerStation
  suffix: Station
  components:
  - type: Sprite
    layers:
    - state: pinpointer-station
      map: ["enum.PinpointerLayers.Base"]
    - state: pinonnull
      map: ["enum.PinpointerLayers.Screen"]
      shader: unshaded
      visible: false
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-base
        color: "#3a3a3a"
      - state: inhand-left-stripe
        color: "#3a3a3a"
      - state: inhand-left-top
      right:
      - state: inhand-right-base
        color: "#3a3a3a"
      - state: inhand-right-stripe
        color: "#3a3a3a"
      - state: inhand-right-top
  - type: Icon
    state: pinpointer-station
  - type: Pinpointer
    component: ResearchServer
    targetName: the station

- type: entity
  parent: [ PinpointerBase, BaseXenoborgContraband ]
  id: PinpointerMothership
  name: core pinpointer
  description: A handheld tracking device that leads to the direction of the Mothership core.
  components:
  - type: Sprite
    layers:
    - state: pinpointer-xenoborg
      map: ["enum.PinpointerLayers.Base"]
    - state: pinonnull
      map: ["enum.PinpointerLayers.Screen"]
      shader: unshaded
      visible: false
  - type: Item
    inhandVisuals:
      left:
      - state: inhand-left-base
        color: "#3a3a3a"
      - state: inhand-left-stripe
        color: "#3a3a3a"
      - state: inhand-left-top
      right:
      - state: inhand-right-base
        color: "#3a3a3a"
      - state: inhand-right-stripe
        color: "#3a3a3a"
      - state: inhand-right-top
  - type: Icon
    state: pinpointer-xenoborg
  - type: Pinpointer
    component: MothershipCore
    targetName: the Mothership

- type: entity
  parent: BaseItem
  id: PinpointerMothershipPiece
  name: piece of core pinpointer
  description: A piece of a core pinpointer. You need four pieces to repair it.
  components:
  - type: Sprite
    sprite: Objects/Devices/pinpointer.rsi
    layers:
    - state: pinpointer-xenoborg-piece-1
      map: [ "base" ]
  - type: RandomSprite
    available:
    - base:
        pinpointer-xenoborg-piece-1: ""
        pinpointer-xenoborg-piece-2: ""
        pinpointer-xenoborg-piece-3: ""
        pinpointer-xenoborg-piece-4: ""
  - type: Item
  - type: Tag
    tags:
    - MothershipPinpointerPiece

- type: entity
  parent: PinpointerMothership
  id: PinpointerMothershipRepaired
  name: repaired core pinpointer
  description: A handheld tracking device that leads to the direction of the Mothership core. This one has seen better days.
  components:
  - type: Sprite
    layers:
    - state: pinpointer-xenoborg-repaired
      map: ["enum.PinpointerLayers.Base"]
  - type: Icon
    state: pinpointer-xenoborg-repaired
  - type: Construction
    graph: RepairMothershipPinpointer
    node: repairedPinpointer
