VE Lua Documentation

Press F to search!

onCouplerFound

Definition


-- @/lua/vehicle/energyStorage.lua:183

local function onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  for i = 1, storageCount, 1 do
    local storage = orderedStorages[i]
    if storage.onCouplerFound then
      storage:onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
    end
  end
end

Callers

@/lua/vehicle/powertrain.lua

local function onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  for i = 1, deviceCount, 1 do
    if device.onCouplerFound then
      device:onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
    end
@/lua/vehicle/controller/advancedCouplerControl.lua

local function onCouplerFound(nodeId, obj2id, obj2nodeId)
  --dump(couplerGroup)
@/lua/vehicle/controller/couplings/fifthwheel.lua

local function onCouplerFound(nodeId, obj2id, obj2nodeId)
  --print("found")
@/lua/vehicle/main.lua

function onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  -- print('couplerFound'..','..nodeId..','..obj2nodeId..','..obj2id)
  beamstate.couplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  controller.onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  powertrain.onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  controller.onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  powertrain.onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  energyStorage.onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  powertrain.onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  energyStorage.onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  extensions.hook("onCouplerFound", nodeId, obj2id, obj2nodeId, nodeDist)
@/lua/vehicle/controller.lua

local function onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
  for i = 1, couplerFoundEventCount, 1 do
      if controller.onCouplerFound ~= nil then
        print("  sortedControllers[" .. i .. "].onCouplerFound(nodeId, obj2id, obj2nodeId) -- " .. tostring(controller.typeName))
      end
@/lua/vehicle/energyStorage.lua
    if storage.onCouplerFound then
      storage:onCouplerFound(nodeId, obj2id, obj2nodeId, nodeDist)
    end
@/lua/vehicle/controller/controllerTemplate.lua

-- local function onCouplerFound(nodeId, obj2id, obj2nodeId)
-- end