- type: entity
  id: BorgChassisSelectable
  parent: BaseBorgChassisNT
  components:
  - type: Sprite
    layers:
    - state: robot
      map: ["enum.BorgVisualLayers.Body", "movement"]
    - state: robot_e_r
      map: ["enum.BorgVisualLayers.Light"]
      shader: unshaded
      visible: false
    - state: robot_l
      shader: unshaded
      map: ["light","enum.BorgVisualLayers.LightStatus"]
      visible: false
  - type: BorgChassis
    # Default borg can take no modules until selected type.
    maxModules: 0
    hasMindState: robot_e
    noMindState: robot_e_r
  - type: BorgTransponder
    sprite:
      sprite: Mobs/Silicon/chassis.rsi
      state: robot
    name: cyborg
  - type: InteractionPopup
    interactSuccessString: petting-success-generic-cyborg
    interactFailureString: petting-failure-generic-cyborg
  - type: BorgSwitchableType
    inherentRadioChannels:
    - Common
    - Binary
    notifyChannels:
    - Binary
    - ScientificService # Fire edit

- type: entity
  id: BorgChassisGeneric
  parent: BorgChassisSelectable
  name: generic cyborg
  suffix: type picked
  components:
  - type: BorgSwitchableType
    selectedBorgType: generic

- type: entity
  id: BorgChassisMining
  parent: BorgChassisSelectable
  name: salvage cyborg
  components:
  - type: BorgSwitchableType
    selectedBorgType: mining

- type: entity
  id: BorgChassisEngineer
  parent: BorgChassisSelectable
  name: engineer cyborg
  components:
  - type: BorgSwitchableType
    selectedBorgType: engineering

- type: entity
  id: BorgChassisJanitor
  parent: BorgChassisSelectable
  name: janitor cyborg
  components:
  - type: BorgSwitchableType
    selectedBorgType: janitor

- type: entity
  id: BorgChassisMedical
  parent: BorgChassisSelectable
  name: medical cyborg
  components:
  - type: BorgSwitchableType
    selectedBorgType: medical

- type: entity
  id: BorgChassisService
  parent: BorgChassisSelectable
  name: service cyborg
  components:
  - type: BorgSwitchableType
    selectedBorgType: service

- type: entity
  id: BorgChassisSyndicateAssault
  parent: BaseBorgChassisSyndicate
  name: syndicate assault cyborg
  description: A lean, mean killing machine with access to a variety of deadly modules.
  components:
    - type: Sprite
      layers:
        - state: synd_sec
        - state: synd_sec_e
          map: ["enum.BorgVisualLayers.Light"]
          shader: unshaded
          visible: false
        - state: synd_sec_l
          shader: unshaded
          map: ["light"]
          visible: false
    - type: BorgChassis
      maxModules: 3
      moduleWhitelist:
        tags:
          - BorgModuleGeneric
          - BorgModuleSecurity
          - BorgModuleSyndicate
          - BorgModuleSyndicateAssault
      hasMindState: synd_sec_e
      noMindState: synd_sec
    - type: InteractionPopup
      interactSuccessString: petting-success-syndicate-cyborg
      interactFailureString: petting-failure-syndicate-cyborg
      interactSuccessSound:
        path: /Audio/Ambience/Objects/periodic_beep.ogg
    # Sunrise-Start
    - type: PointLight
      color: "#dd200b"
    - type: TriggerOnMobstateChange
      preventSuicide: true
      mobState:
      - Critical
    - type: TimerTrigger
      delay: 3
      initialBeepDelay: 0
      beepInterval: 3
      beepSound: /Audio/Effects/PowerSink/charge_fire.ogg
    - type: ExplodeOnTrigger
    - type: GibOnTrigger
      deleteItems: true
    - type: Explosive
      explosionType: Default
      totalIntensity: 3500
      intensitySlope: 15
      maxIntensity: 70
      canCreateVacuum: true
    - type: TTS
      voice: Sentrybot
    - type: MovementSpeedModifier
      baseWalkSpeed : 2.5
      baseSprintSpeed : 4.5
    - type: InnateItem
      entityTargetActions:
      - AccessBreaker
    # Sunrise-End

