API ReferenceveenergyStorage
Electric Battery Component
Logic defined in `lua/vehicle/energyStorage/electricBattery.lua`. Simulates electrical energy storage for EVs and hybrids.
Logic defined in lua/vehicle/energyStorage/electricBattery.lua. Simulates electrical energy storage for EVs and hybrids.
Exports
Functions
new(jbeamData) (factory)
-
Description: Creates a new battery object.
-
JBeam Properties:
batteryCapacity: Total energy (kWh).startingCapacity: Initial charge (kWh).
-
Returns:
storage
Methods (on object)
setStoredEnergy(energy): Sets energy level (input in Joules).setRemainingRatio(ratio): Sets charge level (0.0 to 1.0).
Related
- Electric Motor: The primary consumer of battery energy.
Sequential Gearbox Shift Logic
Shift logic for sequential manual transmissions. Gear changes are made one step at a time (up or down) via paddle shifters or a sequential lever. Supports flat-shift (upshift without lifting throttle) and auto-blip downshifts.
Energy Storage Components
The `energyStorage/` directory contains definitions for various physical energy containers used by the vehicle.