- type: entity
  parent: [BaseMob, StripableInventoryBase]
  id: BaseBorgChassis
  name: cyborg
  description: A man-machine hybrid that assists in station activity. They love being asked to state their laws over and over.
  save: false
  abstract: true
  components:
  - type: SurgeryTarget # Mono
  - type: Sanitized # Mono
  - type: Reactive
    groups:
      Acidic: [Touch]
  - type: DamageOnHighSpeedImpact
    damage:
      types:
        Blunt: 5
    soundHit:
      collection: MetalThud
  - type: CombatMode
  - type: NoSlip
  - type: StaticPrice
    price: 1250
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.35
        density: 300
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: MovementSpeedModifier
    baseWalkSpeed : 2.5
    baseSprintSpeed : 4.5
  - type: Sprite
    sprite: Mobs/Silicon/chassis.rsi
  - type: RotationVisuals
    horizontalRotation: 90
  - type: MobState
    allowedStates:
    - Alive
    - Critical
    - Dead
  - type: MobThresholds
    thresholds:
      0: Alive
      150: Critical # Monolith
      250: Dead # Monolith
    stateAlertDict:
      Alive: BorgHealth
      Critical: BorgCrit
      Dead: BorgDead
    showOverlays: false
    allowRevives: true
  - type: HealthExaminable
    examinableTypes:
      - Blunt
      - Slash
      - Piercing
      - Heat
      - Shock
    locPrefix: silicon
  - type: UserInterface
    interfaces:
      enum.SiliconLawsUiKey.Key:
        type: SiliconLawBoundUserInterface
        requireInputValidation: false
      enum.BorgUiKey.Key:
        type: BorgBoundUserInterface
      enum.StrippingUiKey.Key:
        type: StrippableBoundUserInterface
      # Only used for NT borgs that can switch type, defined here to avoid copy-pasting the rest of this component.
      enum.BorgSwitchableTypeUiKey.SelectBorgType:
        type: BorgSelectTypeUserInterface
      enum.RadarConsoleUiKey.Key: # Mono
        type: RadarConsoleBoundUserInterface
  - type: ActivatableUI
    key: enum.BorgUiKey.Key
  - type: SiliconLawBound
  - type: ActionGrant
    actions:
    - ActionViewLaws
  - type: EmagSiliconLaw
    stunTime: 5
  - type: SiliconLawProvider
    laws: Crewsimov
  - type: IonStormTarget
  - type: Inventory
    templateId: borg
  - type: Hands
    showInHands: false
    disableExplosionRecursion: true
    canBeStripped: false
  - type: ComplexInteraction
  - type: IntrinsicRadioReceiver
  - type: IntrinsicRadioTransmitter
    channels:
    - Traffic
    - Common
    - Science
  - type: ActiveRadio
    channels:
    - Traffic
    - Common
    - Science
  - type: CollectiveMind
    channels:
    - Binary
    defaultChannel: Binary
  - type: ZombieImmune
  - type: Repairable
    doAfterDelay: 10
    allowSelfRepair: true
  - type: BorgChassis
  - type: LockingWhitelist
    blacklist:
      components:
      - RoboticsConsole
  - type: WiresPanel
  - type: ActivatableUIRequiresPanel
  - type: NameIdentifier
    group: Silicon
  - type: ContainerContainer
    containers:
      borg_brain: !type:ContainerSlot { }
      cell_slot: !type:ContainerSlot { }
      borg_module: !type:Container { }
      part-container: !type:Container
  - type: PowerCellSlot
    cellSlotId: cell_slot
    fitsInCharger: true
  - type: ItemToggle
    onActivate: false # You should not be able to turn off a borg temporarily.
    activated: false # gets activated when a mind is added
    onUse: false # no item-borg toggling sorry
  #- type: ItemTogglePointLight # Mono - Light removal PR: Borg Adjustments
  - type: NightVision # Mono
    color: "#808080"
  - type: AccessToggle
  # TODO: refactor movement to just be based on toggle like speedboots but for the boots themselves
  # TODO: or just have sentient speedboots be fast idk
  - type: PowerCellDraw
    drawRate: 0.6
  # no ToggleCellDraw since dont want to lose access when power is gone
  - type: ItemSlots
    slots:
      cell_slot:
        name: power-cell-slot-component-slot-name-default
  - type: Body
  - type: StatusEffects
    allowed:
    - Stun
    - KnockedDown
    - SlowedDown
    - Flashed
  - type: TypingIndicator
    proto: robot
  - type: Speech
    speechVerb: Robotic
    speechSounds: Borg
    allowedEmotes: # Goobstation - Cyborg emote sounds
    - Laugh
    - Sigh
    - Crying
    - Whistle
  - type: Vocal
    sounds:
      Unsexed: UnisexSilicon
  - type: UnblockableSpeech
  - type: FootstepModifier
    footstepSoundCollection:
      collection: FootstepBorg
  - type: Construction
    graph: Cyborg
    node: cyborg
    containers:
    - part-container
    - cell_slot
  - type: Lock
    locked: true
    unlockOnClick: false
  - type: ActivatableUIRequiresLock
  - type: LockedWiresPanel
  - type: Damageable
    damageContainer: Silicon
    damageModifierSet: BaseBorgChassis
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 75
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          path: /Audio/Machines/warning_buzzer.ogg
          params:
            volume: 5
    - trigger:
        !type:DamageTrigger
         damage: 350 # Monolith
      behaviors:
      - !type:PlaySoundBehavior
        sound:
          collection: MetalBreak
      - !type:EmptyContainersBehaviour
        containers:
        - borg_brain
        - borg_module
        - cell_slot
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  #- type: HandheldLight # Mono - Light removal PR: Borg Adjustments
  #  toggleOnInteract: false
  #  wattage: 0.2
  #  blinkingBehaviourId: blinking
  #  radiatingBehaviourId: radiating
  #- type: LightBehaviour
  #  behaviours:
  #  - !type:FadeBehaviour
  #    id: radiating
  #    maxDuration: 2.0
  #    startValue: 3.0
  #    endValue: 2.0
  #    isLooped: true
  #    reverseWhenFinished: true
  #  - !type:PulseBehaviour
  #    id: blinking
  #    interpolate: Nearest
  #    maxDuration: 1.0
  #    minValue: 0.1
  #    maxValue: 2.0
  #    isLooped: true
  #- type: ToggleableLightVisuals
  #- type: PointLight
  #  enabled: false
  #  mask: /Textures/Effects/LightMasks/cone.png
  #  autoRot: true
  #  radius: 4
  #  netsync: false
  - type: Pullable
  - type: Puller
    needsHands: false
  - type: StandingState
  - type: Tag
    tags:
    - DoorBumpOpener
    - FootstepSound
    - CanPilot
  - type: Emoting
  - type: GuideHelp
    guides:
    - Cyborgs
    - Robotics
  - type: LanguageKnowledge # Einstein Engines - Languages
    speaks:
    - TauCetiBasic
    - RobotTalk
    understands:
    - TauCetiBasic
    - RobotTalk
  - type: ProtectedFromStepTriggers
  - type: DamageOnInteractProtection
    damageProtection:
      flatReductions:
        Heat: 10 # capable of touching light bulbs and stoves without feeling pain!
  - type: PreventDropOnDowned # Frontier: borgs don't drop items when falling (e.g. critical/dead)
  # <Mono>
  - type: ToggleableSignature
    blip:
      radarColor: CornflowerBlue
      scale: 0.5
  - type: Magboots
  - type: AccessGrantable
  - type: MovementAlwaysTouching
  - type: IntrinsicUI
    uis:
      enum.RadarConsoleUiKey.Key:
        toggleAction: ActionObserverShowRadar
  - type: RadarConsole
    followEntity: true
  - type: DetectionRangeMultiplier # same as mass scanner
    infraredMultiplier: 0.5
    visualMultiplier: 0.75
  # </Mono>

