deepcopy
Definition
-- @/=[C]:-1
function deepcopy(...)
Callers
@/lua/ge/extensions/editor/crawlEditor/startingPositions.lua
if self.currentTransform == "area" then
self._prevTransformPos = deepcopy(self.startingPosition.transform.position)
self.beginDragRotation = deepcopy(self.startingPosition.transform.rotation)
self._prevTransformPos = deepcopy(self.startingPosition.transform.position)
self.beginDragRotation = deepcopy(self.startingPosition.transform.rotation)
elseif self.currentTransform == "icon" then
elseif self.currentTransform == "icon" then
self._prevTransformPos = deepcopy(self.startingPosition.iconPosition)
end
@/lua/ge/extensions/freeroam/organizations.lua
local function getUIDataForOrg(orgId)
local organization = deepcopy(getOrganization(orgId))
if not organization then return end
@/lua/ge/extensions/gameplay/discover.lua
local function formatDiscover(discover)
local discoverCopy = deepcopy(discover)
discoverCopy.discoverId = discover.id
for id, pageInfo in pairs(pageInfosById) do
local page = deepcopy(pageInfo)
page.sections = {}
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veNodeTriSelfCollisionDetector.lua
if v.couplerNodes then
local couplerNodesCopy = deepcopy(v.couplerNodes)
local newCouplerNodePairs = {}
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/veJBeamModifierLeakVis.lua
if mod ~= "__astNodeIdx" then
local newModVal = deepcopy(modVal)
if type(newModVal) == "table" then
local sectionModsCopy = deepcopy(sectionMods)
if mod ~= "__astNodeIdx" then
local newModVal = deepcopy(modVal)
if type(newModVal) == "table" then
@/lua/vehicle/controller/drivingDynamics/supervisors/yawControl.lua
initialControlParameters = deepcopy(controlParameters)
end
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/campaign/exploration.lua
data = deepcopy(M.state)
-- dump(data)
-- dump(data)
M.state = deepcopy(data)
if getExplorationActive() then
local data = {}
data = deepcopy(M.state)
saveCallback(M.__globalAlias__, data)
@/lua/ge/extensions/editor/dragRaceEditor/dragSettings.lua
local cleanData = deepcopy(dragSettings)
jsonWriteFile(filePath, cleanData, true)
@/lua/common/jbeam/utils.lua
if type(options) == 'table' then
n = deepcopy(options)
else
if type(options) == 'table' then
b = deepcopy(options)
else
@/lua/ge/extensions/core/multiSpawn.lua
params = params or {allMods = false, allConfigs = true}
params.filters = params.filters or deepcopy(defaultFilters)
local minPop = params.minPop or 0
if params.allMods or officialConfig then
local configCopy = deepcopy(config)
popFactor = defaultPopFactor,
configData = deepcopy(configData)
})
amount = amount or 10 -- default group size
params.filters = params.filters or deepcopy(defaultFilters)
-- default filters: Type = selects valid road vehicles
table.insert(group, deepcopy(group[nextIndex]))
end
local spawnData = {}
local groupCopy = deepcopy(group)
groupCopy = fitGroup(groupCopy, amount)
log('E', logTag, string.format('Vehicle model not found: %s', options.model or ''))
spawnData[i] = deepcopy(defaultOptions)
end
if options.shuffle then -- randomize group order
group = arrayShuffle(deepcopy(group))
end
@/lua/ge/extensions/editor/multiSpawnManager.lua
if val.baseColor[4] then
colorTbl = deepcopy(val.baseColor)
elseif val.baseColor.x and val.baseColor.y and val.baseColor.z and val.baseColor.w then
else
colorTbl = deepcopy(defaultPaint)
end
local function setGenerator(generatorData) -- sets or creates generator data; also updates imgui values
currGroup.generator = generatorData or deepcopy(defaultGenerator)
for k, v in pairs(currGroup.generator) do
local processedGroup = deepcopy(groupData)
if processedGroup.data then -- this can be nil for generator groups
if commonGroups[options.groupListIdx] then
commonGroups[options.groupListIdx].cache = deepcopy(currGroup)
end
if commonGroups[options.groupListIdx] then
commonGroups[options.groupListIdx].cache = deepcopy(currGroup) -- keep the old group data, so that it can be returned later
end
if commonGroups[idx].cache then
currGroup = deepcopy(commonGroups[idx].cache)
else
if options.generatedGroup[1] then
local tempData = deepcopy(currGroup)
tempData.name = tempData.name.." - Copy"
tempData.type = "custom"
tempData.data = deepcopy(options.generatedGroup)
createGroup(tempData)
if next(currGroup) then
local tempData = deepcopy(currGroup)
tempData.name = tempData.name.." - Copy"
@/lua/ge/extensions/gameplay/missions/missionScreen.lua
--dump("default user settings from ",info.defaultUserSettings)
--info.defaultUserSettings = deepcopy(m.lastUserSettings or {})
--dump(info.defaultUserSettings)
if string.find(mode, "test") then
local layout = deepcopy(M.testLayout)
guihooks.trigger("onRequestMissionScreenDataReady", layout, {replaySupport = false} )
@/lua/vehicle/controller/drivingDynamics/actuators/electronicSplitShaftLock.lua
initialControlParameters = deepcopy(controlParameters)
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/career/modules/delivery/general.lua
if anyCargoDropOffable then
local dropOffPoi = deepcopy(poiTemplate)
dropOffPoi.heading = "Delivery Drop Off"
if anyCargoPickUpAble then
local pickUpPoi = deepcopy(poiTemplate)
pickUpPoi.heading = "Delivery Pick Up"
@/lua/ge/extensions/editor/missionEditor/startTrigger.lua
local hasOld = oldValues[stType] ~= nil
oldValues[self.mission.startTrigger.type] = deepcopy(self.mission.startTrigger)
if hasOld then
if hasOld then
self.mission.startTrigger = deepcopy(oldValues[stType])
else
local prev = self.mission.startTrigger
self.mission.startTrigger = deepcopy(newStartTrigger[stType])
if stType == 'coordinates' then
@/lua/ge/extensions/ui/gameplaySelector/general.lua
if customRootPath and next(customRootPath) then
pathSegments = deepcopy(customRootPath)
end
@/lua/ge/extensions/career/modules/computer.lua
local data = {}
local computerFunctionsForUI = deepcopy(computerFunctions)
computerFunctionsForUI.vehicleSpecific = {}
local vehiclesForUI = deepcopy(menuData.vehiclesInGarage)
for i, vehicleData in ipairs(vehiclesForUI) do
@/lua/ge/extensions/gameplay/parking.lua
local function onSerialize()
local data = {active = active, debugLevel = M.debugLevel, parkedVehIds = deepcopy(parkedVehIds), trackedVehIds = tableKeys(trackedVehData), vars = deepcopy(vars)}
resetAll()
local function onSerialize()
local data = {active = active, debugLevel = M.debugLevel, parkedVehIds = deepcopy(parkedVehIds), trackedVehIds = tableKeys(trackedVehData), vars = deepcopy(vars)}
resetAll()
@/lua/ge/extensions/editor/raceEditor/pathnodes.lua
if node.normal then
self.beginDragRotation = deepcopy(quatFromDir(node.normal, vec3(0,0,1)))
end
if hovered.normal then
self.beginDragRotation = deepcopy(quatFromDir(hovered.normal, vec3(0,0,1)))
end
editor.history:commitAction("Create Manual Node",
{mouseInfo = deepcopy(self.mouseInfo), index = bestId, self = self,
normal = editor.getPreference("raceEditor.general.directionalNodes") and (self.mouseInfo._upPos - self.mouseInfo._downPos)},
@/lua/ge/extensions/editor/gen/top.lua
for _,p in pairs(apair) do
local ps = deepcopy(p)
table.sort(ps)
table.sort(ps)
local imis = deepcopy(cmi)
table.sort(imis)
base = floor and floor.base or base
sbase = deepcopy(base)
-- floor.top.margin = 0.
else
sbase = deepcopy(base)
if desctop.margin then
for _,p in pairs(apair) do
local ps = deepcopy(p)
table.sort(ps)
table.sort(ps)
local imis = deepcopy(imi)
table.sort(imis)
local cpair = {}
local baseext = deepcopy(base)
local aridge = {}
@/lua/ge/extensions/editor/dynamicDecalsTool.lua
for uid, layer in pairs(selectedLayers) do
editor.selection["dynamicDecalLayer"][uid] = deepcopy(api.getLayerByUid(uid))
end
for uid, layer in pairs(selectedLayers) do
editor.selection["dynamicDecalLayer"][uid] = deepcopy(api.getLayerByUid(uid))
end
if selectedLayers and selectedLayers[layerUid] then
editor.selection["dynamicDecalLayer"][layerUid] = deepcopy(api.getLayerByUid(layerUid))
end
if selectedLayers and toParentUid and selectedLayers[toParentUid] then
editor.selection["dynamicDecalLayer"][toParentUid] = deepcopy(api.getLayerByUid(toParentUid))
end
@/lua/common/jbeam/sections/wheels.lua
local sideOptions = deepcopy(wheel)
sideOptions.beamSpring = sideOptions.wheelSideBeamSpring
local reinforcementOptions = deepcopy(wheel)
reinforcementOptions.beamSpring = reinforcementOptions.wheelReinforcementBeamSpring
local treadOptions = deepcopy(wheel)
treadOptions.beamSpring = treadOptions.wheelTreadBeamSpring
local peripheryOptions = deepcopy(treadOptions)
if peripheryOptions.wheelPeripheryBeamSpring ~=nil then peripheryOptions.beamSpring = peripheryOptions.wheelPeripheryBeamSpring end
local sideOptions = deepcopy(wheel)
sideOptions.beamSpring = sideOptions.wheelSideBeamSpring
local treadOptions = deepcopy(wheel)
treadOptions.beamSpring = treadOptions.wheelTreadBeamSpring
local peripheryOptions = deepcopy(treadOptions)
if peripheryOptions.wheelPeripheryBeamSpring ~=nil then peripheryOptions.beamSpring = peripheryOptions.wheelPeripheryBeamSpring end
local hubOptions = deepcopy(wheel)
if hubOptions.hubNodeWeight ~= nil then hubOptions.nodeWeight = hubOptions.hubNodeWeight end
local supportOptions = deepcopy(hubOptions)
supportOptions.beamPrecompression = (0.75 * wheel.hubRadius / wheel.radius) + 0.25
-- hub-tire beams options
local reinforcementOptions = deepcopy(wheel)
reinforcementOptions.beamSpring = reinforcementOptions.wheelReinforcementBeamSpring
local hubOptions = deepcopy(wheel)
if hubOptions.hubBeamSpring ~= nil then hubOptions.beamSpring = hubOptions.hubBeamSpring end
local sideOptions = deepcopy(wheel)
sideOptions.beamSpring = sideOptions.wheelSideBeamSpring
-- hub-tire beams options
local reinforcementOptions = deepcopy(wheel)
reinforcementOptions.beamSpring = reinforcementOptions.wheelReinforcementBeamSpring
local treadOptions = deepcopy(wheel)
treadOptions.beamSpring = treadOptions.wheelTreadBeamSpring
local peripheryOptions = deepcopy(treadOptions)
if peripheryOptions.wheelPeripheryBeamSpring ~=nil then peripheryOptions.beamSpring = peripheryOptions.wheelPeripheryBeamSpring end
local supportOptions = deepcopy(hubOptions)
supportOptions.beamPrecompression = (0.75 * wheel.hubRadius / wheel.radius) + 0.25
local hubOptions = deepcopy(wheel)
if hubOptions.hubBeamSpring ~= nil then hubOptions.beamSpring = hubOptions.hubBeamSpring end
local sideOptions = deepcopy(wheel)
sideOptions.beamSpring = sideOptions.wheelSideBeamSpring
-- hub-tire beams options
local reinforcementOptions = deepcopy(wheel)
reinforcementOptions.beamSpring = reinforcementOptions.wheelReinforcementBeamSpring
local treadOptions = deepcopy(wheel)
treadOptions.beamSpring = treadOptions.wheelTreadBeamSpring
local peripheryOptions = deepcopy(treadOptions)
if peripheryOptions.wheelPeripheryBeamSpring ~=nil then peripheryOptions.beamSpring = peripheryOptions.wheelPeripheryBeamSpring end
local supportOptions = deepcopy(hubOptions)
supportOptions.beamPrecompression = (0.75 * wheel.hubRadius / wheel.radius) + 0.25
local pressuredOptions = deepcopy(reinforcementOptions)
pressuredOptions.pressurePSI = pressuredOptions.pressurePSI or 30
local reinfPressureOptions = deepcopy(pressuredOptions)
reinfPressureOptions.pressurePSI = reinfPressureOptions.reinforcementPressurePSI or reinfPressureOptions.pressurePSI
local hubOptions = deepcopy(wheel)
hubOptions.beamSpring = hubOptions.hubBeamSpring or hubOptions.beamSpring
-- Hub Cap
local hubcapOptions = deepcopy(wheel)
hubcapOptions.beamSpring = hubcapOptions.hubcapBeamSpring or hubcapOptions.beamSpring
local hubcapAttachOptions = deepcopy(wheel)
hubcapAttachOptions.beamSpring = hubcapAttachOptions.hubcapAttachBeamSpring or hubcapAttachOptions.beamSpring
-- hub-tire beams options
local treadOptions = deepcopy(wheel)
treadOptions.beamSpring = treadOptions.wheelTreadBeamSpring or treadOptions.beamSpring
local treadReinfOptions = deepcopy(treadOptions)
treadReinfOptions.beamSpring = treadReinfOptions.wheelTreadReinforcementBeamSpring or treadReinfOptions.beamSpring
local peripheryOptions = deepcopy(treadOptions)
peripheryOptions.beamSpring = peripheryOptions.wheelPeripheryBeamSpring or peripheryOptions.beamSpring
local supportOptions = deepcopy(hubOptions)
supportOptions.beamPrecompression = (0.75 * wheel.hubRadius / wheel.radius) + 0.25
local reinfBeamLength = math.sqrt(sideBeamLength * sideBeamLength + axisLength * axisLength)
local pressuredOptions = deepcopy(wheel)
pressuredOptions.pressurePSI = pressuredOptions.pressurePSI or 30
local reinfPressureOptions = deepcopy(pressuredOptions)
reinfPressureOptions.pressurePSI = reinfPressureOptions.reinforcementPressurePSI or reinfPressureOptions.pressurePSI
local sideOptions = deepcopy(wheel)
sideOptions.beamSpring = sideOptions.wheelSideBeamSpring or 0
local cleanwheel = deepcopy(wheel)
cleanwheel.axleBeams = nil
local wheelNodes = cleanupWheelOptions(deepcopy(cleanwheel))
local hubOptions = deepcopy(cleanwheel)
hubOptions.beamSpring = hubOptions.hubBeamSpring or hubOptions.beamSpring
local hubSideOptions = deepcopy(hubOptions)
hubSideOptions.beamSpring = hubSideOptions.hubSideBeamSpring or hubSideOptions.beamSpring
local hubReinfOptions = deepcopy(hubSideOptions)
hubReinfOptions.beamSpring = hubReinfOptions.hubReinfBeamSpring or hubReinfOptions.beamSpring
local hubTreadOptions = deepcopy(hubOptions)
hubTreadOptions.beamSpring = hubTreadOptions.hubTreadBeamSpring or hubTreadOptions.beamSpring
local hubPeripheryOptions = deepcopy(hubOptions)
hubPeripheryOptions.beamSpring = hubPeripheryOptions.hubPeripheryBeamSpring or hubPeripheryOptions.beamSpring
local hubStabilizerOptions = deepcopy(hubSideOptions)
hubStabilizerOptions.beamSpring = hubStabilizerOptions.hubStabilizerBeamSpring or hubStabilizerOptions.beamSpring
-- Hub Cap
local hubcapOptions = deepcopy(cleanwheel)
hubcapOptions.beamSpring = hubcapOptions.hubcapBeamSpring or hubcapOptions.beamSpring
local hubcapAttachOptions = deepcopy(cleanwheel)
hubcapAttachOptions.beamSpring = hubcapAttachOptions.hubcapAttachBeamSpring or hubcapAttachOptions.beamSpring
local hubcapSupportOptions = deepcopy(hubcapAttachOptions)
hubcapSupportOptions.beamSpring = hubcapSupportOptions.hubcapSupportBeamSpring or hubcapSupportOptions.beamSpring
local sideOptions = deepcopy(cleanwheel)
sideOptions.beamSpring = sideOptions.wheelSideBeamSpring or 0
local sideReinfOptions = deepcopy(sideOptions)
sideReinfOptions.beamSpring = sideOptions.wheelSideReinfBeamSpring or 0
local reinfOptions = deepcopy(cleanwheel)
reinfOptions.beamSpring = reinfOptions.wheelReinfBeamSpring or 0
local treadOptions = deepcopy(cleanwheel)
treadOptions.beamSpring = treadOptions.wheelTreadBeamSpring or treadOptions.beamSpring
local treadReinfOptions = deepcopy(treadOptions)
treadReinfOptions.beamSpring = treadOptions.wheelTreadReinfBeamSpring or treadOptions.beamSpring
local peripheryOptions = deepcopy(treadOptions)
peripheryOptions.beamSpring = peripheryOptions.wheelPeripheryBeamSpring or peripheryOptions.beamSpring
local peripheryReinfOptions = deepcopy(peripheryOptions)
peripheryReinfOptions.beamSpring = peripheryReinfOptions.wheelPeripheryReinfBeamSpring or peripheryOptions.beamSpring
local tireSupportOptions = deepcopy(cleanwheel)
tireSupportOptions.beamSpring = tireSupportOptions.tireSupportBeamSpring or tireSupportOptions.beamSpring
@/lua/ge/extensions/career/modules/vehiclePerformance.lua
local function openMenu(options)
uiParams = deepcopy(options)
uiParams.testInProgress = testInProgress
@/lua/ge/extensions/career/modules/delivery/vehicleTasks.lua
local function getRewardsWithBreakdown(taskData)
local originalRewards = deepcopy(taskData.offer.rewards)
local breakdown = {}
local adjustedRewards = deepcopy(originalRewards)
for _, bd in ipairs(breakdown) do
@/lua/ge/extensions/editor/sitesEditor/sortedListDisplay.lua
editor.history:commitAction("Change " .. name .. " of " .. self.key,
{ objects = self.sites[self.key].objects, sel = deepcopy(self.selections), field = name, old = old, new = value },
setFieldUndo, setFieldRedo)
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/trafficSpawnGroup.lua
end
self.vehicleIds = deepcopy(vehIds)
self.pinIn.flow.value = true
if self.state == 0 then
local group = self.pinIn.group.value and deepcopy(self.pinIn.group.value) or {data = gameplay_traffic_trafficUtils.createTrafficGroup()} -- if no given group, create a default traffic group
@/lua/ge/extensions/editor/gen/mesh.lua
-- local ndgeo = M.forNode(geolib, {'geometry'})
-- ndgeo = deepcopy(ndgeo)
local ndmesh = M.forNode(ndgeo, {'mesh'})
-- ndmesh = deepcopy(ndmesh)
-- lo('?? for_mesh2:'..tostring(ndmesh)..':'..saf)
for i=1,#am do
ageo[#ageo+1] = deepcopy(ndgeo)
-- ndgeo = deepcopy(ndgeo)
ageo[#ageo+1] = deepcopy(ndgeo)
-- ndgeo = deepcopy(ndgeo)
end
local mat = M.forNode(ndmatlib, {'material'})
mat = deepcopy(mat)
M.ofNode(mat, {id=idmat,name='cladding_zinc'})
local ndinst = M.forNode(ndtech, {'instance_material'})
ndinst = deepcopy(ndinst)
M.ofNode(ndinst, {target='#'..idmat, symbol=idmat})
local ndmesh = M.forNode(xlod, {'COLLADA','library_geometries','geometry','mesh'})
ndmesh = deepcopy(ndmesh)
ndmesh = M.toXML({an ={vec3(0,0,1)},av=avt,af=aft,auv=auvt}, ndmesh)
local ndinst = M.forNode(ndscene, {'instance_geometry'})
ndinst = deepcopy(ndinst)
M.ofNode(ndinst, {url='#'..idgeo})
M.forLOD = function(template, dist, geosrc)
local nd_lod = deepcopy(template)
dist = tostring(dist)
lo('>> framePave:'..#aloop..':'..#astep..':'..tostring(dir)) --tostring(step))
local sarg = {aloop=deepcopy(aloop),astep=deepcopy(astep)}
local dbg = false
lo('>> framePave:'..#aloop..':'..#astep..':'..tostring(dir)) --tostring(step))
local sarg = {aloop=deepcopy(aloop),astep=deepcopy(astep)}
local dbg = false
end
apath[#apath+1] = deepcopy(l)
apath[#apath][#apath[#apath]+1] = l[1]
-- if true then return end
local sav = deepcopy(av)
-- reset vertices
for i,l in pairs(aloop) do
apath[#apath+1] = deepcopy(l)
apath[#apath][#apath[#apath]+1] = l[1]
end
local stamp = U.stamp(deepcopy(iseq))
if U.index(aloopstamp, stamp)[1] then
end
local stamp = U.stamp(deepcopy(iseq))
if U.index(aloopstamp, stamp)[1] then
end
-- lo('?? straihtned_stamp:'..U.stamp(deepcopy(iseq)))
local aeref = deepcopy(aloop)
table.insert(aeref, 1, rc)
for i,a in pairs(arc) do
local stamp = U.stamp(deepcopy(a))
-- lo(stamp)
local sarg = {
aloop = deepcopy(aloop),
astep = astep,
-- if true then return {} end
local sdedge = deepcopy(dedge)
-- eat out bag
end)
m = deepcopy(b.m)
b.af = U.map(b.aif,function(k,v)
-- translucentRecvShadows
local cm = sam[i] -- deepcopy(m)
-- lo('?? to_space:'..ds)
@/lua/ge/extensions/scenario/raceMarkers/cylinderMarker.lua
self.modeInfos = deepcopy(modeInfos)
end
self.color = deepcopy(self.modeInfos[mode or 'default'].color or {0,0,0,0})
self.currentColor = ColorF(self.color[1],self.color[2],self.color[3],1)
@/lua/ge/extensions/editor/drivePathEditor/splineMgr.lua
copy.graphNodes = util.fastArrayCopy(spline.graphNodes)
copy.graphPath = deepcopy(spline.graphPath)
@/lua/ge/extensions/editor/bulkRename.lua
elseif whatSetPtr[0] == 0 then
objectIds = deepcopy(editor.selection.object)
@/gameplay/missionTypes/timeTrial/editor.lua
mission.careerSetup.starRewards[dynamicKey] = deepcopy(mission.careerSetup.starRewards[normalKey])
for _, r in ipairs(mission.careerSetup.starRewards[dynamicKey]) do
@/lua/ge/extensions/career/modules/tuning.lua
local vehData = core_vehicle_manager.getVehicleData(vehId)
return deepcopy(vehData.vdata.variables)
end
local tuningData = getTuningData()
vehicleVarsBefore = deepcopy(career_modules_inventory.getVehicles()[inventoryId].config.vars or {})
local tuningData = getTuningData()
local varTuningData = deepcopy(tuningData[varName])
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/setVehicleFlowgraph.lua
if name ~= 'flow' and not pin.fixed then
varData[name] = deepcopy(pin.value)
end
@/lua/vehicle/ve_utils.lua
-- case where options is a dict on its own, filling a whole line
localOptions = tableMerge(localOptions, deepcopy(rowValue))
else
else
newRow = deepcopy(localOptions)
end
@/lua/ge/extensions/editor/assetManagementTool.lua
local json = deepcopy(record)
json.fixed = nil
@/lua/ge/extensions/editor/api/objectHistoryActions.lua
editor.setObjectSelectedBool(editor.selection.object, false)
editor.selection.object = deepcopy(actionData.oldSelection)
-- select current selected objects
editor.setObjectSelectedBool(editor.selection.object, false)
editor.selection.object = deepcopy(actionData.newSelection)
-- select current selected objects
end
editor.history:commitAction("SelectObjects", {newSelection = deepcopy(newSelection), oldSelection = deepcopy(oldSelection)}, selectObjectsUndo, selectObjectsRedo)
editor.setDirty()
end
editor.history:commitAction("SelectObjects", {newSelection = deepcopy(newSelection), oldSelection = deepcopy(oldSelection)}, selectObjectsUndo, selectObjectsRedo)
editor.setDirty()
@/lua/ge/extensions/gameplay/rally/notebook/structured/textCompositor.lua
local systemPacenotes = deepcopy(self.compositor.config.system)
local compositorVoice = settings.getValue("rallyTextCompositorVoice")
@/lua/ge/extensions/scenario/raceMarkers/overhead.lua
self.oldMode = 'hidden'
self.modeInfos = deepcopy(modeInfos)
end
@/lua/ge/extensions/gameplay/missions/missionTypes/flowMission.lua
-- copy in the generic progress setup for this missiontype
local setup = deepcopy(gameplay_missions_missions.getMissionProgressSetupData(self.missionType))
for k, v in pairs(setup) do
if not self.mgr then
local tempVariables = deepcopy(self.fgVariables)
end
self.lastUserSettings = deepcopy(self.userSettings)
self.userSettings = nil
@/lua/ge/extensions/ui/vehicleSelector/vehicleSpecifications.lua
if multiPaintSetup.usedByConfigByKey[configKey] or multiPaintSetup.forAllConfigs then
local setup = deepcopy(multiPaintSetup)
if setup.isDefaultForConfigByKey[configKey] then
@/lua/vehicle/controller/drivingDynamics/supervisors/tractionControl.lua
initialControlParameters = deepcopy(controlParameters)
end
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/flowgraph/modules/uiModule.lua
self.serializedRecoveryPromptState = core_recoveryPrompt.serializeState()
self.gameStateBeginning = deepcopy(core_gamestate.state)
self.recoverGameStateWhenExecutionStopped = true
@/lua/ge/extensions/career/modules/delivery/generator.lua
item.data.originalDistance = distance
local template = deepcopy(M.getParcelTemplateById(item.templateId))
if sum >= r then
return deepcopy(item.item)
end
materialType = template.materialType,
location = deepcopy(origin),
origin = deepcopy(origin),
location = deepcopy(origin),
origin = deepcopy(origin),
destination = deepcopy(destination),
origin = deepcopy(origin),
destination = deepcopy(destination),
generatorLabel = generatorLabel,
for d = 1, duplicateAmount do
local copy = deepcopy(item)
cargoId = cargoId + 1
local destination = {type = "facilityParkingspot", facId = destinationFac.id, psPath = destinationAp.psPath}
local dropOff = deepcopy(destination)
spawnLocation = deepcopy(origin),
origin = origin,
modifiers = {},
location = deepcopy(origin),
origin = deepcopy(origin),
location = deepcopy(origin),
origin = deepcopy(origin),
destination = destination,
dParcelManager.addTransientMoveCargo(item.id, con.location)
--dParcelManager.changeCargoLocation(item.id, deepcopy(con.location), true)
end
-- split material parcel
local copy = deepcopy(cargo)
groupId = groupId + 1
-- split material parcel
local copy = deepcopy(cargo)
groupId = groupId + 1
local function addLoanerSpotsToFacility(resTable, priorityKey, fac, sites, accessPointsByName)
local loanerSpots = deepcopy(fac.manualAccessPoints or {})
table.sort(loanerSpots, function(a,b) return (a[priorityKey] or 0) < (b[priorityKey] or 0) end)
ap.isDropOffSpot = true
ap.logisticTypesReceivedLookup = deepcopy(fac.logisticTypesReceivedLookup)
accessPointsByName[ps.name] = ap
ap.isInspectSpot = elem.isInspectSpot
ap.logisticTypesReceivedLookup = elem.logisticTypesReceived and tableValuesAsLookupDict(elem.logisticTypesReceived) or deepcopy(fac.logisticTypesReceivedLookup)
ap.logisticTypesProvidedLookup = elem.logisticTypesProvided and tableValuesAsLookupDict(elem.logisticTypesProvided) or deepcopy(fac.logisticTypesProvidedLookup)
ap.logisticTypesReceivedLookup = elem.logisticTypesReceived and tableValuesAsLookupDict(elem.logisticTypesReceived) or deepcopy(fac.logisticTypesReceivedLookup)
ap.logisticTypesProvidedLookup = elem.logisticTypesProvided and tableValuesAsLookupDict(elem.logisticTypesProvided) or deepcopy(fac.logisticTypesProvidedLookup)
@/lua/ge/extensions/freeroam/freeroamConfigurator.lua
local function saveConfigurationToFile()
local saveData = deepcopy(currentConfiguration)
saveData.version = version
log("W", "freeroamConfigurator", "Failed to get vehicle details: " .. dumps(currentConfiguration.vehicle) .. ", defaulting to pickup")
currentConfiguration.vehicle = deepcopy(defaultVehicle)
currentConfiguration._dirty = true
@/lua/ge/extensions/editor/toolUtilities/skeleton.lua
local maskForWidths = deepcopy(rawMask)
@/lua/ge/extensions/editor/crawlEditor/waypoints.lua
if node.hasNormal and node.normal then
self.beginDragRotation = deepcopy(quatFromDir(node.normal, vec3(0,0,1)))
end
editor.history:commitAction("Create Manual Pathnode",
{mouseInfo = deepcopy(self.mouseInfo), index = bestId, radius = radius, self = self},
function(data)
@/lua/ge/extensions/editor/dynamicDecals/vehicleColorPalette.lua
if im.Button(string.format("Randomize all colors##vehicleColorPalette%s", guiId)) then
local colors = deepcopy(editor.getPreference("dynamicDecalsTool.colorPresets.presets"))
if #colors < 3 then
if data.colors then
restoreColors = {timer = 5, colors = deepcopy(data.colors)}
end
@/lua/ge/extensions/flowgraph/nodes/ui/updatedUI/endScreenBegin.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/gameplay/missionTypes/rallyRoadSection/constructor.lua
self.fgVariables = deepcopy(self.missionTypeData)
-- self.missionTypeLabel = "bigMap.missionLabels.rallyRoadSection"
@/lua/ge/extensions/editor/gen/lib/ai.lua
local pL,cL = L,0
local sac = deepcopy(ac)
local N = 0
local pL,cL = L,0
local sac = deepcopy(ac)
local N = 0
]]
local sac = deepcopy(ac)
-- go(ac, loss)
@/lua/ge/extensions/editor/decalEditor.lua
local function clearSelectionActionUndo(actionData)
selectedInstances = deepcopy(actionData.oldSelection)
updateGizmoPos()
local function selectSingleInstanceActionUndo(actionData)
selectedInstances = deepcopy(actionData.oldSelection)
updateGizmoPos()
local function clickedOnInstance(instance)
local oldSelection = deepcopy(selectedInstances)
if not instance then
local instance = {position = selectedInstance.position, normal = selectedInstance.normal, tangent = selectedInstance.tangent,
template = deepcopy(selectedInstance.template), size = selectedInstance.size / selectedInstance.template.size,
textureRectIdx = selectedInstance.textureRectIdx, id = id}
local instance = {position = selectedInstance.position, normal = selectedInstance.normal, tangent = selectedInstance.tangent,
template = deepcopy(selectedInstance.template), size = selectedInstance.size / selectedInstance.template.size,
textureRectIdx = selectedInstance.textureRectIdx, id = id}
if selectedTemplate then
local instanceData = {position = res.pos, normal = res.normal, tangent = 0, template = deepcopy(selectedTemplate)}
editor.history:commitAction("CreateDecalInstance", {instanceData = instanceData}, createInstanceActionUndo, createInstanceActionRedo)
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/trafficCustomGroup.lua
self.group.type = 'generator'
self.group.generator = deepcopy(self.params)
if self.group.generator.auto then
@/lua/ge/extensions/editor/toolUtilities/meshAuditionMgr.lua
local meshFilterBuf = im.ArrayChar(64, "") -- Search bar input buffer.
local staticMeshPaths = deepcopy(defaultStaticMeshPaths) -- The paths of the static meshes, used for searching.
local timer, time = hptimer(), 0.0
if editor.uiIconImageButton(editor.icons.ab_asset_jbeam, im.ImVec2(24, 24), nil, nil, nil, 'defaultFoldersBtn') then
staticMeshPaths = deepcopy(defaultStaticMeshPaths)
populateAvailableStaticMeshes()
@/lua/common/utils.lua
-- local, used in deepcopy()
local function _deepcopyTable(lookup_table, object)
-- Copies the object, including vec3 and quat, recursively. FFI structs are shallow-copied. Slow
function deepcopy(object)
local otype = type(object)
@/lua/ge/extensions/flowgraph/nodes/states/transitionStack.lua
table.sort(self._pinTemplates._in, function(a,b) return a.name < b.name end)
self._pinTemplates._out = deepcopy(self._pinTemplates._in)
end
@/lua/vehicle/partCondition.lua
paintOdometer = clamp(paintOdometer, 0, paintAgingConstants.wearEndOdometer)
local agedPaint = deepcopy(paint)
local agedColor = deepcopy(paint.baseColor)
local agedPaint = deepcopy(paint)
local agedColor = deepcopy(paint.baseColor)
odometer = linearScale(visualValue, 1, 0, 0, paintAgingConstants.wearEndOdometer),
originalPaints = deepcopy(v.config.paints)
}
defaultPaints[3] = defaultPaints[3] or defaultPaints[1]
visualState.paint.originalPaints = deepcopy(defaultPaints)
end
local paintOdometer = (paintOdometerAbsoluteBaseValues[partId] or 0) + max(extensions.odometer.getRelativeRecording() - (paintOdometerRelativeStartingValues[partId] or 0), 0)
paintCondition = {odometer = paintOdometer, visualValue = linearScale(paintOdometer, paintAgingConstants.wearStartOdometer, paintAgingConstants.wearEndOdometer, 1, 0), originalPaints = deepcopy(partPaints[partId])}
canProvidePaintCondition = true
@/lua/ge/extensions/career/modules/delivery/pages.lua
}
for _, change in ipairs(arrayReverse(deepcopy(career_modules_playerAttributes.getAttributeLog()))) do
if change.reason.delivery then
@/lua/ge/extensions/editor/vehicleEditor/staticEditor/vePartTree.lua
for partName, _ in pairs(partsList) do
local part, jbeamFilename = deepcopy(jbeamIO.getPart(ioCtx, partName))
@/lua/ge/extensions/core/vehicle/partmgmt.lua
local richPartInfo = {}
richPartInfo.information = deepcopy(uiPartInfo or {})
if uiPartInfo.modName then
-- Vehicle doesn't originate from a part config file
data = deepcopy(vehicleData.config)
data.linkedPCFile = nil
local function compileVehicleCollection(collectionTree)
local collectionTreeCopy = deepcopy(collectionTree)
local data = deepcopy(playerVehicleData.config)
local prevPCFilename = data.partConfigFilename
@/lua/ge/extensions/editor/gen/exp_solidflex.lua
-- lo('?? step1:'..ii..':'..s..':'..cplast..':'..#aa..':'..itgt..'<')
local cac = deepcopy(ac)
if i < itgt then
local last = list[#list]
local clist = deepcopy(list)
cac[1] = ac[1] + s
local last = list[#list]
local clist = deepcopy(list)
cac[1] = ac[1] + s
local epo = 80
local cL,L,cac = AI.go2(U.joint(deepcopy(aa),ae), loss, step, epo, 0.01)
-- lo('?? for_L:'..cL..':'..#ahist)
danim[1] = {cb = function()
local cl,l,cac = AI.go2(U.joint(deepcopy(aa),ae), loss, step, 10, 0.01)
U.map(cac,function(k,v)
danim = {}
rebuild(U.joint(deepcopy(aa),ae))
--[[
cpick = nil
rebuild(U.joint(deepcopy(aa),ae))
--[[
end
m = build(U.joint(deepcopy(aa),ae))
if cvneigh then
@/lua/vehicle/powertrain/hydraulicAccumulator.lua
if ph.connectedPump == device.name then
local consumerJbeamData = deepcopy(tableMerge(ph, v.data[ph.name] or {}))
local consumerType = ph.type
@/lua/ge/extensions/career/modules/branches/leagues.lua
isLeagueUnlocked(l.id)
local league = deepcopy(l)
league.totalStarsAvailable, league.totalStarsObtained = 0, 0
@/flowgraphEditor/Tower/customNodes/towerNode.lua
}
rooms.turn = arrayConcat(deepcopy(rooms.left), deepcopy(rooms.right))
rooms.corridor = arrayConcat(deepcopy(rooms.forward), deepcopy(rooms.turn))
}
rooms.turn = arrayConcat(deepcopy(rooms.left), deepcopy(rooms.right))
rooms.corridor = arrayConcat(deepcopy(rooms.forward), deepcopy(rooms.turn))
rooms.turn = arrayConcat(deepcopy(rooms.left), deepcopy(rooms.right))
rooms.corridor = arrayConcat(deepcopy(rooms.forward), deepcopy(rooms.turn))
local all = {}
rooms.turn = arrayConcat(deepcopy(rooms.left), deepcopy(rooms.right))
rooms.corridor = arrayConcat(deepcopy(rooms.forward), deepcopy(rooms.turn))
local all = {}
for _, elem in ipairs(blueprint) do
local typeFiles = deepcopy(rooms[elem.type])
@/gameplay/missionTypes/drift/editor.lua
local instance = gameplay_missions_missions.getMissionById(mission.id)
local defaultStarKeysSorted = deepcopy(instance.careerSetup._activeStarCache.defaultStarKeysSorted)
@/lua/ge/extensions/editor/missionEditor/careerSetup.lua
if editor.uiIconImageButton(editor.icons.content_copy, im.ImVec2(22, 22)) then
self.copiedRewards = deepcopy(rewards or {})
end
if editor.uiIconImageButton(editor.icons.content_paste, im.ImVec2(22, 22)) then
rewards = deepcopy(self.copiedRewards)
self.mission._dirty = true
@/gameplay/missionTypes/aiRace/customNodes/autoStartPositionsNode.lua
local vehIds = deepcopy(self.pinIn.vehicleIds.value)
if self.pinIn.playerId.value and self.pinIn.playerId.value > 0 then
@/lua/vehicle/powertrain/electricMotor.lua
elseif type(jbeamData.electricalEfficiency) == "table" then
tempElectricalEfficiencyTable = deepcopy(jbeamData.electricalEfficiency)
end
local copy = deepcopy(tempElectricalEfficiencyTable)
tempElectricalEfficiencyTable = {}
@/lua/vehicle/controller/drivingDynamics/actuators/activeDiffLock.lua
initialControlParameters = deepcopy(controlParameters)
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/editor/visualization.lua
if itemPath == "gizmos.visualization.visTypes" then
editor.setPreference(itemPath, deepcopy(var.visualizationTypesDefault))
elseif itemPath == "gizmos.visualization.visible" then
elseif itemPath == "gizmos.visualization.visible" then
editor.setPreference(itemPath, deepcopy(var.visibleTypesDefault))
elseif itemPath == "gizmos.visualization.selectable" then
elseif itemPath == "gizmos.visualization.selectable" then
editor.setPreference(itemPath, deepcopy(var.selectableTypesDefault))
end
@/lua/ge/extensions/gameplay/race/race.lua
if not data.offTrackData then
data.offTrackData = deepcopy(offTrackData)
end
table.insert(self.recoveryStates[id], {
state = deepcopy(self.states[id]),
time = self.time,
local snap = self.recoveryStates[id][#self.recoveryStates[id]]
self.states[id] = deepcopy(snap.state)
if self.recoverAffectsTotalTime then
table.insert(state.eventLog, {name = 'Recovered', time = self.time, dt = dt})
self.recoveryStates[id][events.recovered] = deepcopy(self.states[id])
state.recoveriesUsed = state.recoveriesUsed + 1
@/lua/vehicle/controller/drivingDynamics/actuators/adaptiveTorsionBars.lua
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/flowgraph/variableStorage.lua
if not data.list then
local oldData = deepcopy(data)
data = {list = data}
@/lua/ge/extensions/career/modules/delivery/parcelMods.lua
local progress = deepcopy(progressTemplate)
M.setProgress = function(data)
progress = data or deepcopy(progressTemplate)
end
@/lua/ge/extensions/editor/preferences.lua
local function pageListGui(items)
local keys = deepcopy(items)
@/lua/ge/extensions/scenario/raceMarkers/crawlMarker.lua
self.oldMode = 'hidden'
self.modeInfos = deepcopy(modeInfos)
@/lua/common/jbeam/materials.lua
for meshi, mesh in pairs(meshes) do
local gmat = deepcopy(gm)
gmat.orgMat = orgMat
-- prepare data for the vehicle side
local triggersCopy = deepcopy(triggers)
for _, t in pairs(triggersCopy) do
@/lua/ge/extensions/ui/liveryEditor/layers/fill.lua
M.layerUid = layerUid
M.layerData = deepcopy(api.getLayerByUid(layerUid))
-- notify ui and extensions
M.layerData = deepcopy(api.getLayerByUid(layer.uid))
if M.layerUid then
M.layerData = deepcopy(api.getLayerByUid(M.layerUid))
end
@/lua/ge/extensions/editor/dynamicDecals/layerTypes/linkedSet.lua
im.TextColored(editor.color.beamng.Value, cat)
local props = deepcopy(properties)
table.sort(props, function(a, b) return a.name < b.name end)
@/lua/ge/extensions/gameplay/police.lua
vars = {
scoreLevels = deepcopy(defaultScoreLevels),
strictness = 0.5, -- strength of detecting driver infractions
local mode = traffic[oldId].pursuit.mode
traffic[newId].pursuit = deepcopy(traffic[oldId].pursuit)
setPursuitMode(0, oldId)
local function onSerialize()
local data = {vars = deepcopy(vars), propIds = deepcopy(policePropIds)} -- no need to cache police ids, they should automatically get reprocessed
onTrafficStopped()
local function onSerialize()
local data = {vars = deepcopy(vars), propIds = deepcopy(policePropIds)} -- no need to cache police ids, they should automatically get reprocessed
onTrafficStopped()
@/lua/ge/extensions/ui/bindingsLegend.lua
if not actionsByName[binding.action] then
local action = deepcopy(actionInfo)
action.label = actionInfo.title
if not bindingsByAction[binding.action] then
local action = deepcopy(actionInfo)
action.action = binding.action
@/lua/ge/extensions/flowgraph/nodes/ui/missionEndScreen.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/editor/dynamicDecals/debugSection.lua
if materialData.mapTo == material then
local dynDecalMaterial = deepcopy(materialData)
@/lua/ge/extensions/flowgraph/nodes/mission/ARunForLife.lua
-- to make sure we don't spawn twice in the same lane
listLaneDone = deepcopy(lanesPos)
end
@/lua/ge/extensions/campaign/dealer.lua
state.stock[itemType] = state.stock[itemType] or {}
local result = deepcopy(state.stock[itemType])
return result
-- log('D', logTag, 'onSerialize called...')
local data = deepcopy(M.state)
return data
local function onSaveCampaign(saveCallback)
local data = deepcopy(M.state)
saveCallback(M.__globalAlias__, data)
@/lua/ge/extensions/scenario/raceMarkers/sideMarker.lua
self.modeInfos = deepcopy(modeInfos)
self.mode = mode
self.oldColor = deepcopy(self.newColor)
self.newColor = deepcopy(self.modeInfos[mode or 'default'].color)
self.oldColor = deepcopy(self.newColor)
self.newColor = deepcopy(self.modeInfos[mode or 'default'].color)
--self.currentColor = ColorF(self.oldColor[1],self.oldColor[2],self.oldColor[3],1)
function C:hide()
self.oldColor = deepcopy(self.newColor)
self.newColor = self.modeInfos['hidden'].color
function C:show()
self.newColor = deepcopy(self.oldColor)
self.oldColor = self.modeInfos['hidden'].color
@/lua/vehicle/controller/driveModes.lua
if controller and controller.setParameters then
local controllerSettings = deepcopy(setting)
controllerSettings.type = nil
order = mode.order,
settings = deepcopy(defaultSettings)
}
@/lua/vehicle/controller/drivingDynamics/actuators/electronicDiffLock.lua
initialControlParameters = deepcopy(controlParameters)
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/ui/vehicleSelector/general.lua
if customRootPath and next(customRootPath) then
pathSegments = deepcopy(customRootPath)
end
@/lua/ge/extensions/ui/liveryEditor/layers/decal.lua
if action.value == "enabled" then
local actionCopy = deepcopy(action)
actionCopy.data = {
@/lua/ge/extensions/editor/objectToSplineEditor.lua
if doCreate then
local actionData = {objId = objId, points = deepcopy(points), params = deepcopy(params)}
editor.history:commitAction("Create Objects At Spline", actionData, createObjectsUndo, createObjectsRedo)
if doCreate then
local actionData = {objId = objId, points = deepcopy(points), params = deepcopy(params)}
editor.history:commitAction("Create Objects At Spline", actionData, createObjectsUndo, createObjectsRedo)
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/vePropTransformer.lua
if vehData then
initVehDatas[vehID] = deepcopy(vehData)
initStates[vehID] = deepcopy(initStateTemplate)
initVehDatas[vehID] = deepcopy(vehData)
initStates[vehID] = deepcopy(initStateTemplate)
initStates[vehID].propsData = deepcopy(initVehDatas[vehID].vdata.props)
initStates[vehID] = deepcopy(initStateTemplate)
initStates[vehID].propsData = deepcopy(initVehDatas[vehID].vdata.props)
states[vehID] = deepcopy(initStates[vehID])
initStates[vehID].propsData = deepcopy(initVehDatas[vehID].vdata.props)
states[vehID] = deepcopy(initStates[vehID])
end
@/lua/vehicle/powertrain/combustionEngine.lua
elseif type(jbeamData.burnEfficiency) == "table" then
tempBurnEfficiencyTable = deepcopy(jbeamData.burnEfficiency)
end
local copy = deepcopy(tempBurnEfficiencyTable)
tempBurnEfficiencyTable = {}
@/lua/ge/extensions/core/levels.lua
if obj then
local data = deepcopy(spawnPoint)
data.type = "spawnPoint"
@/lua/common/jbeam/tableSchema.lua
-- replace row: reassociate the header colums as keys to the row cells
local newRow = deepcopy(ctx.localOptions)
ctx.newListSize = 0
ctx.localOptions = replaceSpecialValues(deepcopy(inputOptions)) or {}
ctx.newList = newList
@/lua/vehicle/controller/drivingDynamics/CMU.lua
initialControlParameters = deepcopy(controlParameters)
end
if value == "default" then
currentControlParam[name] = deepcopy(currentDefaultControlParam[name])
else
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/editor/api/dynamicDecals.lua
local fromLayerData = deepcopy(fromLayer)
local toLayerData = deepcopy(layerData_table)
local fromLayerData = deepcopy(fromLayer)
local toLayerData = deepcopy(layerData_table)
if layer.type == M.layerTypes.decal then
local layerCopy = deepcopy(layer)
layerCopy.cursorPosScreenUv.x = layer.cursorPosScreenUv.x + cursorPosOffset.x
elseif layer.type == M.layerTypes.brushStroke then
local layerCopy = deepcopy(layer)
for _, cpos in ipairs(layerCopy.dataPoints) do
elseif layer.type == M.layerTypes.path then
local layerCopy = deepcopy(layer)
for _, cpos in ipairs(layerCopy.dataPoints) do
local transform = parentTransformNew:copy():mul(transformRel)
local layerCopy = deepcopy(M.getLayerByUid(child.uid))
decalProjection:setDecalWorldTransform(layerCopy, transform)
local function moveLayerLocalPos_group(layer, newLocalPosition, includeChildren, referenceLayerUid)
local layerDataCopy = deepcopy(M.getLayerByUid(referenceLayerUid))
local function moveLayerLocalPos_path(layer, newLocalPosition, includeChildren)
local data = deepcopy(M.getLayerByUid(layer.uid))
local layerDataCopy = shallowcopy(data)
local function moveLayerLocalPos_brushStroke(layer, newLocalPosition, includeChildren)
local data = deepcopy(M.getLayerByUid(layer.uid))
local layerDataCopy = shallowcopy(data)
local function moveLayerLocalPos_decal(layer, newPosition, includeChildren)
local layer = deepcopy(M.getLayerByUid(layer.uid))
local oldTransform = decalProjection:getDecalWorldTransform(layer)
local newTransform = offsetM:mul(oldTransform)
local newLayer = deepcopy(M.getLayerByUid(layer.uid))
decalProjection:setDecalWorldTransform(newLayer, newTransform)
M.rotateLayer = function(layer, delta_vec3)
layer = deepcopy(M.getLayerByUid(layer.uid))
local dotVal = -delta_vec3.y
newTransform = oldTransform:copy():mul(newTransform)
local newLayer = deepcopy(M.getLayerByUid(layer.uid))
decalProjection:setDecalWorldTransform(newLayer, newTransform)
M.scaleLayer = function(layer, delta_vec3)
layer = deepcopy(M.getLayerByUid(layer.uid))
local newLayer = deepcopy(M.getLayerByUid(layer.uid))
layer = deepcopy(M.getLayerByUid(layer.uid))
local newLayer = deepcopy(M.getLayerByUid(layer.uid))
local oldTransform = decalProjection:getDecalWorldTransform(layer)
@/lua/ge/extensions/editor/assemblySpline/splineMgr.lua
splineA.kitFolderPath = copy.kitFolderPath
splineA.meshKit = deepcopy(copy.meshKit)
splineA.moleculeDescription = deepcopy(copy.moleculeDescription)
splineA.meshKit = deepcopy(copy.meshKit)
splineA.moleculeDescription = deepcopy(copy.moleculeDescription)
splineA.rigidEnabledStates = deepcopy(copy.rigidEnabledStates)
splineA.moleculeDescription = deepcopy(copy.moleculeDescription)
splineA.rigidEnabledStates = deepcopy(copy.rigidEnabledStates)
splineA.bridgeEnabledStates = deepcopy(copy.bridgeEnabledStates)
splineA.rigidEnabledStates = deepcopy(copy.rigidEnabledStates)
splineA.bridgeEnabledStates = deepcopy(copy.bridgeEnabledStates)
splineA.isImported = copy.isImported
splineA.isImported = copy.isImported
splineA.importedKit = deepcopy(copy.importedKit)
splineB.kitFolderPath = copy.kitFolderPath
splineB.meshKit = deepcopy(copy.meshKit)
splineB.moleculeDescription = deepcopy(copy.moleculeDescription)
splineB.meshKit = deepcopy(copy.meshKit)
splineB.moleculeDescription = deepcopy(copy.moleculeDescription)
splineB.rigidEnabledStates = deepcopy(copy.rigidEnabledStates)
splineB.moleculeDescription = deepcopy(copy.moleculeDescription)
splineB.rigidEnabledStates = deepcopy(copy.rigidEnabledStates)
splineB.bridgeEnabledStates = deepcopy(copy.bridgeEnabledStates)
splineB.rigidEnabledStates = deepcopy(copy.rigidEnabledStates)
splineB.bridgeEnabledStates = deepcopy(copy.bridgeEnabledStates)
splineB.isImported = copy.isImported
splineB.isImported = copy.isImported
splineB.importedKit = deepcopy(copy.importedKit)
@/lua/ge/extensions/editor/dynamicDecals/gizmo.lua
local function gizmoBeginDrag()
-- M.data.objectDataCopy = deepcopy(M.getLayerByUid(M.data.))
-- you can initialize some dragging variables here
@/lua/ge/extensions/editor/perfProfiler.lua
if im.Button("Delete All Vehicles", im.ImVec2(im.GetContentRegionAvailWidth(), 0)) then
local vehs = deepcopy(getAllVehicles())
for _, obj in ipairs(vehs) do
if im.Button("Save") then
local file = deepcopy(metadataFile)
file.name = nil
@/lua/ge/extensions/gameplay/drag/general.lua
if not M.getDragIsStarted() then
M.setDragRaceData(deepcopy(data))
if not M.startDragRaceActivity(i) then
@/lua/vehicle/powertrain.lua
if device then
local deviceData = deepcopy(device)
if deviceData.children then
deviceJbeamData = {}
for _, jbeamData in pairs(deepcopy(v.data.powertrain)) do
tableMergeRecursive(jbeamData, v.data[jbeamData.name] or {})
@/lua/ge/extensions/scenario/raceMarkers/ringMarker.lua
self.modeInfos = deepcopy(modeInfos)
@/lua/ge/extensions/editor/missionEditor/genericTypeData.lua
if not self.oldMissionTypeData[self.mission.id] or force then self.oldMissionTypeData[self.mission.id] = {} end
self.oldMissionTypeData[self.mission.id][oldType] = deepcopy(self.mission.missionTypeData)
if self.oldMissionTypeData[self.mission.id][newType] ~= nil then
newData = deepcopy(self.oldMissionTypeData[self.mission.id][newType])
end
@/lua/ge/extensions/flowgraph/nodes/scene/camera/procedural/procDirectPath.lua
local from = deepcopy(m)
from.pos = vec3(deepcopy(self.pinIn.from.value)) + d
local from = deepcopy(m)
from.pos = vec3(deepcopy(self.pinIn.from.value)) + d
from.rot = fq
local from2 = deepcopy(m)
from2.pos = vec3(deepcopy(self.pinIn.from.value)) + d * 1.25
local from2 = deepcopy(m)
from2.pos = vec3(deepcopy(self.pinIn.from.value)) + d * 1.25
from2.rot = fq
local mid = deepcopy(m)
mid.pos = (vec3(self.pinIn.from.value)) + vec3(0, 0, 180) + d * 3
-- some helper vectors to get the correct rotation
local tt = (vec3(deepcopy(self.pinIn.to.value)) - mid.pos):normalized()
local tx = tt:cross(vec3(0, 0, 1))
local mid2 = deepcopy(m)
mid2.pos = mid.pos
local to = deepcopy(m)
to.pos = mid2.pos
local to2 = deepcopy(m)
to2.pos = mid2.pos
local out = deepcopy(m)
out.pos = mid.pos
local back = deepcopy(m)
back.pos = vec3(deepcopy(self.pinIn.from.value)) + d * 5 + vec3(0, 0, 90)
local back = deepcopy(m)
back.pos = vec3(deepcopy(self.pinIn.from.value)) + d * 5 + vec3(0, 0, 90)
back.rot = fq
local back2 = deepcopy(m)
back2.pos = vec3(deepcopy(self.pinIn.from.value)) + d
local back2 = deepcopy(m)
back2.pos = vec3(deepcopy(self.pinIn.from.value)) + d
back2.rot = fq
@/lua/ge/extensions/editor/api/object.lua
local function selectObjects(idArray, selectMode)
local oldSel = deepcopy(editor.selection.object)
local selChanged = modifySelection(idArray, selectMode)
local function removeInvalidObjects(objectIds)
local selection = deepcopy(objectIds)
objectIds = {}
@/lua/ge/extensions/career/modules/delivery/cargoScreen.lua
if item.spawnWhenCommitingCargo then
local copy = deepcopy(item)
copy.isFacilityCard = false
local result = {}
getClosestNeighbor("player", deepcopy(targetsById), result, onlyClosestTarget)
core_groundMarkers.setPath(result, {clearPathOnReachingTarget = false})
@/lua/vehicle/controller/drivingDynamics/supervisors/yawProviders/STMEstimate.lua
initialControlParameters = deepcopy(controlParameters)
end
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/tech/sensors.lua
end
local copy = deepcopy(conf)
copy.vid = vid
@/lua/ge/extensions/editor/tech/sensorConfiguration/conversions.lua
end
local sensor = deepcopy(template)
sensor.name = sensor.name .. ctr
@/lua/ge/extensions/util/configListGenerator.lua
for _, subFilter in ipairs(seller.subFilters) do
local aggregateFilter = deepcopy(seller.filter)
tableMergeRecursive(aggregateFilter, subFilter)
local eligibleVehicles = {}
local configData = deepcopy(core_vehicles.getConfigList())
for _, vehicleInfo in pairs(configData.configs) do
local configs = deepcopy(eligibleVehicles)
local filters = createAggregatedFilters(filterSet)
else
local randomVehicleInfo = deepcopy(configs[index])
randomVehicleInfo.filter = filter
@/lua/common/jbeam/sections/camera.lua
for k,v in pairs(vehicle.cameras) do
v = deepcopy(v) or {}
-- shift ipair() iterable indices, from 0..N-1 to 1..N
@/lua/ge/extensions/flowgraph/nodes/input/blacklistActionFilter.lua
function C:_onSerialize(res)
res.activeTemplates = deepcopy(self.activeTemplates)
end
@/lua/ge/extensions/flowgraph/manager.lua
-- copy over data from copied node to pasted node
--node:setData(deepcopy(nodeData.data))
end
@/lua/ge/extensions/editor/gen/world.lua
lo('>>^^^^^^^^^^^^^^^^ toJSON:'..#asave)
table.insert(asave, 1, {math.floor(socket.gettime()), deepcopy(desc)})
if #asave > default.maxundo then
clean()
desc = deepcopy(asave[2][2])
table.remove(asave, 1)
if inupdate then
aforest = deepcopy(sdata.aforest)
else
local i = 0
local saforest = deepcopy(aforest)
if sdata.default then
botext = {}
-- desc.afloor[i+1].botext = deepcopy(desc.afloor[i+1].base)
-- botext = {} --deepcopy(desc.afloor[i+1].base)
-- desc.afloor[i+1].botext = deepcopy(desc.afloor[i+1].base)
-- botext = {} --deepcopy(desc.afloor[i+1].base)
end
-- lower lid
subdata = deepcopy(mdata)
-- U.dump(asi, '?? ASI1:'..#subdata.verts)
if #f.top.achild == 1 and not c.base then
c.base = deepcopy(f.base)
end
for k=1,#desctop.adata do
local af = deepcopy(desctop.adata[k].af)
-- U.dump(af, '?? for_AF:'..k..':'..#af)
end
local an = deepcopy(desctop.adata[k].an)
for k = 1,#an do
local function fromFloor(desc, i)
local fnew = deepcopy(desc.afloor[i])
for j,w in pairs(fnew.awall) do
doorind = nil,
pillar = deepcopy(wdesc.pillar),
}
elseif intest then
awmat = deepcopy(dmat.wall)
table.remove(awmat, 1)
-- build LOD geometry file
local afloor = deepcopy(desc.afloor)
local topfloor = desc.afloor[#desc.afloor]
local mat = M.forNode(ndmatlib, {'material'})
mat = deepcopy(mat)
M.ofNode(mat, {id=idmat,name=topfloor.top.mat})
local ndinst = M.forNode(ndtech, {'instance_material'})
ndinst = deepcopy(ndinst)
M.ofNode(ndinst, {target='#'..idmat, symbol=idmat})
local ndinstg = M.forNode(ndlod, {'instance_geometry'})
ndinstg = deepcopy(ndinstg)
M.ofNode(ndinstg, {url='#'..'geo_top'})
local ndinst = M.forNode(ndtech, {'instance_material'})
ndinst = deepcopy(ndinst)
M.ofNode(ndinst, {target='#'..idmat, symbol=idmat})
else
cedit.cval['DragMat'] = deepcopy(mesh.uvs) -- U.clone(mesh.uvs)
return
if i > ima then ima = i end
local f = deepcopy(house.afloor[i])
afloor[#afloor+1] = f
floor = adesc[cedit.mesh].afloor[ind]
local newfloor = deepcopy(floor)
-- table.insert(house.afloor, ito, newfloor)
end
table.insert(asave, 1, {math.floor(socket.gettime()), deepcopy(desc)})
]]
if i > ima then ima = i end
local f = deepcopy(house.afloor[i])
afloor[#afloor+1] = f
floor = adesc[cedit.mesh].afloor[cij[1]]
local newfloor = deepcopy(floor)
-- table.insert(house.afloor, ito, newfloor)
--[[
table.insert(asave, 1, {math.floor(socket.gettime()), deepcopy(desc)})
-- asave[#asave+1] = math.floor(socket.gettime())
end
afloor[#afloor + 1] = deepcopy(dsrc.afloor[k])
end
-- for j,_ in pairs(buf[akey[1]]) do
awall[#awall+1] = deepcopy(dsrc.afloor[akey[1]].awall[j])
L = L + fsrc.awall[j].u:length()
-- for j,_ in pairs(buf[akey[1]]) do
local w = awall[n+1] -- deepcopy(dsrc.afloor[akey[1]].awall[j])
for dae,r in pairs(w.df) do
local newfloor = deepcopy(desc.afloor[akey[1]])
if cij[1] == #desc.afloor then
lo('?? emp_wall:'..j)
awall[#awall+1] = deepcopy(fsrc.awall[j-1])
end
end
awall[#awall+1] = deepcopy(fsrc.awall[j])
local w = awall[#awall]
-- local wnew = deepcopy(fsrc.awall[1])
-- wnew.df = {}
-- U.dump(desc.afloor[akey[1]].top, '?? whole:'..i..':'..akey[i])
table.insert(dnew.afloor, 1, deepcopy(dsrc.afloor[akey[i]]))
-- remove forest
if true then
floor.achild[#floor.achild+1] = deepcopy(dnew)
floor.achild[#floor.achild].pos = posnew -- floor.achild[#floor.achild].pos + vec3(4,0,0)
-- if not w.pillar then
-- w.pillar = deepcopy(default.pillar)
-- end
if not w.pillar then
w.pillar = deepcopy(default.pillar)
-- U.dump(default.pillar,'?? p_new:'..ij[2]..':'..tostring(w.pillar.yes))
if daePath[tp] then
local list = U.perm(deepcopy(daePath[tp]))
if U._PRD == 0 then list = deepcopy(daePath[tp]) end
local list = U.perm(deepcopy(daePath[tp]))
if U._PRD == 0 then list = deepcopy(daePath[tp]) end
for i,pth in pairs(list) do
table.insert(floor.base, ma+1, U.mod(ma+1,floor.base))
local w = deepcopy(floor.awall[ma])
w.id = nil
-- U.dump(floor.base, '?? to_ins_at_mi:'..i..':'..mi)
local w = deepcopy(floor.awall[mi])
w.id = nil
-- save forest info
-- local sdesc = deepcopy(adesc)
local dnew = {afloor = {}, pos = vec3(0,0,0), prn = desc.id, floor = floor.ij[1]}
local child = deepcopy(floor)
child.base = deepcopy(c.base)
local child = deepcopy(floor)
child.base = deepcopy(c.base)
dnew.afloor = {child}
for i,b in pairs(child.base) do
child.awall[#child.awall+1] = deepcopy(floor.awall[c.imap[i]])
end
-- U.dump(desc.afloor[1].awall[1], '?? floor_PRE:'..tostring(desc.afloor[2].pos))
local floor = {ij = {1}, base = deepcopy(desc.afloor[1].base), pos = floorpre.pos,
h = W.ui.basement_height,
h = W.ui.basement_height,
top = deepcopy(floorpre.top), awall = {},
}
df = {},
uv = deepcopy(floorpre.awall[j].uv),
mat = out.defmat -- 'm_greybox_base', -- 'm_stonewall_damaged_01',
end
cedit.cval['DragPos'] = {base = deepcopy(desc.afloor[cij[1]].base), cbase = cbase}
-- return
if not cedit.cval['DragPos'] or not cedit.cval['DragPos'].hole then
cedit.cval['DragPos'] = {hole = deepcopy(ahole[cur].base), frame = deepcopy(out.ahole)}
incontrol = true
if not cedit.cval['DragPos'] or not cedit.cval['DragPos'].hole then
cedit.cval['DragPos'] = {hole = deepcopy(ahole[cur].base), frame = deepcopy(out.ahole)}
incontrol = true
end
cedit.cval['DragPos'].shole = deepcopy(ahole[cur].base)
cedit.cval['DragPos'].sframe = deepcopy(out.ahole)
cedit.cval['DragPos'].shole = deepcopy(ahole[cur].base)
cedit.cval['DragPos'].sframe = deepcopy(out.ahole)
local w = out.inhole
if not cedit.cval['DragPos'] or not cedit.cval['DragPos'].hole then
cedit.cval['DragPos'] = {hole = deepcopy(ahole[cur].base), frame = deepcopy(out.ahole)}
incontrol = true
if not cedit.cval['DragPos'] or not cedit.cval['DragPos'].hole then
cedit.cval['DragPos'] = {hole = deepcopy(ahole[cur].base), frame = deepcopy(out.ahole)}
incontrol = true
end
cedit.cval['DragPos'].shole = deepcopy(ahole[cur].base)
cedit.cval['DragPos'].sframe = deepcopy(out.ahole)
cedit.cval['DragPos'].shole = deepcopy(ahole[cur].base)
cedit.cval['DragPos'].sframe = deepcopy(out.ahole)
local w = out.inhole
-- lo('?? to_DEL:',true)
local top = deepcopy(desc.afloor[#desc.afloor].top)
for i = 1,#desc.afloor-val do
@/lua/common/interpolatedMap.lua
]]
local data = deepcopy(inputData)
--we expectd the first row to be the header and that it has one less entry than the second row,
@/lua/vehicle/extensions/scenario/annotate.lua
print("### onVehicleScenarioData ###")
data = deepcopy(_data)
if type(data.text) ~= 'string' then
@/lua/ge/extensions/core/paths.lua
local function savePath(cameraPath, filename)
local pathCopy = deepcopy(cameraPath)
for index, marker in ipairs(pathCopy.markers) do
return {
paths = deepcopy(paths)
}
local function onDeserialized(data)
paths = deepcopy(data.paths)
end
@/lua/ge/extensions/gameplay/missions/missionManager.lua
mission.setupModules.environment._originalTimeOfDay = deepcopy(core_environment.getTimeOfDay() or {})
local fogDensity, fogObj = core_environment.getFogDensity()
mission.setupModules.environment._originalTimeOfDay.play = mission.setupModules.environment._originalTimeOfDay.play and true or false
local tod = deepcopy(core_environment.getTimeOfDay())
tod.time = mission.setupModules.environment.time
@/gameplay/missionTypes/aiRace/editor.lua
local instance = gameplay_missions_missions.getMissionById(mission.id)
local defaultStarKeysSorted = deepcopy(instance.careerSetup._activeStarCache.defaultStarKeysSorted)
@/lua/ge/extensions/scenario/raceDebug.lua
if not node then
node = deepcopy(mapData.nodes[wpp])
end
@/lua/ge/extensions/core/trafficSignals.lua
local controllerStates = seconds <= duration and sequence.controllerStates or deepcopy(sequence.controllerStates) -- deepcopy if changes are expected
@/lua/ge/extensions/editor/crawlEditor/paths.lua
self._prevGizmoPos = vec3(editor.getAxisGizmoTransform():getColumn(3))
self._prevPathnodePos = deepcopy(self.currentPathnode.pos)
self._prevPathnodeRotation = quat(self.currentPathnode.rotation or quat(1, 0, 0, 0))
@/lua/ge/extensions/editor/gen/utils.lua
local out = {}
local aeref = deepcopy(aloop)
table.insert(aeref, 1, rc)
local out = {}
local aeref = deepcopy(aloop)
aeref[#aeref+1] = rc
-- base = U.clone(base)
base = deepcopy(base)
local map = {}
@/gameplay/missionTypes/delivery/editor.lua
local instance = gameplay_missions_missions.getMissionById(mission.id)
local defaultStarKeysSorted = deepcopy(instance.careerSetup._activeStarCache.defaultStarKeysSorted)
@/lua/ge/extensions/editor/sidewalkSpline/splineMgr.lua
spline.splineRandomSeed = copy.splineRandomSeed
spline.pieceDistribution = deepcopy(copy.pieceDistribution)
spline.roadLength = 0.0
spline.kitFolderPath = copy.kitFolderPath
spline.meshKit = deepcopy(copy.meshKit)
spline.kitDescription = deepcopy(copy.kitDescription)
spline.meshKit = deepcopy(copy.meshKit)
spline.kitDescription = deepcopy(copy.kitDescription)
spline.pieceEnabledStates = deepcopy(copy.pieceEnabledStates)
spline.kitDescription = deepcopy(copy.kitDescription)
spline.pieceEnabledStates = deepcopy(copy.pieceEnabledStates)
spline.distributionGroups = deepcopy(copy.distributionGroups)
spline.pieceEnabledStates = deepcopy(copy.pieceEnabledStates)
spline.distributionGroups = deepcopy(copy.distributionGroups)
spline.isImported = copy.isImported
spline.isImported = copy.isImported
spline.importedKit = deepcopy(copy.importedKit)
splineB.kitFolderPath = copy.kitFolderPath
splineB.meshKit = deepcopy(copy.meshKit)
splineB.kitDescription = deepcopy(copy.kitDescription)
splineB.meshKit = deepcopy(copy.meshKit)
splineB.kitDescription = deepcopy(copy.kitDescription)
splineB.pieceEnabledStates = deepcopy(copy.pieceEnabledStates)
splineB.kitDescription = deepcopy(copy.kitDescription)
splineB.pieceEnabledStates = deepcopy(copy.pieceEnabledStates)
splineB.distributionGroups = deepcopy(copy.distributionGroups)
splineB.pieceEnabledStates = deepcopy(copy.pieceEnabledStates)
splineB.distributionGroups = deepcopy(copy.distributionGroups)
splineB.isImported = copy.isImported
splineB.isImported = copy.isImported
splineB.importedKit = deepcopy(copy.importedKit)
splineRandomSeed = spline.splineRandomSeed,
pieceDistribution = deepcopy(spline.pieceDistribution),
kitFolderPath = spline.kitFolderPath,
kitFolderPath = spline.kitFolderPath,
pieceEnabledStates = deepcopy(spline.pieceEnabledStates),
}
spline.splineRandomSeed = copiedProfile.splineRandomSeed
spline.pieceDistribution = deepcopy(copiedProfile.pieceDistribution)
spline.kitFolderPath = copiedProfile.kitFolderPath
if copiedProfile.pieceEnabledStates then
spline.pieceEnabledStates = deepcopy(copiedProfile.pieceEnabledStates)
end
splineRandomSeed = spline.splineRandomSeed,
pieceDistribution = deepcopy(spline.pieceDistribution),
kitFolderPath = spline.kitFolderPath,
kitFolderPath = spline.kitFolderPath,
pieceEnabledStates = deepcopy(spline.pieceEnabledStates),
}
spline.splineRandomSeed = templateData.splineRandomSeed or defaultParams.splineRandomSeed
spline.pieceDistribution = deepcopy(templateData.pieceDistribution)
spline.kitFolderPath = templateData.kitFolderPath
if templateData.pieceEnabledStates then
spline.pieceEnabledStates = deepcopy(templateData.pieceEnabledStates)
end
@/lua/ge/extensions/gameplay/route/raceRoute.lua
-- setmetatable(clone, C)
-- clone.path = deepcopy(self.path)
-- clone.originalPositions = deepcopy(self.originalPositions)
-- clone.path = deepcopy(self.path)
-- clone.originalPositions = deepcopy(self.originalPositions)
@/lua/ge/extensions/core/cameraModes/path.lua
-- Passed a marker
self.lastCtrlPointR2 = deepcopy(self.lastFrameR2)
if markers[n2].cut then
@/lua/ge/extensions/editor/missionEditor/objectives.lua
if editor.uiIconImageButton(editor.icons.content_copy, im.ImVec2(22, 22)) then
self.copiedRewards = deepcopy(rewards or {})
end
if editor.uiIconImageButton(editor.icons.content_paste, im.ImVec2(22, 22)) then
rewards = deepcopy(self.copiedRewards)
self.mission._dirty = true
if editor.uiIconImageButton(editor.icons.content_copy, im.ImVec2(22, 22)) then
self.copiedStars[self.mission.missionType] = deepcopy(self.mission.careerSetup or {})
end
if editor.uiIconImageButton(editor.icons.content_paste, im.ImVec2(22, 22)) then
self.mission.careerSetup = deepcopy(self.copiedStars[self.mission.missionType])
self.mission._dirty = true
@/lua/ge/extensions/career/career.lua
local actionWhitelist = deepcopy(devActions)
arrayConcat(actionWhitelist, nodegrabberActions)
local attKey = br.attributeKey
local brData = deepcopy(career_modules_playerAttributes.getAttribute(attKey) or {value=br.defaultValue or 0})
brData.level, brData.curLvlProgress, brData.neededForNext = career_branches.calcBranchLevelFromValue(brData.value, br.id)
if attData then
data.money = deepcopy(attData.money) or {value=0}
data.beamXP = deepcopy(attData.beamXP) or {value=0}
data.money = deepcopy(attData.money) or {value=0}
data.beamXP = deepcopy(attData.beamXP) or {value=0}
data.vouchers = deepcopy(attData.vouchers) or {value=0}
data.beamXP = deepcopy(attData.beamXP) or {value=0}
data.vouchers = deepcopy(attData.vouchers) or {value=0}
if insuranceData and insuranceData.plDriverScore then
local newAttKey = career_branches.newAttributeNamesToOldNames[attKey] or attKey
local brData = deepcopy(attData[newAttKey] or attData[attKey] or {value=br.defaultValue or 0})
brData.level, brData.curLvlProgress, brData.neededForNext = career_branches.calcBranchLevelFromValue(brData.value, br.id)
@/lua/ge/extensions/ui/liveryEditor/layerAction.lua
local referenceDecal = api.addDecal()
local newDecal = deepcopy(referenceDecal)
newDecal.uid = layer.uid
@/lua/ge/extensions/core/hotlapping.lua
if not veh:isPlayerControlled() and not veh.isTraffic and not veh.isParked then
local route = deepcopy(raceData.aiPath)
table.insert(route, route[1])
@/lua/ge/extensions/flowgraph/nodes/gameplay/rally/loop/saveRallyLoopAttempt.lua
self.pinOut.change.value = totalChange
self.pinOut.outroTranslation.value = { txt = outroText, context = deepcopy(attempt.data) }
end
@/lua/vehicle/controller/drivingDynamics/actuators/activeDiffBias.lua
initialControlParameters = deepcopy(controlParameters)
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/common/jbeam/variables.lua
log('I', 'component', 'path processed: "' .. tostring(componentKey) .. '" = ' .. dumps(new_val))
d[key] = deepcopy(new_val)
end
local function applySlotVars(slotVars, _vars)
if tableIsEmpty(_vars) then return deepcopy(slotVars) end
local vars = deepcopy(_vars)
if tableIsEmpty(_vars) then return deepcopy(slotVars) end
local vars = deepcopy(_vars)
local succeed = {}
do
local wrapper = { _v = deepcopy(rootVarsList) }
-- only evaluate $= inside variables
-- this produces a map like { ['$AAA'] = { val = 1, ... }, ... } used by expressionParser
local currentVarsMap = _sanitizeVars(deepcopy(rootVarsList), vehicleConfig.vars or {})
currentVarsMap['$components'] = {val = rootPart.components}
-- resolve slot variables against parent scope, then merge to form this part scope
local svars = applySlotVars(deepcopy(slotVars or {}), parentScope)
svars = tableMerge(deepcopy(parentScope), svars)
local svars = applySlotVars(deepcopy(slotVars or {}), parentScope)
svars = tableMerge(deepcopy(parentScope), svars)
if #partVarsList > 0 then
local wrap = { _v = deepcopy(partVarsList) }
apply(wrap, svars, true)
-- this makes values like $BBB_1 available to deeper parts
local sanitizedPartVars = _sanitizeVars(deepcopy(partVarsList), vehicleConfig.vars or {})
svars = tableMerge(svars, sanitizedPartVars)
if debugParts then
partOrig = deepcopy(part)
end
svars = tableMerge(deepcopy(varStack[parentPart]), svars)
varStack[part] = svars
local varStack = {}
varStack[tostring(rootPart)] = deepcopy(vars)
-- get the slot variables into the proper stack
local slotVarCopy = deepcopy(slot.variables or {})
local svars = applySlotVars(slotVarCopy, varStack[tostring(parentPart)] or {})
local svars = applySlotVars(slotVarCopy, varStack[tostring(parentPart)] or {})
svars = tableMerge(deepcopy(varStack[tostring(parentPart)]), svars)
svars['$components'] = {val = rootPart.components}
@/lua/ge/extensions/flowgraph/nodes/ui/customUiLayout.lua
if im.Selectable1(key) then
self.storedLayout = deepcopy(layouts[key])
reason = "Copied layout " ..key .."."
@/lua/ge/extensions/flowgraph/states.lua
end
local currentDepth = deepcopy(depth)
table.insert(currentDepth, graph.id)
node = node,
depth = deepcopy(currentDepth)
}
simple = 'from ' .. link.sourceNode.id.." to " .. link.targetNode.id,
depth = deepcopy(currentDepth)
}
for _, child in ipairs(graph:getChildren()) do self:gatherNodesAndLinksRecursion(child, nodes, links, group, deepcopy(currentDepth)) end
end
@/lua/ge/extensions/flowgraph/nodes/gameplay/decalCircle.lua
{ dir = 'in', type = 'number', name = 'radius', default = 1, description = 'Circle radius.' },
{ dir = 'in', type = 'vec3', name = 'decalScale', description = 'Decal scale.', default = deepcopy(defaultDecalScale), hardcoded = true },
{ dir = 'in', type = 'number', name = 'amount', description = "How many decals will be drawn to create the circle (The more, the smoother it'll look, but will be slower).", default = defaultAmount, hardcoded = true },
{ dir = 'in', type = 'number', name = 'filling2', description = "How much filled (0 - 100) will be the second filling (Can display a cooldown).", default = 0, hardcoded = true },
{ dir = 'in', type = 'color', name = 'filledColor', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor), description = 'Primary color.' },
{ dir = 'in', type = 'color', name = 'fillingColor1', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor1), description = 'First filling color (progress).' },
{ dir = 'in', type = 'color', name = 'filledColor', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor), description = 'Primary color.' },
{ dir = 'in', type = 'color', name = 'fillingColor1', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor1), description = 'First filling color (progress).' },
{ dir = 'in', type = 'color', name = 'fillingColor2', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor2), description = 'Second filling color (cooldown).' },
{ dir = 'in', type = 'color', name = 'fillingColor1', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor1), description = 'First filling color (progress).' },
{ dir = 'in', type = 'color', name = 'fillingColor2', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor2), description = 'Second filling color (cooldown).' },
{ dir = 'in', type = 'color', name = 'backgroundColor', hidden = true, hardcoded = true, default = deepcopy(defaultBGColor), description = 'Secondary color (opposite of filling).' }
{ dir = 'in', type = 'color', name = 'fillingColor2', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor2), description = 'Second filling color (cooldown).' },
{ dir = 'in', type = 'color', name = 'backgroundColor', hidden = true, hardcoded = true, default = deepcopy(defaultBGColor), description = 'Secondary color (opposite of filling).' }
}
if not self.colorCache[k] or (self.pinIn[k].value and not setEqual(self.colorCache[k], self.pinIn[k].value)) then
self.colorCache[k] = deepcopy(self.pinIn[k].value or pin.default)
self.colorFCache[k] = ColorF(unpack(self.colorCache[k]))
@/lua/ge/extensions/util/export.lua
local function _createPartTree(gltfRoot, vehiclePartTree, slotMap, partToFlexMesh, meshNodeMap, partNodeBeams, createdNodeIDs)
partToFlexMesh = deepcopy(partToFlexMesh)
gltfRoot.scenes[1].nodes = {}
if not gltfRoot then
gltfRoot = deepcopy(gltfRootTemplate)
-- only add the index buffer at the beginning
@/lua/vehicle/controller/drivingDynamics/supervisors/components/motorTorqueControl.lua
initialControlParameters = deepcopy(controlParameters)
end
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/career/modules/marketplace.lua
local function getListings()
local listingsCopy = deepcopy(listedVehicles)
for i, listing in ipairs(listingsCopy) do
@/lua/ge/extensions/editor/dynamicDecals/layerTypes/path.lua
if editor.uiIconImageButton(editor.icons.move, im.ImVec2(tool.getIconSize(), tool.getIconSize()), (gizmo.data.uid == layer.uid and gizmo.data.dataPointIndex == k) and editor.color.beamng.Value or nil, nil, nil, string.format("MovePathPoint_%s_%d", layer.uid, k)) then
local layerData = deepcopy(layer)
api.projectDynamicDecals = false
api.setDecalLocalPos(layerData, newGizmoTransform:getPosition() - vehicleObj:getPosition())
layerData.dataPoints[k] = deepcopy(layerData.cursorPosScreenUv)
api.setLayer(layerData, true)
@/lua/vehicle/controller/drivingDynamics/supervisors/components/awdControl.lua
initialControlParameters = deepcopy(controlParameters)
M.isActive = true
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/gameplay/rally/notebook/systemPacenotes.lua
-- M.getCopy = function(langs)
-- local spCopy = deepcopy(staticPacenotes)
-- local out = {}
@/lua/ge/extensions/core/weather.lua
formerValues = {}
local p = deepcopy(presets[presetName])
@/lua/ge/extensions/ui/liveryEditor/layerEdit.lua
-- keep original copy to restore original on cancel changes
M.editState.layer = deepcopy(layer)
M.editState.layerType = layer.type
local referenceDecal = api.addDecal()
local layer = deepcopy(referenceDecal)
layer.uid = M.editState.layerUid
local referenceDecal = api.addDecal()
layer = deepcopy(referenceDecal)
layer.uid = M.editState.layerUid
@/lua/ge/extensions/core/quickAccess.lua
local function getDynamicSlotConfigurationData()
local menuTreeCopyForUI = deepcopy(menuTreeCopy)
local dynamicSlotSettingsData = dynamicSlotSettings[dynamicSlotKeyToConfigure]
local function addEntry(_args)
local args = deepcopy(_args) -- do not modify the outside table by any chance
if type(args.generator) ~= 'function' and (type(args.title) ~= 'string' or (type(args.onSelect) ~= 'function' and type(args["goto"]) ~= 'string')) then
else
gameStateBefore = deepcopy(core_gamestate.state)
end
local function isMenuEmpty(level)
local entries = deepcopy(menuTreeCopy[level] or {}) -- make a copy, the generators modify the menu below, this should not be persistent
local menuItems = {}
local function generateCompleteTree(level)
local menuTreeCopy = deepcopy(menuTree)
currentMenuItems = {}
if item.dynamicSlot then
item.dynamicSlotSetting = deepcopy(dynamicSlotSettings[item.dynamicSlot.id])
table.insert(dynamicItems, item)
recentActionsIdx = recentActionsIdx + 1
actionInfo = deepcopy(getActionInfo(recentAction.level, recentAction.uniqueID))
originalActionInfo = {level = recentAction.level, uniqueID = recentAction.uniqueID}
item.marking = "star"
actionInfo = deepcopy(getActionInfo(item.dynamicSlotSetting.level, item.dynamicSlotSetting.uniqueID))
originalActionInfo = {level = item.dynamicSlotSetting.level, uniqueID = item.dynamicSlotSetting.uniqueID}
@/lua/ge/extensions/flowgraph/nodes/gameplay/traffic/trafficMoveGroup.lua
if self.pinIn.shuffle.value then
self.vehIds = arrayShuffle(deepcopy(self.vehIds))
end
@/lua/ge/extensions/ui/freeroamSelector/general.lua
if customRootPath and next(customRootPath) then
pathSegments = deepcopy(customRootPath)
end
@/lua/ge/extensions/scenario/raceMarkers/sideColumnMarker.lua
self.modeInfos = deepcopy(modeInfos)
@/lua/ge/extensions/flowgraph/nodes/gameplay/decalSingle.lua
{ dir = 'in', type = 'quat', name = 'rot', description = 'Decal rotation.' },
{ dir = 'in', type = 'vec3', name = 'scl', description = "Decal scale.", default = deepcopy(defaultDecalScale), hardcoded = true },
{ dir = 'in', type = 'string', name = 'decalPath', description = 'The path of the decal to be used.', default = defaultDecalPath, hardcoded = true },
{ dir = 'in', type = 'string', name = 'decalPath', description = 'The path of the decal to be used.', default = defaultDecalPath, hardcoded = true },
{ dir = 'in', type = 'color', name = 'clrA', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor), description = 'Primary color of the decal.' },
{ dir = 'in', type = 'color', name = 'clrB', hidden = true, hardcoded = true, default = deepcopy(defaultBGColor), description = 'Secondary color of the decal.' },
{ dir = 'in', type = 'color', name = 'clrA', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor), description = 'Primary color of the decal.' },
{ dir = 'in', type = 'color', name = 'clrB', hidden = true, hardcoded = true, default = deepcopy(defaultBGColor), description = 'Secondary color of the decal.' },
{ dir = 'in', type = 'number', name = 'clrFrequency', hidden = true, hardcoded = true, default = 2, description = 'Frequency of the color change.' }
@/gameplay/missionTypes/knockAway/editor.lua
local instance = gameplay_missions_missions.getMissionById(mission.id)
local defaultStarKeysSorted = deepcopy(instance.careerSetup._activeStarCache.defaultStarKeysSorted)
@/lua/ge/extensions/scenario/scenarios.lua
local data = fileData[scenario.scenarioName]
local statData = deepcopy(stats)
if mapData.nodes[wp] ~= nil then
scenario.nodes[wp] = deepcopy(mapData.nodes[wp])
scenario.nodes[wp].radius = scenario.nodes[wp].radius * aiRadFac
scenario.stats = nil
scenario.lapConfig = deepcopy(scenario.initialLapConfig)
local tmp = deepcopy(scenario)
stop()
@/lua/ge/extensions/gameplay/drag/saveSystem.lua
if timeslip then
local historyEntry = deepcopy(timeslip)
historyEntry.stripId = dragData.strip and dragData.strip.id or "unknown"
@/lua/ge/extensions/editor/api/preferencesRegistry.lua
local fname = filename or DefaultPreferencesPath
self.preferences = deepcopy(jsonReadFile(fname)) or {}
if self.preferences.version ~= PreferencesFileFormatVersion then
if nil == self.preferences[cat.name] then
val = deepcopy(item.defaultValue)
isDefaultValue = true
-- default, subcategory should be non nil
val = deepcopy(item.defaultValue)
isDefaultValue = true
-- default value, was not found in the json file
val = deepcopy(item.defaultValue)
isDefaultValue = true
-- we keep all preference value that were set in the past, because some extensions might not be loaded anymore but they might be loaded in the future
local prefsToSave = deepcopy(self.preferences)
if not prefsToSave then return false end
for _, item in pairs(subCat.items) do
self:set(item.path, deepcopy(item.defaultValue))
end
local item = self:findItem(itemPath)
self:set(item.path, deepcopy(item.defaultValue))
return true
@/lua/ge/extensions/editor/api/valueInspector.lua
editor.pickingLinkTo.child = Sim.findObjectById(self.selectedIds[1])
editor.pickingLinkTo.selectionObjectIds = deepcopy(self.selectedIds)
end imgui.SameLine()
@/lua/ge/extensions/flowgraph/modules/fileModule.lua
if FS:fileExists(p) then
self.files[file] = jsonReadFile(p) or deepcopy(defaultFile)
else
else
self.files[file] = deepcopy(defaultFile)
end
@/lua/ge/extensions/core/vehicles.lua
if not destination[key] then
destination[key] = deepcopy(data[key])
else
if not destination[key] then
destination[key] = deepcopy(data[key])
else
if not destination[key] then
destination[key] = deepcopy(data[key])
else
local function sanitizeInfoFile(data, filepath)
local newData = deepcopy(data)
for key, value in pairs(data) do
if data then
model = deepcopy(data)
if cache[key].configs and tableSize(cache[key].configs) < 1 then
cache[key].configs[key] = deepcopy(model)
if cache[key].configs[key].model_key == nil then
else
filter[propName] = deepcopy(value.aggregates[propName])
end
-- Get the config data
opt = deepcopy(opt) or {}
prepareConfigData(modelName, opt)
local vehs = _spawnNewVehicle(modelName, opt.config, state, opt, 1)
local vehCollection = deepcopy(state.initVehCollection)
buildInitVehCollectionCache(state.initVehCollection, vehCollection)
-- Get the config data
opt = deepcopy(opt) or {}
prepareConfigData(modelName, opt)
local vehCollection = deepcopy(state.initVehCollection)
buildInitVehCollectionCache(state.initVehCollection, vehCollection)
-- local function resetToInitState(vid)
-- local collection = deepcopy(M.initVehIdToVehCollection[vid])
-- if collection then
-- local function resetAllToInitState()
-- M.vehCollections = deepcopy(M.initVehCollections)
-- M.vehIdToVehCollection = deepcopy(M.initVehIdToVehCollection)
-- M.vehCollections = deepcopy(M.initVehCollections)
-- M.vehIdToVehCollection = deepcopy(M.initVehIdToVehCollection)
@/lua/ge/extensions/gameplay/util/crashDetection.lua
table.insert(crashData.preImpactData.frameDamages, deepcopy(newFrameDamage))
crashData.totalPreImpactDamage = crashData.totalPreImpactDamage + newFrameDamage.newDamage
table.insert(crashData.currentImpactData.frameDamages, deepcopy(newFrameDamage))
crashData.totalCurrentImpactDamage = crashData.totalCurrentImpactDamage + newFrameDamage.newDamage
else
table.insert(crashData.currentImpactData.frameDamages, deepcopy(newFrameDamage))
crashData.totalCurrentImpactDamage = crashData.totalCurrentImpactDamage + newFrameDamage.newDamage
@/lua/vehicle/controller/drivingDynamics/actuators/adaptiveDampers.lua
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/gameplay/race/path.lua
end
local order = deepcopy(lapConfig)
if closed then
end
local order = deepcopy(list)
if closed then
if trackInfo.originalInfo[field] ~= nil then
path[field] = deepcopy(trackInfo.originalInfo[field])
end
@/lua/ge/extensions/flowgraph/nodes/types/transform.lua
function C:gizmoBeginDrag()
self._beginDragRotation = deepcopy(quat(self.rotation))
self._beginDragScale = vec3(self.scale)
@/lua/ge/extensions/career/modules/fuel.lua
fuelingActive[index] = true
startingFuelData = startingFuelData or deepcopy(fuelData)
end
@/lua/vehicle/bdebugImpl.lua
M.state = state
M.state.vehicle = M.state.vehicle or deepcopy(M.initState.vehicle)
for k, v in pairs(M.state.vehicle) do
local function resetModes()
M.state = deepcopy(M.initState)
guihooks.message("vehicle.bdebug.clear", 3, "debug")
M.state = deepcopy(savedState or M.initState)
M.state.vehicle.nodeDebugTextTypeToID = newPartialState.vehicle.nodeDebugTextTypeToID
@/lua/ge/extensions/trackbuilder/trackBuilder.lua
materialSettings.groundModels = core_environment.groundModels
materialSettings.groundModelNames = deepcopy(gMNames)
materialSettings.groundModelNamesPtr = im.ArrayCharPtrByTbl(materialSettings.groundModelNames)
@/lua/vehicle/controller/drivingDynamics/supervisors/slipProviders/virtualSpeedSlip.lua
local function initLastStage(jbeamData)
initialControlParameters = deepcopy(controlParameters)
end
local function getConfig()
return deepcopy(controlParameters)
end
@/gameplay/missionTypes/rallyStage/constructor.lua
self.fgVariables = deepcopy(self.missionTypeData)
self.missionTypeLabel = "bigMap.missionLabels.rallyStage"
@/lua/common/jbeam/slotSystem.lua
local function unifyParts(target, source_raw, level, slotOptions, partPath)
local source = deepcopy(source_raw)
--log('I', "jbeam.unifyParts",string.rep(" ", level).."* merging part "..tostring(source.partName).."{".. tostring(source) .. "}["..dumps(source.slotType).."] => "..tostring(target.partName).." ["..tostring(target.slotType).."] ... ")
if type(section) == "table" and not tableIsDict(section) then
local localSlotOptions = deepcopy(slotOptions) or {}
localSlotOptions.partOrigin = source.partName
else
localSlotOptions = deepcopy(slotOptions) or {}
localSlotOptions.partOrigin = source.partName
for _, slotDef in ipairs(slots) do
local slotOptions = deepcopy(_slotOptions) or {}
slotOptions = tableMerge(slotOptions, deepcopy(slotDef))
local slotOptions = deepcopy(_slotOptions) or {}
slotOptions = tableMerge(slotOptions, deepcopy(slotDef))
slotPartMap[newPath] = chosenPartName
activePartsData[chosenPartName] = deepcopy(chosenPart)
activeParts[partPath] = chosenPartName
chosenPart = deepcopy(chosenPart)
activePartsData[mainPartName] = deepcopy(rootPart)
activeParts[mainPartPath] = mainPartName
@/lua/ge/extensions/editor/missionEditor/setupModules.lua
v._compatibility = nil
self.mission.setupModules[k] = deepcopy(v)
end
if im.Button("Add New Provided Vehicle") then
table.insert(setupModule.vehicles, deepcopy(defaultVehicle)) -- deepcopy is important here
self.mission._dirty = true
@/lua/ge/extensions/editor/terrainEditor.lua
local function brushSoftnessCurve_Show()
var.softSelectFilterBackup = deepcopy(var.softSelectFilter)
editor.showWindow(terrainBrushSoftnessCurveDialogName)
local function brushSoftnessCurve_Default()
var.softSelectFilter = deepcopy(var.softSelectFilterDefault)
if editor.getPreference("terrainEditor.general.brushSoftnessCurveLiveUpdate") == true then
if var.softSelectFilterBackup then
var.softSelectFilter = deepcopy(var.softSelectFilterBackup)
end
local function copyMaterialProxyWithInputs(mtlProxy)
local mtlProxyCopy = deepcopy(mtlProxy)
if path == "terrainEditor.general.brushSlopeMaskMax" then setBrushSlopeMaskMax() end
if path == "terrainEditor.general.softSelectFilter" then var.softSelectFilter = deepcopy(value) brushSoftnessCurve_Set(var.softSelectFilter) end
if path == "terrainEditor.terraform.terraformDOI" then terraformer.setDOI(value) end
@/lua/ge/extensions/freeroam/facilities.lua
markerInfo = {
walkingMarker = { doors = deepcopy(f.doors), iconOffsetHeight = f.iconOffsetHeight, iconLift = f.iconLift, icon = f.playModeIconName or f.icon, pos = center, radius = math.sqrt(maxDistSqr), screens = f.screens},
bigmapMarker = { pos = center, icon = f.icon or f.playModeIconName, name = f.name, description = f.description, thumbnail = f.preview, previews = {f.preview}}
@/lua/ge/extensions/editor/camPathEditor.lua
local function gizmoBeginDrag()
beginDragRotation = deepcopy(M.currentPath.markers[currentMarkerIndex].rot)
beginDragPos = deepcopy(M.currentPath.markers[currentMarkerIndex].pos)
beginDragRotation = deepcopy(M.currentPath.markers[currentMarkerIndex].rot)
beginDragPos = deepcopy(M.currentPath.markers[currentMarkerIndex].pos)
end
while camTs[i] > nextTime and ctrlPoints[i] ~= lastMarker do
lastCtrlPointsR2[i] = deepcopy(lastFramesR2[i])
ctrlPoints[i] = (ctrlPoints[i] % #markers) + 1
-- draw camera frustum
local markerCopy = deepcopy(marker)
local frustumColor = (index == currentMarkerIndex) and selectedFrustumColor or defaultFrustumColor
@/lua/ge/extensions/editor/gen/exp_meshexplorer.lua
local af = {}
local fbag = deepcopy(geo.fbag[apiece[1]])
for i=2,#apiece do
if not cval['piece_rot'] then
cval['piece_rot'] = {verts = deepcopy(m.verts)}
-- return
-- pieces union
local fbag = deepcopy(geo.fbag[apiece[1]])
for j=2,#apiece do
end
cval[key] = {am={}, akey={}} -- deepcopy(mesh.data)
cval[key].om = om
-- am[#am+1] = daedata.dgeo[k].m
cval[key].am[#cval[key].am+1] = deepcopy(daedata.dgeo[k].m)
cval[key].akey[#cval[key].akey+1] = k
else
cval[key].am = {deepcopy(daedata.dgeo[cgeo].m)}
cval[key].akey = {cgeo}
if k == cgeo then
cval['DragPos'] = {m=deepcopy(d.m)}
if d.pos and d.pos:length()>0 then
if not cval['geo_space'] then
cval['geo_space'] = deepcopy(mesh.data)
end
-- translucentRecvShadows
local cm = cval['geo_space'][i] -- deepcopy(m)
-- lo('?? to_space:'..ds)
for i,flist in pairs(fbag) do
pm[#pm+1] = deepcopy(am[idel])
local af = {}
@/lua/ge/extensions/ui/gridSelectorUtils/tilesModule.lua
if (data.displayData.showFavouritesMode == 'completeClusters') and tile.favouriteIdx > 0 then
local favouriteTile = deepcopy(tile)
favouriteTile.key = favouriteTile.key .. "_" .. tile.favouriteIdx
if (data.displayData.showRecentMode == 'completeClusters') and tile.recentIdx < math.huge then
local recentTile = deepcopy(tile)
recentTile.key = recentTile.key .. "_" .. tile.recentIdx
@/lua/ge/extensions/editor/rallyEditor/pacenotes.lua
if wp.normal then
self.beginDragRotation = deepcopy(quatFromDir(wp.normal, vec3(0,0,1)))
end
notebook = self.path,
old_pacenotes = deepcopy(self.path.pacenotes:onSerialize()),
},
@/lua/ge/extensions/freeroam/freeroam.lua
}
local defaultSpawningOptions = deepcopy(M.spawningOptionsHelper)
M.resetSpawningOptions = function()
M.spawningOptionsHelper = deepcopy(defaultSpawningOptions)
end
@/lua/ge/extensions/gameplay/statistic.lua
if not cbs then return end
local nval = deepcopy(newentry)
nval.career = career
if value==nil then log("E", "metricAdd", "invalid value metric="..dumps(name)) return end
local oldEntry = deepcopy(fileData.entries[name])
local r = _metricAdd(fileData.entries[name],name,value,aggregate)
if fileDataCareer then
oldEntry = deepcopy(fileDataCareer.entries[name])
r = _metricAdd(fileDataCareer.entries[name],name,value,aggregate)
if value==nil then log("E", "metricSet", "invalid value") return end
local oldEntry = deepcopy(fileData.entries[name])
fileData.entries[name] = _metricSet(fileData.entries[name],name,value,aggregate)
if fileDataCareer then
oldEntry = deepcopy(fileDataCareer.entries[name])
local r = _metricSet(fileDataCareer.entries[name],name,value,aggregate)
else
return deepcopy(entry)
end
local function onScenarioLoaded(scenario)
-- local data = deepcopy(scenario)
-- data.nodes = nil
local function onScenarioFinished(scenario)
-- local data = deepcopy(scenario)
-- data.nodes = nil
local function onScenarioRestarted(scenario)
-- local data = deepcopy(scenario)
-- data.nodes = nil
@/lua/ge/extensions/editor/forestEditor.lua
if im.Button("Copy##TextureSet") then
pM_textureSetCopy = deepcopy(pM_textureSets.data[tostring(pM_selectedTextureSetId)])
end
if im.Button("Paste##TextureSet") then
pM_textureSets.data[tostring(pM_selectedTextureSetId)] = deepcopy(pM_textureSetCopy)
pM_textureSetDirty = true
@/lua/ge/extensions/scenario/raceMarkers/sideHologramMarker.lua
self.modeInfos = deepcopy(modeInfos)
@/lua/ge/extensions/career/modules/insurance/repairScreen.lua
local invVehs = insuranceModule.getInvVehs()
local invVehInfo = deepcopy(vehicleToRepairData)
local insuranceId = invVehs[invVehInfo.id].insuranceId
defaultRepairTimeChoiceData = insuranceModule.sanitizeCoverageOption(insuranceId, "repairTime", invVehInfo.id)
data.repairOptions.insuranceRepairData.repairTimeOptions = deepcopy(defaultRepairTimeChoiceData)
end
@/lua/vehicle/extensions/tech/CANBus/ProjectBavariaController.lua
local lastHardwareState = deepcopy(hardwareState)
@/lua/ge/extensions/gameplay/sites/sitesManager.lua
local ret = {
sitesByLevel = deepcopy(sitesByLevel),
currentLevel = currentLevel,
@/lua/ge/extensions/flowgraph/nodes/mission/selectGarageSpots.lua
end
local tmp = deepcopy(possibleStartingSpots)
local usedSpotsByName = tableValuesAsLookupDict(self.usedStartingSpotNames)
@/lua/common/settings.lua
if not valuesCache then
local values = deepcopy(M.defaultValues)
local cloudValues = jsonReadFile(M.pathCloud) or {}
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/raceMarkers.lua
if not self.route then
self.route = deepcopy(self.pinIn.raceData.value.path.aiDetailedPath)
if self.route and self.pinIn.raceData.value.path.config.closed then
@/lua/ge/extensions/editor/raceEditor/pacenotes.lua
if note.normal then
self.beginDragRotation = deepcopy(quatFromDir(note.normal, vec3(0,0,1)))
end
editor.history:commitAction("Create Manual Note",
{mouseInfo = deepcopy(self.mouseInfo), index = self.index, self = self,
normal =(self.mouseInfo._upPos - self.mouseInfo._downPos)},
@/lua/vehicle/ai.lua
scriptData = deepcopy(arg)
scriptData.mapData = pathMap
@/gameplay/missionTypes/rallyLoop/constructor.lua
self.iconFontIcon = "raceFlag"
self.fgVariables = deepcopy(self.missionTypeData)
self.missionTypeLabel = "bigMap.missionLabels.rallyLoop"
@/lua/ge/extensions/career/modules/delivery/parcelManager.lua
local function getRewardsWithBreakdown(cargo)
local originalRewards, breakdown, adjustedRewards = deepcopy(cargo.rewards), {} , deepcopy(cargo.rewards)
local function getRewardsWithBreakdown(cargo)
local originalRewards, breakdown, adjustedRewards = deepcopy(cargo.rewards), {} , deepcopy(cargo.rewards)
@/lua/ge/extensions/flowgraph/nodes/ui/updatedUI/endScreenWhole.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/gameplay/missions/missionTypes/editorHelper.lua
local function customGetNewData(e) return e.getNewFunction(e) end
local function defaultValueGetNewData(e) return {{fieldName = e.fieldName, value = deepcopy(e.defaultValue)}} end
local function transformGetNewData(e)
local function leaderboardSetMission(e, mtd) e.best[0] = mtd[e.fieldNameBest] or e.defaultBest e.medium[0] = mtd[e.fieldNameMedium] or e.defaultMedium e.worst[0] = mtd[e.fieldNameWorst] or e.defaultWorst e.count[0] = mtd[e.fieldNameCount] or e.defaultCount end
local function simpleLapConfigSetMission(e, mtd) e.lapConfig:set(mtd[e.fieldName] or deepcopy(e.defaultPos)) end
local function missionIdSetMission(e, mtd) e.value = mtd.value or e.defaultValue end
@/lua/ge/extensions/scenario/raceMarkers/singleHologramMarker.lua
self.fadeFar = fadeFar
self.modeInfos = deepcopy(modeInfos)
self:clearMarkers()
@/lua/ge/extensions/gameplay/rally/notebook/pacenote.lua
local notesArray = langData[self.noteFields.note].structured
notesArray = deepcopy(notesArray)
local before = langData[self.noteFields.before]
@/lua/ge/extensions/util/docCreator.lua
local levels = deepcopy(extensions.core_levels.getList())
cleanupTable(job, levels)
}
vehicles = deepcopy(vehicles)
cleanupTable(job, vehicles)
for _,name in ipairs(names) do
local e = deepcopy(entry)
if info.vendorName then
@/lua/vehicle/extensions/core/quickAccess.lua
local function addEntry(_args)
local args = deepcopy(_args) -- do not modify the outside table by any chance
if type(args.generator) ~= "function" and (type(args.title) ~= "string" or (type(args.onSelect) ~= "function" and type(args["goto"]) ~= "string")) then
local function generateCompleteTree(level)
menuTreeCopy = deepcopy(menuTree)
@/lua/vehicle/controller/lightbar.lua
-- Convert mode config into usable format
local configEntries = tableFromHeaderTable(deepcopy(vm.config))
vm.config = nil
@/lua/ge/extensions/editor/util/plotHelperUtil.lua
if not self.mouseDownInGraph then return end
self.originalScale = deepcopy(self.scale)
elseif rowLength == 2 or linesToDraw == 1 then
cRow = deepcopy(row)
goto continue
@/lua/ge/extensions/scenario/quickRace.lua
sc.lapConfig = lc
sc.initialLapConfig = deepcopy(lc)
else
else
sc.initialLapConfig = deepcopy(config.lapConfig)
sc.BranchLapConfig = deepcopy(config.lapConfig)
sc.initialLapConfig = deepcopy(config.lapConfig)
sc.BranchLapConfig = deepcopy(config.lapConfig)
sc.lapConfig = deepcopy(config.lapConfig)
sc.BranchLapConfig = deepcopy(config.lapConfig)
sc.lapConfig = deepcopy(config.lapConfig)
end
@/lua/vehicle/powertrain/hydraulicPump.lua
if ph.connectedPump == device.name then
local consumerJbeamData = deepcopy(tableMerge(ph, v.data[ph.name] or {}))
@/lua/ge/extensions/flowgraph/nodes/ui/endScreen.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/editor/gen/lib/jbeam.lua
end
local sp = deepcopy(p)
jTS.process(sp, true, true)
@/lua/ge/extensions/editor/missionEditor/playbookUtils.lua
local instruction = {type = "missionAttempt", missionId = self.mission.id, stars = {}}
local stars = deepcopy(self.missionInstance.careerSetup._activeStarCache.sortedStars)
if #stars > 1 then
stars[key] = true
local instruction = {type = "missionAttempt", missionId = self.mission.id, stars = deepcopy(stars)}
table.insert(editor_missionPlaybook.book.instructions, instruction)
stars[key] = true
local instruction = {type = "missionAttempt", missionId = self.mission.id, stars = deepcopy(stars)}
table.insert(editor_missionPlaybook.book.instructions, instruction)
if im.Button("Add All Bonus Stars Randomly Individually") then
local keys = deepcopy(self.missionInstance.careerSetup._activeStarCache.bonusStarKeysSorted)
arrayShuffle(keys)
@/lua/common/jbeam/sections/nodeBeam.lua
local ropebeams = {}
local ropecopy = deepcopy(rope)
ropecopy.length = nil
for _, quad in pairs(vehicle.quads) do
local tri1 = deepcopy(quad)
vehicle.triangles[tbi] = tri1; tbi = tbi + 1
local tri2 = deepcopy(quad)
vehicle.triangles[tbi] = tri2; tbi = tbi + 1
@/lua/ge/extensions/career/modules/insurance/insurance.lua
if data.insuranceId == insuranceId then
local vehData = deepcopy(data)
local vehInfo = career_modules_inventory.getVehicles()[vehData.id]
groupDiscountData = {
groupDiscountTiers = deepcopy(groupDiscountTiers),
currentTierData = currentTierData,
},
vehicleInfo = deepcopy(context.vehicleInfo),
}
insuranceClassId = context.insuranceClassId,
vehicleInfo = deepcopy(context.vehicleInfo),
}
@/lua/ge/extensions/editor/missionPlaybook.lua
if not m.saveData.unlockedStars[key] then
table.insert(defaultChoices, {mId = m.id, starKeys=deepcopy(defaultCache)})
end
@/lua/ge/extensions/gameplay/traffic/baseRole.lua
self.driver = {
personality = deepcopy(basePersonality),
aggression = veh.vars.baseAggression
if self.ignorePersonality then
return deepcopy(basePersonality)
end
if type(data) ~= 'table' then
self.driver.personality = deepcopy(basePersonality)
return
@/lua/ge/extensions/scenario/quickRaceLoader.lua
for i=1, 10, 1 do
local help = deepcopy(scenData)
elseif procedurals ~= not file.procedural then -- no this cannot be changed to procedurals == file.procedural, becaus then false == nil -> false
file.originalInfo = deepcopy(file)
file.sourceFile = trackFile
@/lua/ge/extensions/gameplay/crawl/general.lua
boundary = boundary,
path = deepcopy(path),
startingPosition = startingPosition,
local path = deepcopy(gameplay_crawl_saveSystem.getPathById(trail.pathId))
if trail.pathReversed then
@/lua/ge/extensions/ui/uiNavi.lua
local tmpmap = map.getMap()
-- local tmpmap = deepcopy(m) -- since we are always just create a new object out of primitive data types in the function below we don't need this copy here
local oldSize = tostring(string.len(jsonEncode(tmpmap.nodes)))
local tmpmap = map.getMap()
-- local tmpmap = deepcopy(m) -- since we are always just create a new object out of primitive data types in the function below we don't need this copy here
local newNodes = {}
@/lua/ge/extensions/util/terrainGenerator.lua
local textureMapsTblSize = tableSize(processedMaterials)
self.materials = deepcopy(processedMaterials)
for i, mat in ipairs(self.materials) do
@/lua/ge/extensions/flowgraph/nodes/ui/selectButtons.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/editor/assemblySpline/molecule.lua
for _, variation in ipairs(bridge.variations) do
local newVariation = deepcopy(variation)
newVariation.id = Engine.generateUUID() -- New unique id for this variation instance (to distinguish from base or other variations).
@/lua/common/devUtils.lua
else
snapshot.vars[k] = deepcopy(v)
end
@/lua/vehicle/backwardsCompatibility.lua
local compatDiffs
local oldData = deepcopy(v.data.differentials)
@/lua/ge/extensions/editor/gen/decal.lua
if rd.listrad then
rd.list = deepcopy(rd.listrad)
D.nodesUpdate(rd)
local list = {}
aconf = deepcopy(ilist)
for _,ind in pairs(ilist) do
end
dhist[rd.ind][#dhist[rd.ind]+1] = deepcopy(mask)
lo('?? to_hist:'..rd.ind..':'..tableSize(dhist[rd.ind][#dhist[rd.ind]])..':'..tostring(rd.aset and tableSize(rd.aset) or nil)..' lines:'..tostring(rd.aline and #rd.aline or nil))
if not desc.list then return end
desc.listrad = deepcopy(desc.list)
local an = {}
-- save radial nodes
b.listrad = deepcopy(b.list)
end
nodesUpdate(b, apos, {1,#apos})
-- b.listrad = deepcopy(b.list)
b.list = apos
-- save radial nodes
b.listrad = deepcopy(b.list)
end
table.remove(b.list,ndi+b.io)
b.listrad = deepcopy(b.list)
end
nodesUpdate(b, apos, {1,#apos}, nil)
-- b.listrad = deepcopy(b.list)
b.list = apos
dir = (list[2]-list[1]):normalized()}
-- abr[#abr].listrad = deepcopy(abr[#abr].list)
decalUp(abr[#abr])
-- if U._MODE == 'conf' then
-- b.listrad = deepcopy(b.list)
-- end
end)
b.listrad = deepcopy(apos)
-- lo('?? branch_update:'..i..':'..#apos)
@/lua/ge/extensions/scenario/scenariosLoader.lua
end
scenarioData.initialLapConfig = deepcopy(scenarioData.lapConfig)
@/lua/ge/extensions/editor/missionPlaybook/missionTreeViewer.lua
if m.careerSetup.showInCareer then
unlockedStars[m.id] = deepcopy(m.saveData.unlockedStars)
unlockedThisStep[m.id] = {}
unlockedThisStep[m.id] = {}
unlocksById[m.id] = deepcopy(m.unlocks)
if resultData.funRet and resultData.funRet.unlockedStarsChanged then
unlockedThisStep[resultData.funRet.missionId] = deepcopy(resultData.funRet.unlockedStarsChanged)
end
@/lua/vehicle/extensions/tech/CANBus/ButtonBox.lua
local lastHardwareState = deepcopy(hardwareState)
@/lua/vehicle/controller/drivingDynamics/actuators/activeCenterDiffLock.lua
initialControlParameters = deepcopy(controlParameters)
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/vehicle/controller/drivingDynamics/supervisors/components/aeroControl.lua
initialControlParameters = deepcopy(controlParameters)
M.isActive = true
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/career/modules/insurance/history.lua
local function buildPlHistory()
local list = deepcopy(plHistory)
table.sort(list, sortByTimeReverse)
@/lua/ge/extensions/flowgraph/nodes/util/customLua.lua
if im.Selectable1(name, name == self.name) then
local data = deepcopy(customNodes[name])
data.pos = self.nodePosition
function C:_onDeserialized(data)
self.name = deepcopy(data.name or self.name)
self.code = deepcopy(data.code or self.code)
self.name = deepcopy(data.name or self.name)
self.code = deepcopy(data.code or self.code)
for _, code in ipairs(codeNames) do
function C:_onSerialize(data)
data.name = deepcopy(self.name)
data.code = deepcopy(self.code)
data.name = deepcopy(self.name)
data.code = deepcopy(self.code)
end
@/lua/ge/extensions/util/trackBuilder/splineTrack.lua
for i = #stackedPieces, to, -1 do
M.addPiece(M.deepcopy(stackedPieces[i]))
M.invalidatePiece(#pieces)
--helper copy function for stacking.
local function deepcopy(orig)
local orig_type = type(orig)
@/lua/ge/extensions/editor/tech/roadArchitect/junctions.lua
type = jct.type,
roads = deepcopy(jct.roads),
condition = im.FloatPtr(jct.condition[0]),
@/lua/ge/extensions/editor/biomeTool.lua
if layer.layerID == selectedLassoAreaID and layer.layerType == layerType_enum.area then
--local lassoArea = {lassoAreaID = getLassoAreaGlobalIdx(layerID, zoneType) + 1, zoneType = zoneType, nodes = deepcopy(nodes)}
for _, lassoArea in ipairs(layer.lassoAreas) do
end
table.insert(lassoAreas, deepcopy(lassoNodes))
end
selectedItemsInfo.zoneType == zoneType then
selectedItemsInfo.selectedItems = deepcopy(selectionList)
itemFound = true
selectedItemsInfo.zoneType == zoneType then
selectedItemsInfo.selectedItems = deepcopy(selectionList)
itemFound = true
if not itemFound then
local selectionData = {layerType = layerType, layerID = layerID, zoneType = zoneType, selectedItems = deepcopy(selectionList)}
table.insert(var.forestBrushTempSelectedItems, selectionData)
if layer.layerID == layerID and layer.layerType == layerType_enum.area then
local lassoArea = {lassoAreaID = getLassoAreaGlobalIdx(layerID, zoneType) + 1, zoneType = zoneType, nodes = deepcopy(nodes)}
table.insert(layer.lassoAreas, lassoArea)
@/lua/vehicle/scriptai.lua
local script = deepcopy(inScript.path and inScript.path or inScript)
if not script[2] then
script = deepcopy(script)
if startDelay > 0 then
table.insert(script, 1, deepcopy(script[1]))
script[2].dir, script[2].up = nil, nil
@/lua/ge/extensions/core/modmanager.lua
mods[modname].active = false
extensions.hook('onModDeactivated', deepcopy(mods[modname]))
if mountedFilesChange then
mods[modname].active = true
extensions.hook('onModActivated', deepcopy(mods[modname]))
if mountedFilesChange and #mountedFilesChange>0 then
mods[modname].active = true
extensions.hook('onModActivated', deepcopy(mods[modname]))
end
local zipOldCopy = deepcopy(mods[filename])
-- auto-corrects the mount point
@/lua/ge/extensions/career/modules/vehicleShopping.lua
local function getEligibleVehiclesWithoutDealershipVehicles(eligibleVehicles, seller)
local eligibleVehiclesWithoutDealershipVehicles = deepcopy(eligibleVehicles)
local configsInDealership = {}
-- get the dealerships from the level
local facilities = deepcopy(freeroam_facilities.getFacilities(getCurrentLevelIdentifier()))
for _, dealership in ipairs(facilities.dealerships) do
local function sendPurchaseDataToUi()
local vehicleShopInfo = deepcopy(getVehicleInfoByShopId(purchaseData.shopId))
vehicleShopInfo.shopId = purchaseData.shopId
@/lua/ge/extensions/flowgraph/nodes/scene/singleMarker.lua
if not posIn then return true end
self.position = deepcopy(posIn)
self.position[3] = self.position[3] + self.data.zOffset
@/lua/ge/extensions/flowgraph/nodes/gameplay/decalLine.lua
{ dir = 'in', type = 'vec3', name = 'posB', description = 'End of the line.' },
{ dir = 'in', type = 'vec3', name = 'decalScale', description = 'Decal scale.', default = deepcopy(defaultDecalScale), hardcoded = true },
{ dir = 'in', type = 'number', name = 'amount', description = "How many decals will be used to draw the line.", default = defaultAmount, hardcoded = true },
{ dir = 'in', type = 'number', name = 'filling2', description = "How much filled (0 - 100) will be the second filling (Can display a cooldown).", default = 0, hardcoded = true },
{ dir = 'in', type = 'color', name = 'filledColor', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor), description = 'Primary color.' },
{ dir = 'in', type = 'color', name = 'fillingColor1', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor1), description = 'First filling color (progress).' },
{ dir = 'in', type = 'color', name = 'filledColor', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor), description = 'Primary color.' },
{ dir = 'in', type = 'color', name = 'fillingColor1', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor1), description = 'First filling color (progress).' },
{ dir = 'in', type = 'color', name = 'fillingColor2', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor2), description = 'Second filling color (cooldown).' },
{ dir = 'in', type = 'color', name = 'fillingColor1', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor1), description = 'First filling color (progress).' },
{ dir = 'in', type = 'color', name = 'fillingColor2', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor2), description = 'Second filling color (cooldown).' },
{ dir = 'in', type = 'color', name = 'backgroundColor', hidden = true, hardcoded = true, default = deepcopy(defaultBGColor), description = 'Secondary color (opposite of filling).' }
{ dir = 'in', type = 'color', name = 'fillingColor2', hidden = true, hardcoded = true, default = deepcopy(defaultFGColor2), description = 'Second filling color (cooldown).' },
{ dir = 'in', type = 'color', name = 'backgroundColor', hidden = true, hardcoded = true, default = deepcopy(defaultBGColor), description = 'Secondary color (opposite of filling).' }
}
if not self.colorCache[k] or (self.pinIn[k].value and not setEqual(self.colorCache[k], self.pinIn[k].value)) then
self.colorCache[k] = deepcopy(self.pinIn[k].value or pin.default)
self.colorFCache[k] = ColorF(unpack(self.colorCache[k]))
@/lua/ge/extensions/editor/dynamicDecals/docs.lua
local function filterDocs()
docsSections = deepcopy(docsSectionsBase)
filterChildren(docsSections)
sortSectionChildren(docsSections)
docsSectionsBase = deepcopy(docsSections)
-- select the very first section of the docs by default
im.ImGuiTextFilter_Clear(filter)
docsSections = deepcopy(docsSectionsBase)
selectSectionInChildren(docsSections, section)
sortSectionChildren(docsSections)
docsSectionsBase = deepcopy(docsSections)
@/lua/vehicle/controller/vehicleController/vehicleController.lua
local gearCount = gearbox.gearCount + 1
local jbeamDataCopy = deepcopy(jbeamData)
for _, v in pairs(shiftRPMNames) do
@/lua/ge/extensions/editor/missionEditor.lua
if newMissionData.copy then
newMis = gameplay_missions_missions.createMission(data.id, deepcopy(lastShownMission))
else
end
local keys = deepcopy(instance.sortedStarKeys)
table.insert(keys,"noStarUnlocked")
end
local keys = deepcopy(instance.sortedStarKeys or {})
table.insert(keys,"noStarUnlocked")
{groupFilter = {"table", {}, "", nil, nil, nil, true}},
{showWindows = {"table", deepcopy(showWindows), "", nil, nil, nil, true}},
{shortIds = {"bool", false, "Use Short Ids", nil, nil, nil, false}},
@/lua/ge/extensions/editor/crawlEditor/boundaries.lua
for _, vertex in ipairs(self.currentVertices) do
self._prevVerticesPos[vertex.index] = deepcopy(vertex.pos)
end
if self.currentPlane then
self.beginDragRotation = deepcopy(quatFromDir(quatFromEuler(0, math.pi / 2, 0) * self.currentPlane.normal, vec3(0, 0, 1)))
end
@/lua/ge/extensions/core/input/bindings.lua
local function fillNormalizeBindingDefaults(binding)
local binding = deepcopy(binding)
fixBuggyBindingFromUISide(binding)
-- strip the binding settings that are default (leaving only the custom settings)
local result = deepcopy(binding)
for k, v in pairs(defaultBinding) do
if binding == nil then return dumps(binding) end
return dumps(cleanBindingDefaults(deepcopy(binding))):gsub("\n", " "):gsub(" +", " ")
end
end
local b = deepcopy(binding)
b.action = core_input_actions.upgradeAction(b.action)
-- 2) handle the rest of fields
local result = deepcopy(base)
tableMerge(result, deepcopy(diff))
local result = deepcopy(base)
tableMerge(result, deepcopy(diff))
result.removed = nil
for _,b in ipairs(vehicleContents.bindings) do
table.insert(contents.bindings, deepcopy(b))
end
end
local inputmapTemplate = deepcopy(data)
inputmapTemplate.bindings = {}
-- first we initialize them as empty. this forces empty inputmaps to be saved too (instead of being ignored because UI didn't mention the vehicle in incoming data)
local inputmaps = { none=deepcopy(inputmapTemplate) }
local vehicle = getPlayerVehicle(0)
if vehicle then
inputmaps[vehicle:getJBeamFilename()] = deepcopy(inputmapTemplate)
end
@/lua/ge/extensions/gameplay/missions/missions.lua
table.sort(bonusKeysSorted, sortStarKeys)
return arrayConcat(deepcopy(defaultKeysSorted), deepcopy(bonusKeysSorted)), defaultKeysSorted, bonusKeysSorted, defaultStarKeysCache, bonusStarKeysCache
end
table.sort(bonusKeysSorted, sortStarKeys)
return arrayConcat(deepcopy(defaultKeysSorted), deepcopy(bonusKeysSorted)), defaultKeysSorted, bonusKeysSorted, defaultStarKeysCache, bonusStarKeysCache
end
end
local careerSetup = deepcopy(missionData.careerSetup or {})
careerSetup._activeStarCache = nil
visibleCondition = missionData.visibleCondition or {type='always'},
startTrigger = deepcopy(missionData.startTrigger),
--recommendedAttributes = missionData.recommendedAttributes,
local result, mission, add = xpcall(function()
return missionTypeConstructor(deepcopy(missionData))
end
@/gameplay/missionTypes/dragStripRace/constructor.lua
self.latestVersion = version
self.fgVariables = deepcopy(self.missionTypeData) or {}
self.fgPath = "/gameplay/missionTypes/dragStripRace/dragRace.flow.json"
@/lua/vehicle/energyStorage.lua
for _, jbeamData in pairs(deepcopy(v.data.energyStorage or {})) do
tableMergeRecursive(jbeamData, v.data[jbeamData.name] or {})
@/lua/vehicle/extensions/dynamicVehicleData.lua
local adjustedWheels = deepcopy(wheels.wheels)
@/lua/ge/extensions/editor/gen/exp_frame.lua
-- lo('?? l_DUMP:'..tostring(dw))
sdw = deepcopy(dw)
end
--?? if _dbg
adw[ind[2]] = deepcopy(dw)
-- lo('?? if_IND:'..tostring(ind))
-- U.dump(ac,'>> ef.step:'..i)
local cac = deepcopy(ac)
-- lo('?? step:'..#ac..' i:'..i..' s:'..tostring(s))
@/lua/common/json-ast.lua
-- now we need to parse the table primitives
ctx.transient.luaData = deepcopy(ctx.transient.luaDataRaw)
_convertTableSchema(ctx.transient.luaData)
@/lua/ge/extensions/core/inventory.lua
if v.itemId == itemId then
result = deepcopy(v)
end
itemsTable[itemType] = itemsTable[itemType] or {}
local result = deepcopy(itemsTable[itemType])
return result
local function onSaveCampaign(saveCallback)
local data = deepcopy(M.itemsTable)
saveCallback(M.__globalAlias__, data)
-- log('D', logTag, 'onSerialize called...')
local data = deepcopy(M.itemsTable)
return data
@/lua/ge/extensions/editor/meshEditor.lua
if selectedMesh and fieldsCopy then
editor.history:commitAction("PasteMeshFields", {oldFields = editor.copyFields(selectedMeshId), newFields = deepcopy(fieldsCopy), meshID = selectedMeshId}, pasteActionUndo, pasteActionRedo)
end
@/lua/ge/extensions/core/vehicleActivePooling.lua
for _, v in ipairs(deepcopy(self.inactiveVehs)) do
if limit <= 0 then break end
if not self.activeVehs[1] then return false end
for _, v in ipairs(deepcopy(self.activeVehs)) do
self:setVeh(v, false)
if difference > 0 then -- hide some active vehicles
for i, v in ipairs(deepcopy(self.activeVehs)) do
if i <= difference then
function VehPool:getVehs()
return arrayConcat(deepcopy(self.activeVehs), self.inactiveVehs)
end
@/lua/ge/extensions/editor/textEditor.lua
local function onSerialize()
local instancesCopy = deepcopy(guiInstancer.instances)
for key, instance in pairs(instancesCopy) do
@/lua/ge/extensions/career/modules/inventory.lua
local function saveVehiclesData(currentSavePath, oldSaveDate, vehiclesThumbnailUpdate)
local vehiclesCopy = deepcopy(vehicles)
local currentDate = os.date("!%Y-%m-%dT%H:%M:%SZ")
local function getVehicleUiData(inventoryId, inventoryIdsInGarage)
local vehicleData = deepcopy(vehicles[inventoryId])
if not vehicleData then return end
@/lua/ge/extensions/core/camera.lua
local function getExtendedConfig(vdata)
local config = deepcopy(configuration)
local slotId = 1
local function initCam(camera, jbeamConfig, constructor)
local jbeamConfig = deepcopy(jbeamConfig)
log('I', 'camera', 'onScenarioChange processing pendingTrigger...')
local tempTrigger = deepcopy(pendingTrigger)
pendingTrigger = nil
@/lua/ge/extensions/flowgraph/nodes/gameplay/race/raceEndScreen.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/editor/vehicleEditor/liveEditor/veFlexbodyDebug.lua
local function saveVehicleSettings()
settings[vEditor.vehicle:getJBeamFilename()] = deepcopy(state.settings)
jsonWriteFile(settingsPath, settings)
if vehData then
initVehDatas[vehID] = deepcopy(vehData)
initStates[vehID] = deepcopy(initStateTemplate)
initVehDatas[vehID] = deepcopy(vehData)
initStates[vehID] = deepcopy(initStateTemplate)
states[vehID] = deepcopy(initStates[vehID])
end
@/lua/ge/extensions/flowgraph/nodes/states/transition.lua
table.sort(self._pinTemplates._in, function(a,b) return a.name < b.name end)
self._pinTemplates._out = deepcopy(self._pinTemplates._in)
end
@/lua/ge/extensions/gameplay/rally/notebook/missionSettings.lua
-- return false
self.notebook = deepcopy(defaultSettings.notebook)
-- self.drivelineMode = defaultSettings.drivelineMode
if not data then return end
self.notebook = data.notebook or deepcopy(defaultSettings.notebook)
-- self.drivelineMode = data.drivelineMode or defaultSettings.drivelineMode
function C:setCodriverId(codriverId)
self.notebook = self.notebook or deepcopy(defaultSettings.notebook)
self.notebook.codriverId = codriverId
function C:setNotebookFilename(filename)
self.notebook = self.notebook or deepcopy(defaultSettings.notebook)
self.notebook.filename = filename
@/lua/ge/extensions/career/modules/playerAttributes.lua
attributes = {}
attributes["beamXP"] = deepcopy(baseAttribute)
attributes["money"] = deepcopy(baseAttribute)
attributes["beamXP"] = deepcopy(baseAttribute)
attributes["money"] = deepcopy(baseAttribute)
attributes["vouchers"] = deepcopy(baseAttribute)
attributes["money"] = deepcopy(baseAttribute)
attributes["vouchers"] = deepcopy(baseAttribute)
for _, branch in ipairs(career_branches.getSortedBranches()) do
for _, branch in ipairs(career_branches.getSortedBranches()) do
attributes[branch.attributeKey] = deepcopy(baseAttribute)
attributes[branch.attributeKey].value = branch.defaultValue or baseAttribute.value
for attributeName, value in pairs(change) do
attributes[attributeName] = attributes[attributeName] or deepcopy(baseAttribute)
local attribute = attributes[attributeName]
for attributeName, newValue in pairs(newValues) do
local attribute = attributes[attributeName] or deepcopy(baseAttribute)
ch[attributeName] = newValues[attributeName] - attribute.value
end
attributes[mappedName] = attributes[mappedName] or deepcopy(baseAttribute)
for k,v in pairs(data) do
if not attributes[orgId .. "Reputation"] then
local attribute = deepcopy(baseAttribute)
attribute.min = career_modules_reputation.getMinimumValue()
}
for _, change in ipairs(arrayReverse(deepcopy(attributeLog))) do
if change.attributeChange.money then
}
for _, change in ipairs(arrayReverse(deepcopy(attributeLog))) do
if change.reason.tags.gameplay then
@/lua/ge/extensions/core/settings/settings.lua
local values = deepcopy(M.impl.defaultValues)
local lastSavedTime = 0
refreshTSState(true)
local newState = deepcopy(values)
local data = loadSettingValues()
local function getValuesCopy()
return deepcopy(values)
end
@/lua/ge/extensions/career/modules/partInventory.lua
local vehicleUiData = deepcopy(vehicle)
vehicleUiData.thumbnail = career_modules_inventory.getVehicleThumbnail(inventoryId) .. "?" .. (vehicleUiData.dirtyDate or "")
if not part.mainPart then
local newPart = deepcopy(part)
if newPart.location ~= 0 and coreSlots[newPart.location][newPart.containingSlot] then
local partInventoryCopy = deepcopy(partInventory)
for partId, part in pairs(partInventoryCopy) do
@/lua/ge/extensions/flowgraph/nodes/input/blacklistAction.lua
if im.Button("Set##setact" .. self.id) then
self.list = deepcopy(preset.list)
reason = "Set actions to preset " .. preset.name
@/lua/ge/extensions/gameplay/traffic.lua
end
local data = {state = state, traffic = deepcopy(trafficData), vars = deepcopy(vars)}
onTrafficStopped()
end
local data = {state = state, traffic = deepcopy(trafficData), vars = deepcopy(vars)}
onTrafficStopped()
@/lua/ge/extensions/editor/raceEditor/timeTrials.lua
if editEnded[0] then
local newPrefabs = deepcopy(self.path[fieldName])
newPrefabs[i] = ffi.string(filenameList[i])
function(data)
local newPrefabs = deepcopy(self.path[fieldName])
newPrefabs[i] = data.filepath
if rem then
local newPrefabs = deepcopy(self.path[fieldName])
table.remove(newPrefabs, rem)
if im.Button("Add##prefabs") then
local newPrefabs = deepcopy(self.path[fieldName])
table.insert(newPrefabs,"/")
@/lua/ge/extensions/editor/assetBrowser.lua
if im.Button("Delete##directoryToLoad" .. tostring(k)) then
local newDirectoriesToLoad = deepcopy(directoriesToLoadRef)
table.remove(newDirectoriesToLoad, k)
if im.Button("Add##directoryToLoad") then
local newDirectoriesToLoad = deepcopy(directoriesToLoadRef)
table.insert(newDirectoriesToLoad, {name = var.directoriesToLoad_new_name, path = var.directoriesToLoad_new_path})
@/lua/ge/extensions/editor/api/history.lua
if #self.undoStack > 0 then
local topTrans = deepcopy(self.undoStack[#self.undoStack])
local crtTrans = deepcopy(singleActionTransaction)
local topTrans = deepcopy(self.undoStack[#self.undoStack])
local crtTrans = deepcopy(singleActionTransaction)
@/lua/ge/extensions/editor/tech/roadArchitect/groups.lua
name = ffi.string(pg.name),
list = deepcopy(pg.list) }
end
@/lua/vehicle/controller/drivingDynamics/supervisors/components/brakeControl.lua
}
controlParameters.tractionControl.wheelGroupSettings[groupSetting.motorName] = deepcopy(wheelGroupControlData[groupSetting.motorName])
end
wheelControlKeyCount = #wheelControlKeys
initialControlParameters = deepcopy(controlParameters)
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/flowgraph/nodes/gameplay/sites/parkingspot.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/flowgraph/nodes/activity/aggregateAttempt.lua
if highestDefaultStarOutroText then
self.pinOut.outroTranslation.value = { txt = highestDefaultStarOutroText, context = deepcopy(attempt.data) }
end
@/lua/ge/extensions/flowgraph/nodes/gameplay/sites/location.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/editor/util/vehicleSelectUtil.lua
if paintTbl.baseColor[4] then
newPaintTbl = deepcopy(paintTbl.baseColor)
elseif paintTbl.baseColor.x and paintTbl.baseColor.y and paintTbl.baseColor.z and paintTbl.baseColor.w then
else
newPaintTbl = deepcopy(paintTbl)
end
else
newPaintTbl = deepcopy(defaultPaint)
end
@/lua/ge/extensions/career/modules/testDrive.lua
local function setTestDriveInfo(_testDriveInfo)
testDriveInfo = deepcopy(_testDriveInfo)
end
@/lua/ge/extensions/career/modules/loanerVehicles.lua
if vehInfo.owningOrganization then
local veh = deepcopy(vehInfo)
veh.thumbnail = career_modules_inventory.getVehicleThumbnail(veh.id)
for _, vehInfo in ipairs(getLoanedVehicles()) do
local veh = deepcopy(vehInfo)
local organization = freeroam_organizations.getOrganization(veh.owningOrganization)
@/lua/ge/extensions/editor/dynamicDecals/layerTypes/brushStroke.lua
if editor.uiIconImageButton(editor.icons.move, im.ImVec2(tool.getIconSize(), tool.getIconSize()), (gizmo.data.uid == layer.uid and gizmo.data.dataPointIndex == k) and editor.color.beamng.Value or nil, nil, nil, string.format("MoveBrushStrokePoint_%s_%d", layer.uid, k)) then
local layerData = deepcopy(layer)
local vehPos = vehicleObj:getTransform():getPosition()
api.setDecalLocalPos(layerData, newGizmoTransform:getPosition() - vehPos)
layerData.dataPoints[k] = deepcopy(layerData.cursorPosScreenUv)
api.setLayer(layerData, true)
@/lua/ge/extensions/career/modules/painting.lua
local vehicle = career_modules_inventory.getVehicles()[inventoryId]
vehicle.config.paints = deepcopy(chosenPaints)
for partPath, partCondition in pairs(vehicle.partConditions) do
@/lua/ge/extensions/editor/materialEditor.lua
if tableIsEmpty(sortedMaterialObjectNames) and tableIsEmpty(sortedMaterialObjectNamesAtTop) then
sortedMaterialObjectNames = deepcopy(materialObjectNames)
end
@/lua/ge/extensions/flowgraph/modules/vehicleModule.lua
function C:getSpawnedVehicles()
return deepcopy(self.sortedIds)
end
@/lua/ge/extensions/core/vehicle/inplaceEdit.lua
part.flexbodies = {}
local newListSize = jbeamTableSchema.processTableWithSchemaDestructive(deepcopy(part.flexbodies_raw), part.flexbodies)
end
if not availablePartsForSlot then
availablePartsForSlot = deepcopy(slotMap[slot.type] or {})
table.insert(availablePartsForSlot, 1, "")
@/lua/ge/extensions/core/vehiclePaints.lua
if not paintsByIdCache then buildPaintCaches() end
return deepcopy(paintsByIdCache[id])
end
if not paintCollectionsByIdCache then buildPaintCaches() end
return deepcopy(paintCollectionsByIdCache[id])
end
log("W", "vehicles", "paint " .. dumps(paintKeyOrPaint) .. " from config " .. dumps(debugModelKey) .. "/" .. dumps(debugConfigKey) .. " not found in the model file. But found by name in the paint library.. Please use the id instead: " .. dumps(paints[1].id) .. " or add the paint to the model file.")
paint = deepcopy(paints[1])
paint.class = 'custom'
if multiPaintSetupsByIdCache and multiPaintSetupsByIdCache[multiPaintSetupKeyOrMultiPaintSetup] ~= nil then
multiPaintSetup = deepcopy(multiPaintSetupsByIdCache[multiPaintSetupKeyOrMultiPaintSetup])
end
@/lua/ge/extensions/editor/sitesEditor/zones.lua
if self.currentPlane then
self.beginDragRotation = deepcopy(quatFromDir(quatFromEuler(0, math.pi / 2, 0) * self.currentPlane.normal, vec3(0, 0, 1)))
end
@/lua/ge/extensions/core/cameraModes/transition.lua
self.transitionRequestedType = nil
self.camPathTransitionData.callback(deepcopy(data.res))
self.camPathTransitionData = nil
@/gameplay/missionTypes/timeTrial/constructor.lua
self.fgVariables = deepcopy(self.missionTypeData)
self._defaultUserSettings = {}
@/gameplay/missionTypes/crawl/constructor.lua
self.latestVersion = version
self.fgVariables = deepcopy(self.missionTypeData) or {}
-- Set default trail file if not provided
@/lua/vehicle/controller/drivingDynamics/supervisors/components/diffControl.lua
initialControlParameters = deepcopy(controlParameters)
M.isActive = true
local function getConfig()
return deepcopy(controlParameters)
end
@/lua/ge/extensions/career/modules/delivery/progress.lua
M.setProgress = function(data)
progress = data or deepcopy(progressTemplate)
end
for _, id in ipairs(tableKeysSorted(vehicleInfo.containersById)) do
vehicleInfo.containersById[id].cargo = dParcelManager.addParcelRewardsSummary(deepcopy(vehicleInfo.containersById[id].cargo))
table.insert(vehicleInfo.containers, vehicleInfo.containersById[id])
animationData = career_modules_branches_landing.getBranchSkillCardData(key),
branchLevels = deepcopy(branch.levels),
showLevelUpPopup = true,
@/lua/ge/extensions/editor/objectTool.lua
if not tableIsEmpty(duplicableObjects) then
editor.history:commitAction("DuplicateObjects", {objects = duplicableObjects, objectIds = deepcopy(editor.selection.object), parentIds = getParentIds(editor.selection.object)}, pasteObjectsUndo, pasteObjectsRedo, true)
editor.computeSelectionBBox()
if not editor.editingObjectName then
local oldSelection = deepcopy(editor.selection.object)
editor.selectObjectById(objectIdByIconClick, selectMode)
if not editor.editingObjectName then
local oldSelection = deepcopy(editor.selection.object)
editor.selectObjectById(hoveredObject:getID(), selectMode)
if selectMode == editor.SelectMode_New then
local oldSelection = deepcopy(editor.selection.object)
editor.clearObjectSelection()
doingRectSelection = false
local oldSelection = deepcopy(editor.selection.object)
editor.selectObjectsByRef(objectsInRect, selectMode)
if not editor.isViewportFocused() then return end
local objects = deepcopy(copyObjectsArray)
@/lua/ge/extensions/editor/util/vehicleFilterUtil.lua
-- Preserve all filter fields (propName, type, and any other fields)
local cleaned = deepcopy(filter)
for _, setting in ipairs(probabilitySettings) do
local cleanedSetting = deepcopy(setting)
if cleanedSetting.whiteList then
local selected = {}
local available = deepcopy(filteredVehicles)
for i = 1, math.min(maxVehicles, #available) do
local selected = {}
local available = deepcopy(filteredVehicles)
for i = 1, math.min(maxVehicles, #available) do
if #filteredVehicles > 0 then
local available = deepcopy(filteredVehicles)
local toSelect = math.min(vehiclesForThisSubFilter, #available)
-- Use deepcopy only for complex nested structures that need isolation
e.manualAdditions = filterData.manualAdditions and deepcopy(filterData.manualAdditions) or {}
e.manualRemovals = filterData.manualRemovals and deepcopy(filterData.manualRemovals) or {}
e.manualAdditions = filterData.manualAdditions and deepcopy(filterData.manualAdditions) or {}
e.manualRemovals = filterData.manualRemovals and deepcopy(filterData.manualRemovals) or {}
e.baseFilter = filterData.baseFilter and deepcopy(filterData.baseFilter) or {}
e.manualRemovals = filterData.manualRemovals and deepcopy(filterData.manualRemovals) or {}
e.baseFilter = filterData.baseFilter and deepcopy(filterData.baseFilter) or {}
e.probabilitySettings = filterData.probabilitySettings and deepcopy(filterData.probabilitySettings) or {}
e.baseFilter = filterData.baseFilter and deepcopy(filterData.baseFilter) or {}
e.probabilitySettings = filterData.probabilitySettings and deepcopy(filterData.probabilitySettings) or {}
e.maxVehicles = filterData.maxVehicles or 0
ctd[e.fieldName].probabilitySettings = cleanProbabilitySettings(e.probabilitySettings)
ctd[e.fieldName].manualAdditions = deepcopy(e.manualAdditions)
ctd[e.fieldName].manualRemovals = deepcopy(e.manualRemovals)
ctd[e.fieldName].manualAdditions = deepcopy(e.manualAdditions)
ctd[e.fieldName].manualRemovals = deepcopy(e.manualRemovals)
ctd[e.fieldName].maxVehicles = e.maxVehicles
@/lua/ge/extensions/editor/dragRaceEditor/utils.lua
end
table.insert(undoStack, deepcopy(dragRaceData))
state.setRedoStack({})
type = "stage",
transform = deepcopy(constants.CONSTANTS.DEFAULT_TRANSFORM)
},
type = "endLine",
transform = deepcopy(constants.CONSTANTS.DEFAULT_TRANSFORM)
}
boundary = {
transform = deepcopy(constants.CONSTANTS.DEFAULT_TRANSFORM)
}
@/lua/ge/extensions/editor/inspector.lua
local idx = guiInstancer:addInstance()
guiInstancer.instances[idx].selection = deepcopy(selection)
guiInstancer.instances[idx].previousSelectedIds = {}
groundCoverUVDragPos = imgui.GetMousePos()
groundCoverUVHandlesOnDragStart = deepcopy(groundCoverUVHandles)
local groundCoverUVDragStartLocalDeltaX = groundCoverUVDragPos.x - groundCoverUVHandlesOnDragStart[draggingGCUVHandleSq][1].x
elseif editor.uiIconImageButton(editor.icons.lock_open, imgui.ImVec2(24, 24)) and (not tableIsEmpty(editor.selection)) then
inspectorInfo.selection = deepcopy(editor.selection)
inspectorInfo.ctx = createInspectorContext()
inspectorInfo.ctx = createInspectorContext()
inspectorInfo.ctx.fields = deepcopy(sharedCtx.fields)
end
-- editor.pickingLinkTo.child:setField("linkToParent", 0, pid)
editor.selection.object = deepcopy(editor.pickingLinkTo.selectionObjectIds)
editor.pickingLinkTo = nil
@/lua/ge/extensions/editor/audioRibbonEditor.lua
end
local depthsCopy = deepcopy(depths)
local widthsCopy = deepcopy(widths)
local depthsCopy = deepcopy(depths)
local widthsCopy = deepcopy(widths)
@/lua/ge/extensions/editor/dynamicDecals/layerStack.lua
if editor.getTempBool_BoolBool() == true then
local layerCopy = deepcopy(layer)
layerCopy.name = editor.getTempCharPtr()
if im.Button("Copy Layer Mask") then
layerMaskCopyData = deepcopy(layer.mask)
editor.logInfo(string.format("%s: %s", logTag, "Copied layer mask"))
end
local layerCopy = deepcopy(layer)
layerCopy.mask = deepcopy(layerMaskCopyData)
local layerCopy = deepcopy(layer)
layerCopy.mask = deepcopy(layerMaskCopyData)
api.setLayer(layerCopy, true)
if im.Button("Append Layer Mask") then
local layerCopy = deepcopy(layer)
for _, maskLayer in ipairs(layerMaskCopyData.layers) do
if editor.getTempBool_BoolBool() then
local layerCopy = deepcopy(layer)
layerCopy.mask.enabled = true
else
local layerCopy = deepcopy(layer)
layerCopy.mask.enabled = false
if editor.uiIconImageButton(editor.icons.delete, im.ImVec2(tool.getIconSize(), tool.getIconSize()), nil, nil, nil, string.format("%s_%s", layer.uid, "removeLayerMask")) then
local layerCopy = deepcopy(layer)
layerCopy.mask = nil
if im.Checkbox(string.format("##%s_%s_%s_%d", layer.uid, guiId, "layerMaskLayerEnabled", k), editor.getTempBool_BoolBool(maskLayer.enabled)) then
local layerCopy = deepcopy(layer)
layerCopy.mask.layers[k].enabled = editor.getTempBool_BoolBool()
if editor.uiIconImageButton(editor.icons.delete, im.ImVec2(tool.getIconSize(), tool.getIconSize()), nil, nil, nil, string.format("%s_%d_%s", layer.uid, k, "removeLayerMaskLayer")) then
local layerCopy = deepcopy(layer)
table.remove(layerCopy.mask.layers, k)
@/lua/ge/extensions/core/dynamicProps.lua
local function unloadAll()
tempCopy = deepcopy(dynamicPropsObjs)
for i = 1, #dynamicPropsObjs, 1 do
dump(tempCopy)
dynamicPropsObjs = deepcopy(tempCopy)
be:reloadCollision(false, false)
@/lua/ge/extensions/editor/aiViz.lua
local node = mapNodes[nid]
local nodesToCheck = deepcopy(mapNodes)
@/lua/ge/extensions/editor/sceneTree.lua
local function onEditorSaveGuiInstancerState(state)
local instancesCopy = deepcopy(guiInstancer.instances)
for key, instance in pairs(guiInstancer.instances) do
@/lua/ge/extensions/freeroam/bigMapMarkers.lua
--dump(settings.validIdsLookup)
--local validCopy = deepcopy(settings.validIdsLookup)
for _, poi in ipairs(elements) do
@/lua/ge/extensions/editor/dynamicDecals/selection.lua
end
local layerData = deepcopy(api.getLayerByUid(uid))
editor.selection["dynamicDecalLayer"][uid] = layerData
@/lua/ge/extensions/editor/trafficManager.lua
local vehData = deepcopy(session.vehicles[nameId])
vehData.home.pos = session.vehicles[nameId].home.pos:toTable()
@/lua/ge/extensions/editor/gen/test.lua
-- build LOD geometry file
local afloor = deepcopy(desc.afloor)
dlod = houseUp({pos = desc.pos + vec3(0,0,0), afloor = afloor, isbox=true, basement = {yes = false}})
local mat = M.forNode(ndmatlib, {'material'})
mat = deepcopy(mat)
M.ofNode(mat, {id=idmat,name=floor.top.mat})
local ndinst = M.forNode(ndtech, {'instance_material'})
ndinst = deepcopy(ndinst)
M.ofNode(ndinst, {target='#'..idmat, symbol=idmat})
local ndinstg = M.forNode(ndlod, {'instance_geometry'})
ndinstg = deepcopy(ndinstg)
M.ofNode(ndinstg, {url='#'..'geo_top'})
local ndinst = M.forNode(ndtech, {'instance_material'})
ndinst = deepcopy(ndinst)
M.ofNode(ndinst, {target='#'..idmat, symbol=idmat})
-- local ndtinst = M.forNode(ndtech, {'instance_material'})
-- ndtinst = deepcopy(ndtinst)
-- M.ofNode(ndtinst, {target='#'..idmat, symbol=idmat})
if torebuild then
local afloor = deepcopy(desc.afloor)
dlod = houseUp({pos = desc.pos + vec3(40,0,0), afloor = afloor, isbox=true, basement = {yes = false}})
local dist = '200'
local nd_lod = deepcopy(nd_maingeo)
M.ofNode(nd_lod, {id='e_lod_1_L'..dist, name='e_lod.1_L'..dist, type='NODE'})
end
local sbase = deepcopy(base)
-- shape test
base = shape2base('p_shape')
sbase = deepcopy(base)
base = U.polyMargin(base, 0.4)
base = shape2base('sh_t')
sbase = deepcopy(base)
base = U.polyMargin(base, 0.4)
@/lua/vehicle/powertrain/turbocharger.lua
local function init(device, jbeamData)
turbo = deepcopy(jbeamData)
if turbo == nil then
@/lua/ge/extensions/util/procTrack.lua
--dump(scenario.lapConfig)
scenario.initialLapConfig = deepcopy(scenario.lapConfig)
scenario.BranchLapConfig = deepcopy(scenario.lapConfig)
scenario.initialLapConfig = deepcopy(scenario.lapConfig)
scenario.BranchLapConfig = deepcopy(scenario.lapConfig)
end
@/lua/ge/extensions/gameplay/missions/progress.lua
local rewards = mission.careerSetup.starRewards[star] or {}
starRewards.originalRewardsPerStar[star] = deepcopy(rewards)
for _, reward in ipairs(rewards) do
end
local rCopy = deepcopy(reward)
rCopy.sourceStar = star
if not prog[progressKey] then
prog[progressKey] = deepcopy(prog[defaultKey])
end
local leaderboardKey = 'recent'--mission.defaultLeaderboardKey or 'recent'
local attemptIndices = deepcopy(missionInstance.saveData.progress[progressKey].leaderboards[leaderboardKey]) or {}
@/lua/ge/extensions/career/modules/partShopping.lua
if inventoryPart.name == suitablePartName and inventoryPart.location == 0 and inventoryPart.vehicleModel == part.vehicleModel and (not partSlotOfThisPartInShoppingCart or partSlotOfThisPartInShoppingCart == part.containingSlot) then
local shopPart = deepcopy(inventoryPart)
shopPart.containingSlot = part.containingSlot
partsInShop = {}
local chosenPartsTree = deepcopy(currentVehicleData.config.partsTree)
generatePartFromTree(chosenPartsTree, "", nil, currentVehicleData, availableParts, vehicleObj)
previewVehicle.config.partsTree = deepcopy(currentVehicleData.config.partsTree)
previewVehicle.partList = flattenPartsTree(previewVehicle.config.partsTree)
shoppingSessionActive = true
slotToPartIdMap = deepcopy(career_modules_partInventory.getSlotToPartIdMap())
initialVehicle = deepcopy(vehicles[currentVehicle])
initialVehicle.partList = flattenPartsTree(initialVehicle.config.partsTree)
previewVehicle = deepcopy(initialVehicle)
if inventoryPart.location == 0 and inventoryPart.vehicleModel == parentPart.vehicleModel and (not partSlotOfThisPartInShoppingCart) and jbeamSlotSystem.partFitsSlot(partDescription, parentPart.description.slotInfoUi[slotName]) then
local shopPart = deepcopy(inventoryPart)
shopPart.containingSlot = parentPart.containingSlot .. slotName .. "/"
for containingSlot, partId in pairs(slotToPartIdMap[inventoryId]) do
combinedSlotToPartMap[containingSlot] = deepcopy(career_modules_partInventory.getInventory()[partId])
end
for _, part in pairs(parts) do
combinedSlotToPartMap[part.containingSlot] = deepcopy(part)
end
local addedParts = false
local resultParts = deepcopy(parts)
for _, part in pairs(parts) do
local mainPartName = jbeamIO.getMainPartName(currentVehicleData.ioCtx)
local vehiclePartsTree = deepcopy(previewVehicle.config.partsTree)
local vehicleParts = flattenPartsTree(vehiclePartsTree)
@/lua/ge/extensions/editor/util/editorElementHelper.lua
local function customGetNewData(e) return e.getNewFunction(e) end
local function defaultValueGetNewData(e) return {{fieldName = e.fieldName, value = deepcopy(e.defaultValue)}} end
local function transformGetNewData(e)
local function leaderboardSetContainer(e, ctd) e.best[0] = ctd[e.fieldNameBest] or e.defaultBest e.medium[0] = ctd[e.fieldNameMedium] or e.defaultMedium e.worst[0] = ctd[e.fieldNameWorst] or e.defaultWorst e.count[0] = ctd[e.fieldNameCount] or e.defaultCount end
local function simpleLapConfigSetContainer(e, ctd) e.lapConfig:set(ctd[e.fieldName] or deepcopy(e.defaultPos)) end
local function elementIdSetContainer(e, ctd) e.value = ctd.value or e.defaultValue end
@/lua/ge/extensions/flowgraph/nodes/ui/imgui/imDialogue.lua
function C:_onSerialize(res)
res.options = deepcopy(self.options)
end
@/lua/ge/extensions/editor/raceEditor/startPositions.lua
if sp.missing then return end
self.beginDragRotation = deepcopy(sp.rot)
self.beginDragData = sp:onSerialize()
editor.history:commitAction("Create Start Position",
{self = self, index = self.index, mouseInfo = deepcopy(self.mouseInfo)},
function(data)
@/gameplay/missionTypes/dragStripAPM/constructor.lua
self.fgVariables = deepcopy(self.missionTypeData) or {}
self.missionTypeLabel = "bigMap.missionLabels."..'dragRace'
@/lua/ge/extensions/editor/vehicleDetailViewer.lua
if spawnNewView then
local newView = deepcopy(viewTemplates.left)
newView.name = 'View ' .. tostring(#views + 1)
@/lua/ge/extensions/flowgraph/nodes/scene/camera/procedural/procCamPathPosRot.lua
local from = deepcopy(m)
from.pos = vec3(self.pinIn.pos.value)
path.markers = { deepcopy(from), deepcopy(from) }
path.markers = { deepcopy(from), deepcopy(from) }
@/lua/ge/extensions/career/modules/delivery/cargoCards.lua
showEmpty = true,
filterTags = deepcopy(con.cargoTypesLookup),
}
@/lua/ge/extensions/gameplay/missions/unlocks.lua
for _, mission in ipairs(missions) do
local startableInfo = conditionMet(mission.startCondition or deepcopy(conditionTypes['always']))
mission.unlocks = mission.unlocks or {}
else
local visibleInfo = conditionMet(mission.visibleCondition or deepcopy(conditionTypes['always']))
mission.unlocks.visible = visibleInfo.met
for _, mission in ipairs(gameplay_missions_missions.get()) do
cache[mission.id] = deepcopy(mission.unlocks)
end
@/lua/ge/extensions/tech/techCore.lua
else
config.prevGameState = deepcopy(core_gamestate.state)
core_input_actionFilter.clear(0)
@/lua/ge/extensions/editor/roadEditor.lua
if tableSize(selectedRoadsIds) == 1 and fieldsCopy then
editor.history:commitAction("PasteRoad", {oldFields = editor.copyFields(selectedRoadsIds[1]), newFields = deepcopy(fieldsCopy), roadId = selectedRoadsIds[1]}, pasteActionUndo, pasteActionRedo)
end
end
actionData.newRoadIDs = deepcopy(newRoadIds)
end
local nodeIDsTbl = deepcopy(selectedNodes)
editor.history:commitAction("PositionRoadNode", {roadAndNodeIDs = nodeIDsTbl, oldPositions = oldPositionsTbl, newPositions = newPositionsTbl}, positionNodeActionUndo, positionNodeActionRedo)
-- Add new node to selectedRoad
nodeIDsTbl[activeRoadID] = deepcopy({tempNodeIndex})
tempNodeIndexes[activeRoadID] = nil
if dragLength > 5 then
local oldPositionsTbl = deepcopy(dragNodesStartPositions)
local newPositionsTbl = {}
local nodeIDsTbl = deepcopy(selectedNodes)
editor.history:commitAction("PositionRoadNode", {roadAndNodeIDs = nodeIDsTbl, oldPositions = oldPositionsTbl, newPositions = newPositionsTbl}, positionNodeActionUndo, positionNodeActionRedo)
if selectedNodes[roadID] and not tableIsEmpty(selectedNodes[roadID]) then
tempSelectedNodes[roadID] = deepcopy(selectedNodes[roadID])
end
@/lua/ge/extensions/editor/slotTrafficEditor.lua
local node = mapNodes[nid]
local nodesToCheck = deepcopy(mapNodes)
-- Create two-way links for easier traversal
mapNodes[nid1].links[nid2] = deepcopy(link)
if not mapNodes[nid2].links[nid1] then
if not mapNodes[nid2].links[nid1] then
mapNodes[nid2].links[nid1] = deepcopy(link)
end
for i, nodeId in ipairs(tempNodes) do
table.insert(nodeInfos, {nid = nodeId, pos = vec3(mapNodes[nodeId].pos), radius = mapNodes[nodeId].radius, links = deepcopy(mapNodes[nodeId].links)})
nodeIds[nodeId] = true
editor.history:commitAction("AddstNode", {nodeInfos = nodeInfos, linkInfos = deepcopy(getConnectedLinks(nodeIds))}, addNodeLinkActionUndo, addNodeLinkActionRedo, true)
end
editor.history:commitAction("PositionstNode", {nids = deepcopy(editor.selection.stNode), fieldName = "pos", oldValues = deepcopy(nodeOldPositions), newValues = newValues}, changeNodeFieldActionUndo, changeNodeFieldActionRedo, true)
setDirty()
end
editor.history:commitAction("PositionstNode", {nids = deepcopy(editor.selection.stNode), fieldName = "pos", oldValues = deepcopy(nodeOldPositions), newValues = newValues}, changeNodeFieldActionUndo, changeNodeFieldActionRedo, true)
setDirty()
newValues[nid] = vec3(posArray[0], posArray[1], posArray[2])
editor.history:commitAction("PositionstNode", {nids = deepcopy(editor.selection.stNode), fieldName = "pos", oldValues = oldValues, newValues = newValues}, changeNodeFieldActionUndo, changeNodeFieldActionRedo)
end
newValues[nid] = radPtr[0]
editor.history:commitAction("ChangestNodeRadius", {nids = deepcopy(editor.selection.stNode), fieldName = "radius", oldValues = oldValues, newValues = newValues}, changeNodeFieldActionUndo, changeNodeFieldActionRedo)
end
for nid, _ in pairs(editor.selection.stNode) do
local nodeInfo = {nid = nid, pos = vec3(mapNodes[nid].pos), radius = mapNodes[nid].radius, links = deepcopy(mapNodes[nid].links)}
table.insert(nodeInfos, nodeInfo)
local nids = editor.selection.stNode
editor.history:commitAction("DeletestNodes", {nodeInfos = nodeInfos, linkInfos = deepcopy(getConnectedLinks(nids))}, deleteNodeLinkActionUndo, deleteNodeLinkActionRedo)
elseif editor.selection.stLink and not isLinkSelectionEmpty() then
if navgraphDirty then
local mapNodesCopy = deepcopy(mapNodes)
for nid1, node in pairs(mapNodes) do
-- Also save roads data
local roadsCopy = deepcopy(roads)
@/lua/ge/extensions/editor/shortcutLegend.lua
compoundedActionInfos = deepcopy(actionInfos)
@/lua/ge/extensions/ui/liveryEditor/layers/decals.lua
M.layerUid = layerUid
M.layerData = deepcopy(api.getLayerByUid(M.layerUid))
-- notify ui and extensions
@/lua/ge/extensions/editor/trafficSignalsEditor.lua
if not currData.flashingLights then
currData.flashingLights = {currData.lights and deepcopy(currData.lights) or {}}
end
core_trafficSignals.loadControllerDefinitions()
signalCtrlDefinitions = deepcopy(core_trafficSignals.getControllerDefinitions())
signalCtrlDefinitions.origStates = deepcopy(signalCtrlDefinitions.states)
signalCtrlDefinitions = deepcopy(core_trafficSignals.getControllerDefinitions())
signalCtrlDefinitions.origStates = deepcopy(signalCtrlDefinitions.states)
state.lights = deepcopy(state.flashingLights[1] or {})
@/lua/ge/extensions/scenario/waypoints.lua
if M.state.branchGraph[M.state.lapConfigName][i] then
table.insert(waypointConfig, deepcopy(M.state.branchGraph[M.state.lapConfigName][i]))
end
if M.state.branchGraph[branchName][i] then
table.insert(w.waypointConfig, index, deepcopy(M.state.branchGraph[branchName][i]))
--table.insert(scenario.lapConfig, index, M.state.branchGraph[branchName][i].cpName)
local function onScenarioRestarted(scenario)
scenario.lapConfig = deepcopy(scenario.initialLapConfig)
clearState()
local function getVehicleWaypointData(vehicleId)
local data = deepcopy(M.state.vehicleWaypointsData[vehicleId])
return data
@/lua/ge/extensions/editor/levelValidator.lua
for _, l in ipairs(levelLogs) do
local log = deepcopy(l)
if log.objectId or log.prefabChildId then