
- type: entity
  parent: ComputerRadar
  id: ComputerAdvancedRadar # Frontier
  name: radar computer
  description: This advanced radar lets you detect far away objects for an increased tactical advantage.
  components:
  - type: Computer
    board: AdvancedRadarConsoleCircuitboard
  - type: RadarConsole
    maxRange: 768
    maxIffRange: 1100 # a bit over sqrt(2) * 768
  - type: Sprite
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: eris_control
    - map: ["computerLayerKeys"]
      state: generic_keys
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open

#region Cargo Sale
- type: entity
  name: cargo sale computer
  suffix: Normal
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, BaseComputer]
  id: ComputerPalletConsoleNFMarket
  description: Used to sell goods loaded onto cargo pallets.
  abstract: true
  components:
  - type: Sprite
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: transfer
    - map: ["computerLayerKeys"]
      state: tech_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: PointLight
    radius: 1.5
    energy: 1.6
    color: "#b89f25"
  - type: NFCargoPalletConsole
  - type: ActivatableUI
    key: enum.CargoPalletConsoleUiKey.Sale
  - type: UserInterface
    interfaces:
      enum.CargoPalletConsoleUiKey.Sale:
        type: CargoPalletConsoleNFBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: Computer
    board: Null
  - type: MarketModifier
    buy: false # The user _sells_ things to this machine.

- type: entity
  parent: ComputerPalletConsoleNFMarket
  id: ComputerPalletConsoleNFVeryHighMarket
  suffix: VeryHigh
  components:
  - type: MarketModifier
    mod: 1.50

- type: entity
  parent: ComputerPalletConsoleNFMarket
  id: ComputerPalletConsoleNFHighMarket
  suffix: High
  components:
  - type: MarketModifier
    mod: 1.25

- type: entity
  parent: ComputerPalletConsoleNFMarket
  id: ComputerPalletConsoleNFNormalMarket
  suffix: Normal
  components:
  - type: MarketModifier
    mod: 1.0

- type: entity
  parent: ComputerPalletConsoleNFMarket
  id: ComputerPalletConsoleNFLowMarket
  suffix: Low
  components:
  - type: MarketModifier
    mod: 0.75

- type: entity
  parent: ComputerPalletConsoleNFMarket
  id: ComputerPalletConsoleNFVeryLowMarket
  suffix: VeryLow
  components:
  - type: MarketModifier
    mod: 0.50

- type: entity
  name: contraband exchange computer
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, BaseComputer]
  id: ComputerContrabandPalletConsole
  description: Used to exchange contraband for Frontier Uplink Coins.
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: contraband
    - map: ["computerLayerKeys"]
      state: telesci_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: ContrabandPalletConsole
  - type: ActivatableUI
    key: enum.ContrabandPalletConsoleUiKey.Contraband
  - type: UserInterface
    interfaces:
      enum.ContrabandPalletConsoleUiKey.Contraband:
        type: ContrabandPalletConsoleBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: Computer
    board: Null

- type: entity
  parent: ComputerShuttle
  id: ComputerShuttleAntag
  categories: [ HideSpawnMenu ]
  components:
  - type: Sprite
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: syndishuttle
    - map: ["computerLayerKeys"]
      state: syndie_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: PointLight
    radius: 1.5
    energy: 1.6
    color: "#c94242"

#region IFF
- type: entity
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerIFFSyndicate]
  id: ComputerIFFPOI
  name: IFF computer
  suffix: POI
  description: Allows you to control the IFF and stealth characteristics of this station.
  components:
  - type: IFFConsole
    allowedFlags:
      - Hide
  - type: ActivatableUI
    key: enum.IFFConsoleUiKey.Key
  - type: UserInterface
    interfaces:
      enum.IFFConsoleUiKey.Key:
        type: IFFConsoleBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: Computer
    board: Null

#region Cargo Market
- type: entity
  name: cargo market computer
  abstract: true
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, BaseComputer]
  id: ComputerMarketConsoleNFBase
  description: Used to buy goods from the station's market system.
  placement:
    mode: SnapgridCenter
  components:
  - type: Sprite
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      sprite: _NF/Structures/Machines/computers.rsi
      state: cargo_market
    - map: ["computerLayerKeys"]
      state: tech_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: MarketConsole
  - type: ActivatableUI
    key: enum.MarketConsoleUiKey.Default
  - type: UserInterface
    interfaces:
      enum.MarketConsoleUiKey.Default:
        type: MarketConsoleBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: MarketModifier
    mod: 1
  - type: Computer
    board: Null

