getCurrentVehicle
Definition
-- @/lua/ge/extensions/freeroam/freeroamConfigurator.lua:459
-- Get current vehicle
M.getCurrentVehicle = function()
return currentConfiguration.vehicle
end
Callers
@/lua/ge/extensions/career/career.lua
end
data.currentVehicle = career_modules_inventory.getCurrentVehicle() and career_modules_inventory.getVehicles()[career_modules_inventory.getCurrentVehicle()]
data.vehicleCount = #career_modules_inventory.getVehicles()
end
data.currentVehicle = career_modules_inventory.getCurrentVehicle() and career_modules_inventory.getVehicles()[career_modules_inventory.getCurrentVehicle()]
data.vehicleCount = #career_modules_inventory.getVehicles()
@/lua/ge/extensions/career/modules/vehicleShopping.lua
for inventoryId, vehId in pairs(career_modules_inventory.getMapInventoryIdToVehId()) do
if inventoryId ~= career_modules_inventory.getCurrentVehicle() then
career_modules_inventory.removeVehicleObject(inventoryId)
@/lua/ge/extensions/gameplay/missions/missionScreen.lua
if usesOwnVehicle then
local currentVehicle = career_modules_inventory.getCurrentVehicle()
if not currentVehicle then
-- getting repair status is async though.
local currentVehicle = career_modules_inventory.getCurrentVehicle()
if not currentVehicle then
@/lua/ge/extensions/career/modules/spawnPoints.lua
if not career_modules_linearTutorial.getTutorialFlag('spawnPointDiscoveryEnabled') then return end
if not (getCurrentLevelIdentifier() and career_modules_inventory and career_modules_inventory.getCurrentVehicle() and getPlayerVehicle(0)) then return end
lastUpdateTimer = lastUpdateTimer + dtReal
@/lua/ge/extensions/core/recoveryPrompt.lua
if career_career.isActive() then
if career_modules_inventory.getCurrentVehicle() then
career_modules_inventory.updatePartConditions(nil, career_modules_inventory.getCurrentVehicle(), function() career_modules_insurance_insurance.startRepair(nil) end)
if career_modules_inventory.getCurrentVehicle() then
career_modules_inventory.updatePartConditions(nil, career_modules_inventory.getCurrentVehicle(), function() career_modules_insurance_insurance.startRepair(nil) end)
end
@/lua/ge/extensions/career/modules/partInventory.lua
-- TODO why does this need to be async?
if updateVehicleParts and (career_modules_inventory.getCurrentVehicle() and career_modules_inventory.getVehicles()[career_modules_inventory.getCurrentVehicle()].partConditions) then
updateVehicleMaps()
-- TODO why does this need to be async?
if updateVehicleParts and (career_modules_inventory.getCurrentVehicle() and career_modules_inventory.getVehicles()[career_modules_inventory.getCurrentVehicle()].partConditions) then
updateVehicleMaps()
partInventoryOpen = true
currentVehicleInventoryIdForMenu = career_modules_inventory.getCurrentVehicle()
if not currentVehicleInventoryIdForMenu then
@/lua/ge/extensions/flowgraph/nodes/mission/postClean.lua
-- skip repair if the player uses their own vehicle in career
if career_modules_inventory and career_modules_inventory.getCurrentVehicle() then
doRepair = false
@/lua/ge/extensions/career/modules/inventory.lua
local function getCurrentVehicle()
return currentVehicle
local function debugRespawnCurrentVehicle()
local inventoryId = getCurrentVehicle()
if not inventoryId then return end
@/lua/ge/extensions/career/modules/insurance/insurance.lua
if career_modules_inventory.getVehicleIdFromInventoryId(vehInfo.id) then -- vehicle is currently spawned
if vehInfo.id == career_modules_inventory.getCurrentVehicle() then
startRepairVehInfo = {inventoryId = vehInfo.id, repairTime = repairTime}
local function startRepair(vehInvId, repairOptionData, callback)
vehInvId = vehInvId or career_modules_inventory.getCurrentVehicle()
repairOptionData = (repairOptionData and type(repairOptionData) == "table") and repairOptionData or {}
@/lua/ge/extensions/gameplay/garageMode.lua
local function getCurrentVehicle()
local result = nil
if career_career.isActive() then
lastOwnedVehicleId = career_modules_inventory.getCurrentVehicle()
end
activateGarageModeOnLevelLoad = true
core_levels.startLevel(garageLevelPath, true, nil, getCurrentVehicle())
end
-- load the test level
freeroam_freeroam.startFreeroam(testLevelPath, nil, nil, getCurrentVehicle())
end
@/lua/ge/extensions/gameplay/missions/missionManager.lua
-- skip this step if the player is not seated in a vehicle they own
if not career_modules_inventory.getCurrentVehicle() then step.complete = true return end
@/lua/ge/extensions/career/modules/fuel.lua
if career_career.isActive() then
local currentVehicleId = career_modules_inventory.getCurrentVehicle()
if currentVehicleId then
local function startTransaction(_gasStation)
if not career_modules_inventory.getCurrentVehicle() then return end
gasStation = _gasStation
local function startFuelingTank(index)
if career_modules_inventory.getCurrentVehicle() then
local veh = getPlayerVehicle(0)
else
career_modules_inventory.updatePartConditions(nil, career_modules_inventory.getCurrentVehicle())
end
if career_modules_inventory.getVehicles()[career_modules_inventory.getCurrentVehicle()].loanType == "work" then
ui_message(string.format("Fuel paid for by the company"), 6, "refueling")
@/lua/ge/extensions/gameplay/missions/missionTypes/flowMission.lua
if setupModule.includePlayerVehicle or lastIdx == 1 then
local thumbnail = career_career.isActive() and career_modules_inventory and career_modules_inventory.getVehicleThumbnail(career_modules_inventory.getCurrentVehicle())
thumbnail = thumbnail or gameplay_missions_missions.getNoVehicleThumbFilepath()
@/lua/ge/extensions/career/modules/partShopping.lua
local function startShopping(inventoryId, _originComputerId)
currentVehicle = inventoryId or career_modules_inventory.getCurrentVehicle()
if not currentVehicle then