# Placeholder PAIs, aka semi-automatic ghost roles

- type: entity
  parent: BaseItem
  id: PersonalAI
  name: personal ai device
  description: Your electronic pal who's fun to be with!
  components:
  - type: Instrument
    allowPercussion: false
    handheld: false
    program: 2
    bank: 100 # Defined in space-station-14.sf2
  - type: UserInterface
    interfaces:
      enum.StoreUiKey.Key:
        type: StoreBoundUserInterface
        requireInputValidation: false
      # available in pai shop
      enum.RadarConsoleUiKey.Key:
        type: RadarConsoleBoundUserInterface
        requireInputValidation: false
      enum.InstrumentUiKey.Key:
        type: InstrumentBoundUserInterface
        requireInputValidation: false
      enum.StationMapUiKey.Key:
        type: StationMapBoundUserInterface
        requireInputValidation: false
  - type: Sprite
    sprite: Objects/Fun/pai.rsi
    layers:
    - state: pai-base
    - state: pai-off-overlay
      shader: unshaded
      map: ["screen"]
  - type: Input
    context: "human"
  - type: PAI
  - type: BlockMovement
  - type: ToggleableGhostRole
    examineTextMindPresent: pai-system-pai-installed
    examineTextMindSearching: pai-system-still-searching
    examineTextNoMind: pai-system-off
    beginSearchingText: pai-system-searching
    roleName: pai-system-role-name
    roleDescription: pai-system-role-description
    roleRules: ghost-role-information-familiar-rules
    mindRoles:
    - MindRoleGhostRoleFamiliar
    wipeVerbText: pai-system-wipe-device-verb-text
    wipeVerbPopup: pai-system-wiped-device
    stopSearchVerbText: pai-system-stop-searching-verb-text
    stopSearchVerbPopup: pai-system-stopped-searching
  - type: Examiner
  - type: IntrinsicRadioReceiver
  - type: ActiveRadio
    channels:
    - Common
  - type: DoAfter
  - type: Actions
  - type: ActionGrant
    actions:
    - ActionPAIOpenShop
  - type: Store
    categories:
    - PAIAbilities
    currencyWhitelist:
    - SiliconMemory
    balance:
      SiliconMemory: 30
  - type: RadarConsole
    maxRange: 256
    followEntity: true
  - type: TypingIndicator
    proto: robot
  - type: Speech
    speechVerb: Robotic
    speechSounds: Pai
    # This has to be installed because otherwise they're not "alive",
    #  so they can ghost and come back.
    # Note that the personal AI never "dies".
  - type: MobState
    allowedStates:
      - Alive
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ToggleableGhostRoleVisuals.Status:
        screen:
          Off: { state: pai-off-overlay }
          Searching: { state: pai-searching-overlay }
          On: { state: pai-on-overlay }
  - type: StationMap
  - type: ChangeVoiceInContainer
    whitelist:
      components:
        - SecretStash
        - WrappedParcel
  - type: Vocal
    sounds:
      Unsexed: UnisexSilicon
  - type: Tag
    tags:
    - SiliconEmotes

- type: entity
  parent: [ PersonalAI, BaseSyndicateContraband]
  id: SyndicatePersonalAI
  name: syndicate personal ai device
  description: Your Syndicate pal who's fun to be with!
  components:
  - type: Sprite
    sprite: Objects/Fun/pai.rsi
    layers:
    - state: pai-base
    - state: syndicate-pai-off-overlay
      shader: unshaded
      map: ["screen"]
  - type: ToggleableGhostRole
    roleName: pai-system-role-name-syndicate
    roleDescription: pai-system-role-description-syndicate
    roleRules: ghost-role-information-familiar-rules
    mindRoles:
    - MindRoleGhostRoleFamiliar
  - type: IntrinsicRadioTransmitter
    channels:
    - Syndicate
  - type: ActiveRadio
    channels:
    - Syndicate
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ToggleableGhostRoleVisuals.Status:
        screen:
          Off: { state: syndicate-pai-off-overlay }
          Searching: { state: syndicate-pai-searching-overlay }
          On: { state: syndicate-pai-on-overlay }
  - type: StaticPrice
    price: 500
  - type: Vocal
    sounds:
      Unsexed: UnisexSiliconSyndicate

- type: entity
  parent: PersonalAI
  id: GoldenPersonalAI
  name: golden personal ai device
  description: Your electronic pal who's fun to be with! Special golden edition!
  components:
  - type: Sprite
    sprite: Objects/Fun/pai.rsi
    layers:
    - state: golden-pai-base
    - state: pai-off-overlay
      shader: unshaded
      map: ["screen"]
  - type: Appearance

- type: entity
  parent: PersonalAI
  id: PotatoAI
  name: potato artificial intelligence
  description: It's a potato. You forced it to be sentient, you monster.
  components:
  - type: Sprite
    sprite: Objects/Fun/pai.rsi
    layers:
    - state: potato-base
    - state: potato-off-overlay
      shader: unshaded
      map: ["screen"]
  - type: ToggleableGhostRole
    roleName: pai-system-role-name-potato
    roleDescription: pai-system-role-description-potato
    roleRules: ghost-role-information-familiar-rules
    mindRoles:
    - MindRoleGhostRoleFamiliar
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.ToggleableGhostRoleVisuals.Status:
        screen:
          Off: { state: potato-off-overlay }
          Searching: { state: potato-searching-overlay }
          On: { state: potato-on-overlay }
  - type: Construction
    graph: PotatoAI
    node: potatoai

# PAI Actions

- type: entity
  parent: ActionIntrinsicStore
  id: ActionPAIOpenShop
  name: Software Catalog
  description: Install new software to assist your owner.

- type: entity
  parent: BaseMentalAction
  id: ActionPAIMassScanner
  name: Mass Scanner
  description: View a mass scanner interface.
  components:
  - type: Action
    icon: { sprite: Interface/Actions/actions_ai.rsi, state: mass_scanner }
    itemIconStyle: NoItem
  - type: InstantAction
    event: !type:OpenUiActionEvent
      key: enum.RadarConsoleUiKey.Key

- type: entity
  parent: BaseMentalAction
  id: ActionPAIPlayMidi
  name: Play MIDI
  description: Open your portable MIDI interface to soothe your owner.
  components:
  - type: Action
    icon: Interface/Actions/pai-midi.png
    itemIconStyle: NoItem
  - type: InstantAction
    event: !type:OpenUiActionEvent
      key: enum.InstrumentUiKey.Key

- type: entity
  parent: BaseMentalAction
  id: ActionPAIOpenMap
  name: Open Map
  description: Open your map interface and guide your owner.
  components:
  - type: Action
    icon: { sprite: Interface/Actions/pai-map.rsi, state: icon }
    itemIconStyle: NoItem
  - type: InstantAction
    event: !type:OpenUiActionEvent
      key: enum.StationMapUiKey.Key
