- type: entity
  id: BaseBorgModule
  parent: BaseItem
  name: borg module
  description: A piece of tech that gives cyborgs new abilities.
  abstract: true
  components:
  - type: Item
    storedRotation: -90
  - type: Sprite
    sprite: Objects/Specific/Robotics/borgmodule.rsi
  - type: BorgModule
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: no-action }
  - type: StaticPrice
    price: 100
  - type: Tag
    tags:
    - BorgModuleGeneric
  - type: GuideHelp
    guides:
    - Cyborgs
    - Robotics

- type: entity
  id: BaseProviderBorgModule
  abstract: true
  components:
  - type: SelectableBorgModule
  - type: ContainerContainer
    containers:
      provided_container: !type:Container { }

- type: entity
  id: ActionBorgSwapModule
  name: Swap Module
  description: Select this module, enabling you to use the tools it provides.
  components:
  - type: InstantAction
    itemIconStyle: BigAction
    useDelay: 0.5
    event: !type:BorgModuleActionSelectedEvent

- type: entity
  id: BaseBorgModuleCargo
  parent: BaseBorgModule
  abstract: true
  components:
  - type: Tag
    tags:
    - BorgModuleCargo

- type: entity
  id: BaseBorgModuleEngineering
  parent: BaseBorgModule
  abstract: true
  components:
  - type: Tag
    tags:
    - BorgModuleEngineering

- type: entity
  id: BaseBorgModuleJanitor
  parent: BaseBorgModule
  abstract: true
  components:
  - type: Tag
    tags:
    - BorgModuleJanitor

- type: entity
  id: BaseBorgModuleMedical
  parent: BaseBorgModule
  abstract: true
  components:
  - type: Tag
    tags:
    - BorgModuleMedical

- type: entity
  id: BaseBorgModuleService
  parent: BaseBorgModule
  abstract: true
  components:
  - type: Tag
    tags:
    - BorgModuleService

- type: entity
  id: BaseBorgModuleSyndicate
  parent: BaseBorgModule
  abstract: true
  components:
    - type: Tag
      tags:
        - BorgModuleSyndicate

- type: entity
  id: BaseBorgModuleSyndicateAssault
  parent: BaseBorgModule
  abstract: true
  components:
    - type: Tag
      tags:
        - BorgModuleSyndicateAssault

# generic modules
- type: entity
  id: BorgModuleCable
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: cable cyborg module
  components:
  - type: Sprite
    layers:
    - state: generic
    - state: icon-cables
  - type: ItemBorgModule
    moduleId: Cables # Frontier
    items:
    - CableApcStackLingering10
    - CableMVStackLingering10
    - CableHVStackLingering10
    - Wirecutter
    - trayScanner
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: wire-module }

- type: entity
  id: BorgModuleFireExtinguisher
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: fire extinguisher cyborg module
  components:
  - type: Sprite
    layers:
    - state: generic
    - state: icon-fire-extinguisher
  # Frontier: droppable borg items
  #- type: ItemBorgModule
  #  items:
  #  - FireExtinguisher
  - type: DroppableBorgModule
    moduleId: FireExtinguisher
    items:
    - id: FireExtinguisher
      whitelist:
        tags:
        - FireExtinguisher
  # End Frontier
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: extinguisher-module }

- type: entity
  id: BorgModuleGPS
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: GPS cyborg module
  components:
  - type: Sprite
    layers:
    - state: generic
    - state: icon-gps
  - type: ItemBorgModule
    moduleId: GPS # Frontier
    items:
    - HandheldGPSBasic
    - HandHeldMassScannerBorg
    - HandheldStationMapUnpowered
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: gps-module }

- type: entity
  id: BorgModuleRadiationDetection
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: radiation detection cyborg module
  components:
  - type: Sprite
    layers:
    - state: generic
    - state: icon-radiation
  - type: ItemBorgModule
    moduleId: RadiationDetection # Frontier
    items:
    - GeigerCounter
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: geiger-module }

- type: entity
  id: BorgModuleTool
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: tool cyborg module
  components:
  - type: Sprite
    layers:
    - state: generic
    - state: icon-tools
  - type: ItemBorgModule
    moduleId: Tools # Frontier
    items:
    - Crowbar
    - Wrench
    - Screwdriver
    - Wirecutter
    - Multitool
    - WelderIndustrial # Frontier
    - MaintenanceJack # Frontier
    - NaniteApplicator # Monolith
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: tool-module }

