Updated: Process attachments POA with priority when spawning

This commit is contained in:
Deyan Dobromirov 2024-04-01 13:59:33 +03:00
parent 2ba281f855
commit 1c80a3bb41
2 changed files with 9 additions and 9 deletions

View File

@ -84,7 +84,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
------------ CONFIGURE ASMLIB ------------
asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","8.748")
asmlib.SetOpVar("TOOL_VERSION","8.749")
asmlib.SetIndexes("V" ,1,2,3)
asmlib.SetIndexes("A" ,1,2,3)
asmlib.SetIndexes("WV",1,2,3)

View File

@ -2289,11 +2289,7 @@ function LocatePOA(oRec, ivPoID)
end -- Transform angle is decoded from the model and stored in the cache
-------------------- Point --------------------
if(sP) then -- There is still something to be processed after the registration
if(sP:sub(1,1) == sD) then -- Check whenever point is disabled
ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) -- Override with the origin
elseif(IsNull(sP) or IsBlank(sP)) then -- In case of empty value or null use the origin
ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) -- Override with the origin
elseif(sP:sub(1,1) == sE) then -- POA point must extracted from the model
if(sP:sub(1,1) == sE) then -- POA point must extracted from the model
local sK = sP:sub(2, -1) -- Read point transform ID and try to index
local vP = GetAttachmentByID(oRec.Slot, sK) -- Read transform point
if(IsHere(vP)) then ReloadPOA(vP[cvX], vP[cvY], vP[cvZ]) -- Load point into POA
@ -2301,6 +2297,10 @@ function LocatePOA(oRec, ivPoID)
if(IsNull(sK) or IsBlank(sK)) then ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) else
if(not DecodePOA(sK)) then LogInstance("Point mismatch "..GetReport2(ID, oRec.Slot)) end
end end -- Decode the transformation when is not null or empty string
elseif(sP:sub(1,1) == sD) then -- Check whenever point is disabled
ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) -- Override with the origin
elseif(IsNull(sP) or IsBlank(sP)) then -- In case of empty value or null use the origin
ReloadPOA(tPOA.O[cvX], tPOA.O[cvY], tPOA.O[cvZ]) -- Override with the origin
else -- When the point is empty use the origin otherwise decode the value
if(not DecodePOA(sP)) then LogInstance("Point mismatch "..GetReport2(ID, oRec.Slot)) end
end -- Try decoding the transform point when not applicable
@ -3855,9 +3855,9 @@ function ProcessDSV(sDelim)
if(not fileExists(sDv..fForm:format(irf, sNt.."CATEGORY"), "DATA")) then
if(fileExists(sDv..fForm:format(prf, sNt.."CATEGORY"), "DATA")) then
if(not ImportCategory(3, prf)) then
LogInstance("Failed CATEGORY "..GetReport1(prf)) end
else LogInstance("Missing CATEGORY "..GetReport1(prf)) end
else LogInstance("Generic CATEGORY "..GetReport1(prf)) end
LogInstance("Failed "..GetReport2(prf, "CATEGORY")) end
else LogInstance("Missing "..GetReport2(prf, "CATEGORY")) end
else LogInstance("Generic "..GetReport2(prf, "CATEGORY")) end
end local iD, makTab = 1, GetBuilderID(1)
while(makTab) do local defTab = makTab:GetDefinition()
if(not fileExists(sDv..fForm:format(irf, sNt..defTab.Nick), "DATA")) then