- type: entity
  id: BorgChassisSyndicateMedical
  parent: [BaseBorgChassisSyndicate, ShowMedicalIcons]
  name: syndicate medical cyborg
  description: A combat medical cyborg. Has limited offensive potential, but makes more than up for it with its support capabilities.
  components:
    - type: Sprite
      layers:
        - state: synd_medical
        - state: synd_medical_e
          map: ["enum.BorgVisualLayers.Light"]
          shader: unshaded
          visible: false
        - state: synd_medical_l
          shader: unshaded
          map: ["light"]
          visible: false
    - type: BorgChassis
      maxModules: 3
      moduleWhitelist:
        tags:
          - BorgModuleGeneric
          - BorgModuleSecurity
          - BorgModuleMedical
          - BorgModuleSyndicate
      hasMindState: synd_medical_e
      noMindState: synd_medical
    - type: ShowHealthBars
    - type: InteractionPopup
      interactSuccessString: petting-success-syndicate-cyborg
      interactFailureString: petting-failure-syndicate-cyborg
      interactSuccessSound:
        path: /Audio/Ambience/Objects/periodic_beep.ogg
    - type: SolutionScanner
    - type: FootstepModifier
      footstepSoundCollection:
        collection: FootstepHoverBorg
        params:
          volume: -6
    # Sunrise-Start
    - type: TTS
      voice: Sentrybot
    - type: MovementSpeedModifier
      baseWalkSpeed: 3
      baseSprintSpeed: 5
    - type: InnateItem
      entityTargetActions:
      - AccessBreaker
      - HandheldHealthAnalyzerUnpowered
    # Sunrise-End

- type: entity
  id: BorgChassisSyndicateSaboteur
  parent: BaseBorgChassisSyndicate
  name: syndicate saboteur cyborg
  description: A streamlined engineering cyborg, equipped with covert modules. Its chameleon projector lets it disguise itself as a Nanotrasen cyborg.
  components:
    - type: Sprite
      layers:
        - state: synd_engi
        - state: synd_engi_e
          map: ["enum.BorgVisualLayers.Light"]
          shader: unshaded
          visible: false
        - state: synd_engi_l
          shader: unshaded
          map: ["light"]
          visible: false
    - type: BorgChassis
      maxModules: 3
      moduleWhitelist:
        tags:
          - BorgModuleGeneric
          - BorgModuleSecurity
          - BorgModuleEngineering
          - BorgModuleSyndicate
      hasMindState: synd_engi_e
      noMindState: synd_engi
    - type: ShowHealthBars
      damageContainers:
      - Inorganic
      - Silicon
      - Mech # Sunrise-edit
    - type: InteractionPopup
      interactSuccessString: petting-success-syndicate-cyborg
      interactFailureString: petting-failure-syndicate-cyborg
      interactSuccessSound:
        path: /Audio/Ambience/Objects/periodic_beep.ogg

- type: entity
  id: BorgChassisDerelict
  parent: BaseBorgChassisDerelict
  name: derelict cyborg
  description: A man-machine hybrid that assists in station activity. This one is in a state of great disrepair.
  components:
  - type: Sprite
    layers:
    - state: derelict
    - state: derelict_e_r
      map: ["enum.BorgVisualLayers.Light"]
      shader: unshaded
      visible: false
    - state: derelict_l
      shader: unshaded
      map: ["light"]
      visible: false
  - type: BorgChassis
    maxModules: 5 # One less module slot than the regular module to reflect this being a "broken" cyborg.
    moduleWhitelist:
      tags:
      - BorgModuleGeneric
    hasMindState: derelict_e
    noMindState: derelict_e_r
  - type: Construction
    node: derelictcyborg
  - type: InteractionPopup
    interactSuccessString: petting-success-derelict-cyborg
    interactFailureString: petting-failure-derelict-cyborg
    interactSuccessSound:
      path: /Audio/Ambience/Objects/periodic_beep.ogg

- type: entity
  parent: BaseBorgChassisDerelict
  id: EngineeringBorgChassisDerelict
  name: derelict engineer cyborg
  description: A man-machine hybrid that assists the engineering department. This one seems to have chunks of strange crystals pockmarking its surface.
  components:
  - type: Sprite
    layers:
    - state: engineer_derelict
    - state: engineer_e_r
      map: ["enum.BorgVisualLayers.Light"]
      shader: unshaded
      visible: false
    - state: engineer_derelict_crystal #This layer and the layer below are duplicated in order to create a more mellow unshaded layer. See https://github.com/space-wizards/space-station-14/pull/37869 for more info on the method.
      shader: unshaded
    - state: engineer_derelict_crystal
      shader: shaded
    - state: engineer_l
      shader: unshaded
      map: ["light"]
      visible: false
  - type: BorgChassis
    maxModules: 5 # One less module slot than the regular module to reflect this being a "broken" cyborg.
    moduleWhitelist:
      tags:
      - BorgModuleGeneric
      - BorgModuleEngineering
    hasMindState: engineer_e
    noMindState: engineer_e_r