- type: entity
  id: BorgModuleSecurity
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: security cyborg module
  components:
  - type: Sprite
    layers:
    - state: syndicate
    - state: icon-syndicate
  - type: ItemBorgModule
    moduleId: Security
    items:
    - Machete
    - CyborgStunbaton
    - WeaponCyborgEnergyGun
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: syndicate-weapon-module }

- type: entity
  id: BorgModuleMercenary
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: mercenary cyborg module
  components:
  - type: Sprite
    layers:
    - state: syndicate
    - state: icon-syndicate
  - type: ItemBorgModule
    moduleId: Mercenary
    items:
    - Machete
    - WeaponPistolMercenaryEchis
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: syndicate-weapon-module }

# cargo modules
- type: entity
  id: BorgModuleAppraisal
  parent: [ BaseBorgModuleCargo, BaseProviderBorgModule ]
  name: cargo cyborg module # Mono
  components:
  - type: Sprite
    layers:
    - state: cargo
    - state: icon-appraisal
  - type: ItemBorgModule
    moduleId: Appraisal # Frontier
    items:
    - AppraisalTool
    - WeaponTetherGunBorg # Mono - we ball
    - WeaponForceGunBorg # Mono
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: appraisal-module }

- type: entity
  id: BorgModuleMining
  parent: [ BaseBorgModuleCargo, BaseProviderBorgModule ]
  name: mining cyborg module
  components:
  - type: Sprite
    layers:
    - state: cargo
    - state: icon-mining
  - type: ItemBorgModule
    moduleId: Mining # Frontier
    items:
    - MiningDrill
    - Shovel
    - MineralScannerUnpowered
    # - OreBag # Frontier
    - Crowbar
    - Wrench
    - RadioHandheldNF # Frontier: RadioHandheld<RadioHandheldNF
  # Frontier: droppable borg items
  - type: DroppableBorgModule
    moduleId: Mining
    items:
    - id: OreBag
      whitelist:
        components:
        - NFOreBag
  # End Frontier: droppable borg items
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: mining-module }

- type: entity
  id: BorgModuleGrapplingGun
  parent: [ BaseBorgModuleCargo, BaseProviderBorgModule ]
  name: grappling gun cyborg module
  components:
  - type: Sprite
    layers:
    - state: cargo
    - state: icon-grappling-gun
  - type: ItemBorgModule
    moduleId: GrapplingGun # Frontier
    items:
    - WeaponGrapplingGun
    - HandheldGPSBasic
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: grappling-module }

# engineering modules
- type: entity
  id: BorgModuleAdvancedTool
  parent: [ BaseBorgModuleEngineering, BaseProviderBorgModule ]
  name: advanced tool cyborg module
  components:
  - type: Sprite
    layers:
    - state: engineering
    - state: icon-tools-adv
  - type: ItemBorgModule
    moduleId: AdvancedTools # Frontier
    items:
    - JawsOfLife
    - PowerDrill
    - Multitool
    - WelderExperimental
    - RemoteSignaller
    - GasAnalyzer
    - GeigerCounter
    - MaintenanceJack # Frontier
    - RPED
    - NaniteApplicatorExperimental # Monolith
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: adv-tools-module }

- type: entity
  id: BorgModuleConstruction
  parent: [ BaseBorgModuleEngineering, BaseProviderBorgModule ]
  name: construction cyborg module
  components:
  - type: Sprite
    layers:
    - state: engineering
    - state: icon-construction
  - type: ItemBorgModule
    moduleId: Construction # Frontier
    items:
    - SheetSteelLingering0
    - SheetGlassLingering0
    - SheetPlasticLingering0
    - SheetPlasteelLingering0
    - PartRodMetalLingering0
    - FloorTileItemSteelLingering0
    - FloorTileItemDarkLingering0
    - FloorTileItemWhiteLingering0
  # Frontier: droppable borg items
  - type: DroppableBorgModule
    moduleId: Construction
    items:
    - id: ConstructionBag
      whitelist:
        components:
        - ConstructionBag
    - id: APCElectronics
      whitelist:
        components:
          - ComputerBoard
          - MachineBoard
          - BaseElectronics
    - id: CapacitorStockPart
      whitelist:
        components:
          - MachinePart
    - id: Beaker
      whitelist:
        tags:
        - GlassBeaker
  # End Frontier: droppable borg items
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: construction-module }

