Skip to content

Commit

Permalink
Fixed: isstring global being defined two times
Browse files Browse the repository at this point in the history
Added: Timer setup support for multiple types
  • Loading branch information
dvdvideo1234 committed Aug 30, 2024
1 parent 63dcf71 commit 4aa84d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/trackassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
------------ CONFIGURE ASMLIB ------------

asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","8.783")
asmlib.SetOpVar("TOOL_VERSION","8.784")

------------ CONFIGURE GLOBAL INIT OPVARS ------------

Expand Down
14 changes: 13 additions & 1 deletion lua/trackassembly/trackasmlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,9 @@ local isbool = isbool
local istable = istable
local isnumber = isnumber
local isstring = isstring
local isstring = isstring
local isvector = isvector
local isangle = isangle
local ismatrix = ismatrix
local isfunction = isfunction
local Vector = Vector
local Matrix = Matrix
Expand Down Expand Up @@ -2656,6 +2657,17 @@ function NewTable(sTable,defTab,bDelete,bReload)
tTm[2] = (tonumber(vTm[2] or vTm["Li"]) or 0) -- Record life
tTm[3] = ((tonumber(vTm[3] or vTm["Rm"]) or 0) ~= 0) -- Kill command
tTm[4] = ((tonumber(vTm[4] or vTm["Co"]) or 0) ~= 0) -- Collect garbage call
elseif(isfunction(vTm)) then -- Transfer table data from definition
local bS, vO = pcall(vTm); if(not bS) then
LogInstance("Generator "..vO,tabDef.Nick); return self end
return self:TimerSetup(vO) -- Force function return value
elseif(isvector(vTm) or isangle(vTm) or ismatrix(vTm)) then
local cA, cB, cC = vTm:Unpack()
tTm[2] = (cA or 0) -- Record life
tTm[3] = ((cB or 0) ~= 0) -- Kill command
tTm[4] = ((cC or 0) ~= 0) -- Collect garbage call
else -- Transfer table data from definition
tTm[2] = (tonumber(vTm) or 0) -- Record life
end; return self
end
-- Navigates the reference in the cache
Expand Down

0 comments on commit 4aa84d8

Please sign in to comment.