From 1c80a3bb41c9f74d4bd0412072f069dfed5125e3 Mon Sep 17 00:00:00 2001 From: Deyan Dobromirov Date: Mon, 1 Apr 2024 13:59:33 +0300 Subject: [PATCH] Updated: Process attachments POA with priority when spawning --- lua/autorun/trackassembly_init.lua | 2 +- lua/trackassembly/trackasmlib.lua | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index 574882e0..cc6b5f22 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -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) diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index 7d5af5dc..8f18d8b9 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -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