API ReferenceveenergyStorage
Pressure Tank Component
Logic defined in `lua/vehicle/energyStorage/pressureTank.lua`. Simulates a compressed air tank, used for pneumatic brakes and Power Take-Off (PTO) systems.
Logic defined in lua/vehicle/energyStorage/pressureTank.lua. Simulates a compressed air tank, used for pneumatic brakes and Power Take-Off (PTO) systems.
Exports
Functions
new(jbeamData) (factory)
-
Description: Creates a new pressure tank.
-
Returns:
storage
Methods (on object)
updateTankSync(dt): Handles pneumatic PTO synchronization across couplers between vehicles (e.g., truck and trailer).setRemainingMass(mass): Updates pressure based on molar quantity and temperature.
Key Variables (on object)
currentPressure: Absolute pressure in Pascal (Pa).isPrimarySupply: True if this tank is the source (e.g., connected to a compressor).
Related
electrics: Stores sync variables for PTO (pneumaticPTOPressure, etc.).beamstate: Handles the physical coupling required for PTO sync.
See Also
- Energy Storage Components - Directory overview
- Electric Battery Component - Related reference
- Fuel Tank Component - Related reference
- Nitrous (N2O) Tank Component - Related reference
- Vehicle Environment Overview - Guide