Fuel

Pumps, jerrycan and vehicle consumption.

Consumption

Every model has fuel.typeId and fuel.usage. A vehicle with usage: 7 burns 7 liters every fuel.usage-basis-km kilometers traveled (10 by default, about 0.9 liters a minute at full speed). Consumption grows with speed and with the throttle. Raise usage-basis-km (100 is realistic consumption) for longer range, lower it to run out of fuel sooner. Without fuel the vehicle does not accelerate. With typeId: NONE the vehicle has no tank.

Low-fuel warning

When fuel drops below hud.low-fuel.percent (15%) the [!] warning appears next to the fuel value and a sound plays every sound-interval-seconds seconds. The warning's text is hud.low-fuel-warning in vehicle-messages/it_IT.yml (it accepts &c colors and tags), the sound and threshold are in config.yml, hud section. Vehicles without a tank, like bicycles, have neither fuel nor a warning.

Fuel types

In fuel-settings of config.yml: gasoline, diesel, petrol and kerosene, each with an item, model-data and price-per-liter.

Pumps

Pumps are created with /fuelsetup (ev.admin only):

CommandWhat it does
/fuelsetup editGives the wand: click to pick the area's two corners and the interaction point.
/fuelsetup save <station> <pump> <LAND|MARITIME|AVIATION|ALL>Saves the pump and the type of vehicles it serves.
/fuelsetup cancel, remove, listCancels, removes or lists.

The player right-clicks the pump, picks the liters in the menu, and the refueling takes the time set by fuel.pump-liters-per-second. The player pays, through Vault.

Jerrycan

The jerrycan (capacity jerrycan.capacity) is bought with /fuel buy or from the fuel shop (/fuel shop) and refuels a stopped vehicle. /fuel give gives it away for free (staff).