VE Lua Documentation

Press F to search!

queueObjectLuaCommand

Definition


-- @/=[C]:-1
function queueObjectLuaCommand(...)

Callers

@/lua/vehicle/controller/couplings/fifthwheel.lua
      ]], objectId, M.name, "fifthwheel_v2")
  obj:queueObjectLuaCommand(obj2Id, kingpinCmd)
  kingpinRequestTimeouts[obj2Id] = kingpinRequestTimeouts[obj2Id] or 1
@/lua/vehicle/extensions/chassisData.lua
  if chassisData then
    obj:queueObjectLuaCommand(objID, string.format("%s(%q)", callback, jsonEncode(chassisData)))
  end
@/lua/vehicle/controller/couplings/kingpin.lua
    --dump(fifthwheelCmd)
    obj:queueObjectLuaCommand(objId, fifthwheelCmd)
  end
@/lua/vehicle/beamstate.lua
local function sendExportCouplerData(obj2Id, obj2nodeId, data)
  obj:queueObjectLuaCommand(obj2Id, "beamstate.exportCouplerData(" .. tostring(obj2nodeId) .. ", " .. serialize(data) .. ")")
  M.updateRemoteElectrics = updateRemoteElectrics
    --print("couplerAttached -> beamstate.exportCouplerData("..tostring(obj2nodeId)..", "..serialize(data)..")")
    -- obj:queueObjectLuaCommand(obj2id, "beamstate.exportCouplerData(" .. tostring(obj2nodeId) .. ", " .. serialize(data) .. ")")
    -- M.updateRemoteElectrics = updateRemoteElectrics
      end
      obj:queueObjectLuaCommand(coupler.obj2id, string.format("beamstate.importCouplerData(%s, %s)", coupler.obj2nodeId, serialize(data)))
    end