- type: entity
  parent: BaseBorgChassisDerelict
  id: JanitorBorgChassisDerelict
  name: derelict janitor cyborg
  description: A man-machine hybrid that assists the service department. It's a bigger mess than anything it can clean up.
  components:
  - type: Sprite
    layers:
    - state: janitor_derelict
      map: ["movement"]
    - state: janitor_e_r
      map: ["enum.BorgVisualLayers.Light"]
      shader: unshaded
      visible: false
    - state: janitor_l
      shader: unshaded
      map: ["light"]
      visible: false
  - type: SpriteMovement
    movementLayers:
      movement:
        state: janitor_moving_derelict
    noMovementLayers:
      movement:
        state: janitor_derelict
  - type: BorgChassis
    maxModules: 5 # One less module slot than the regular module to reflect this being a "broken" cyborg.
    moduleWhitelist:
      tags:
      - BorgModuleGeneric
      - BorgModuleJanitor
    hasMindState: janitor_e
    noMindState: janitor_e_r

- type: entity
  parent: BaseBorgChassisDerelict
  id: MedicalBorgChassisDerelict
  name: derelict medical cyborg
  description: A man-machine hybrid that assists the medical department. This one's needles don't look very sanitary.
  components:
  - type: Sprite
    layers:
    - state: medical_derelict
      map: ["movement"]
    - state: medical_e_r
      map: ["enum.BorgVisualLayers.Light"]
      shader: unshaded
      visible: false
    - state: medical_l
      shader: unshaded
      map: ["light"]
      visible: false
  - type: SpriteMovement
    movementLayers:
      movement:
        state: medical_moving_derelict
    noMovementLayers:
      movement:
        state: medical_derelict
  - type: BorgChassis
    maxModules: 6 # One less module slot than the regular module to reflect this being a "broken" cyborg.
    moduleWhitelist:
      tags:
      - BorgModuleGeneric
      - BorgModuleMedical
    hasMindState: medical_e
    noMindState: medical_e_r

- type: entity
  parent: BaseBorgChassisDerelict
  id: MiningBorgChassisDerelict
  name: derelict salvage cyborg
  description: A man-machine hybrid that assists the cargo department. This one has seen the wrong side of a gibtonite chunk.
  components:
  - type: Sprite
    layers:
    - state: miner_derelict
      map: ["movement"]
    - state: miner_e_r
      map: ["enum.BorgVisualLayers.Light"]
      shader: unshaded
      visible: false
    - state: miner_l
      shader: unshaded
      map: ["light"]
      visible: false
  - type: SpriteMovement
    movementLayers:
      movement:
        state: miner_moving_derelict
    noMovementLayers:
      movement:
        state: miner_derelict
  - type: BorgChassis
    maxModules: 6 # One less module slot than the regular module to reflect this being a "broken" cyborg.
    moduleWhitelist:
      tags:
      - BorgModuleGeneric
      - BorgModuleCargo
    hasMindState: miner_e
    noMindState: miner_e_r

- type: entity
  parent: BaseBorgChassisSyndicateDerelict
  id: SyndicateAssaultBorgChassisDerelict
  name: derelict syndicate assault cyborg
  description: A lean, mean killing machine with access to a variety of deadly modules. This one is more rust-orange than blood-red.
  components:
  - type: Sprite
    layers:
    - state: synd_sec_derelict
    - state: synd_sec_e
      map: ["enum.BorgVisualLayers.Light"]
      shader: unshaded
      visible: false
    - state: synd_sec_l
      shader: unshaded
      map: ["light"]
      visible: false
  - type: BorgChassis
    maxModules: 3
    moduleWhitelist: # Note - the Derelict Assault Borg does not have a traversal module. This is intentional as Assault Borgs have space traversal with their c20 and free space movement, and they can navigate to the station using the pinpointer.
      tags:
      - BorgModuleGeneric
      - BorgModuleSyndicate
      - BorgModuleSyndicateAssault
    hasMindState: synd_sec_derelict_e
    noMindState: synd_sec_derelict
  - type: Construction
    node: derelictcyborg