- type: entity
  id: BorgModuleRCD
  parent: [ BaseBorgModuleEngineering, BaseProviderBorgModule ]
  name: RCD cyborg module
  components:
  - type: Sprite
    layers:
    - state: engineering
    - state: icon-rcd
  - type: ItemBorgModule
    moduleId: RCD # Frontier
    items:
    - RCDRecharging
    - ShipRepairDeviceRecharging # Mono
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: rcd-module }

# janitorial modules (this gets its own unique things because janis are epic)
- type: entity
  id: BorgModuleLightReplacer
  parent: [ BaseBorgModuleJanitor, BaseProviderBorgModule ]
  name: light replacer cyborg module
  components:
  - type: Sprite
    layers:
    - state: janitor
    - state: icon-light-replacer
  - type: ItemBorgModule
    moduleId: LightReplacer # Frontier
    items:
    - LightReplacer
    - Crowbar
    - Screwdriver
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: light-replacer-module }

- type: entity
  id: BorgModuleCleaning
  parent: [ BaseBorgModuleJanitor, BaseProviderBorgModule ]
  name: cleaning cyborg module
  components:
  - type: Sprite
    layers:
    - state: janitor
    - state: icon-mop
  - type: ItemBorgModule
    moduleId: Cleaning # Frontier
    items:
    - MopItem
    # - Bucket # Frontier
    - TrashBag
  # Frontier: droppable items
  - type: DroppableBorgModule
    moduleId: Cleaning
    items:
    - id: Bucket
      whitelist:
        tags:
        - Bucket
  # End Frontier
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: cleaning-module }

- type: entity
  id: BorgModuleAdvancedCleaning
  parent: [ BaseBorgModuleJanitor, BaseProviderBorgModule ]
  name: advanced cleaning cyborg module
  components:
  - type: Sprite
    layers:
    - state: janitor
    - state: icon-mop-adv
  - type: ItemBorgModule
    moduleId: AdvancedCleaning # Frontier
    items:
    - AdvMopItem
    - HoloprojectorBorg
    - SprayBottleSpaceCleaner
    - Dropper
    - TrashBag
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: adv-cleaning-module }

# medical modules
- type: entity
  id: BorgModuleDiagnosis # todo: reuse when med refractor is finished
  parent: [ BaseBorgModuleMedical, BaseProviderBorgModule ]
  name: diagnosis cyborg module
  components:
  - type: Sprite
    layers:
    - state: medical
    - state: icon-diagnosis
  - type: ItemBorgModule
    moduleId: Diagnosis # Frontier
    items:
    - HandheldHealthAnalyzerUnpowered
    - ClothingNeckStethoscope
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: diagnosis-module }

- type: entity
  id: BorgModuleTreatment
  parent: [ BaseBorgModuleMedical, BaseProviderBorgModule ]
  name: treatment cyborg module
  components:
  - type: Sprite
    layers:
    - state: medical
    - state: icon-treatment
  - type: ItemBorgModule
    moduleId: Treatment # Frontier
    items:
    - HandheldHealthAnalyzerUnpowered
    - Brutepack10Lingering
    - Ointment10Lingering
    - Gauze10Lingering
    - Bloodpack10Lingering
    - Syringe
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: treatment-module }

- type: entity
  id: BorgModuleDefibrillator
  parent: [ BaseBorgModuleMedical, BaseProviderBorgModule ]
  name: defibrillator cyborg module
  components:
  - type: Sprite
    layers:
    - state: medical
    - state: icon-defib
  - type: ItemBorgModule
    moduleId: Defibrillator # Frontier
    items:
    - DefibrillatorOneHandedUnpowered
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: defib-module }

- type: entity
  id: BorgModuleAdvancedTreatment
  parent: [ BaseBorgModuleMedical, BaseProviderBorgModule ]
  name: advanced treatment cyborg module
  components:
  - type: Sprite
    layers:
    - state: medical
    - state: icon-chemist
  - type: ItemBorgModule
    moduleId: AdvancedTreatment # Frontier
    items:
    - HandheldHealthAnalyzerUnpowered
    # - Beaker # Frontier
    # - Beaker # Frontier
    - BorgDropper
    - BorgHypo
  # Frontier: droppable borg items
  - type: DroppableBorgModule
    moduleId: AdvancedTreatment
    items:
    - id: Beaker
      whitelist:
        tags:
        - GlassBeaker
    - id: Beaker
      whitelist:
        tags:
        - GlassBeaker
  # End Frontier: droppable borg items
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: adv-diagnosis-module }

