mirror of
https://github.com/dvdvideo1234/TrackAssemblyTool.git
synced 2025-03-04 03:13:32 -05:00
Fixed: A bunch of incorrect behavior
Fixed: Panel generation runtime error Fixed: The `BorderValue` API used on max log control is local Added: Node for StevenTechno's Building 2.0
This commit is contained in:
parent
1223df7335
commit
2a83cd6a77
@ -21,7 +21,7 @@ set emd_chew_dbase=%emd_chew_addon%\TrackAssemblyTool_GIT\lua\autorun\trackassem
|
||||
set emd_chew_skip=%emd_chew_addon%\TrackAssemblyTool_GIT\data\peaces_manager\models_ignored.txt
|
||||
|
||||
:: How many addons are to be processed
|
||||
set emd_chew_addcnt=14
|
||||
set emd_chew_addcnt=15
|
||||
|
||||
:: GMA addons to be processed
|
||||
set emd_chew_addlst[1]=sligwolfs_minitrains_149759773
|
||||
@ -38,6 +38,7 @@ set emd_chew_addlst[11]=rons_minitrain_props_728833183
|
||||
set emd_chew_addlst[12]=battleships_abandoned_rails(penn_central_simulator_2017)(wip)_807162936
|
||||
set emd_chew_addlst[13]=alexcookies_2ft_track_pack_740453553
|
||||
set emd_chew_addlst[14]=joes_track_pack_1658816805
|
||||
set emd_chew_addlst[15]=steventechnos_buildings_and_roads_pack_2.0_1888013789
|
||||
|
||||
:: Folder list for extraction and the directories they will be extracted
|
||||
set emd_chew_adddir[1]=SligWolf's Minitrains
|
||||
@ -54,6 +55,7 @@ set emd_chew_adddir[11]=Ron's Minitrain Props
|
||||
set emd_chew_adddir[12]=Battleship's abandoned rails
|
||||
set emd_chew_adddir[13]=AlexCookie's 2ft track pack
|
||||
set emd_chew_adddir[14]=Joe's track pack
|
||||
set emd_chew_adddir[15]=StephenTechno's Buildings 2.0
|
||||
|
||||
:: AUTOMATIC STUFF ::
|
||||
|
||||
|
@ -72,7 +72,7 @@ local gtInitLogs = {"*Init", false, 0}
|
||||
|
||||
------ CONFIGURE ASMLIB ------
|
||||
asmlib.InitBase("track","assembly")
|
||||
asmlib.SetOpVar("TOOL_VERSION","7.577")
|
||||
asmlib.SetOpVar("TOOL_VERSION","7.578")
|
||||
asmlib.SetIndexes("V" , "x", "y", "z")
|
||||
asmlib.SetIndexes("A" ,"pitch","yaw","roll")
|
||||
asmlib.SetIndexes("WV",1,2,3)
|
||||
@ -177,7 +177,7 @@ gsVarName = asmlib.GetAsmConvar("maxtrmarg", "NAM")
|
||||
cvarsRemoveChangeCallback(gsVarName, gsVarName..gsCbcHash)
|
||||
cvarsAddChangeCallback(gsVarName, function(sVar, vOld, vNew)
|
||||
local nM = (tonumber(vNew) or 0)
|
||||
nM = ((nM > 0) and nM or 0) end)
|
||||
nM = ((nM > 0) and nM or 0)
|
||||
asmlib.SetOpVar("TRACE_MARGIN", nM)
|
||||
end, gsVarName..gsCbcHash)
|
||||
|
||||
@ -185,7 +185,7 @@ gsVarName = asmlib.GetAsmConvar("logsmax", "NAM")
|
||||
cvarsRemoveChangeCallback(gsVarName, gsVarName..gsCbcHash)
|
||||
cvarsAddChangeCallback(gsVarName, function(sVar, vOld, vNew)
|
||||
local nM = asmlib.BorderValue((tonumber(vNew) or 0), "non-neg")
|
||||
asmlib.SetOpVar("TRACE_MARGIN", nM)
|
||||
asmlib.SetOpVar("LOG_MAXLOGS", nM)
|
||||
end, gsVarName..gsCbcHash)
|
||||
|
||||
gsVarName = asmlib.GetAsmConvar("logfile", "NAM")
|
||||
@ -689,10 +689,12 @@ if(CLIENT) then asmlib.InitLocalify(varLanguage:GetString())
|
||||
asmlib.SetAsmConvar(oPly,"nextpic", 0)
|
||||
asmlib.SetAsmConvar(oPly,"nextyaw", 0)
|
||||
asmlib.SetAsmConvar(oPly,"nextrol", 0)
|
||||
else
|
||||
if(not devmode) then
|
||||
asmlib.LogInstance("Developer mode disabled",gtArgsLogs); return nil end
|
||||
asmlib.SetLogControl(asmlib.GetAsmConvar("logsmax" , "INT"), asmlib.GetAsmConvar("logfile" , "BUL"))
|
||||
else
|
||||
if(not devmode) then
|
||||
asmlib.LogInstance("Developer mode disabled",gtArgsLogs); return nil end
|
||||
oPly:ConCommand("sbox_max"..asmlib.GetOpVar("CVAR_LIMITNAME").." 1500\n")
|
||||
for key, val in pairs(asmlib.GetConvarList()) do
|
||||
oPly:ConCommand(key.." "..tostring(val).."\n") end
|
||||
@ -3655,6 +3657,9 @@ else
|
||||
PIECES:Record({"models/joe/jtp/grades/1024_32.mdl", "#", "#", 1, "", "0,512,-9.43457", "0,90,0", ""})
|
||||
PIECES:Record({"models/joe/jtp/grades/1024_32.mdl", "#", "#", 2, "", "0,-512,22.56836", "0,-90,0", ""})
|
||||
PIECES:Record({"models/joe/jtp/throw/harpstand_2_pos.mdl", "#", "#", 1, "", "0, -86, 0", "", ""})
|
||||
asmlib.GetCategory("StephenTechno's Buildings 2.0")
|
||||
PIECES:Record({"models/roads_pack/single_lane/0-0_single_lane_x1.mdl", "#", "#", 1, "", "0,0,3.03125", "", ""})
|
||||
PIECES:Record({"models/roads_pack/single_lane/0-0_single_lane_x1.mdl", "#", "#", 2, "", "-72,0,3.03125", "0,-180,0", ""})
|
||||
if(gsMoDB == "SQL") then sqlCommit() end
|
||||
end
|
||||
|
||||
|
@ -282,7 +282,7 @@ end
|
||||
|
||||
local function GetLogID()
|
||||
local nNum, fMax = GetOpVar("LOG_CURLOGS"), GetOpVar("LOG_FORMLID")
|
||||
if(not (nNum and nMax)) then return "" end; return fMax:format(nNum)
|
||||
if(not (nNum and fMax)) then return "" end; return fMax:format(nNum)
|
||||
end
|
||||
|
||||
local function Log(vMsg, bCon)
|
||||
@ -292,7 +292,7 @@ local function Log(vMsg, bCon)
|
||||
local sData = tostring(vMsg); SetOpVar("LOG_CURLOGS",iCur)
|
||||
if(IsFlag("en_logging_file") and not bCon) then
|
||||
local lbNam = GetOpVar("NAME_LIBRARY")
|
||||
local fName = GetOpVar("LOG_FILENAMЕ")
|
||||
local fName = GetOpVar("LOG_FILENAME")
|
||||
if(iCur > iMax) then iCur = 0; fileDelete(fName) end
|
||||
fileAppend(fName,GetLogID().." ["..GetDate().."] "..sData.."\n")
|
||||
else -- The current has values 1..nMaxLogs(0)
|
||||
@ -405,7 +405,7 @@ end
|
||||
* according to the given border name. Basically
|
||||
* custom version of a clamp with vararg border limits
|
||||
]]
|
||||
local function BorderValue(nsVal, vKey)
|
||||
function BorderValue(nsVal, vKey)
|
||||
if(not IsHere(vKey)) then return nsVal end
|
||||
if(not (IsString(nsVal) or IsNumber(nsVal))) then
|
||||
LogInstance("Value not comparable "..GetReport(nsVal)); return nsVal end
|
||||
|
@ -1280,7 +1280,7 @@ function TOOL.BuildCPanel(CPanel)
|
||||
-- If the call is successful in protected mode and a folder table is present
|
||||
if(bSuc) then local pCurr = pCateg[sTyp]
|
||||
if(asmlib.IsBlank(ptCat)) then ptCat = nil end
|
||||
if(ptCat and not IsTable(ptCat)) then ptCat = {ptCat} end
|
||||
if(ptCat and not asmlib.IsTable(ptCat)) then ptCat = {ptCat} end
|
||||
if(ptCat and ptCat[1]) then
|
||||
local iCnt = 1; while(ptCat[iCnt]) do
|
||||
local sCat = tostring(ptCat[iCnt])
|
||||
|
Loading…
Reference in New Issue
Block a user