- type: entity
  name: cargo market computer
  parent: ComputerMarketConsoleNFBase
  id: ComputerMarketConsoleNFLow
  suffix: Low
  components:
  - type: MarketModifier
    mod: 4

- type: entity
  name: cargo market computer
  parent: ComputerMarketConsoleNFBase
  id: ComputerMarketConsoleNFNormal
  suffix: Normal
  components:
  - type: MarketModifier
    mod: 6

- type: entity
  name: cargo market computer
  parent: ComputerMarketConsoleNFBase
  id: ComputerMarketConsoleNFHigh
  suffix: High
  components:
  - type: MarketModifier
    mod: 8

#region Pirate
- type: entity
  id: ComputerPirateBounty
  parent: BaseComputer
  name: pirate bounty computer
  description: Avast, get ye pirate bounties here.
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_blackmarket
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: piratebounty
    - map: ["computerLayerKeys"]
      state: blackmarket_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: PirateBountyConsole
    spawnChestSound:
      path: /Audio/Effects/Lightning/lightningbolt.ogg
      params:
        volume: -5
        variation: 0.2
  - type: ActivatableUI
    key: enum.PirateConsoleUiKey.Bounty
  - type: UserInterface
    interfaces:
      enum.PirateConsoleUiKey.Bounty:
        type: PirateBountyConsoleBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: Computer
    board: Null # Really shouldn't spawn anything on destruction
  - type: PointLight
    radius: 1.5
    energy: 1.6
    color: "#b89f25"
  # - type: GuideHelp # Frontier
  #   guides: # Frontier
  #   - Pirate # Frontier: eventually?  maybe?
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 250
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
      - !type:ChangeConstructionNodeBehavior
        node: start
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Construction
    graph: ComputerPirateBounty
    node: repaired

- type: entity
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerBroken]
  id: ComputerPirateBountyBroken
  name: broken pirate bounty computer
  description: This console has seen better days. Can be repaired with a repair kit.
  components:
  - type: Construction
    graph: ComputerPirateBounty
    node: start

- type: entity
  name: plunder exchange computer
  parent: ComputerContrabandPalletConsole
  id: ComputerContrabandPalletConsolePirate
  description: Fence yer ill-gotten goods here! And keep yer pile orderly.
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_blackmarket
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: contraband # TODO: replace this
    - map: ["computerLayerKeys"]
      state: blackmarket_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: Computer
    board: Null # Really shouldn't spawn anything on destruction
  - type: ContrabandPalletConsole
    cashType: Doubloon
    faction: Pirates
    locStringPrefix: pirate-
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 250
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
      - !type:ChangeConstructionNodeBehavior
        node: start
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Construction
    graph: ComputerContrabandPalletConsolePirate
    node: repaired

- type: entity
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerBroken]
  id: ComputerContrabandPalletConsolePirateBroken
  name: broken plunder exchange computer
  description: This console has seen better days. Can be repaired with a repair kit.
  components:
  - type: Construction
    graph: ComputerContrabandPalletConsolePirate
    node: start

- type: entity
  name: pirate bounty redemption computer
  parent: ComputerPirateBounty
  id: ComputerPirateBountyRedemption
  description: Back from a voyage? Redeem yer bounties here, matey.
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_blackmarket
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: piratebounty_pad
    - map: ["computerLayerKeys"]
      state: blackmarket_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: PirateBountyRedemptionConsole
  - type: ActivatableUI
    key: enum.PirateConsoleUiKey.BountyRedemption
  - type: UserInterface
    interfaces:
      enum.PirateConsoleUiKey.BountyRedemption:
        type: PirateBountyRedemptionConsoleBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: Computer
    board: Null
  - type: PointLight
    radius: 1.5
    energy: 1.6
    color: "#b89f25"
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 250
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: GlassBreak
      - !type:ChangeConstructionNodeBehavior
        node: start
      - !type:DoActsBehavior
        acts: ["Destruction"]
  - type: Construction
    graph: ComputerPirateBountyRedemption
    node: repaired

