> ## Documentation Index
> Fetch the complete documentation index at: https://docs.czautoz.co.uk/llms.txt
> Use this file to discover all available pages before exploring further.

# Repair & Battery

> HelicopterRepairKit repairs all damage zones. HelicopterBattery is required before engine start.

## Repair System

See [Damage Zones](/features/damage-zones) for zone health levels, zone-specific effects, and rotor damage behaviour.

### Requirements

All repairs require:

* **`HelicopterRepairKit`** held in the player's hands (not in inventory — must be actively held)
* **Engine must be off** — or the main rotor must be destroyed (a destroyed main rotor allows repairs even if the engine is still spooling down)
* **Rotor must not be spinning** — rotor spool must be below 50%
* **Helicopter must be grounded** — within 5 m AGL
* **Player must be standing** (not crouched or prone)

### Proximity Requirements

| Zone Type                      | Max Distance |
| ------------------------------ | ------------ |
| Main Rotor / Tail Rotor        | Within 3 m   |
| Body / Engine / Chassis / Fuel | Within 5 m   |

<Note>
  All zone repairs share the same pre-conditions above. There are no additional restrictions specific to any individual zone.
</Note>

### What Gets Repaired

The HelicopterRepairKit repairs **all 6 damage zones**: Body, Engine, Chassis, Fuel, Main Rotor, Tail Rotor.

### Progressive Repair

Zone repair is progressive — each hold action repairs **one damage level**. If a zone has taken heavy damage, multiple hold actions may be required to fully restore it.

Each repair also restores a fraction of global HP (`repair.globalHpPct`).

### Repair Settings

All repair settings live in the `repair` section of `mod_config.json` and apply globally.

| Setting                  | What it does                                                 | Default |
| ------------------------ | ------------------------------------------------------------ | ------- |
| `repair.kitUses`         | Number of repairs a kit can perform before going ruined      | `5`     |
| `repair.rotorRepairTime` | Hold time in seconds to repair a rotor                       | `45`    |
| `repair.zoneRepairTime`  | Hold time in seconds to repair body/engine/chassis/fuel zone | `30`    |
| `repair.globalHpPct`     | Global HP fraction added per repair (0.10 = +10% per action) | `0.10`  |

***

## Battery System

### Requirements

A **`HelicopterBattery`** must be in the `HelicopterBattery` inventory slot with **charge greater than 0** before the engine can be started.

### Battery Behaviour

| Event          | Effect                                          |
| -------------- | ----------------------------------------------- |
| Engine start   | Drains `battery.startDrain` units               |
| Engine stop    | Drains `battery.startDrain` units               |
| Engine running | Recharges `battery.chargeRate` units per second |
| Lights on      | Drains `battery.lightDrain` units per second    |

Battery maximum charge is **500 units**.

### Battery Settings

| Setting              | What it does                                                             | Default |
| -------------------- | ------------------------------------------------------------------------ | ------- |
| `battery.startDrain` | Battery drained per engine start/stop. `0` = no drain.                   | `10.0`  |
| `battery.chargeRate` | Battery recharged per second while engine is running. `0` = no recharge. | `5.0`   |
| `battery.lightDrain` | Battery drained per second while lights are on. `0` = no drain.          | `2.0`   |

<Tip>
  To disable the battery requirement entirely, set `battery.startDrain` to `0`. The helicopter will start without needing a battery in the slot.
</Tip>