- type: entity
  abstract: true
  id: BaseBorgTransponder
  components:
  - type: BorgTransponder
  - type: DeviceNetwork
    deviceNetId: Wireless
    receiveFrequencyId: CyborgControl
    transmitFrequencyId: RoboticsConsole
    savableAddress: false
  - type: OnUseTimerTrigger
    delay: 10
    examinable: false
    beepSound:
      path: /Audio/Effects/Cargo/buzz_two.ogg
      params:
        volume: -4
  # prevent any funnies if someone makes a cyborg item...
  - type: AutomatedTimer
  - type: ExplodeOnTrigger
  # explosion does most of its damage in the center and less at the edges
  - type: Explosive
    explosionType: Minibomb
    deleteAfterExplosion: false # let damage threshold gib the borg
    totalIntensity: 30
    intensitySlope: 20
    maxIntensity: 20
    canCreateVacuum: false # its for killing the borg not the station

- type: entity
  id: BaseBorgChassisNT
  parent: [BaseBorgChassis, BaseBorgTransponder]
  abstract: true
  components:
  - type: RandomMetadata
    nameSegments:
      # - names_borg # Frontier
      - NFNamesBorgUnlocalized # Frontier
  - type: NpcFactionMember
    factions:
    - NanoTrasen
  - type: Access
    enabled: false
    groups:
    - AllAccess
#  - type: AccessReader
#    access: [["Command"], ["Research"]]
  - type: ShowJobIcons
  - type: InteractionPopup
    interactSuccessSound:
      path: /Audio/Ambience/Objects/periodic_beep.ogg

- type: entity
  id: BaseBorgChassisSyndicate
  parent: BaseBorgChassis
  abstract: true
  components:
  - type: NpcFactionMember
    factions:
    - Syndicate
  - type: Access
    tags:
    - NuclearOperative
    - SyndicateAgent
  - type: AccessReader
    access: [["SyndicateAgent"], ["NuclearOperative"]]
  - type: SiliconLawProvider
    laws: SyndicateStatic
    subverted: true
  - type: IntrinsicRadioTransmitter
    channels:
    - Traffic
    - Common
    - Syndicate
  - type: ActiveRadio
    channels:
    - Common
    - Traffic
    - Syndicate
  - type: CollectiveMind
    channels:
    - Binary
    defaultChannel: Binary
  - type: ShowSyndicateIcons
  - type: MovementAlwaysTouching
  - type: Speech
    speechSounds: SyndieBorg
    allowedEmotes:
    - Laugh
    # Goobstation - Cyborg emote sounds
    - Sigh
    - Crying
    - Whistle
    # end Goobstation - Cyborg emote sounds
  - type: Vocal
    sounds:
      Unsexed: UnisexSiliconSyndicate
  #- type: PointLight Mono - Light removal PR: Borg Adjustments
  #  color: "#dd200b"

- type: entity
  id: BaseBorgChassisDerelict
  parent: BaseBorgChassis
  abstract: true
  components:
  - type: NpcFactionMember
    factions:
    - NanoTrasen #The seemingly best fit. It was a regular NT cyborg once, after all.
  - type: Access
    enabled: false
    groups:
    - AllAccess #Randomized access would be fun. AllAccess is the best i can think of right now that does make it too hard for it to enter the station or navigate it..
  # - type: AccessReader # Frontier
  #   access: [["Command"], ["Research"]] # Frontier
  - type: StartIonStormed
    ionStormAmount: 3
  - type: IonStormTarget
    chance: 1
  - type: ShowJobIcons
