VE Lua Documentation

Press F to search!

shiftToGearIndex

Definition


-- @/lua/vehicle/controller/vehicleController/vehicleController.lua:629

local function shiftToGearIndex(index)
  controlLogicModule.shiftToGearIndex(index)
end

Callers

@/lua/vehicle/drivetrain.lua
local function shiftToGear(gear)
  controller.mainController.shiftToGearIndex(gear)
end
@/lua/vehicle/extensions/gameplayInterfaceModules/interactController.lua

local function shiftToGearIndex(params)
  local dataTypeCheck, dataTypeError = checkTableDataTypes(params, {"number"})
  local gearIndex = params[1]
  controller.mainController.shiftToGearIndex(gearIndex)
end
@/lua/vehicle/controller/vehicleController/shiftLogic/dctGearbox.lua

local function shiftToGearIndex(index)
  local desiredMode = automaticHandling.hShifterModeLookup[index]
@/lua/vehicle/controller/vehicleController/shiftLogic/cvtGearbox2.lua

local function shiftToGearIndex(index)
  local desiredMode = automaticHandling.hShifterModeLookup[index]
@/lua/vehicle/controller/vehicleController/shiftLogic/manualGearbox.lua

local function shiftToGearIndex(index)
  local prevGearIndex = gearbox.gearIndex
  if data.grb_idx then
    shiftToGearIndex(data.grb_idx)
  end
@/lua/vehicle/extensions/tech/CANBus/ProjectBavariaShifter.lua
  if parkButtonState ~= parkButtonStates.idle and gear ~= "P" then
    controller.mainController.shiftToGearIndex(1)
  else
      if gear == "S" or gear == "M" then
        controller.mainController.shiftToGearIndex(2)
      end
        if gear == "P" or gear == "N" then
          controller.mainController.shiftToGearIndex(-1)
        elseif gear == "D" then
        elseif gear == "D" then
          controller.mainController.shiftToGearIndex(0)
        end
        if gear == "P" or gear == "N" or gear == "D" then
          controller.mainController.shiftToGearIndex(-1)
        end
        if gear == "P" or gear == "N" then
          controller.mainController.shiftToGearIndex(2)
        elseif gear == "R" then
        elseif gear == "R" then
          controller.mainController.shiftToGearIndex(0)
        end
        if gear == "P" or gear == "R" or gear == "N" then
          controller.mainController.shiftToGearIndex(2)
        end
      if gear == "D" then
        controller.mainController.shiftToGearIndex(3)
      end
        if gear == "S" then
          controller.mainController.shiftToGearIndex(6)
        elseif gear == "M" and electrics.values.gearIndex > 1 then
        if gear == "S" then
          controller.mainController.shiftToGearIndex(6)
        elseif gear == "M" then
@/lua/vehicle/controller/vehicleController/shiftLogic/automaticGearbox.lua

local function shiftToGearIndex(index)
  local desiredMode = automaticHandling.hShifterModeLookup[index]
@/ui/ui-vue/mockdata/inputBindings.js
                "title": "ui.inputActions.vehicle.gear1.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 1)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 1)",
                "order": 13.1,
                "title": "ui.inputActions.vehicle.gear3.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 3)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 3)",
                "order": 13.3,
                "title": "ui.inputActions.vehicle.gear6.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 6)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 6)",
                "order": 13.6,
                "title": "ui.inputActions.vehicle.gear7.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 7)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 7)",
                "order": 13.7,
                "title": "ui.inputActions.vehicle.gear5.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 5)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 5)",
                "order": 13.5,
                "title": "ui.inputActions.vehicle.gear4.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 4)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 4)",
                "order": 13.4,
                "title": "ui.inputActions.vehicle.gear8.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 8)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 8)",
                "order": 13.8,
                "title": "ui.inputActions.vehicle.gear2.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 2)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex( 2)",
                "order": 13.2,
                "title": "ui.inputActions.vehicle.gearR.title",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex(-1)",
                "onUp": "controller.mainController.shiftToGearIndex(0)",
                "onDown": "controller.mainController.shiftToGearIndex(-1)",
                "order": 12,
                "title": "ui.inputActions.vehicle.gearN.title",
                "onDown": "controller.mainController.shiftToGearIndex( 0)",
                "order": 13.9,
@/lua/vehicle/controller/vehicleController/shiftLogic/sequentialGearbox.lua

local function shiftToGearIndex(index, ignoreSequentialBounds)
  local prevGearIndex = gearbox.gearIndex
  if data.grb_idx then
    shiftToGearIndex(data.grb_idx, true)
  end
@/lua/vehicle/controller/vehicleController/shiftLogic/cvtGearbox.lua

local function shiftToGearIndex(index)
  local desiredMode = automaticHandling.hShifterModeLookup[index]
@/lua/vehicle/controller/vehicleController/shiftLogic/electricMotor.lua

local function shiftToGearIndex(index)
  local desiredMode = automaticHandling.hShifterModeLookup[index]
@/lua/vehicle/extensions/tech/adasUltrasonic.lua
    brake = 1
    controller.mainController.shiftToGearIndex(0)
  else
@/lua/vehicle/controller/vehicleController/vehicleController.lua
  setGearboxBehavior("realistic")
  controlLogicModule.shiftToGearIndex(gearIndex)
end
local function shiftToGearIndex(index)
  controlLogicModule.shiftToGearIndex(index)
end