Configuration

This section includes all configurable files for the selected script. Most settings are configured automatically, but each config.lua file contains a header comment explaining the purpose and usage of every configuration type. Be sure to read the header of each file carefully to fully understand how to customize and adapt the system for QBCORE, ESX, or standalone environments, ensuring seamless integration with your server.


qs-fuelstations/config.lua
--──────────────────────────────────────────────────────────────────────────────
--  Quasar Store · Configuration Guidelines
--──────────────────────────────────────────────────────────────────────────────
--  This configuration file defines all adjustable parameters for the script.
--  Comments are standardized to help you identify which sections you can safely edit.
--
--  • [EDIT] – Safe for users to modify. Adjust these values as needed.
--  • [INFO] – Informational note describing what the variable or block does.
--  • [ADV]  – Advanced settings. Change only if you understand the logic behind it.
--  • [CORE] – Core functionality. Do not modify unless you are a developer.
--  • [AUTO] – Automatically handled by the system. Never edit manually.
--
--  Always make a backup before editing configuration files.
--  Incorrect changes in [CORE] or [AUTO] sections can break the resource.
--──────────────────────────────────────────────────────────────────────────────

Config          = Config or {} -- [CORE]
Locales         = Locales or {} -- [CORE]

--──────────────────────────────────────────────────────────────────────────────
-- Language Selection                                                          [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Main language for the asset. Locales are under locales/* — add yours if missing.
-- [INFO] Available: 'ar','bg','ca','cs','da','de','el','en','es','fa','fr','hi','hu','it','ja','ko','nl','no','pl','pt','ro','ru','sl','sv','th','tr','zh-CN','zh-TW'
--──────────────────────────────────────────────────────────────────────────────
Config.Language = 'en' -- [EDIT]

--──────────────────────────────────────────────────────────────────────────────
-- Internal Dependency Checker                                                 [CORE]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Utility used by this config to detect running resources.
--──────────────────────────────────────────────────────────────────────────────
local function dependencyCheck(data) -- [CORE]
    for k, v in pairs(data) do
        if GetResourceState(k):find('started') ~= nil then
            return v
        end
    end
    return false
end

--──────────────────────────────────────────────────────────────────────────────
-- Framework Detection                                                         [AUTO]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Auto-detects ESX/QBCore/VRP. If you renamed resources, set manually and
--        adapt framework files inside the resource.
--──────────────────────────────────────────────────────────────────────────────
local esxHas                   = GetResourceState('es_extended') == 'started'             -- [CORE]
local qbHas                    = GetResourceState('qb-core') == 'started'                 -- [CORE]
local vrpHas                   = GetResourceState('vrp') == 'started'                     -- [CORE]

Config.Framework               = esxHas and 'esx' or qbHas and 'qb' or vrpHas and 'vrpex' or 'esx' -- [AUTO]
Config.UseTarget               = false                                                    -- [EDIT] Enables support for 'ox_target' / 'qb-target'
Config.EnableJerrycan          = true                                                     -- [EDIT] Toggle jerrycan usage (as item/weapon behavior below)

--──────────────────────────────────────────────────────────────────────────────
-- Blip / Stations Basics                                                      [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Control how gas station blips are rendered and basic fuel settings.
--──────────────────────────────────────────────────────────────────────────────
Config.ShowNearestStations     = false -- [EDIT] Show only nearest stations for performance
Config.MaxJerryCanAmmo         = 4500.0 -- [ADV] Do not change unless you know game limits

Config.StationBlips            = {  -- [EDIT]
    SetBlipSprite = 361,            -- [EDIT] Gas station icon
    SetBlipScale  = 0.6,            -- [EDIT]
    SetBlipColour = 81,             -- [EDIT]
    name          = 'Gas Station',  -- [EDIT]
}

--──────────────────────────────────────────────────────────────────────────────
-- Gas Stations List                                                           [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Add/remove stations. refuelCoords optional; if nil, script will handle defaults.
--──────────────────────────────────────────────────────────────────────────────
---@type table<number, {name: string, coords: vector3, refuelCoords?: vector3}>
Config.GasStations             = { -- [EDIT]
    { name = 'Gas Station 1',  coords = vec3(49.4187, 2778.793, 58.043),   refuelCoords = vec3(39.785, 2794.281, 57.899) },
    { name = 'Gas Station 2',  coords = vec3(263.894, 2606.463, 44.983),   refuelCoords = vec3(272.56, 2598.52, 44.58) },
    { name = 'Gas Station 3',  coords = vec3(1039.958, 2671.134, 39.550),  refuelCoords = vec3(1055.490478515625, 2663.85107421875, 39.5656509399414) },
    { name = 'Gas Station 4',  coords = vec3(1207.260, 2660.175, 37.899),  refuelCoords = vec3(1203.96, 2642.59, 37.84) },
    { name = 'Gas Station 5',  coords = vec3(2539.685, 2594.192, 37.944),  refuelCoords = vec3(2526.481201171875, 2606.675048828125, 37.94485092163086) },
    { name = 'Gas Station 6',  coords = vec3(2679.858, 3263.946, 55.240),  refuelCoords = vec3(2670.09, 3259.69, 55.24) },
    { name = 'Gas Station 7',  coords = vec3(2005.055, 3773.887, 32.403),  refuelCoords = vec3(1988.74, 3781.08, 32.18) },
    { name = 'Gas Station 8',  coords = vec3(1687.156, 4929.392, 42.078),  refuelCoords = vec3(1710.909423828125, 4939.63818359375, 42.08590316772461) },
    { name = 'Gas Station 9',  coords = vec3(1701.314, 6416.028, 32.763),  refuelCoords = vec3(1695.46, 6428.0, 32.63) },
    { name = 'Gas Station 10', coords = vec3(179.857, 6602.839, 31.868) },
    { name = 'Gas Station 11', coords = vec3(-94.4619, 6419.594, 31.489),  refuelCoords = vec3(-91.0, 6396.47, 31.64) },
    { name = 'Gas Station 12', coords = vec3(-2554.996, 2334.40, 33.078),  refuelCoords = vec3(-2567.13, 2317.27, 33.22) },
    { name = 'Gas Station 13', coords = vec3(-1800.375, 803.661, 138.651), refuelCoords = vec3(-1830.18, 781.39, 138.33) },
    { name = 'Gas Station 14', coords = vec3(-1437.622, -276.747, 46.207), refuelCoords = vec3(-1437.37, -259.18, 46.26) },
    { name = 'Gas Station 15', coords = vec3(-2096.243, -320.286, 13.168), refuelCoords = vec3(-2060.82080078125, -302.5645446777344, 13.1520938873291) },
    { name = 'Gas Station 16', coords = vec3(-724.619, -935.1631, 19.213), refuelCoords = vec3(-723.21, -909.07, 19.34) },
    { name = 'Gas Station 17', coords = vec3(-526.019, -1211.003, 18.184), refuelCoords = vec3(-520.42, -1225.82, 18.45) },
    { name = 'Gas Station 18', coords = vec3(-70.2148, -1761.792, 29.534), refuelCoords = vec3(-57.77, -1774.39, 29.03) },
    { name = 'Gas Station 19', coords = vec3(265.648, -1261.309, 29.292),  refuelCoords = vec3(288.48, -1251.04, 29.44) },
    { name = 'Gas Station 20', coords = vec3(819.653, -1028.846, 26.403),  refuelCoords = vec3(812.8623657226562, -1041.6175537109375, 26.75194358825683) },
    { name = 'Gas Station 21', coords = vec3(1208.951, -1402.567, 35.224), refuelCoords = vec3(1218.8662109375, -1388.71337890625, 35.18914031982422) },
    { name = 'Gas Station 22', coords = vec3(1181.381, -330.847, 69.316),  refuelCoords = vec3(1175.43603515625, -313.91400146484375, 69.18193817138672) },
    { name = 'Gas Station 23', coords = vec3(620.843, 269.100, 103.089),   refuelCoords = vec3(636.351806640625, 255.8418121337891, 103.13734436035156) },
    { name = 'Gas Station 24', coords = vec3(2581.321, 362.039, 108.468),  refuelCoords = vec3(2561.66650390625, 346.0816955566406, 108.44479370117188) },
    { name = 'Gas Station 25', coords = vec3(176.631, -1562.025, 29.263),  refuelCoords = vec3(179.06649780273438, -1545.9722900390625, 29.1483211517334) },
    { name = 'Gas Station 26', coords = vec3(-319.292, -1471.715, 30.549), refuelCoords = vec3(-339.44183349609375, -1465.489501953125, 30.59231948852539) },
    { name = 'Gas Station 27', coords = vec3(1784.324, 3330.55, 41.253),   refuelCoords = vec3(1778.86, 3320.2, 41.42) },
}

--──────────────────────────────────────────────────────────────────────────────
-- Vehicle Keys Integration                                                    [AUTO]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Detects supported key systems. If none, returns 'none'.
--──────────────────────────────────────────────────────────────────────────────
local vehicleKeys              = { -- [CORE]
    ['qs-vehiclekeys']      = 'qs-vehiclekeys',
    ['qb-vehiclekeys']      = 'qb-vehiclekeys',
    ['F_RealCarKeysSystem'] = 'F_RealCarKeysSystem',
    ['fivecode_carkeys']    = 'fivecode_carkeys',
    ['glfp10_carkeys']      = 'glfp10_carkeys',
    ['mono_carkeys']        = 'mono_carkeys',
    ['ti_vehicleKeys']      = 'ti_vehicleKeys',
    ['vehicles_keys']       = 'vehicles_keys',
    ['wasabi_carlock']      = 'wasabi_carlock',
    ['xd_locksystem']       = 'xd_locksystem',
    ['qbx_vehiclekeys']     = 'qbx_vehiclekeys',
}
Config.Vehiclekeys             = dependencyCheck(vehicleKeys) or 'none' -- [AUTO]

--──────────────────────────────────────────────────────────────────────────────
-- Economy & Interaction                                                       [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Currency symbol and jerrycan behavior/prices.
--──────────────────────────────────────────────────────────────────────────────
Config.PriceSymbol             = '€' -- [EDIT]
Config.JerryCanCost            = 100 -- [EDIT] Price to buy jerrycan
Config.JerryCanRefillCost      = 50 -- [EDIT] Price to refill jerrycan
Config.JerryCanItem            = true -- [EDIT] ESX: as item (true) / weapon (false)

--──────────────────────────────────────────────────────────────────────────────
-- Refuel Handling                                                             [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Cable length and risk behavior when breaking the hose.
--──────────────────────────────────────────────────────────────────────────────
Config.ThrowFuel               = true -- [EDIT] Allow spilling fuel on ground
Config.ThrowFuelKey            = 24 -- [EDIT] Control key (LMB)
Config.CableLength             = 3.5 -- [EDIT] Default hose length
Config.CableMaxLength          = 7.0 -- [EDIT] Max hose length
Config.AddExplosion            = false -- [EDIT] Explosion on hose break (use with caution)

--──────────────────────────────────────────────────────────────────────────────
-- Pump/Tank Models & Electric Chargers                                        [ADV]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Z-offset and flags per pump model. Include electric chargers here.
--──────────────────────────────────────────────────────────────────────────────
Config.TankModels              = { -- [ADV]
    [`prop_gas_pump_1d`]   = { offsetZ = 2.3 },
    [`prop_gas_pump_1a`]   = { offsetZ = 2.3 },
    [`prop_gas_pump_1b`]   = { offsetZ = 2.3 },
    [`prop_gas_pump_1c`]   = { offsetZ = 2.3 },
    [`prop_vintage_pump`]  = { offsetZ = 1.8 },
    [`prop_gas_pump_old2`] = { offsetZ = 1.6 },
    [`prop_gas_pump_old3`] = { offsetZ = 1.6 },
    [`electric_charger`]   = { offsetZ = 0.8, electric = true, nozle = 'electric_nozzle' },
}

--──────────────────────────────────────────────────────────────────────────────
-- Electric Charge Stations                                                    [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Spawn points for EV chargers (model must exist in game/resources).
--──────────────────────────────────────────────────────────────────────────────
Config.ChargeStations          = { -- [EDIT]
    { coords = vector4(175.9, -1546.65, 28.26, 224.29),   model = `electric_charger` },
    { coords = vector4(-51.09, -1767.02, 28.26, 47.16),   model = `electric_charger` },
    { coords = vector4(-514.06, -1216.25, 17.46, 66.29),  model = `electric_charger` },
    { coords = vector4(-704.64, -935.71, 18.21, 90.02),   model = `electric_charger` },
    { coords = vector4(279.79, -1237.35, 28.35, 181.07),  model = `electric_charger` },
    { coords = vector4(834.27, -1028.7, 26.16, 88.39),    model = `electric_charger` },
    { coords = vector4(1194.41, -1394.44, 34.37, 270.3),  model = `electric_charger` },
    { coords = vector4(1168.38, -323.56, 68.3, 280.22),   model = `electric_charger` },
    { coords = vector4(633.64, 247.22, 102.3, 60.29),     model = `electric_charger` },
    { coords = vector4(-1420.51, -278.76, 45.26, 137.35), model = `electric_charger` },
    { coords = vector4(-2080.61, -338.52, 12.26, 352.21), model = `electric_charger` },
    { coords = vector4(-98.12, 6403.39, 30.64, 141.49),   model = `electric_charger` },
    { coords = vector4(181.14, 6636.17, 30.61, 179.96),   model = `electric_charger` },
    { coords = vector4(1714.14, 6425.44, 31.79, 155.94),  model = `electric_charger` },
    { coords = vector4(1703.57, 4937.23, 41.08, 55.74),   model = `electric_charger` },
    { coords = vector4(1994.54, 3778.44, 31.18, 215.25),  model = `electric_charger` },
    { coords = vector4(1770.86, 3337.97, 40.43, 301.1),   model = `electric_charger` },
    { coords = vector4(2690.25, 3265.62, 54.24, 58.98),   model = `electric_charger` },
    { coords = vector4(1208.26, 2649.46, 36.85, 222.32),  model = `electric_charger` },
    { coords = vector4(1033.32, 2662.91, 38.55, 95.38),   model = `electric_charger` },
    { coords = vector4(267.96, 2599.47, 43.69, 5.8),      model = `electric_charger` },
    { coords = vector4(50.21, 2787.38, 56.88, 147.2),     model = `electric_charger` },
    { coords = vector4(-2570.04, 2317.1, 32.22, 21.29),   model = `electric_charger` },
    { coords = vector4(2545.81, 2586.18, 36.94, 83.74),   model = `electric_charger` },
    { coords = vector4(2561.24, 357.3, 107.62, 266.65),   model = `electric_charger` },
    { coords = vector4(-1819.22, 798.51, 137.16, 315.13), model = `electric_charger` },
    { coords = vector4(-341.63, -1459.39, 29.76, 271.73), model = `electric_charger` },
    -- Gabz Auto example (disabled):
    -- { coords = vector4(837.7554, -793.623, 25.23, 105.22), model = `electric_charger` },
}

--──────────────────────────────────────────────────────────────────────────────
-- Charging & Nozzle Offsets                                                   [ADV]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Charge speed (0–100) and per-model nozzle offsets for precise attach.
--──────────────────────────────────────────────────────────────────────────────
Config.ChargeRate              = 1.8 -- [ADV] Percent per second (≈56s from 0 to 100)

Config.CustomOffsets           = { -- [ADV]
    -- Cars
    ['baller']       = { vec3(2, 1, 0), vec3(0.5, 1, 0) },
    ['guardian']     = { vec3(-1.3, -1.0, 0), vec3(1.3, -1.0, 0) },
    -- Helicopters
    ['md902']        = { vec3(-0.9, -1.8, 0), vec3(0.9, -1.8, 0) },
    ['polmav']       = { vec3(-0.65, -1.2, 0.0), vec3(0.65, -1.2, 0.0) },
    ['ec135med']     = { vec3(-0.9, -1.3, 0.5), vec3(0.9, -1.3, 0.5) },
    ['swift']        = { vec3(-0.9, -1.5, 0.8), vec3(0.9, -1.5, 0.8) },
    ['swift2']       = { vec3(-0.9, -1.5, 0.8), vec3(0.9, -1.5, 0.8) },
    ['conada']       = { vec3(-0.9, -1.5, -0.2), vec3(0.9, -1.5, -0.2) },
    ['conada2']      = { vec3(-0.9, -1.5, -0.2), vec3(0.9, -1.5, -0.2) },
    ['havok']        = { vec3(-0.4, -0.5, -0.3), vec3(0.4, -0.5, -0.3) },
    ['volatus']      = { vec3(-0.9, -1.3, -0.1), vec3(0.9, -1.3, -0.1) },
    ['maverick']     = { vec3(-1.0, -1.6, 0.6), vec3(1.0, -1.6, 0.6) },
    ['frogger']      = { vec3(-0.9, -0.75, 0.7), vec3(0.9, -0.75, 0.7) },
    ['frogger2']     = { vec3(-0.9, -0.75, 0.7), vec3(0.9, -0.75, 0.7) },
    ['akula']        = { vec3(-1.35, 1.8, -0.4), vec3(1.35, 1.8, -0.4) },
    ['hunter']       = { vec3(-1.25, 1.8, -0.9), vec3(1.25, 1.8, -0.9) },
    ['valkyrie']     = { vec3(-1.10, -1.0, -0.2), vec3(1.10, -1.0, -0.2) },
    ['savage']       = { vec3(-0.9, -2.7, 0.2), vec3(0.9, -2.7, 0.2) },
    ['skylift']      = { vec3(-1.50, 3.3, -1.5), vec3(1.50, 3.3, -1.5) },
    ['cargobob']     = { vec3(-1.35, -2.7, -0.2), vec3(1.35, -2.7, -0.2) },
    ['cargobob2']    = { vec3(-1.35, -2.7, -0.2), vec3(1.35, -2.7, -0.2) },
    ['cargobob3']    = { vec3(-1.35, -2.7, -0.2), vec3(1.35, -2.7, -0.2) },
    ['buzzard']      = { vec3(-0.8, -1.2, 0.6), vec3(0.8, -1.2, 0.6) },
    ['buzzard2']     = { vec3(-0.8, -1.2, 0.6), vec3(0.8, -1.2, 0.6) },
    ['seasparrow3']  = { vec3(-0.8, -1.2, 0.0), vec3(0.8, -1.2, 0.0) },
    ['svolito']      = { vec3(-0.82, -2.3, -0.4), vec3(0.82, -2.3, -0.4) },
    ['svolito2']     = { vec3(-0.82, -2.3, -0.4), vec3(0.82, -2.3, -0.4) },
    ['sparrow']      = { vec3(-0.7, -0.1, 0), vec3(0.7, -0.1, 0) },
    ['sparrow2']     = { vec3(-0.7, -0.1, 0), vec3(0.7, -0.1, 0) },
    ['sparrow3']     = { vec3(-0.7, -0.1, 0), vec3(0.7, -0.1, 0) },
    ['annihl']       = { vec3(-1.0, -3.0, 0.4), vec3(1.0, -3.0, 0.4) },
    ['annihlator2']  = { vec3(-1.26, -3.5, 0.55), vec3(1.26, -3.5, 0.55) },
    -- Boats
    ['avisa']        = { vec3(-0.725, -2.0, 1.125), vec3(0.725, -2.0, 1.125) },
    ['submersible']  = { vec3(-1.55, -1.5, 1.3), vec3(1.55, -1.5, 1.3) },
    ['submersible2'] = { vec3(0.0, 0.0, 0.0), vec3(1.55, -1.5, 1.3) },
    ['predator']     = { vec3(-1.51, -4.0, 0.68), vec3(1.51, -4.0, 0.68) },
    ['tug']          = { vec3(-3.2, -3.65, 1.5), vec3(3.2, -3.65, 1.5) },
    ['toro']         = { vec3(-1.45, -1.75, 0.70), vec3(1.45, -1.75, 0.7) },
    ['toro2']        = { vec3(-1.45, -1.75, 0.70), vec3(1.45, -1.75, 0.7) },
    ['tropic']       = { vec3(-1.2, 0.5, 0.65), vec3(1.2, 0.5, 0.65) },
    ['tropic2']      = { vec3(-1.2, 0.5, 0.65), vec3(1.2, 0.5, 0.65) },
    ['longfin']      = { vec3(-1.6, 0.5, 0.75), vec3(1.6, 0.5, 0.75) },
    ['speeder']      = { vec3(-1.4, -2, 0.8), vec3(1.4, -2, 0.8) },
    ['speeder2']     = { vec3(-1.4, -2, 0.8), vec3(1.4, -2, 0.8) },
    ['suntrap']      = { vec3(-1.25, 0.0, 0.57), vec3(1.25, 0.0, 0.57) },
    ['squalo']       = { vec3(-1.45, 0.0, 0.57), vec3(1.45, 0.0, 0.57) },
    ['seashark']     = { vec3(-0.4, 0.8, 0.8), vec3(0.4, 0.8, 0.8) },
    ['seashark2']    = { vec3(-0.4, 0.8, 0.8), vec3(0.4, 0.8, 0.8) },
    ['seashark3']    = { vec3(-0.4, 0.8, 0.8), vec3(0.4, 0.8, 0.8) },
    ['marquis']      = { vec3(-2.15, 0.0, 0.93), vec3(2.15, 0.0, 0.93) },
    ['jetmax']       = { vec3(-1.25, -3.0, 0.55), vec3(1.25, -3.0, 0.55) },
    ['dinghy']       = { vec3(-0.75, -3.0, 0.8), vec3(0.75, -3.0, 0.8) },
    ['dinghy2']      = { vec3(-0.75, -3.0, 0.8), vec3(0.75, -3.0, 0.8) },
    ['dinghy3']      = { vec3(-0.75, -3.0, 0.8), vec3(0.75, -3.0, 0.8) },
    ['dinghy4']      = { vec3(-0.75, -3.0, 0.8), vec3(0.75, -3.0, 0.8) },
    ['smallboat']    = { vec3(-0.75, -2.6, 0.5), vec3(0.75, -2.6, 0.5) },
    ['largeboat']    = { vec3(-2.2, -3.5, 0.8), vec3(2.2, -3.5, 0.8) },
    ['hillboaty']    = { vec3(-1.2, -1.2, 0.8), vec3(1.2, -1.2, 0.8) },
    -- Planes
    ['seabreeze']    = { vec3(-0.7, -0.1, 0.5), vec3(0.7, -0.1, 0.5) },
    ['microlight']   = { vec3(-0.4, -0.75, 0.1), vec3(0.4, -0.75, 0.1) },
    ['nimbus']       = { vec3(-1.0, 2.5, -0.7), vec3(1.0, 2.5, -0.7) },
    ['luxor2']       = { vec3(-1.0, 0.5, -0.4), vec3(1.0, 0.5, -0.4) },
    ['velum2']       = { vec3(-0.9, 2.0, -0.3), vec3(0.9, 2.0, -0.3) },
    ['dodo']         = { vec3(-0.7, 1.4, 0.3), vec3(0.7, 1.4, 0.3) },
    ['vestra']       = { vec3(-0.68, 2.65, 0.12), vec3(0.68, 2.65, 0.12) },
    ['velum']        = { vec3(-0.9, 2.0, -0.3), vec3(0.9, 2.0, -0.3) },
    ['shamal']       = { vec3(-1.0, 0.5, -0.4), vec3(1.0, 0.5, -0.4) },
    ['mammatus']     = { vec3(-0.8, 2.4, 0.5), vec3(0.8, 2.4, 0.5) },
    ['stunt']        = { vec3(-0.65, 1.4, 0.2), vec3(0.65, 1.4, 0.2) },
    ['luxor']        = { vec3(-1.0, 0.5, -0.4), vec3(1.0, 0.5, -0.4) },
    ['duster']       = { vec3(-0.71, 2.4, -0.1), vec3(0.71, 2.4, -0.1) },
    ['cuban800']     = { vec3(-0.71, 2.4, -0.1), vec3(0.71, 2.4, -0.1) },
}

--──────────────────────────────────────────────────────────────────────────────
-- Fuel Consumption & Prices                                                   [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Global and per-fuel-type consumption rates, plus pricing.
-- [ADV]  If you enable API pricing, secure your token and handle rate limits.
--──────────────────────────────────────────────────────────────────────────────
Config.FuelConsumptionRate     = 8.0 -- [EDIT] Global baseline (game handling may apply)

Config.FuelConsumption         = { -- [EDIT] Per fuel type multipliers
    petrol   = 10.0,             -- [EDIT]
    diesel   = 5.0,              -- [EDIT]
    electric = 5.0,              -- [EDIT]
}

Config.ApiToken                = 'apikey 4xIJUdjYld3WlZ3xwe3lx3:5SUseocIItXTzBoDNb2Xcx' -- [ADV] External pricing API token
Config.FuelPrices              = {                                       -- [EDIT] Manual prices (used if API disabled/not implemented in code path)
    petrol   = 5.0,                                                      -- [EDIT]
    diesel   = 10.0,                                                     -- [EDIT]
    electric = 5.0,                                                      -- [EDIT]
}

--──────────────────────────────────────────────────────────────────────────────
-- Per-Model Fuel Types & Usage                                                [ADV]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Loads model_fuel_types.json and maps joaat(model) -> fuel type & rate.
--        You can override or add entries here if needed.
--──────────────────────────────────────────────────────────────────────────────
Config.VehicleFuelTypesByModel = {}                                                                       -- [AUTO]
local MODEL_FUEL_TYPES         = json.decode(LoadResourceFile(GetCurrentResourceName(), 'model_fuel_types.json')) -- [CORE]
for _, v in pairs(MODEL_FUEL_TYPES) do                                                                    -- [CORE]
    Config.VehicleFuelTypesByModel[joaat(v.model)] = {                                                    -- [AUTO]
        model       = v.model,                                                                            -- [AUTO]
        fuelType    = v.fuel_type,                                                                        -- [AUTO]
        consumption = Config.FuelConsumption[v.fuel_type],                                                -- [AUTO]
    }
end

-- Optional quick per-model overrides (example) ------------------------------- --
Config.VehicleConsumptions      = { -- [ADV]
    ['t20'] = 2.0,             -- [ADV]
}

-- Blacklist (no fuel system) ------------------------------------------------ --
Config.VehiclesBlacklist        = { -- [EDIT]
    -- 't20',
    -- 'zentorno',
}

--──────────────────────────────────────────────────────────────────────────────
-- Fuel Delivery Job                                                           [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Enable a refueling job loop that maintains station fuel levels.
--──────────────────────────────────────────────────────────────────────────────
Config.EnableJob                = true  -- [EDIT]
Config.EveryStationHasFuelLevel = true  -- [EDIT] Tracks station levels
Config.JerryCanStationLevel     = 20    -- [EDIT] Level reduced when jerrycan taken
Config.DivideStationLevel       = 2     -- [EDIT] Higher = slower depletion

-- [AUTO] Keep consistency if job disabled
if not Config.EnableJob then
    Config.EveryStationHasFuelLevel = false                                      -- [AUTO]
    print('EveryStationHasFuelLevel is disabled because EnableJob is disabled.') -- [AUTO]
end

-- Job Blip ------------------------------------------------------------------- --
Config.JobBlip             = {                -- [EDIT]
    title  = 'Fuel Delivery',                 -- [EDIT]
    color  = 12,                              -- [EDIT]
    coords = vec3(1721.87, -1557.67, 111.65), -- [EDIT]
    id     = 477,                             -- [EDIT]
}

Config.AddStationFuelLevel = { 10, 20 } -- [EDIT] Random fuel added per delivery (min,max)

-- NPC / Locations / Vehicles ------------------------------------------------- --
Config.PedType             = 'a_m_m_ktown_01'                          -- [EDIT]
Config.PedCoords           = vector4(1721.87, -1557.67, 111.65, 243.12) -- [EDIT]
Config.TruckSpawnLocation  = vec4(1733.08, -1556.68, 112.66, 252.0)    -- [EDIT]
Config.TankerSpawnLocation = vec4(1738.34, -1530.89, 112.65, 252.0)    -- [EDIT]
Config.RefuelLocation      = vec4(1688.59, -1460.29, 111.65, 254.5)    -- [EDIT]
Config.TruckToSpawn        = 'packer'                                  -- [EDIT]
Config.TrailerToSpawn      = 'tanker2'                                 -- [EDIT]

-- Payments / Costs / Mechanics ---------------------------------------------- --
Config.PayPerFueling       = math.random(1200, 2500) -- [ADV] Uses runtime RNG once at load
Config.PayType             = 'bank'                -- [EDIT] 'bank' or 'money'
Config.TruckPrice          = 5000                  -- [EDIT]
Config.TankPrice           = 2000                  -- [EDIT]
Config.MaxFuelDeliveries   = 5                     -- [EDIT]
Config.RefuelDuration      = 15000                 -- [EDIT] ms

--──────────────────────────────────────────────────────────────────────────────
-- Debug Options                                                               [EDIT]
--──────────────────────────────────────────────────────────────────────────────
-- [INFO] Enable during development only; may spam console and speed up flows.
--──────────────────────────────────────────────────────────────────────────────
Config.Debug               = true -- [EDIT]
Config.ZoneDebug           = true -- [EDIT]

-- [AUTO] Debug-time tweaks
if Config.Debug then
    Config.RefuelDuration = 100 -- [AUTO] Faster refuel for testing
end