# SPDX-FileCopyrightText: 2024 Aviu00 <93730715+Aviu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2024 NULL882 <gost6865@yandex.ru>
# SPDX-FileCopyrightText: 2024 gluesniffler <159397573+gluesniffler@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aiden <28298836+Aidenkrz@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Aidenkrz <aiden@djkraz.com>
# SPDX-FileCopyrightText: 2025 BramvanZijp <56019239+BramvanZijp@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Fishbait <Fishbait@git.ml>
# SPDX-FileCopyrightText: 2025 GoobBot <uristmchands@proton.me>
# SPDX-FileCopyrightText: 2025 Ilya246 <57039557+Ilya246@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 Killerqu00 <47712032+Killerqu00@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 SX-7 <92227810+SX-7@users.noreply.github.com>
# SPDX-FileCopyrightText: 2025 fishbait <gnesse@gmail.com>
# SPDX-FileCopyrightText: 2025 gluesniffler <linebarrelerenthusiast@gmail.com>
#
# SPDX-License-Identifier: AGPL-3.0-or-later

- type: entity
  id: CombatMech
  abstract: true
  categories: [ HideSpawnMenu ]
  components:
  - type: Mech
    equipmentWhitelist:
      tags:
      - CombatMech

- type: entity
  id: IndustrialMech
  abstract: true
  categories: [ HideSpawnMenu ]
  components:
  - type: Mech
    equipmentWhitelist:
      tags:
      - IndustrialMech

- type: entity
  id: SpecialMech
  abstract: true
  categories: [ HideSpawnMenu ]
  components:
  - type: Mech
    equipmentWhitelist:
      tags:
      - SpecialMech

- type: entity
  id: SmallMech
  abstract: true
  categories: [ HideSpawnMenu ]
  components:
  - type: Mech
    equipmentWhitelist:
      tags:
      - SmallMech

# Ripley MK-II
- type: entity
  id: MechRipley2
  parent: [ BaseMech, IndustrialMech, BaseCargoContraband ]
  name: Ripley APLU MK-II
  description: The "MK-II" has a pressurized cabin for space operations, but the added weight has slowed it down.
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: ripleymkii
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: Mech
    baseState: ripleymkii
    openState: ripleymkii-open
    brokenState: ripleymkii-broken
    mechToPilotDamageMultiplier: 0.4
    airtight: true
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 20
  - type: MovementSpeedModifier
    baseWalkSpeed: 2
    baseSprintSpeed: 2 #Goobedit
  - type: Damageable
    damageModifierSet: MediumArmorNT
  - type: StaticPrice
    price: 1000
  - type: Tag
    tags:
    - DoorBumpOpener
    - FootstepSound
    - RipleyMkII

- type: entity
  id: MechRipley2Battery
  parent: MechRipley2
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellHigh

# Clarke
- type: entity
  id: MechClarke
  parent: [ BaseMech, IndustrialMech, BaseCargoContraband ]
  name: Clarke
  description: A fast-moving mech for space travel. It has built-in trusts.
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: clarke
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      collection: FootstepBorg
  - type: Mech
    baseState: clarke
    openState: clarke-open
    brokenState: clarke-broken
    mechToPilotDamageMultiplier: 0.5
    airtight: true
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 26
  - type: MovementSpeedModifier
    baseWalkSpeed: 3.5
    baseSprintSpeed: 3.5 #Goobedit
  - type: CanMoveInAir
  - type: MovementAlwaysTouching
  - type: StaticPrice
    price: 1500
  - type: Tag
    tags:
    - DoorBumpOpener
    - FootstepSound
    - Clarke

- type: entity
  id: MechClarkeBattery
  parent: MechClarke
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellHigh

- type: entity
  parent: MechHonkerBattery
  id: MechHonkerFilled
  suffix: Battery, Filled
  components:
  - type: Mech
    startingEquipment:
      - WeaponMechSpecialBananaMortar
      - WeaponMechSpecialMousetrapMortar
      - MechEquipmentHorn

# Combat-Station Mechs

