- type: entity
  categories: [ HideSpawnMenu ]
  id: EffectNightVisioCoreDron
  parent: EffectNightVisioCore
  components:
  - type: PointLight
    color: "#222222"
    energy: 3
    radius: 100
    softness: 40

#Radio


- type: entity
  categories: [ HideSpawnMenu ]
  parent: MarkerBase
  id: SpawnDronLandmineCore
  components:
  - type: EntityTableSpawner
    table: !type:GroupSelector
      children:
      - id: LandMineFleshCoreWM
        weight: 70
      - id: LandMineExplosiveCoreWM
        weight: 30


- type: entity
  parent: BaseItem
  id: BoxDronCoreWM
  components:
  - type: StaticPrice
    price: 200
  - type: PhysicalComposition
    materialComposition:
      MoneyWarMizMaterial: 100
  - type: SpawnItemsOnUse
    uses: 1
    sound: !type:SoundPathSpecifier
      path: /Audio/Effects/unwrap.ogg
    items:
    - id: DronCoreWM
  - type: Item
    sprite: Objects/Storage/boxes.rsi
    size: Small
  - type: Sprite
    sprite: /Textures/_Fish/PlanetWar/WM/32xSprait.rsi
    layers:
      - state: droneAnim


- type: entity
  categories: [ HideSpawnMenu ]
  id: DronCorePortalWM
  parent: DronCoreWM
  components:
    - type: EntityTableSpawner
      deleteSpawnerAfterSpawn: false
      table: !type:AllSelector
        children:
        - id: PortalCoreTinyWM


- type: entity
  id: StationDronBeaconCore
  parent: BaseMachinePowered
  placement:
    mode: SnapgridCenter
    snap:
    - Wall
  components:
 # - type: RadarBlip
 #   color: "#0000e3"
 #   scale: 0.5
 #   shape: Square
 #   requireInSpace: false
  - type: Transform
    anchored: true
  - type: Sprite
    sprite: /Textures/_Fish/PlanetWar/WM2/32xSprait.rsi
    layers:
      - state: stationDronBlue
        scale: 1.5, 1.5
      - state: stationDronBluePimp
        shader: unshaded
        scale: 1.5, 1.5
  - type: ExplodeOnTrigger
  - type: Explosive
    explosionType: Default
    maxIntensity: 6
    intensitySlope: 3
    totalIntensity: 6
    canCreateVacuum: false
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.40,-0.40,0.40,0.40"
        density: 3000000
        mask:
        - FullTileMask
        layer:
        - BulletImpassable
        - Opaque
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 550
      behaviors:
      - !type:TriggerBehavior
      - !type:DoActsBehavior
        acts: [ "Destruction" ]
  - type: ApcPowerReceiver
    powerLoad: 5000
  - type: TimedSpawner
    chance: 1
    prototypes:
    - MarkerSpawnDronStationCore
    intervalSeconds: 400
    minimumEntitiesSpawned: 1
    maximumEntitiesSpawned: 1
  - type: EntityTableSpawner
    deleteSpawnerAfterSpawn: false
    table: !type:AllSelector
      children:
      - id: MarkerSpawnDronStationCore


- type: entity
  id: StationDronBeaconCoreWMMizeliy
  parent: StationDronBeaconCore
  components:
  - type: TimedSpawner
    intervalSeconds: 30


- type: entity
  categories: [ HideSpawnMenu ]
  parent: MarkerBase
  id: MarkerSpawnDronStationCore
  components:
    - type: EntityTableSpawner
      deleteSpawnerAfterSpawn: true
      table: !type:AllSelector
        children:
        - id: MarkerDronCoreWM
          amount: 2
        - id: MarkerDronCoreTurretMineWM


- type: entity
  categories: [ HideSpawnMenu, Debug ]
  parent: MarkerBase
  id: MarkerDronCoreWM
  components:
  - type: GhostRole
    name: pw-vehicles-republic-markerdroncore-name
    description: pw-construction-republic-mobhumancorep0-desc
    raffle:
      settings: WM
  - type: GhostRoleMobSpawner
    prototype: DronCorePortalWM
  - type: TimedDespawn
    lifetime: 400


- type: entity
  categories: [ HideSpawnMenu, Debug ]
  parent: MarkerBase
  id: MarkerDronCoreTurretMineWM
  components:
  - type: GhostRole
    name: pw-vehicles-republic-markerdroncoreturretmine-name
    description: pw-construction-republic-mobhumancorep0-desc
    raffle:
      settings: WM
  - type: GhostRoleMobSpawner
    prototype: DronCoreTurretMineWM
  - type: TimedDespawn
    lifetime: 200


