Skip to content

Commit

Permalink
Updated: Process attachments POA with priority when spawning
Browse files Browse the repository at this point in the history
  • Loading branch information
dvdvideo1234 committed Apr 1, 2024
1 parent 2ba281f commit 1c80a3b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/trackassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 8 additions & 8 deletions lua/trackassembly/trackasmlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2289,18 +2289,18 @@ 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
else -- Try decoding the transform point when not applicable
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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1c80a3b

Please sign in to comment.