# Gygax
- type: entity
  id: MechGygax
  parent: [ BaseMech, CombatMech, BaseSecurityContraband ]
  name: Gygax
  description: While lightly armored, the Gygax has incredible mobility thanks to its ability that lets it smash through walls at high speeds.
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: gygax
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: Mech
    baseState: gygax
    openState: gygax-open
    brokenState: gygax-broken
    mechToPilotDamageMultiplier: 0.3
    airtight: true
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 25
        Structural: 180
  - type: CanMoveInAir
  - type: MovementAlwaysTouching
  - type: MovementSpeedModifier
    baseWalkSpeed: 2
    baseSprintSpeed: 2 #Goobedit
  - type: StaticPrice
    price: 3000
  - type: Tag
    tags:
    - DoorBumpOpener
    - FootstepSound
    - Gygax

- type: entity
  id: MechGygaxBattery
  parent: MechGygax
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellHigh

# Durand
- type: entity
  id: MechDurand
  parent: [ BaseMech, CombatMech, BaseSecurityContraband ]
  name: Durand
  description: A slow but beefy combat exosuit that is extra scary in confined spaces due to its punches. Xenos hate it!
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: durand
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: Mech
    baseState: durand
    openState: durand-open
    brokenState: durand-broken
    mechToPilotDamageMultiplier: 0.25
    airtight: true
    maxIntegrity: 400
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 40
        Structural: 220
  - type: MovementSpeedModifier
    baseWalkSpeed: 1.5
    baseSprintSpeed: 1.5 #Goobedit
  - type: Damageable
    damageModifierSet: MediumArmorNT
  - type: CanMoveInAir
  - type: MovementAlwaysTouching
  - type: Repairable
    fuelCost: 30
    doAfterDelay: 15
  - type: StaticPrice
    price: 5000
  - type: Tag
    tags:
    - DoorBumpOpener
    - FootstepSound
    - Durand

- type: entity
  id: MechDurandBattery
  parent: MechDurand
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellHigh

# Nanotrasen Combat Mechs

# Marauder
- type: entity
  id: MechMarauder
  parent: [ BaseMech, CombatMech, BaseCentcommContraband ]
  name: Marauder
  description: Looks like we're all saved. # ERT mech
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: marauder
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: Mech
    baseState: marauder
    openState: marauder-open
    brokenState: marauder-broken
    mechToPilotDamageMultiplier: 0.1
    airtight: true
    maxIntegrity: 500
    maxEquipmentAmount: 4
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 40
        Structural: 200
  - type: MovementSpeedModifier
    baseWalkSpeed: 1
    baseSprintSpeed: 1 #Goobedit
  - type: Damageable
    damageModifierSet: HeavyArmorNT
  - type: CanMoveInAir
  - type: MovementAlwaysTouching
  - type: Repairable
    fuelCost: 30
    doAfterDelay: 15
  - type: StaticPrice
    price: 15000 # Some respect if you steal one of these.

- type: entity
  id: MechMarauderBattery
  parent: MechMarauder
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellHyper

- type: entity
  id: MechMarauderFilled
  parent: MechMarauderBattery
  suffix: Battery, Filled
  components:
  - type: Mech
    startingEquipment:
      - WeaponMechChainSword
      - WeaponMechCombatPulseRifle
      - WeaponMechCombatUltraRifle
      - WeaponMechCombatMissileRack8

# Seraph
- type: entity
  id: MechSeraph
  parent: [ BaseMech, CombatMech, BaseCentcommContraband ]
  name: Seraph
  description: That's the last thing you'll see. # Death Squad mech
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: seraph
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: Mech
    baseState: seraph
    openState: seraph-open
    brokenState: seraph-broken
    mechToPilotDamageMultiplier: 0.05
    airtight: true
    maxIntegrity: 550
    maxEquipmentAmount: 5
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 60
        Structural: 400
  - type: MovementSpeedModifier
    baseWalkSpeed: 2.2
    baseSprintSpeed: 2.2 
  - type: Damageable
    damageModifierSet: HeavyArmorNT
  - type: CanMoveInAir
  - type: MovementAlwaysTouching
  - type: Repairable
    fuelCost: 30
    doAfterDelay: 20
  - type: StaticPrice
    price: 30000 # My respects if you manage to steal one of these.

- type: entity
  id: MechSeraphBattery
  parent: MechSeraph
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellAntiqueProto

