- type: entity
  abstract: true
  parent: [ BaseMachinePowered, ConstructibleMachine ]
  id: SurveillanceCameraRouterBase
  name: camera router
  description: A surveillance camera router. It routes. Perhaps.
  components:
    - type: DeviceNetwork
      deviceNetId: Wired
      receiveFrequencyId: SurveillanceCamera
      transmitFrequencyId: SurveillanceCamera
    - type: WiredNetworkConnection
    - type: DeviceNetworkRequiresPower
    - type: UserInterface
      interfaces:
        enum.SurveillanceCameraSetupUiKey.Router:
          type: SurveillanceCameraSetupBoundUi
    - type: Machine
      board: SurveillanceCameraRouterCircuitboard
    - type: Sprite
      sprite: Structures/Machines/server.rsi
      snapCardinals: true
      layers:
        - state: server-off
        - state: server-on
          visible: false
          map: ["enum.PowerDeviceVisualLayers.Powered"]
        - state: server_o
          map: ["enum.WiresVisualLayers.MaintenancePanel"]
    - type: GenericVisualizer
      visuals:
        enum.PowerDeviceVisuals.Powered:
          enum.PowerDeviceVisualLayers.Powered:
            True: { visible: true }
            False: { visible: false }
    - type: Appearance
    - type: AmbientOnPowered
    - type: AmbientSound
      volume: -9
      range: 5
      enabled: false
      sound:
        path: /Audio/Ambience/Objects/server_fans.ogg
    - type: WiresVisuals
    - type: WiresPanel

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterConstructed
  suffix: Constructed
  components:
    - type: SurveillanceCameraRouter
      setupAvailableNetworks:
        - SurveillanceCameraEngineering
        - SurveillanceCameraSecurity
        - SurveillanceCameraService
        - SurveillanceCameraSupply
        - SurveillanceCameraScience
        - SurveillanceCameraGeneral
        - SurveillanceCameraMedical
        - SurveillanceCameraCommand

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterEngineering
  name: engineering camera router
  suffix: Engineering
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraEngineering

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterSecurity
  name: security camera router
  suffix: Security
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraSecurity

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterScience
  name: science camera router
  suffix: Science
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraScience

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterSupply
  name: supply camera router
  suffix: Supply
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraSupply

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterCommand
  name: command camera router
  suffix: Command
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraCommand

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterService
  name: service camera router
  suffix: Service
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraService

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterMedical
  name: medical camera router
  suffix: Medical
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraMedical

- type: entity
  parent: SurveillanceCameraRouterBase
  id: SurveillanceCameraRouterGeneral
  name: general camera router
  suffix: General
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraGeneral

- type: entity
  abstract: true
  parent: [ BaseMachinePowered, ConstructibleMachine ]
  id: SurveillanceCameraWirelessRouterBase
  name: wireless camera router
  description: A wireless surveillance camera router. It routes. Perhaps.
  components:
    - type: DeviceNetwork
      deviceNetId: Wireless
      receiveFrequencyId: SurveillanceCamera
      transmitFrequencyId: SurveillanceCamera
    - type: WirelessNetworkConnection
      range: 200
    - type: DeviceNetworkRequiresPower
    - type: UserInterface
      interfaces:
        enum.SurveillanceCameraSetupUiKey.Router:
          type: SurveillanceCameraSetupBoundUi
    - type: Machine
      board: SurveillanceCameraWirelessRouterCircuitboard
    - type: Sprite
      sprite: Structures/Machines/server.rsi
      layers:
        - state: server-off
        - state: server-on
          visible: false
          map: ["enum.PowerDeviceVisualLayers.Powered"]
        - state: server_o
          map: ["enum.WiresVisualLayers.MaintenancePanel"]
    - type: GenericVisualizer
      visuals:
        enum.PowerDeviceVisuals.Powered:
          enum.PowerDeviceVisualLayers.Powered:
            True: { visible: true }
            False: { visible: false }
    - type: Appearance
    - type: AmbientOnPowered
    - type: AmbientSound
      volume: -9
      range: 5
      enabled: false
      sound:
        path: /Audio/Ambience/Objects/server_fans.ogg
    - type: WiresVisuals
    - type: WiresPanel

- type: entity
  parent: SurveillanceCameraWirelessRouterBase
  id: SurveillanceCameraWirelessRouterConstructed
  suffix: Constructed
  components:
    - type: SurveillanceCameraRouter
      setupAvailableNetworks:
        - SurveillanceCameraEntertainment

- type: entity
  parent: SurveillanceCameraWirelessRouterBase
  id: SurveillanceCameraWirelessRouterEntertainment
  name: entertainment camera router
  suffix: Entertainment
  components:
    - type: SurveillanceCameraRouter
      subnetFrequency: SurveillanceCameraEntertainment

- type: entity
  parent: SurveillanceCameraWirelessRouterBase
  id: SurveillanceCameraWirelessRouterXenoborg
  name: xenoborg camera wireless router
  components:
  - type: DeviceNetwork
    deviceNetId: Wireless
    receiveFrequencyId: Mothership
    transmitFrequencyId: Mothership
  - type: WirelessNetworkConnection
    range: 2000 # longer range to get xenoborgs even when the mothership is far away
  - type: SurveillanceCameraRouter
    subnetFrequency: Xenoborg
  - type: Machine
    board: SurveillanceCameraWirelessRouterXenoborgCircuitboard
