- type: entity
  id: ResearchAndDevelopmentServer
  parent: [ BaseMachinePowered, ConstructibleMachine ]
  name: R&D server
  description: Contains the collective knowledge of the station's scientists. Destroying it would send them back to the stone age. You don't want that do you?
  components:
  - type: Sprite
    sprite: Structures/Machines/server.rsi
    snapCardinals: true
    layers:
      - state: server-off
      - state: server-on
        visible: false
        map: ["enum.PowerDeviceVisualLayers.Powered"]
      - state: variant-research
      - state: server_o
        map: ["enum.WiresVisualLayers.MaintenancePanel"]
  - type: PointLight
    enabled: false
    castShadows: false
    radius: 1.2
    energy: 3.0
    color: "#b211b2"
  - type: LitOnPowered
  - type: ResearchServer
  - type: TechnologyDatabase
    supportedDisciplines:
    - Industrial
    - Arsenal
    - Experimental
    - CivilianServices
  - type: ApcPowerReceiver
    powerLoad: 200
  - type: ExtensionCableReceiver
  - type: WiresPanel
  - type: WiresVisuals
  - type: Machine
    board: ResearchAndDevelopmentServerMachineCircuitboard
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 600
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 300
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 2
  - type: Appearance
  - type: GenericVisualizer
    visuals:
        enum.PowerDeviceVisuals.Powered:
          enum.PowerDeviceVisualLayers.Powered:
            True: {visible: true}
            False: {visible: false}
  - type: AmbientOnPowered
  - type: AmbientSound
    volume: -9
    range: 5
    enabled: false
    sound:
      path: /Audio/Ambience/Objects/server_fans.ogg
  - type: GuideHelp
    guides:
    - Science

- type: entity
  id: BaseResearchAndDevelopmentPointSource
  parent: BaseMachinePowered
  name: "base R&D point source"
  # We should make this abstract once there are actual point sources.
  components:
  - type: Sprite
    sprite: Structures/Machines/rndpointsource.rsi
    layers:
    - state: rndpointsource-off
    - state: rndpointsource
      shader: unshaded
      map: ["enum.PowerDeviceVisualLayers.Powered"]
  - type: ResearchClient
  - type: ResearchPointSource
    pointspersecond: 25
    active: true
  - type: PointLight
    radius: 1.5
    energy: 3.0
    color: "#3db83b"
  - type: ActivatableUI
    key: enum.ResearchClientUiKey.Key
  - type: ActivatableUIRequiresPower
  - type: UserInterface
    interfaces:
      enum.ResearchClientUiKey.Key:
        type: ResearchClientBoundUserInterface
  - type: Appearance
  - type: GenericVisualizer
    visuals:
      enum.PowerDeviceVisuals.Powered:
        enum.PowerDeviceVisualLayers.Powered:
          True: {visible: true}
          False: {visible: false}
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 400
      behaviors:
        - !type:DoActsBehavior
          acts: [ "Destruction" ]
    - trigger:
        !type:DamageTrigger
        damage: 200
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:SpawnEntitiesBehavior
        spawn:
          SheetSteel1:
            min: 1
            max: 1
  - type: GuideHelp
    guides:
    - Science