- type: entity
  id: MechHeavyCoreWM
  suffix: WM
  parent:
   - MechMarauder
  components:
 # - type: Physics
  #  bodyType: Dynamic
  #- type: RadarBlip
  #  color: "#0000e3"
  #  scale: 0.8
  #  shape: Circle
  #  requireInSpace: false
  - type: ContainmentField
    throwForce: 2
  - type: AdminMinigun
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeCircle
          radius: 0.70
        density: 10000
        mask:
        - MobMask
        layer:
        - MobLayer
  - type: MeleeThrowOnHit
    distance: 6
    speed: 3
  - type: Sprite
    scale: 1.8, 1.8
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCageHightWM
  - type: Mech
    airtight: false
    startingEquipment:
      - WeaponMechCombatMGWM
    mechToPilotDamageMultiplier: 0.01
    maxEquipmentAmount: 1
    pilotWhitelist:
      components:
        - AdminMinigun
    pilotBlacklist:
      components:
        - ScaleVisuals
  - type: MeleeWeapon
    attackRate: 0.3
    range: 1.5
    damage:
      types:
        Blunt: 80
        Structural: 120
  - type: MobThresholds
    currentThresholdState : Alive
    thresholds:
      0: Alive
      1000: Critical
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 3200
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
  - type: PassiveDamage
    allowedStates:
    - Critical
    damageCap: 8000
    damage:
      groups:
        Brute: 4
  - type: MovementSpeedModifier
    baseWalkSpeed: 2
    baseSprintSpeed: 1.6
  - type: PowerCellDraw
    drawRate: 0
   # useRate: 0
  - type: UseDelay
    delay: 10.0
  - type: ExplosionResistance
    damageCoefficient: 0.55
  - type: AccessReader
    access: [["AssCoreBase"]]
  - type: PointLight
    enabled: false
    mask: /Textures/Effects/LightMasks/cone.png
    radius: 16
    netsync: true #включает свет у всех
    falloff: 2
    softness: 1
    autoRot: true
    color: "#0057e7"
  - type: Reflect
    reflectProb: 0.25
    spread: 260


- type: entity
  id: GrusCoreWM
  suffix: WM
  parent:
   - MechHeavyCoreWM
  components:
  - type: FootstepModifier
    footstepSoundCollection:
      collection: FootstepCyborgSpider
      params:
        pitch: 0.5
        volume: 10
 # - type: Rotatable
 #   rotateWhileAnchored: true
 # - type: RadarBlip
 #   scale: 0.9
  - type: RequireProjectileTarget
    active: true
  - type: Physics
    bodyStatus: InAir
    bodyType: KinematicController
    fixedRotation: false
  - type: ContainmentField
    throwForce: 0
  - type: CombatMode
    toggleMouseRotator: false
  - type: MouseRotator
    angleTolerance: 5
    rotationSpeed: 180
    simple4DirMode: false
  - type: NoRotateOnInteract
  - type: NoRotateOnMove
  - type: Fixtures
    fixtures:
      fix1:
        shape:
          !type:PhysShapeAabb
          bounds: "-0.9,-1.3,0.9, 1.5"
        density: 10000
        mask:
        - MachineMask
        layer:
        - MachineLayer
  - type: Reflect
    reflectProb: 0.15
    spread: 360
  - type: Sprite
    scale: 1, 1
    noRot: false
    sprite: /Textures/_Fish/PlanetWar/WM2/100xSprait.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: coregruz
  - type: MeleeThrowOnHit
    distance: 3
    speed: 4
  - type: Mech
    baseState: coregruz
    openState: coregruz
    brokenState: coregruz
    mechToPilotDamageMultiplier: 0.1
    maxEquipmentAmount: 2
    startingEquipment:
      - WeaponMechCombatLightWM
      - WeaponGrusWM
  - type: ExplosionResistance
    damageCoefficient: 0.5
  - type: MobThresholds
    thresholds:
      0: Alive
      800: Critical
  - type: Destructible
    thresholds:
    - trigger:
        !type:DamageTrigger
        damage: 3000
      behaviors:
      - !type:DoActsBehavior
        acts: ["Destruction"]
      - !type:PlaySoundBehavior
        sound:
          collection: MetalSlam
  - type: PassiveDamage
    damageCap: 10000
  - type: MeleeWeapon
    attackRate: 0.75
    range: 0
    damage:
      types:
        Blunt: 1
        Structural: 1
  - type: MovementSpeedModifier
    baseWalkSpeed: 7
    baseSprintSpeed: 4
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCageTankWM
  - type: Strap
    handBuckle: true
    position: Down
    buckleOffsets:
    - "0,0.2"
    - "0,0.4"
    - "0,0.6"
    - "0,0.8"
    - "0,1.0"
    - "0,1.1"
    size: 1000
    whitelist:
      components:
       - AdminMinigun
  - type: TileFrictionModifier
    modifier: 0.2
  - type: Body
    prototype: WMBodyGrus
 # - type: Loadout
 #   prototypes: [WMGearGrusCore]
  - type: Hands
    showInHands: false


- type: entity
  categories: [ HideSpawnMenu ]
  parent: MechHeavyCoreWMFlatpack
  id: MechGrusCoreFlatpack
  components:
  - type: SpawnAfterInteract
    prototype: GrusCoreWM
  - type: Flatpack
    entity: GrusCoreWM


- type: entity
  categories: [ HideSpawnMenu ]
  parent: MechHeavyCoreWMFlatpack
  id: MechStationDronCoreFlatpack
  components:
  - type: SpawnAfterInteract
    prototype: StationDronBeaconCore
  - type: Flatpack
    entity: StationDronBeaconCore