- type: entity
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerBroken]
  id: ComputerPirateBountyRedemptionBroken
  name: broken pirate bounty redemption computer
  description: This console has seen better days. Can be repaired with a repair kit.
  components:
  - type: Construction
    graph: ComputerPirateBountyRedemption
    node: start

- type: entity
  id: ComputerSalvageExpeditionDebug
  parent: ComputerSalvageExpedition
  suffix: Debug
  components:
    - type: SalvageExpeditionConsole
      debug: true

#region Gas Sale
- type: entity
  parent: [ BaseStructureIndestructible, BaseStructureDisableToolUse, BaseComputer ]
  id: GasSaleConsole
  name: gas sale console
  description: Sells gas pumped into any nearby gas sale ports or points.
  suffix: Normal
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: gas_sale_point
    - map: ["computerLayerKeys"]
      state: atmos_key
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: GasSaleConsole
  - type: ActivatableUI
    key: enum.GasSaleConsoleUiKey.Key
  - type: UserInterface
    interfaces:
      enum.GasSaleConsoleUiKey.Key:
        type: GasSaleConsoleBoundUserInterface
      enum.WiresUiKey.Key:
        type: WiresBoundUserInterface
  - type: Computer
    board: Null # FIXME
  - type: MarketModifier
    buy: false
    mod: 1

- type: entity
  parent: GasSaleConsole
  id: GasSaleConsoleVeryHigh
  suffix: VeryHigh
  components:
  - type: MarketModifier
    mod: 1.5

- type: entity
  parent: GasSaleConsole
  id: GasSaleConsoleHigh
  suffix: High
  components:
  - type: MarketModifier
    mod: 1.25

- type: entity
  parent: GasSaleConsole
  id: GasSaleConsoleLow
  suffix: Low
  components:
  - type: MarketModifier
    mod: 0.75

- type: entity
  parent: GasSaleConsole
  id: GasSaleConsoleVeryLow
  suffix: VeryLow
  components:
  - type: MarketModifier
    mod: 0.5

#region Traffic
- type: entity
  id: BaseComputerTraffic
  abstract: true
  components:
  - type: RadarConsole
    maxRange: 350
  - type: Computer
    board: Null
  - type: Sprite
    drawdepth: SmallObjects
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      sprite: Structures/Machines/computers.rsi
      state: shuttle
    - map: ["computerLayerKeys"]
      sprite: Structures/Machines/computers.rsi
      state: generic_keys
    - map: [ "enum.WiresVisualLayers.MaintenancePanel" ]
      state: generic_panel_open
  - type: AccessReader
    access: [["StationTrafficController"]]
  - type: ActivatableUIRequiresAccess
  - type: WorldLoader
    disabled: true
    radius: 0 # Just in case.

- type: entity
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, BaseStructureAccessReaderImmuneToEmag, BaseComputerShuttle, BaseComputerTraffic]
  id: BaseComputerTrafficRemote
  abstract: true

- type: entity
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, BaseStructureAccessReaderImmuneToEmag, ComputerShuttle, BaseShuttleIntercom, BaseComputerTraffic]
  id: BaseComputerTrafficLocal
  abstract: true

- type: entity
  parent: BaseComputerTrafficLocal
  id: ComputerShuttleFrontierOutpostLocal
  name: Frontier Outpost traffic console
  description: Monitors the traffic around Frontier Outpost.
  suffix: Local
  components:
  - type: NFDroneConsoleTarget
    id: Frontier

- type: entity
  parent: BaseComputerTrafficRemote
  id: ComputerShuttleFrontierOutpostRemote
  name: Frontier Outpost traffic console
  description: Monitors the traffic around Frontier Outpost.
  suffix: Remote
  components:
  - type: NFDroneConsole
    id: Frontier

- type: entity
  parent: BaseComputerTrafficLocal
  id: ComputerShuttleTradeOutpostLocal
  name: Trade Outpost traffic console
  suffix: Local
  description: Monitors the traffic around the Trade Outpost.
  components:
  - type: NFDroneConsoleTarget
    id: Trade

- type: entity
  parent: BaseComputerTrafficRemote
  id: ComputerShuttleTradeOutpostRemote
  name: Trade Outpost traffic console
  suffix: Remote
  description: Monitors the traffic around the Trade Outpost.
  components:
  - type: NFDroneConsole
    id: Trade
