diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index 55bf49e6..1eb913cf 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.754") +asmlib.SetOpVar("TOOL_VERSION","8.755") ------------ CONFIGURE GLOBAL INIT OPVARS ------------ diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index 7b03c499..21b53f86 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -1552,18 +1552,27 @@ function NewPOA() local self, mRaw = {0, 0, 0} local mMis = GetOpVar("MISS_NOSQL") local mSep = GetOpVar("OPSYM_SEPARATOR") - function self:Set(nA, nB, nC) - self[1] = (tonumber(nA) or 0) - self[2] = (tonumber(nB) or 0) - self[3] = (tonumber(nC) or 0) - return self - end function self:Get() return unpack(self) end + function self:Table() + return {unpack(self)} + end + function self:Vector() + return Vector(unpack(self)) + end + function self:Angle() + return Angle(unpack(self)) + end function self:String() return tableConcat(self, mSep):gsub("%s","") end + function self:Set(nA, nB, nC) + self[1] = (tonumber(nA) or 0) + self[2] = (tonumber(nB) or 0) + self[3] = (tonumber(nC) or 0) + return self + end function self:Raw(sRaw) if(IsHere(sRaw)) then mRaw = tostring(sRaw or "") end @@ -1571,8 +1580,8 @@ function NewPOA() end function self:IsSame(tPOA) for iD = 1, 3 do - if(tPOA[iD] ~= self[iD]) then return true end - end; return false + if(tPOA[iD] ~= self[iD]) then return false end + end; return true end function self:IsZero() for iD = 1, 3 do @@ -1580,9 +1589,10 @@ function NewPOA() end; return true end function self:Export(sDes) - local sD, sR = tostring(sDes or mMis), self:Raw() - local sE = (self:IsZero() and sE or self:String()) - return (sR and sR or sE) + local sS = self:String() + local sD = tostring(sDes or mMis) + local sE = (self:IsZero() and sD or sS) + return (mRaw and mRaw or sE) end function self:Decode(sStr) local sStr = tostring(sStr or "") -- Default to string