- type: entity
  name: shipyard console
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, BaseComputer]
  id: ComputerShipyardBase
  description: Used to purchase and sell shuttles
  abstract: true
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard
    - map: ["computerLayerKeys"]
      state: telesci_key
  - type: ShipyardConsole
    targetIdSlot:
      name: id-card-console-target-id
      ejectSound: /Audio/Machines/id_swipe.ogg
      insertSound: /Audio/Weapons/Guns/MagIn/batrifle_magin.ogg
      ejectOnBreak: true
      swap: true
      whitelist:
        components:
        - IdCard
        - ShipyardVoucher
    newAccessLevels: [Captain]
  - type: ActivatableUI
    singleUser: true
    key: enum.ShipyardConsoleUiKey.Shipyard
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Shipyard:
        type: ShipyardConsoleBoundUserInterface
  - type: ItemSlots
  - type: ContainerContainer
    containers:
      board: !type:Container
      ShipyardConsole-targetId: !type:ContainerSlot
  - type: Computer
    board: Null

# Concrete consoles
- type: entity
  parent: ComputerShipyardBase
  id: ComputerShipyard
  components:
  - type: ShipyardConsole
    newJobTitle: Captain

- type: entity
  id: ComputerShipyardSecurity
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerShipyardBase]
  name: security shipyard console
  description: Used to enlist into TSF Security Forces
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_security
    - map: ["computerLayerKeys"]
      state: telesci_key
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.Security
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Security:
        type: ShipyardConsoleBoundUserInterface
  - type: ShipyardConsole
    shipyardChannel: Nfsd
    newAccessLevels: [Captain, Security, Brig]

- type: entity
  id: ComputerShipyardNfsd
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerShipyardBase]
  name: TSFMC shipyard console
  description: Used to buy TSFMC vessels.
  components:
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_nfsd
    - map: ["computerLayerKeys"]
      state: telesci_key
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.Security
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Security:
        type: ShipyardConsoleBoundUserInterface
  - type: ShipyardConsole
    shipyardChannel: Nfsd
    newAccessLevels: [Captain, Security, Brig]

- type: entity
  id: ComputerShipyardSyndicate
  parent: [BaseStructureDisableToolUse, BaseStructureDestructible, ComputerShipyardBase]
  name: syndicate shipyard console
  description: Used to buy ships not available through other means.
  components:
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.Syndicate
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Syndicate:
        type: ShipyardConsoleBoundUserInterface
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_blackmarket
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_blackmarket
    - map: ["computerLayerKeys"]
      state: blackmarket_key
  - type: ShipyardConsole
    shipyardChannel: Syndicate
    secretShipyardChannel: Nfsd
    taxAccounts:
      BlackMarket: 0.1 # 0.3->0.1, made BM Mono
    ignoreBaseSaleRate: true # Fixed 70% sale rate.
    canTransferDeed: false

- type: entity
  id: ComputerShipyardBlackMarket
  parent: [BaseStructureDisableToolUse, BaseStructureDestructible, ComputerShipyardBase]
  name: black market shipyard console
  description: Used to buy ships not available through other means.
  components:
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.BlackMarket
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.BlackMarket:
        type: ShipyardConsoleBoundUserInterface
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_blackmarket
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_blackmarket
    - map: ["computerLayerKeys"]
      state: blackmarket_key
  - type: ShipyardConsole
    shipyardChannel: Freelance
    secretShipyardChannel: Nfsd
    taxAccounts:
      BlackMarket: 0.30 # Made BM - Mono
    ignoreBaseSaleRate: true # Fixed 70% sale rate.
    canTransferDeed: false

- type: entity
  id: ComputerShipyardExpedition
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerShipyard]
  name: expedition shipyard console
  description: Used to buy ships outfitted for planetary expeditions
  components:
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.Expedition
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Expedition:
       type: ShipyardConsoleBoundUserInterface
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_blackmarket
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_blackmarket
    - map: ["computerLayerKeys"]
      state: blackmarket_key

- type: entity
  id: ComputerShipyardScrap
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerShipyard]
  name: scrapyard console
  description: Used to purchase and sell "shuttles"
  components:
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.Scrap
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Scrap:
        type: ShipyardConsoleBoundUserInterface
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_blackmarket
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_blackmarket
    - map: ["computerLayerKeys"]
      state: blackmarket_key

- type: entity
  id: ComputerShipyardMedical
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerShipyard]
  name: medical shipyard console
  description: Used to purchase and sell medical shuttles
  components:
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.Medical
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Medical:
        type: ShipyardConsoleBoundUserInterface
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_medical
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_medical
    - map: ["computerLayerKeys"]
      state: telesci_key

- type: entity
  id: ComputerShipyardSr
  parent: [BaseStructureDisableToolUse, BaseStructureIndestructible, ComputerShipyardBase]
  name: colonial staff shipyard console
  description: Used to buy vessels exclusive to Colonial Outpost personnel.
  components:
  - type: ActivatableUI
    key: enum.ShipyardConsoleUiKey.Sr
  - type: UserInterface
    interfaces:
      enum.ShipyardConsoleUiKey.Sr:
        type: ShipyardConsoleBoundUserInterface
  - type: Sprite
    sprite: _NF/Structures/Machines/computers.rsi
    layers:
    - map: ["computerLayerBody"]
      state: computer_sr
    - map: ["computerLayerKeyboard"]
      state: generic_keyboard
    - map: ["computerLayerScreen"]
      state: shipyard_sr
    - map: ["computerLayerKeys"]
      state: telesci_key
