unpack
Definition
-- @/=[C]:-1
function unpack(...)
Callers
@/lua/vehicle/partCondition.lua
local visualState = partCondition.visualState
--odometer, integrityValue, visualValue, integrityState, visualState = unpack(partCondition, 1, table.maxn(partCondition))
integrity = integrityState or integrityValue
@/lua/ge/extensions/editor/gen/exp_meshexplorer.lua
end
return unpack(alib)
end
local ind = U.index(fsnode.astep, val)
fsnode.astep = {unpack(fsnode.astep,1,ind[1])}
local path = ''
end)
-- lo('?? dir_up:'..tostring(ind)..':'..path..':'..tostring({unpack(fsnode.astep,1,ind[1])}))
fsnode.path = path
@/lua/common/jbeam/slotSystem.lua
for i, j in ipairs(unifyJournal) do
unifyParts(unpack(j))
end
@/lua/ge/main.lua
function physicsEngineEvent(...)
local args = unpack({...})
extensions.hook('onPhysicsEngineEvent', args)
@/lua/ge/extensions/flowgraph/nodes/mission/ARunForLife.lua
local newRot = propsInfo[randomPropId].correctedRot
if newRot then rot = quatFromEuler(unpack(newRot)) end
end
data.color = ColorF(unpack(color))
data.position = drawPos
data = decals[o + 1]
data.color = ColorF(unpack(red))
data.position = vec3(plPos.x, camPos.y, Z)
@/lua/ge/extensions/ui/liveryEditor/layers/fill.lua
elseif #color == 3 then
local r, g, b = unpack(color)
layer.color = Point4F(r, g, b, 1)
@/lua/ge/extensions/editor/gen/exp_solidflex.lua
end
return unpack(alib)
end
@/gameplay/missionTypes/cannon/customNodes/cannonBallDistNode.lua
local endPos = targetPos - vec3(unpack(self.pinIn.camOffsetPos.value))
core_camera.setPosRot(0,
@/lua/common/libs/lunajson/lunajson/sax.lua
local num = char(unpack(buf))
num = fixedtonumber(num)
@/lua/ge/extensions/editor/gen/world.lua
local s = ''
U.map({unpack(atkn, 1, n)},function(k,v)
s = s..'_'..v
table.sort(aj)
local mi,ma = math.min(unpack(row)), math.max(unpack(row))
table.sort(aj)
local mi,ma = math.min(unpack(row)), math.max(unpack(row))
@/lua/ge/extensions/editor/api/objectHistoryActions.lua
local function callHookUndo(actionData)
extensions.hook(actionData.hookName, unpack(actionData.args))
end
local function callHookRedo(actionData)
extensions.hook(actionData.hookName, unpack(actionData.args))
end
@/lua/ge/extensions/scenario/scenarios.lua
local args = {...}
return scenario_scenarios[key](unpack(args))
end
@/lua/ge/extensions/gameplay/garageMode.lua
if vehicleToLoad then
core_vehicles.replaceVehicle(unpack(vehicleToLoad))
vehicleToLoad = nil
@/lua/ge/extensions/core/vehicles.lua
elseif type(maybeVehicle) == "table" then
loadCustomVehicle(unpack(maybeVehicle))
return true
@/lua/vehicle/extensions/test/csvMetrics.lua
csvData = csvWriter.newCSV(unpack(header))
enabled = true
csvData:add(unpack(dataRow))
end
@/lua/ge/extensions/ui/liveryEditor.lua
local showDecalCursor = function(show)
local r, g, b = unpack(api.getDecalColor():toTable())
api.setDecalColor(Point4F.fromTable({r, g, b, show and 1 or 0}))
@/lua/ge/extensions/editor/gen/utils.lua
end
return unpack(alib)
end
@/lua/common/libs/lua-MessagePack/MessagePack.lua
function m.unpack(s)
checktype('unpack', 1, s, 'string')
@/lua/vehicle/extensions/gameplayInterfaceModules/interactController.lua
local eventName = params[1]
local eventParams = {unpack(params, 2)}
controller.onGameplayEvent(eventName, eventParams)
@/lua/ge/extensions/editor/gen/lib/jbeam.lua
end
return unpack(alib)
end
@/lua/common/libs/luamqtt/mqtt/protocol5.lua
for _, item in ipairs(order) do
local prop_id, name, value = unpack(item)
if property_multiple[prop_id] then
@/lua/ge/extensions/flowgraph/nodes/gameplay/decalCircle.lua
self.colorCache[k] = deepcopy(self.pinIn[k].value or pin.default)
self.colorFCache[k] = ColorF(unpack(self.colorCache[k]))
end
data.texture = self.pinIn.decalPath.value or defaultDecalPath
data.scale:set(unpack(self.pinIn.decalScale.value or defaultDecalScale))
@/lua/common/libs/LuaIRC/init.lua
if handler then
return handler(self, prefix, unpack(params))
else
@/lua/ge/extensions/editor/mapSensorEditor.lua
for i = 1, #activeSensors do
local sensorType, sensorId = unpack(activeSensors[i])
local conf = extensions.tech_sensors.getSensorConfiguration(sensorType, sensorId)
@/lua/common/libs/slaxml/slaxml.lua
if currentElement[3] then currentElement[2] = nsForPrefix(currentElement[3]) end
if self._call.startElement then self._call.startElement(unpack(currentElement)) end
if self._call.attribute then
if currentAttributes[i][4] then currentAttributes[i][3] = nsForPrefix(currentAttributes[i][4]) end
self._call.attribute(unpack(currentAttributes[i]))
end
pop(nsStack)
if self._call.closeElement then self._call.closeElement(unpack(currentElement)) end
end
@/lua/ge/extensions/ui/liveryEditor/layerEdit.lua
local showCursor = function(show)
local r, g, b = unpack(api.getDecalColor():toTable())
api.setDecalColor(Point4F.fromTable({r, g, b, show and 1 or 0}))
if properties.color then
local r, g, b = unpack(properties.color)
local color = Point4F(r, g, b, 1)
@/lua/ge/extensions/scenario/busdriver.lua
--wpList = scenario_scenarios.getScenario().lapConfig
--getObjectByID(vehicleId):queueLuaCommand("controller.getController('busNextStopDsp').onDepartedStop( "..dumps({unpack(wpList, 1,#wpList)}).." )")
@/lua/common/tech/techCommunication.lua
if message ~= nil then
local request = Request:new(mp.unpack(message), skt)
if callRequestHandler(E, request) == false then
@/lua/common/libs/lua-websockets/websocket/frame.lua
end
local xored = schar(unpack(transformed,1,#original))
tinsert(transformed_arr,xored)
@/lua/common/libs/copas/copas/limit.lua
copas.sleep(-1) -- go to sleep until being woken
local suc, err = pcall(task, unpack(carg)) -- start the task
self:removethread(coroutine.running()) -- dismiss ourselves
@/lua/ge/extensions/flowgraph/nodes/gameplay/decalPath.lua
forwardVec = vec3(0, 0, 0),
color = ColorF(unpack(self.pinIn.decalColor.value or defaultDecalColor)),
scale = vec3(8, 12, 4),
@/lua/ge/extensions/freeroam/bigMapMode.lua
local lineWidth = (camHeightAboveTerrain * camData.res.fov) / 20000
local h, s, v = RGBtoHSV(unpack(core_groundMarkers.color)) -- groundMarkerColor
local r, g, b = HSVtoRGB(h, s, 1)
local lineWidth = (camHeightAboveTerrain * camData.res.fov) / 20000
local h, s, v = RGBtoHSV(unpack(core_groundMarkers.color or {0.1, 0.25, 0.5})) -- groundMarkerColor
local r, g, b = HSVtoRGB(h, 0.3, 1) -- routePreviewCol
@/lua/ge/ge_utils.lua
local geluaCommand = string.format('local args = %s; %s(unpack(args, 1, table.maxn(args)))', 'deserialize(%q)', geluaFunctionName)
local cmd = string.format('obj:queueGameEngineLua(string.format(%q, serialize({%s, unpack(%s)})))', geluaCommand, vluaCommand, serialize({...}))
local geluaCommand = string.format('local args = %s; %s(unpack(args, 1, table.maxn(args)))', 'deserialize(%q)', geluaFunctionName)
local cmd = string.format('obj:queueGameEngineLua(string.format(%q, serialize({%s, unpack(%s)})))', geluaCommand, vluaCommand, serialize({...}))
veh:queueLuaCommand(cmd)
@/lua/ge/extensions/flowgraph/nodes/gameplay/decalSingle.lua
forwardVec = quat(self.pinIn.rot.value) * vec3(0, 1, 0),
color = ColorF(unpack(clr)),
scale = vec3(self.pinIn.scl.value or defaultDecalScale),
@/lua/ge/extensions/editor/missionEditor.lua
end
local csvdata = require('csvlib').newCSV("Mission ID", "Mission Name", "Mission Type", "Branch", "Leagues", "Tier", "Star Id", "Star Label", "Star Type", "money", "vouchers",unpack(branchNames))
local starType = instance.careerSetup._activeStarCache.defaultStarKeysByKey[key] and "default" or "bonus"
csvdata:add(mission.id, translatedName, missionType, firstBranch, leagueNames, instance.unlocks.maxBranchlevel, key, translatedStarLabel, starType, rewards.money or 0,rewards.vouchers or 0,unpack(branchRewards))
end
local rewards = {}
for _, key in ipairs({"money", "vouchers",unpack(branchNames)}) do
if row[key] ~= 0 then
@/lua/ge/extensions/gameplay/traffic/vehicle.lua
if not v.vLua then
v.func(unpack(v.args))
else
@/lua/common/extensions.lua
profilerPopEvent(name)
return unpack(results)
end
@/gameplay/missionTypes/collection/customNodes/collectionMarkersNode.lua
clr = clr - clr%(0.05)
clrByNum[clr] = clrByNum[clr] or color(unpack(rainbowColor(36,(0.05+(0.75*clr))*12)))
end
clr = clr - clr%(0.05)
clrByNum[clr] = clrByNum[clr] or color(unpack(rainbowColor(36,(0.05+(0.75*clr))*12)))
end
@/lua/common/guihooks.lua
end
csvfile = require('csvlib').newCSV(unpack(keys))
csvfilename = filename or string.format("graphcsv.%s.csv", os.date("%Y-%d-%mT%H_%M_%S"))
end
csvfile:add(unpack(row))
end
@/lua/vehicle/extensions/tech/trailSim.lua
if hasRemoteData then
guihooks.graph(unpack(data))
end
@/lua/ge/extensions/core/jobsystem.lua
-- runs things in the foreground
fct({yield = function() end, sleep = function() end}, unpack({...}))
return
end
create(fct, maxdt, unpack({...}))
end
if co.args and next(co.args) then
errorfree, value = coroutine.resume(co.t, co, unpack(co.args))
else
@/lua/vehicle/electrics.lua
if smootherType == "exponential" then
return newExponentialSmoothing(unpack(params))
elseif smootherType == "temporal" then
elseif smootherType == "temporal" then
return newTemporalSmoothing(unpack(params))
elseif smootherType == "temporalNonLinear" then
elseif smootherType == "temporalNonLinear" then
return newTemporalSmoothingNonLinear(unpack(params))
end
@/lua/ge/map.lua
self.update = nop
self.eventFun(unpack(self.params))
end
local function onDeserialize(s)
isEditorEnabled, buildSerial = unpack(s)
buildSerial = buildSerial or -1
@/lua/ge/extensions/ui/liveryEditor/layerAction.lua
local showCursor = function(show)
local r, g, b = unpack(api.getDecalColor():toTable())
api.setDecalColor(Point4F.fromTable({r, g, b, show and 1 or 0}))
-- hide layer by setting alpha to 0. Using enabled property will update UI styling and component rerenders
local r, g, b = unpack(layer.color:toTable())
layer.color = Point4F.fromTable({r, g, b, show and 1 or 0})
@/lua/vehicle/controller/tech/vehicleSystemsCoupling.lua
local function createCSV(sendKeys, receiveKeys)
csvSendData = csvWriter.newCSV('time', unpack(sendKeys))
csvReceiveData = csvWriter.newCSV('time', unpack(receiveKeys))
csvSendData = csvWriter.newCSV('time', unpack(sendKeys))
csvReceiveData = csvWriter.newCSV('time', unpack(receiveKeys))
csvPhysicsSteps = csvWriter.newCSV('time')
if debugFile then
csvSendData:add(os.clockhp(), unpack(messageToSimulink))
end
if debugFile then
csvReceiveData:add(os.clockhp(), unpack(decodedMessageFromSimulink))
end
@/lua/ge/extensions/editor/sensorConfigurationEditor.lua
for i = 1, #activeSensors do
local sensorType, sensorId = unpack(activeSensors[i])
local conf = extensions.tech_sensors.getSensorConfiguration(sensorType, sensorId)
@/lua/ge/extensions/flowgraph/nodes/gameplay/decalLine.lua
self.colorCache[k] = deepcopy(self.pinIn[k].value or pin.default)
self.colorFCache[k] = ColorF(unpack(self.colorCache[k]))
end
data.texture = self.pinIn.decalPath.value or defaultDecalPath
data.scale:set(unpack(self.pinIn.decalScale.value or defaultDecalScale))
@/lua/ge/extensions/tech/impactgen/crashOutput.lua
if renderPerspective(unpack(renderQueue[renderIdx])) then
renderIdx = renderIdx + 1
@/lua/ge/extensions/editor/gen/lib/ui.lua
end
return unpack(alib)
end
@/lua/ge/extensions/core/multiSpawn.lua
table.remove(queue, 1)
M.spawnGroup(unpack(args))
end
@/lua/ge/extensions/editor/buildingEditor.lua
end
return unpack(alib)
end
@/lua/common/utils/filterchain.lua
else
return getVarByNameInScope({select(2, unpack(components))}, scope[components[1]])
end
end
return {dt, unpack(res)}
else
--dump( (function(a,b,c) return a + b + c end) ( unpack({(function (a, b, c) return a + b + c, 1, 1; end)(1,2,3)}) ))
--[[
--local out = led1:update(dt, 1, 2, 3)
--print('### ' .. timer .. ' = ' .. dumps(unpack({out})))
end
@/lua/vehicle/controller/tech/cosimulationCoupling.lua
-- Insert "signal_number" after "time" and before the actual signal names
local sendHeaders = { "time", "message_index", unpack(sendNames) }
local receiveHeaders = { "time", "message_index", unpack(receiveNames) }
local sendHeaders = { "time", "message_index", unpack(sendNames) }
local receiveHeaders = { "time", "message_index", unpack(receiveNames) }
-- Create CSV files with updated headers
csvSendData = csvlib.newCSV(unpack(sendHeaders))
csvReceiveData = csvlib.newCSV(unpack(receiveHeaders))
csvSendData = csvlib.newCSV(unpack(sendHeaders))
csvReceiveData = csvlib.newCSV(unpack(receiveHeaders))
lastTimeOfSend = os.clockhp()
csvSendData:add(os.clockhp(), unpack(msgOut))
end
if enableVSL then
csvReceiveData:add(os.clockhp(), unpack(msgIn))
end
if enableVSL then
csvReceiveData:add(os.clockhp(), unpack(msgIn))
end
-- Add to CSV for logging
csvSendData:add(os.clockhp(), unpack(msgOut))
-- log('I', logTag, 'VSL only from controller, logging data.')
@/lua/ge/extensions/ui/liveryEditor/layers/decal.lua
local showCursor = function(show)
local r, g, b = unpack(api.getDecalColor():toTable())
api.setDecalColor(Point4F.fromTable({r, g, b, show and 1 or 0}))
@/lua/common/libs/xlsxlib/tests/tests.lua
local xlsxData = xlsxLib.loadFileXLSX(dataPath .. inputFile)
local data = xlsxLib.getSheetData(xlsxData, unpack(queryArgs))
local fn = dataPath .. expectedFile
@/lua/common/tcpServer.lua
for _, clientData in ipairs(data) do
local connection, message = unpack(clientData)
-- Process message
@/lua/ge/extensions/core/camera.lua
if type(arg[1]) == "number" then
player, camName, withTransition, customData = unpack(arg, 1, table.maxn(arg)) -- without arguments, unpack can stop at the first nil it encounters, cutting the row short
else
else
camName, withTransition, customData = unpack(arg, 1, table.maxn(arg)) -- without arguments, unpack can stop at the first nil it encounters, cutting the row short
end
@/lua/ge/extensions/tech/techCore.lua
while #objects > 0 do
local node, obj = unpack(table.remove(objects))
@/lua/common/libs/luamqtt/mqtt/protocol.lua
until len <= 0
return unpack(bytes)
end
@/lua/ge/extensions/core/commandhandler.lua
if type(extensions[cmd][functionName]) == "function" then
extensions[cmd][functionName](unpack(params))
else
@/lua/common/libs/luasocket/ltn12.lua
snk = table.remove(args, #args)
f = filter.chain(unpack(args))
end
@/lua/ge/extensions/ui/liveryEditor/layers/decals.lua
local showDecalCursor = function(show)
local r, g, b = unpack(api.getDecalColor():toTable())
api.setDecalColor(Point4F.fromTable({r, g, b, show and 1 or 0}))
@/lua/common/jbeam/variables.lua
for i = #unifyJournal, 1, -1 do
local parentPart, part, level, slotOptions, path, slot = unpack(unifyJournal[i])
local slotVars = slot.variables
for i = 1, #unifyJournal do
local parentPart, part, level, slotOptions, path, slot = unpack(unifyJournal[i])
unifyComponents(rootPart, svars, unpack(unifyJournal[i]))
end
@/lua/ge/extensions/core/levels.lua
if type(nextSpawnVehicle) == 'table' then
local model, options = unpack(nextSpawnVehicle)
local modelData = core_vehicles.getModel(model)
nextSpawnVehicle = core_vehicles.getDefaultVehicleParams()
model, options = unpack(nextSpawnVehicle)
end
@/lua/common/libs/LuLPeg/lulpeg.lua
acc[#acc + 1] = pt.aux
print(offset..'P( "'..s.char(u.unpack(acc))..'" )')
else
if #acc ~= 0 then
print(offset..'P( "'..s.char(u.unpack(acc))..'" )')
end
elseif #acc ~= 0 then
print(offset..'P( "'..s.char(u.unpack(acc))..'" )')
acc = {}
@/lua/common/extensions/ui/imguiWire.lua
local id = generateId(args, resIDCache)
return unpack(returns[id] or {false})
end
table.remove(v, 1) -- name
local res = { ui_imgui[funcName](unpack(v)) }
if #res > 0 then
@/lua/ge/extensions/tech/adasUltrasonic.lua
if #lowering_readings > 0 then
be:queueObjectLua(vid, string.format("extensions.tech_adasUltrasonic.applyBrakes(%f)", math.min(unpack(lowering_readings))))
else
@/lua/ge/extensions/editor/gen/lib/ai.lua
end
return unpack(alib)
end
@/lua/common/libs/luasec/ssl.lua
if type(param) == "table" then
return func(ctx, unpack(param))
else
@/lua/vehicle/bdebugImpl.lua
if partsSelected[torbar.partPath or v.config.partsTree.partPath] then
drawTorsionBar(torbar, nodeScale, beamScale, alpha, unpack(torbarTypesColors[TORBAR_NORMAL]))
end
-- anisotropic torsionbar
col1, col2 = unpack(torbarTypesColors[TORBAR_ANISOTROPIC])
else
-- regular torsionbar
col1, col2 = unpack(torbarTypesColors[TORBAR_NORMAL])
end
-- anisotropic torsionbar, purple blue shade
col1, col2 = unpack(torbarTypesColors[TORBAR_ANISOTROPIC])
else
-- regular torsionbar, green-cyan shade
col1, col2 = unpack(torbarTypesColors[TORBAR_NORMAL])
end
-- broken ones will have red-orange shade
col1, col2 = unpack(torbarTypesColors[TORBAR_BROKEN])
sizeMult = 2