- type: entity
  save: false
  abstract: true
  id: PlayerSiliconBase #for player controlled silicons
  components:
  - type: Reactive
    groups:
      Acidic: [Touch]
  - type: Input
    context: "human"
  - type: DamageOnHighSpeedImpact
    damage:
      types:
        Blunt: 5
    soundHit:
      path: /Audio/Effects/hit_kick.ogg
  - type: Clickable
  - type: Damageable
    damageContainer: Inorganic
  - type: Bloodstream
    bloodReagent: Oil
    bloodlossDamage:
      types:
        Bloodloss:
          1
    bloodlossHealDamage:
      types:
        Bloodloss:
          -0.25
  - type: InteractionOutline
  - type: Fixtures
    fixtures:
    - shape:
        # Circles, cuz rotation of rectangles looks very bad
        !type:PhysShapeCircle
        radius: 0.35
      mass: 20
      mask:
      - Impassable
      - MobImpassable
      - VaultImpassable
      - SmallImpassable
      layer:
      - Opaque
  - type: MovementSpeedModifier
    baseWalkSpeed : 4
    baseSprintSpeed : 3
  - type: Sprite
    noRot: true
    drawdepth: Mobs
    netsync: false
  - type: Physics
    bodyType: KinematicController
  - type: Hands
    showInHands: false
  - type: Body
    template: DroneTemplate
    preset: DronePreset
  - type: DoAfter
  - type: Pullable
  - type: Examiner
  - type: Puller
  - type: Recyclable
    safe: false
  - type: StandingState
  - type: Alerts

- type: entity
  name: drone
  id: Drone
  parent: PlayerSiliconBase
  components:
  - type: Drone
    tools:
      - id: ClothingBackpackSatchelDrone
      - id: trayScanner
      - id: Omnitool
      - id: WelderExperimental
  - type: NameIdentifier
    group: Drone
  - type: Inventory
    templateId: drone
  - type: Strippable
  - type: UserInterface
    interfaces:
    - key: enum.StrippingUiKey.Key
      type: StrippableBoundUserInterface
  - type: GhostTakeoverAvailable
    makeSentient: true
    name: Maintenance Drone
    description: Maintain the station. Ignore other beings except drones.
    rules: |
     You are bound by these laws both in-game and out-of-character:
     1. You may not involve yourself in the matters of another being, even if such matters conflict with Law Two or Law Three, unless the other being is another Drone.
     2. You may not harm any being, regardless of intent or circumstance.
     3. Your goals are to build, maintain, repair, improve, and power to the best of your abilities, You must never actively work against these goals.
  - type: MovementSpeedModifier
    baseWalkSpeed : 5
    baseSprintSpeed : 5
  - type: MobState
    thresholds:
      0: !type:NormalMobState {}
      60: !type:DeadMobState {}
  - type: Flashable
  - type: NoSlip
  - type: StatusEffects
    allowed:
    - Stun
    - KnockedDown
    - SlowedDown
  - type: SlowOnDamage
    speedModifierThresholds:
      20: 0.8
      30: 0.6
      40: 0.4
      50: 0.2
  - type: Temperature
    heatDamageThreshold: 5000
    currentTemperature: 310.15
    specificHeat: 42
    heatDamage:
      types:
        Heat : 1 #per second, scales with temperature & other constants
  - type: Sprite
    drawdepth: Mobs
    netsync: false
    layers:
    - state: shell
      sprite: Mobs/Silicon/drone.rsi
  - type: MovementIgnoreGravity
  - type: Fixtures
    fixtures:
    - shape:
        !type:PhysShapeCircle
        radius: 0.35
      mass: 20
      mask:
      - SmallImpassable
      - MobImpassable
      layer:
      - Opaque
  - type: Appearance
    visuals:
      - type: GenericEnumVisualizer
        key: enum.DroneVisuals.Status
        layer: 0
        states:
          enum.DroneStatus.Off: shell
          enum.DroneStatus.On: drone
  - type: ReplacementAccent
    accent: silicon
  - type: Repairable
    fuelcost: 15
    doAfterDelay: 8
  - type: Actions
  - type: UnpoweredFlashlight
    toggleAction:
      name: action-name-toggle-light
      description: action-description-toggle-light
      icon: Objects/Tools/flashlight.rsi/flashlight.png
      iconOn: Objects/Tools/flashlight.rsi/flashlight-on.png
      event: !type:ToggleActionEvent
  - type: PointLight
    enabled: false
    radius: 2.5
    softness: 5
    mask: /Textures/Effects/LightMasks/cone.png
    autoRot: true

- type: entity
  name: onestar mecha
  id: Onestar
  parent: PlayerSiliconBase
  components:
  - type: Drone
    applyLaws: false
    tools:
      - id: Minigun
      - id: EnergySword
      - id: LauncherMultipleRocket
      - id: XrayCannon
  - type: UserInterface
    interfaces:
    - key: enum.StrippingUiKey.Key
      type: StrippableBoundUserInterface
  - type: GhostTakeoverAvailable
    makeSentient: true
    name: Onestar Mecha
    description: You are an experimental mecha created by who-knows-what, all you know is that you have weapons and you detect fleshy moving targets nearby...
    rules: Use your weapons to cause havok. You are an antagonist.
  - type: MovementSpeedModifier
    baseWalkSpeed : 3
    baseSprintSpeed : 2
  - type: MobState
    thresholds:
      0: !type:NormalMobState {}
      1000: !type:DeadMobState {}
  - type: Sprite
    drawdepth: Mobs
    netsync: false
    layers:
    - state: onestar_boss
      sprite: Mobs/Silicon/onestar.rsi
    - state: onestar_boss_screen
      sprite: Mobs/Silicon/onestar.rsi
      shader: unshaded
  - type: MovementIgnoreGravity
  - type: Fixtures
    fixtures:
    - shape:
        !type:PhysShapeCircle
        radius: 1
      mass: 500
      mask:
      - SmallImpassable
      - MobImpassable
      - VaultImpassable
      - Impassable
      layer:
      - Opaque
  - type: Appearance
    visuals:
    - type: DamageStateVisualizer
      rotate: true
      normal: onestar_boss
      dead: onestar_boss_wrecked
  - type: CombatMode