# science modules
# todo: if science ever gets their own custom robot, add more "sci" modules.
- type: entity
  id: BorgModuleArtifact
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: artifact cyborg module
  components:
  - type: Sprite
    layers:
    - state: science
    - state: icon-artifacts
  - type: ItemBorgModule
    moduleId: Artifact # Frontier
    items:
    - NodeScanner
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: node-scanner-module }

- type: entity
  id: BorgModuleAnomaly
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: anomaly cyborg module
  components:
  - type: Sprite
    layers:
    - state: science
    - state: icon-anomalies
  - type: ItemBorgModule
    moduleId: Anomaly # Frontier
    items:
    - AnomalyScanner
    - AnomalyLocatorUnpowered
    - AnomalyLocatorWideUnpowered
    - RemoteSignaller
    - Multitool
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: anomaly-module }

# service modules
- type: entity
  id: BorgModuleService
  parent: [ BaseBorgModuleService, BaseProviderBorgModule ]
  name: service cyborg module
  components:
  - type: Sprite
    layers:
    - state: service
    - state: icon-pen
  - type: ItemBorgModule
    moduleId: Service # Frontier
    items:
    - Pen
    # - BooksBag # Frontier
    - HandLabeler
    # - Lighter # Frontier
    # - DrinkShaker # Frontier
    - BorgDropper
  # Frontier: droppable items
  - type: DroppableBorgModule
    moduleId: Service
    items:
    - id: BooksBag
      whitelist:
        components:
        - NFBookBag
    - id: Lighter
      whitelist:
        components:
        - NFLighter
    - id: DrinkShaker
      whitelist:
        components:
        - NFShaker
  # End Frontier
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: service-module }

- type: entity
  id: BorgModuleMusique
  parent: [ BaseBorgModuleService, BaseProviderBorgModule ]
  name: musique cyborg module
  components:
  - type: Sprite
    layers:
    - state: service
    - state: icon-musique
  - type: ItemBorgModule
    moduleId: Music # Frontier
    items:
    - SynthesizerInstrument
    - ElectricGuitarInstrument
    - SaxophoneInstrument
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: musical-module }

- type: entity
  id: BorgModuleGardening
  parent: [ BaseBorgModuleService, BaseProviderBorgModule ]
  name: gardening cyborg module
  components:
  - type: Sprite
    layers:
    - state: service
    - state: icon-gardening
  - type: ItemBorgModule
    moduleId: Gardening # Frontier
    items:
    - HydroponicsToolMiniHoe
    - HydroponicsToolSpade
    - HydroponicsToolClippers
    # - Bucket # Frontier
  # Frontier: droppable borg items
  - type: DroppableBorgModule
    moduleId: Gardening
    items:
    - id: Bucket
      whitelist:
        tags:
        - Bucket
  # End Frontier
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: gardening-module }

- type: entity
  id: BorgModuleHarvesting
  parent: [ BaseBorgModuleService, BaseProviderBorgModule ]
  name: harvesting cyborg module
  components:
  - type: Sprite
    layers:
    - state: service
    - state: icon-harvesting
  - type: ItemBorgModule
    moduleId: Harvesting # Frontier
    items:
    - HydroponicsToolScythe
    - HydroponicsToolHatchet
    # - PlantBag # Frontier
  # Frontier: droppable borg items
  - type: DroppableBorgModule
    moduleId: Harvesting
    items:
    - id: PlantBag
      whitelist:
        components:
        - NFPlantBag
  # End Frontier
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: harvesting-module }

- type: entity
  id: BorgModuleClowning
  parent: [ BaseBorgModuleService, BaseProviderBorgModule ]
  name: clowning cyborg module
  components:
  - type: Sprite
    layers:
    - state: service
    - state: icon-clown
  - type: ItemBorgModule
    moduleId: Clowning # Frontier
    items:
    - BikeHorn
    - ClownRecorder
    - BikeHornInstrument
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: clowning-module }

#syndicate modules
- type: entity
  id: BorgModuleSyndicateWeapon
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: weapon cyborg module
  components:
  - type: Sprite
    layers:
    - state: syndicate
    - state: icon-syndicate
  - type: ItemBorgModule
    moduleId: Weapons # Frontier
    items:
    - WeaponPistolEchis
    - EnergyDaggerLoud
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: syndicate-weapon-module }