- type: entity
  id: MechSeraphFilled
  parent: MechSeraphBattery
  suffix: Battery, Filled
  components:
  - type: Mech
    startingEquipment:
      - WeaponMechChainSword
      - WeaponMechCombatPulseRifle
      - WeaponMechCombatShotgun
      - WeaponMechCombatMissileRack6
      - WeaponMechCombatUltraRifle

# Syndicate Combat Mech

# Dark Gygax
- type: entity
  id: MechGygaxSyndie
  parent: [ BaseMech, CombatMech, BaseSyndicateAnchoredContraband ]
  name: Dark Gygax
  description: A modified Gygax used for nefarious purposes. On the back of the armor plate there is an inscription "Cybersun Inc."
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: darkgygax
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: Mech
    baseState: darkgygax
    openState: darkgygax-open
    brokenState: darkgygax-broken
    mechToPilotDamageMultiplier: 0.15
    airtight: true
    maxIntegrity: 300
    maxEquipmentAmount: 4
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 30
        Structural: 200
  - type: MovementSpeedModifier
    baseWalkSpeed: 2.2
    baseSprintSpeed: 2.2 #Goobedit
  - type: Damageable
    damageModifierSet: MediumArmorSyndi
  - type: CanMoveInAir
  - type: MovementAlwaysTouching
  - type: Repairable
    fuelCost: 40
    doAfterDelay: 20
  - type: StaticPrice
    price: 15000 # Some respect if you steal one of these.

- type: entity
  id: MechGygaxSyndieBattery
  parent: MechGygaxSyndie
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellHyper

- type: entity
  id: MechGygaxSyndieFilled
  parent: MechGygaxSyndieBattery
  suffix: Battery, Filled
  components:
  - type: Mech
    startingEquipment:
      - WeaponMechChainSword
      - WeaponMechCombatShotgun
      - WeaponMechCombatMissileRack8
      - WeaponMechCombatTeslaCannon

# Mauler
- type: entity
  id: MechMaulerSyndie
  parent: [ BaseMech, CombatMech, BaseSyndicateContraband ]
  name: Mauler
  description: A modified Marauder used by the Syndicate that's not as maneuverable as the Dark Gygax, but it makes up for that in armor and sheer firepower. On the back of the armor plate there is an inscription "Cybersun Inc."
  components:
  - type: Sprite
    drawdepth: Mobs
    noRot: true
    sprite: Objects/Specific/Mech/mecha.rsi
    layers:
    - map: [ "enum.MechVisualLayers.Base" ]
      state: mauler
    - map: ["enum.PaperLabelVisuals.Layer"]
      sprite: Structures/Storage/Crates/labels.rsi
      state: paper
  - type: FootstepModifier
    footstepSoundCollection:
      path: /Audio/Mecha/sound_mecha_powerloader_step.ogg
  - type: Mech
    baseState: mauler
    openState: mauler-open
    brokenState: mauler-broken
    mechToPilotDamageMultiplier: 0.1
    airtight: true
    maxIntegrity: 500
    maxEquipmentAmount: 5
    pilotWhitelist:
      components:
        - HumanoidAppearance
  - type: MeleeWeapon
    hidden: true
    attackRate: 1
    damage:
      types:
        Blunt: 50
        Structural: 400
  - type: MovementSpeedModifier
    baseWalkSpeed: 1
    baseSprintSpeed: 1 #Goobedit
  - type: Damageable
    damageModifierSet: HeavyArmorSyndi
  - type: CanMoveInAir
  - type: MovementAlwaysTouching
  - type: Repairable
    fuelCost: 50
    doAfterDelay: 25
  - type: StaticPrice
    price: 30000 # Some respect if you steal one of these.

- type: entity
  id: MechMaulerSyndieBattery
  parent: MechMaulerSyndie
  suffix: Battery
  components:
  - type: ContainerFill
    containers:
      mech-battery-slot:
      - PowerCellHyper

- type: entity
  id: MechMaulerSyndieFilled
  parent: MechMaulerSyndieBattery
  suffix: Battery, Filled
  components:
  - type: Mech
    startingEquipment:
      - WeaponMechChainSword
      - WeaponMechCombatUltraRifle
      - WeaponMechCombatShotgun
      - WeaponMechCombatMissileRack6
      - WeaponMechCombatTeslaCannon
