mirror of
https://github.com/dvdvideo1234/TrackAssemblyTool.git
synced 2025-03-04 03:13:32 -05:00
Fixed: Joe's visual lever switch not rotated correctly in the model panel
Fixed: Doubling some function names in the open frame logs
This commit is contained in:
parent
6b36a1696e
commit
bfecb1c212
@ -75,7 +75,7 @@ local gtInitLogs = {"*Init", false, 0}
|
||||
|
||||
------ CONFIGURE ASMLIB ------
|
||||
asmlib.InitBase("track","assembly")
|
||||
asmlib.SetOpVar("TOOL_VERSION","7.613")
|
||||
asmlib.SetOpVar("TOOL_VERSION","7.614")
|
||||
asmlib.SetIndexes("V" , "x", "y", "z")
|
||||
asmlib.SetIndexes("A" ,"pitch","yaw","roll")
|
||||
asmlib.SetIndexes("WV",1,2,3)
|
||||
@ -800,7 +800,7 @@ if(CLIENT) then asmlib.InitLocalify(varLanguage:GetString())
|
||||
pnModelPanel.LayoutEntity = function(pnSelf, oEnt) gtArgsLogs[1] = "OPEN_FRAME.ModelPanel"
|
||||
if(pnSelf.bAnimated) then pnSelf:RunAnimation() end
|
||||
local uiBox = asmlib.CacheBoxLayout(oEnt,40); if(not asmlib.IsHere(uiBox)) then
|
||||
asmlib.LogInstance("ModelPanel.LayoutEntity Box invalid",gtArgsLogs); return nil end
|
||||
asmlib.LogInstance("Box invalid",gtArgsLogs); return nil end
|
||||
local stSpawn = asmlib.GetNormalSpawn(oPly,asmlib.GetOpVar("VEC_ZERO"),uiBox.Ang,oEnt:GetModel(),1)
|
||||
stSpawn.SPos:Set(uiBox.Cen)
|
||||
stSpawn.SPos:Rotate(stSpawn.SAng)
|
||||
@ -861,9 +861,10 @@ if(CLIENT) then asmlib.InitLocalify(varLanguage:GetString())
|
||||
pnListView:AddColumn(""):SetFixedWidth(0) -- (5) This is actually the hidden model of the piece used.
|
||||
pnListView.OnRowSelected = function(pnSelf, nIndex, pnLine) gtArgsLogs[1] = "OPEN_FRAME.ListView"
|
||||
local uiMod = tostring(pnLine:GetColumnText(5) or asmlib.GetOpVar("MISS_NOMD")) -- Actually the model in the table
|
||||
local uiAct = (tonumber(pnLine:GetColumnText(2)) or 0); pnModelPanel:SetModel(uiMod) -- Active points amount
|
||||
local uiAct = (tonumber(pnLine:GetColumnText(2)) or 0) -- Active points amount or track ends per model
|
||||
pnModelPanel:SetModel(uiMod); pnModelPanel:GetEntity():SetModel(uiMod) -- Apply the model on the model panel
|
||||
local uiBox = asmlib.CacheBoxLayout(pnModelPanel:GetEntity(),0,gnRatio,gnRatio-1); if(not asmlib.IsHere(uiBox)) then
|
||||
asmlib.LogInstance("ListView.OnRowSelected Box invalid for <"..uiMod..">",gtArgsLogs); return nil end
|
||||
asmlib.LogInstance("Box invalid for <"..uiMod..">",gtArgsLogs); return nil end
|
||||
pnModelPanel:SetLookAt(uiBox.Eye); pnModelPanel:SetCamPos(uiBox.Cam)
|
||||
local pointid, pnextid = asmlib.GetAsmConvar("pointid","INT"), asmlib.GetAsmConvar("pnextid","INT")
|
||||
pointid, pnextid = asmlib.SnapReview(pointid, pnextid, uiAct); SetClipboardText(uiMod)
|
||||
@ -877,7 +878,7 @@ if(CLIENT) then asmlib.InitLocalify(varLanguage:GetString())
|
||||
SetClipboardText(pnLine:GetColumnText(nCnt))
|
||||
end
|
||||
if(not asmlib.UpdateListView(pnListView,frUsed,nCount)) then
|
||||
asmlib.LogInstance("ListView.OnRowSelected Populate the list view failed",gtArgsLogs); return nil end
|
||||
asmlib.LogInstance("Populate the list view failed",gtArgsLogs); return nil end
|
||||
-- The button dababase export by type uses the current active type in the ListView line
|
||||
pnButton.DoClick = function(pnSelf) gtArgsLogs[1] = "OPEN_FRAME.Button"
|
||||
asmlib.LogInstance("Click "..asmlib.GetReport(pnSelf:GetText()), gtArgsLogs)
|
||||
|
@ -242,23 +242,23 @@ function IsOther(oEnt)
|
||||
end
|
||||
|
||||
-- Reports the type and actual value
|
||||
function GetReport(vA)
|
||||
return GetOpVar("FORM_VREPORT2"):format(type(vA), tostring(vA))
|
||||
function GetReport(vA) local sR = GetOpVar("FORM_VREPORT2")
|
||||
return (sR and sR:format(type(vA), tostring(vA)) or "")
|
||||
end
|
||||
|
||||
-- Reports vararg containing two values
|
||||
function GetReport2(vA, vB)
|
||||
return GetOpVar("FORM_VREPORT2"):format(tostring(vA), tostring(vB))
|
||||
function GetReport2(vA, vB) local sR = GetOpVar("FORM_VREPORT2")
|
||||
return (sR and sR:format(tostring(vA), tostring(vB)) or "")
|
||||
end
|
||||
|
||||
-- Reports vararg containing three values
|
||||
function GetReport3(vA, vB, vC)
|
||||
return GetOpVar("FORM_VREPORT3"):format(tostring(vA), tostring(vB), tostring(vC))
|
||||
function GetReport3(vA, vB, vC) local sR = GetOpVar("FORM_VREPORT3")
|
||||
return (sR and sR:format(tostring(vA), tostring(vB), tostring(vC)) or "")
|
||||
end
|
||||
|
||||
-- Reports vararg containing three values
|
||||
function GetReport4(vA, vB, vC, vD)
|
||||
return GetOpVar("FORM_VREPORT4"):format(tostring(vA), tostring(vB), tostring(vC), tostring(vD))
|
||||
function GetReport4(vA, vB, vC, vD) local sR = GetOpVar("FORM_VREPORT4")
|
||||
return (sR and sR:format(tostring(vA), tostring(vB), tostring(vC), tostring(vD)) or "")
|
||||
end
|
||||
|
||||
-- Returns the sign of a number [-1,0,1]
|
||||
@ -2497,9 +2497,9 @@ end
|
||||
function CacheBoxLayout(oEnt,nRot,nCamX,nCamZ)
|
||||
if(not (oEnt and oEnt:IsValid())) then
|
||||
LogInstance("Entity invalid <"..tostring(oEnt)..">"); return nil end
|
||||
local sMod = oEnt:GetModel()
|
||||
local sMod = oEnt:GetModel() -- Extract the entity model
|
||||
local oRec = CacheQueryPiece(sMod); if(not IsHere(oRec)) then
|
||||
LogInstance("Piece record invalid <"..sMod..">"); return nil end
|
||||
LogInstance("Record invalid <"..sMod..">"); return nil end
|
||||
local stBox = oRec.Layout; if(not IsHere(stBox)) then
|
||||
local vMin, vMax; oRec.Layout = {}; stBox = oRec.Layout
|
||||
if (CLIENT) then vMin, vMax = oEnt:GetRenderBounds()
|
||||
|
@ -82,7 +82,7 @@ local varLanguage = GetConVar("gmod_language")
|
||||
local gtArgsLogs = {"TOOL"}
|
||||
|
||||
if(not asmlib.ProcessDSV()) then -- Default tab delimiter
|
||||
asmlib.LogInstance("Processing external DSV fail <"..gsDataRoot.."trackasmlib_dsv.txt>")
|
||||
asmlib.LogInstance("Processing DSV fail <"..gsDataRoot.."trackasmlib_dsv.txt>")
|
||||
end
|
||||
|
||||
cleanupRegister(gsLimitName); asmlib.SetOpVar("REFER_TOOLOBJ", TOOL)
|
||||
|
Loading…
Reference in New Issue
Block a user