- type: entity
  id: BorgModuleOperative
  parent: [ BaseBorgModuleSyndicate, BaseProviderBorgModule ]
  name: operative cyborg module
  description: A module that comes with a crowbar, an Emag, an Access Breaker and a syndicate pinpointer.
  components:
    - type: Sprite
      layers:
      - state: syndicate
      - state: icon-syndicate
    - type: ItemBorgModule
      moduleId: Operative # Frontier
      items:
      - Crowbar
      - Emag
      - AccessBreaker
      - PinpointerSyndicateNuclear
    - type: BorgModuleIcon
      icon: { sprite: Interface/Actions/actions_borg.rsi, state: syndicate-operative-module }

- type: entity
  id: BorgModuleEsword
  parent: [ BaseBorgModuleSyndicate, BaseProviderBorgModule ]
  name: energy sword cyborg module
  description: A module that comes with a double energy sword.
  components:
    - type: Sprite
      layers:
      - state: syndicate
      - state: icon-syndicate
    - type: ItemBorgModule
      moduleId: EnergySword # Frontier
      items:
      - CyborgEnergySwordDouble
      - PinpointerSyndicateNuclear
    - type: BorgModuleIcon
      icon: { sprite: Interface/Actions/actions_borg.rsi, state: syndicate-esword-module }

- type: entity
  id: BorgModuleL6C
  parent: [ BaseBorgModuleSyndicateAssault, BaseProviderBorgModule ]
  name: L6C ROW cyborg module
  description: A module that comes with a L6C.
  components:
    - type: Sprite
      layers:
      - state: syndicate
      - state: icon-syndicate
    - type: ItemBorgModule
      moduleId: L6CROW # Frontier
      items:
        - WeaponLightMachineGunL6C
        - PinpointerSyndicateNuclear
    - type: BorgModuleIcon
      icon: { sprite: Interface/Actions/actions_borg.rsi, state: syndicate-l6c-module }

- type: entity
  id: BorgModuleMartyr
  parent: [ BaseBorgModule, BaseProviderBorgModule ]
  name: martyr cyborg module
  description: "A module that comes with an explosive you probably don't want to handle yourself."
  components:
    - type: Sprite
      layers:
        - state: syndicateborgbomb
        - state: icon-bomb
    - type: ItemBorgModule
      moduleId: Martyr # Frontier
      items:
        - SelfDestructSeq
    - type: BorgModuleIcon
      icon: { sprite: Interface/Actions/actions_borg.rsi, state: syndicate-martyr-module }

# Shitmed Modules

- type: entity
  id: BorgModuleSurgery
  parent: [ BaseBorgModuleMedical, BaseProviderBorgModule ]
  name: surgery cyborg module
  components:
  - type: Sprite
    layers:
    - state: medical
    - state: icon-surgery
  - type: ItemBorgModule
    moduleId: Surgery
    items:
    - Scalpel
    - Drill
    - Hemostat
    - Retractor
    - Cautery
    - SawElectric
    - BoneGel
    # Frontier -> GoobStation -> Monolith: droppable borg items
  - type: DroppableBorgModule
    moduleId: Surgery
    items:
    - id: OrganHumanBrain
      whitelist:
        components:
        - Organ
        - BodyPart
    # End Frontier -> GoobStation -> Monolith: droppable borg items
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: surgery-module }

- type: entity
  id: BorgModuleAdvancedSurgery
  parent: [ BaseBorgModuleMedical, BaseProviderBorgModule ]
  name: advanced surgery cyborg module
  components:
  - type: Sprite
    layers:
    - state: medical
    - state: icon-advanced-surgery
  - type: ItemBorgModule
    moduleId: AdvancedSurgery
    items:
    - EnergyScalpel
    - EnergyCautery
    - AdvancedRetractor
    - BoneGel
    # Frontier -> GoobStation -> Monolith: droppable borg items
  - type: DroppableBorgModule
    moduleId: Surgery
    items:
    - id: OrganHumanBrain
      whitelist:
        components:
        - Organ
        - BodyPart
    # End Frontier -> GoobStation -> Monolith: droppable borg items
  - type: BorgModuleIcon
    icon: { sprite: Interface/Actions/actions_borg.rsi, state: adv-surgery-module }
