diff --git a/data/autosave/z_autorun_add_pieces.lua b/data/autosave/z_autorun_add_pieces.lua index 41fa4321..17271762 100644 --- a/data/autosave/z_autorun_add_pieces.lua +++ b/data/autosave/z_autorun_add_pieces.lua @@ -13,9 +13,6 @@ local asmlib = trackasmlib -- Change this to your addon name local myAddon = "Test's track pack" -- Your addon name goes here --- The base tool prefix which serves for script running identification -local myToolp = "TrackAssemblyTool("..myAddon..")" - --[[ * Change this if you want to use different in-game type * You can also use multiple types myType1, myType2, @@ -36,6 +33,24 @@ local myError = print -- This is used for addon relation prefix. Fingers away from it local myPrefix = myAddon:gsub("[^%w]","_") +-- This is the script path. It tells TA who wants to add these models +-- Do not touch this also, it is used for debugging +local myScript = debug.getinfo(1) + myScript = myScript and myScript.source or "N/A" + +--[[ + * This function defines what happens when there is an error present + * Usually you can tell Gmod that you want it to generate an error + * and throw the message to the log also. In this case you will not + * have to change the change the function name in lots of places + * when you need it to do something else +--]] +local function myThrowError(vMesg) + local sMesg = tostring(vMesg) -- Make sure the message is string + if(asmlib) then asmlib.LogInstance(sMesg) end -- Output the message into the logs + myError(myScript.." > ("..myAddon.."): "..sMesg) -- Generate an error in the console ( optional ) +end + if(asmlib) then -- This is the path to your DSV local myDsv = asmlib.GetOpVar("DIRPATH_BAS").. @@ -52,29 +67,8 @@ if(asmlib) then ]]-- local myFlag = file.Exists(myDsv.."PIECES.txt","DATA") - -- This is the script path. It tells TA who wants to add these models - -- Do not touch this also, it is used for debugging - local myScript = debug.getinfo(1) - myScript = myScript and myScript.source or "N/A" - -- Tell TA what custom script we just called don't touch it - asmlib.LogInstance(">>> "..myScript) - - -- And what parameters I was called with ;) - asmlib.LogInstance("Status("..tostring(myFlag).."): {"..myAddon..", "..myPrefix.."}") - - --[[ - * This function defines what happens when there is an error present - * Usually you can tell Gmod that you want it to generate an error - * and throw the message to the log also. In this case you will not - * have to change the change the function name in lots of places - * when you need it to do something else - --]] - local function myThrowError(vMesg) - local sMesg = tostring(vMesg) -- Make sure the message is string - asmlib.LogInstance(sMesg) -- Output the message into the logs - myError(myScript.." > "..myToolp..": "..sMesg) -- Generate an error in the console ( optional ) - end + asmlib.LogInstance(">>> "..myScript.." ("..tostring(myFlag).."): {"..myAddon..", "..myPrefix.."}") --[[ * Register the addon to the auto-load prefix list when the @@ -87,12 +81,14 @@ if(asmlib) then * sPref > The external data prefix to be added ( default instance prefix ) * sDelim > The delimiter to be used for processing ( default tab ) ]]-- + asmlib.LogInstance("RegisterDSV start <"..myPrefix..">") if(myFlag) then -- Your DSV must be registered only once when loading for the first time asmlib.LogInstance("RegisterDSV skip <"..myPrefix..">") else -- If the locking file is not located that means this is the first run of your script if(not asmlib.RegisterDSV(myScript, myPrefix)) then -- Register the DSV prefix and check for error myThrowError("Failed to register DSV") -- Throw the error if fails end -- Third argument is the delimiter. The default tab is used + asmlib.LogInstance("RegisterDSV done <"..myPrefix..">") end --[[ * This is used if you want to make internal categories for your addon @@ -130,10 +126,14 @@ if(asmlib) then * sPref > An export file custom prefix. For synchronizing * it must be related to your addon ( default is instance prefix ) ]]-- + asmlib.LogInstance("ExportCategory start <"..myPrefix..">") if(CLIENT) then if(not asmlib.ExportCategory(3, myCategory, myPrefix)) then myThrowError("Failed to synchronize category") end + asmlib.LogInstance("ExportCategory done <"..myPrefix..">") + else + asmlib.LogInstance("ExportCategory skip <"..myPrefix..">") end --[[ @@ -191,14 +191,17 @@ if(asmlib) then * sPref > An export file custom prefix. For synchronizing it must be related to your addon * sDelim > The delimiter used by the server/client ( default is a tab symbol ) ]]-- + asmlib.LogInstance("SynchronizeDSV start <"..myPrefix..">") if(not asmlib.SynchronizeDSV("PIECES", myTable, true, myPrefix)) then myThrowError("Failed to synchronize track pieces") - else -- You are saving me from all the work for manually generation these + else -- You are saving me from all the work for manually generating these + asmlib.LogInstance("TranslateDSV start <"..myPrefix..">") if(not asmlib.TranslateDSV("PIECES", myPrefix)) then myThrowError("Failed to translate DSV into Lua") end + asmlib.LogInstance("TranslateDSV done <"..myPrefix..">") end -- Now we have Lua inserts and DSV asmlib.LogInstance("<<< "..myScript) else - myError(myScript.." > "..myToolp..": Failed loading the required module") + myThrowError("Failed loading the required module") end diff --git a/data/trackassembly/trackasmlib_log.txt b/data/trackassembly/trackasmlib_log.txt index 85dfbbcc..ee0c28a8 100644 --- a/data/trackassembly/trackasmlib_log.txt +++ b/data/trackassembly/trackasmlib_log.txt @@ -1,140 +1,254 @@ - 1 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Table PIECES deleted ! - 2 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Table PIECES dropped ! - 3 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Indexed Table PIECES created ! - 4 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Table ADDITIONS deleted ! - 5 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Table ADDITIONS dropped ! - 6 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Indexed Table ADDITIONS created ! - 7 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Table PHYSPROPERTIES deleted ! - 8 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Table PHYSPROPERTIES dropped ! - 9 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] CreateTable: Indexed Table PHYSPROPERTIES created ! - 10 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] Init: DB PIECES from LUA - 11 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 12 [01/23/17 00:03:57] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 13 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 14 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 15 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 16 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 17 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 18 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 19 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 20 [01/23/17 00:03:58] SERVER > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 21 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] Init: DB PHYSPROPERTIES from LUA - 22 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 23 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 24 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 25 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] Init: DB ADDITIONS from LUA - 26 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 27 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 28 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 29 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertAdditions"] = "INSERT INTO TRACKASSEMBLY_ADDITIONS ( MODELBASE, MODELADD, ENTCLASS, LINEID, POSOFF, ANGOFF, MOVETYPE, PHYSINIT, DRSHADOW, PHMOTION, PHYSLEEP, SETSOLID ) VALUES ( %s, %s, %s, %d, %s, %s, %d, %d, %d, %d, %d, %d );" - 30 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] >>> @addons/ron_transrapid/lua/autorun/transrapid_tracks.lua - 31 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] Status: {Test's track pack, Test_s_track_pack} - 32 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] RegisterDSV: Success - 33 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] SynchronizeDSV: Success - 34 [01/23/17 00:03:59] SERVER > TRACKASSEMBLY [SQL] <<< @addons/ron_transrapid/lua/autorun/transrapid_tracks.lua - 35 [01/23/17 00:04:03] SERVER > TRACKASSEMBLY [SQL] ProcessDSV(Test_s_track_pack): PIECES - 36 [01/23/17 00:04:03] SERVER > TRACKASSEMBLY [SQL] ProcessDSV: Success - 1 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Table PIECES deleted ! - 2 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Table PIECES dropped ! - 3 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Indexed Table PIECES created ! - 4 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Table ADDITIONS deleted ! - 5 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Table ADDITIONS dropped ! - 6 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Indexed Table ADDITIONS created ! - 7 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Table PHYSPROPERTIES deleted ! - 8 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Table PHYSPROPERTIES dropped ! - 9 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] CreateTable: Indexed Table PHYSPROPERTIES created ! - 10 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] Init: DB CATEGORY skip DSV - 11 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] Init: DB PIECES from LUA - 12 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 13 [01/23/17 00:04:32] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 14 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 15 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 16 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 17 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 18 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 19 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 20 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 21 [01/23/17 00:04:33] CLIENT > TRACKASSEMBLY [SQL] InsertRecord: Register trace - 22 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] Init: DB PHYSPROPERTIES from LUA - 23 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 24 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 25 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 26 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] Init: DB ADDITIONS from LUA - 27 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 28 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 29 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 30 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertAdditions"] = "INSERT INTO TRACKASSEMBLY_ADDITIONS ( MODELBASE, MODELADD, ENTCLASS, LINEID, POSOFF, ANGOFF, MOVETYPE, PHYSINIT, DRSHADOW, PHMOTION, PHYSLEEP, SETSOLID ) VALUES ( %s, %s, %s, %d, %s, %s, %d, %d, %d, %d, %d, %d );" - 31 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] >>> @addons/ron_transrapid/lua/autorun/transrapid_tracks.lua - 32 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] Status: {Test's track pack, Test_s_track_pack} - 33 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] StoreExternalCategory: Success - 34 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] SynchronizeDSV: Success - 35 [01/23/17 00:04:34] CLIENT > TRACKASSEMBLY [SQL] <<< @addons/ron_transrapid/lua/autorun/transrapid_tracks.lua - 36 [01/23/17 00:04:38] CLIENT > TRACKASSEMBLY [SQL] ProcessDSV(Test_s_track_pack): CATEGORY - 37 [01/23/17 00:04:38] CLIENT > TRACKASSEMBLY [SQL] ProcessDSV(Test_s_track_pack): PIECES - 38 [01/23/17 00:04:38] CLIENT > TRACKASSEMBLY [SQL] ProcessDSV: Success - 39 [01/23/17 00:04:38] CLIENT > TRACKASSEMBLY [SQL] InitLocalify: Code selected - 40 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 41 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 42 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtSelectPanel"] = "SELECT MODEL, TYPE, NAME FROM TRACKASSEMBLY_PIECES WHERE LINEID = %d ORDER BY TYPE ASC, NAME ASC;" - 43 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 44 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertAdditions"] = "INSERT INTO TRACKASSEMBLY_ADDITIONS ( MODELBASE, MODELADD, ENTCLASS, LINEID, POSOFF, ANGOFF, MOVETYPE, PHYSINIT, DRSHADOW, PHMOTION, PHYSLEEP, SETSOLID ) VALUES ( %s, %s, %s, %d, %s, %s, %d, %d, %d, %d, %d, %d );" - 45 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Called by for Place[TRACKASSEMBLY_USER_PANEL] - 46 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: [CQT] (1800) true, true - 47 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Garbage collected - 48 [01/23/17 00:12:15] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Place[TRACKASSEMBLY_USER_PANEL] @562.95 - 49 [01/23/17 00:12:16] CLIENT > TRACKASSEMBLY [SQL] Extension missing .. SKIPPING ! - 50 [01/23/17 00:12:16] CLIENT > TRACKASSEMBLY [SQL] Extension missing .. SKIPPING ! - 51 [01/23/17 00:12:16] CLIENT > TRACKASSEMBLY [SQL] Extension missing .. SKIPPING ! - 52 [01/23/17 00:12:16] CLIENT > TRACKASSEMBLY [SQL] Extension missing .. SKIPPING ! - 53 [01/23/17 00:12:17] CLIENT > TRACKASSEMBLY [SQL] Extension missing .. SKIPPING ! - 54 [01/23/17 00:12:17] CLIENT > TRACKASSEMBLY [SQL] Extension missing .. SKIPPING ! - 55 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Found #1098 piece items. - 56 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 57 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertAdditions"] = "INSERT INTO TRACKASSEMBLY_ADDITIONS ( MODELBASE, MODELADD, ENTCLASS, LINEID, POSOFF, ANGOFF, MOVETYPE, PHYSINIT, DRSHADOW, PHMOTION, PHYSLEEP, SETSOLID ) VALUES ( %s, %s, %s, %d, %s, %s, %d, %d, %d, %d, %d, %d );" - 58 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtSelectPropertyTypes"] = "SELECT TYPE FROM TRACKASSEMBLY_PHYSPROPERTIES WHERE LINEID = %d ORDER BY TYPE ASC;" - 59 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 60 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtSelectPanel"] = "SELECT MODEL, TYPE, NAME FROM TRACKASSEMBLY_PIECES WHERE LINEID = %d ORDER BY TYPE ASC, NAME ASC;" - 61 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 62 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] CacheQueryProperty: Types >> Pool - 63 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Called by for Place[PROPERTY_TYPES] - 64 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: [CQT] (600) true, true - 65 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Garbage collected - 66 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Place[PROPERTY_TYPES] @566.31 - 67 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[1] = "Concrete" - 68 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[2] = "Frozen" - 69 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[3] = "Liquid" - 70 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[4] = "Manufactured" - 71 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[5] = "Metal" - 72 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[6] = "Miscellaneous" - 73 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[7] = "Organic" - 74 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[8] = "Special" - 75 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[9] = "Terrain" - 76 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property[10] = "Wood" - 77 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property["Used"] = 566.30595434845 - 78 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Property["Kept"] = 10 - 79 [01/23/17 00:12:18] CLIENT > TRACKASSEMBLY [SQL] Found #10 material types. - 37 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] CacheQueryPiece: Model >> Pool - 38 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 39 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 40 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtSelectPiece"] = "SELECT * FROM TRACKASSEMBLY_PIECES WHERE MODEL = %s ORDER BY LINEID ASC;" - 41 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 42 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertAdditions"] = "INSERT INTO TRACKASSEMBLY_ADDITIONS ( MODELBASE, MODELADD, ENTCLASS, LINEID, POSOFF, ANGOFF, MOVETYPE, PHYSINIT, DRSHADOW, PHMOTION, PHYSLEEP, SETSOLID ) VALUES ( %s, %s, %s, %d, %s, %s, %d, %d, %d, %d, %d, %d );" - 43 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] TimerAttach: Called by for Place[models/props_phx/construct/windows/window1x2.mdl] - 44 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] TimerAttach: [CQT] (1800) true, true - 45 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] TimerAttach: Garbage collected - 46 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] TimerAttach: Place[models/props_phx/construct/windows/window1x2.mdl] @566.53 - 47 [01/23/17 00:12:19] SERVER > TRACKASSEMBLY [SQL] TOOL.ElevateGhost(false): <3.010507106781> - 80 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] DrawToolScreen: Create screen - 81 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] CacheQueryPiece: Model >> Pool - 82 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: Store stmt missing - 83 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertAdditions"] = "INSERT INTO TRACKASSEMBLY_ADDITIONS ( MODELBASE, MODELADD, ENTCLASS, LINEID, POSOFF, ANGOFF, MOVETYPE, PHYSINIT, DRSHADOW, PHMOTION, PHYSLEEP, SETSOLID ) VALUES ( %s, %s, %s, %d, %s, %s, %d, %d, %d, %d, %d, %d );" - 84 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtSelectPiece"] = "SELECT * FROM TRACKASSEMBLY_PIECES WHERE MODEL = %s ORDER BY LINEID ASC;" - 85 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtSelectPropertyTypes"] = "SELECT TYPE FROM TRACKASSEMBLY_PHYSPROPERTIES WHERE LINEID = %d ORDER BY TYPE ASC;" - 86 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPieces"] = "INSERT INTO TRACKASSEMBLY_PIECES ( MODEL, TYPE, NAME, LINEID, POINT, ORIGIN, ANGLE, CLASS ) VALUES ( %s, %s, %s, %d, %s, %s, %s, %s );" - 87 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtSelectPanel"] = "SELECT MODEL, TYPE, NAME FROM TRACKASSEMBLY_PIECES WHERE LINEID = %d ORDER BY TYPE ASC, NAME ASC;" - 88 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] SQLCacheStmt: stmt["stmtInsertPhysproperties"] = "INSERT INTO TRACKASSEMBLY_PHYSPROPERTIES ( TYPE, LINEID, NAME ) VALUES ( %s, %d, %s );" - 89 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Called by for Place[models/props_phx/construct/windows/window1x2.mdl] - 90 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: [CQT] (1800) true, true - 91 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Garbage collected - 92 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] TimerAttach: Place[models/props_phx/construct/windows/window1x2.mdl] @566.62 - 93 [01/23/17 00:12:19] CLIENT > TRACKASSEMBLY [SQL] DrawHUD: Create screen + 1 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] SettingsLogs(SKIP): Success + 2 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] SettingsLogs(ONLY): Missing + 3 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_modedb)[LUA] + 4 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_devmode)<0/1>[0] + 5 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxtrmarg)<0.0001/nil>[0.02] + 6 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_timermode)[CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1] + 7 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxmass)<1/nil>[50000] + 8 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxlinear)<1/nil>[1000] + 9 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxforce)<0/nil>[100000] + 10 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxactrad)<1/500>[150] + 11 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxstcnt)<1/800>[200] + 12 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxghosts)<0/nil>[1] + 13 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_enwiremod)<0/1>[1] + 14 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_bnderrmod)[LOG] + 15 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxfruse)<1/100>[50] + 16 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [N/A] MakeAsmVar: Border (sbox_maxasmtracks)<0/nil>[1500] + 17 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] CreateTable: Created TRACKASSEMBLY_PIECES + 18 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] CreateTable: Created TRACKASSEMBLY_ADDITIONS + 19 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] CreateTable: Created TRACKASSEMBLY_PHYSPROPERTIES + 20 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] Init: DB PIECES from LUA + 21 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 22 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 23 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 24 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 25 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 26 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 27 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 28 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 29 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 30 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 31 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 32 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 33 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 34 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 35 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 36 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 37 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 38 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] Init: DB PHYSPROPERTIES from LUA + 39 [11-08-18 22:16:06] SERVER > TRACKASSEMBLY [LUA] Init: DB ADDITIONS from LUA + 40 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] >>> @addons/trackassemblytool_git/lua/autorun/z_autorun_add_pieces.lua (true): {Test's track pack, Test_s_track_pack} + 41 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] RegisterDSV start + 42 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] RegisterDSV skip + 43 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] ExportCategory start + 44 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] ExportCategory skip + 45 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] SynchronizeDSV start + 46 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] SynchronizeDSV(Test_s_track_pack): Success + 47 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] TranslateDSV start + 48 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] TranslateDSV(Test_s_track_pack@PIECES): Success + 49 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] TranslateDSV done + 50 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] <<< @addons/trackassemblytool_git/lua/autorun/z_autorun_add_pieces.lua + 51 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] >>> @lua/autorun/z_autorun_add_pieces_r2fttp.lua + 52 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] Status(true): {Ron's 2ft track pack, Ron_s_2ft_track_pack} + 53 [11-08-18 22:16:07] SERVER > TRACKASSEMBLY [LUA] RegisterDSV skip + 54 [11-08-18 22:16:09] SERVER > TRACKASSEMBLY [LUA] SynchronizeDSV(Ron_s_2ft_track_pack): Success + 55 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] TranslateDSV(Ron_s_2ft_track_pack@PIECES): Success + 56 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] <<< @lua/autorun/z_autorun_add_pieces_r2fttp.lua + 57 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] >>> @lua/autorun/z_autorun_add_pieces_rgstp.lua + 58 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] Status(true): {Ron's G Scale Track pack, Ron_s_G_Scale_Track_pack} + 59 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] RegisterDSV skip + 60 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] SynchronizeDSV(Ron_s_G_Scale_Track_pack): Success + 61 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] TranslateDSV(Ron_s_G_Scale_Track_pack@PIECES): Success + 62 [11-08-18 22:16:10] SERVER > TRACKASSEMBLY [LUA] <<< @lua/autorun/z_autorun_add_pieces_rgstp.lua + 63 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 64 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 65 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 66 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 67 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 68 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 69 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 70 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 71 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] ImportDSV(Ron_s_2ft_track_pack@PIECES): Success + 72 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] ImportDSV(Ron_s_G_Scale_Track_pack@PIECES): Success + 73 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] ImportDSV(Test_s_track_pack@PIECES): Success + 74 [11-08-18 22:16:12] SERVER > TRACKASSEMBLY [LUA] ProcessDSV: Success + 1 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] SettingsLogs(SKIP): Success + 2 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] SettingsLogs(ONLY): Missing + 3 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_modedb)[LUA] + 4 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_devmode)<0/1>[0] + 5 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxtrmarg)<0.0001/nil>[0.02] + 6 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_timermode)[CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1] + 7 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxmass)<1/nil>[50000] + 8 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxlinear)<1/nil>[1000] + 9 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxforce)<0/nil>[100000] + 10 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxactrad)<1/500>[150] + 11 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxstcnt)<1/800>[200] + 12 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_maxghosts)<0/nil>[1] + 13 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [N/A] MakeAsmVar: Border (trackassembly_enwiremod)<0/1>[1] + 14 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] CreateTable: Created TRACKASSEMBLY_PIECES + 15 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] CreateTable: Created TRACKASSEMBLY_ADDITIONS + 16 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] CreateTable: Created TRACKASSEMBLY_PHYSPROPERTIES + 17 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] Init: DB CATEGORY from LUA + 18 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] Init: DB PIECES from LUA + 19 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 20 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 21 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 22 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 23 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 24 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 25 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 26 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 27 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 28 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 29 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 30 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 31 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 32 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 33 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 34 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 35 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 36 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] Init: DB PHYSPROPERTIES from LUA + 37 [11-08-18 22:16:20] CLIENT > TRACKASSEMBLY [LUA] Init: DB ADDITIONS from LUA + 38 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] >>> @addons/trackassemblytool_git/lua/autorun/z_autorun_add_pieces.lua (true): {Test's track pack, Test_s_track_pack} + 39 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] RegisterDSV start + 40 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] RegisterDSV skip + 41 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] ExportCategory start + 42 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] ExportCategory(Test_s_track_pack): Success + 43 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] ExportCategory done + 44 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] SynchronizeDSV start + 45 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] SynchronizeDSV(Test_s_track_pack): Success + 46 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] TranslateDSV start + 47 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] TranslateDSV(Test_s_track_pack@PIECES): Success + 48 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] TranslateDSV done + 49 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] <<< @addons/trackassemblytool_git/lua/autorun/z_autorun_add_pieces.lua + 50 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] >>> @lua/autorun/z_autorun_add_pieces_r2fttp.lua + 51 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] Status(true): {Ron's 2ft track pack, Ron_s_2ft_track_pack} + 52 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] RegisterDSV skip + 53 [11-08-18 22:16:21] CLIENT > TRACKASSEMBLY [LUA] ExportCategory(Ron_s_2ft_track_pack): Success + 54 [11-08-18 22:16:24] CLIENT > TRACKASSEMBLY [LUA] SynchronizeDSV(Ron_s_2ft_track_pack): Success + 55 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] TranslateDSV(Ron_s_2ft_track_pack@PIECES): Success + 56 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] <<< @lua/autorun/z_autorun_add_pieces_r2fttp.lua + 57 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] >>> @lua/autorun/z_autorun_add_pieces_rgstp.lua + 58 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] Status(true): {Ron's G Scale Track pack, Ron_s_G_Scale_Track_pack} + 59 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] RegisterDSV skip + 60 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] ExportCategory(Ron_s_G_Scale_Track_pack): Success + 61 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] SynchronizeDSV(Ron_s_G_Scale_Track_pack): Success + 62 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] TranslateDSV(Ron_s_G_Scale_Track_pack@PIECES): Success + 63 [11-08-18 22:16:25] CLIENT > TRACKASSEMBLY [LUA] <<< @lua/autorun/z_autorun_add_pieces_rgstp.lua + 64 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] ImportCategory: Success + 65 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 66 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 67 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 68 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 69 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 70 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 71 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 72 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] InsertRecord: Register trace + 73 [11-08-18 22:16:27] CLIENT > TRACKASSEMBLY [LUA] ImportDSV(Ron_s_2ft_track_pack@PIECES): Success + 74 [11-08-18 22:16:28] CLIENT > TRACKASSEMBLY [LUA] ImportCategory: Success + 75 [11-08-18 22:16:28] CLIENT > TRACKASSEMBLY [LUA] ImportDSV(Ron_s_G_Scale_Track_pack@PIECES): Success + 76 [11-08-18 22:16:28] CLIENT > TRACKASSEMBLY [LUA] ImportCategory: Success + 77 [11-08-18 22:16:28] CLIENT > TRACKASSEMBLY [LUA] ImportDSV(Test_s_track_pack@PIECES): Success + 78 [11-08-18 22:16:28] CLIENT > TRACKASSEMBLY [LUA] ProcessDSV: Success + 79 [11-08-18 22:16:28] CLIENT > TRACKASSEMBLY [LUA] InitLocalify: Using code + 80 [11-08-18 22:18:43] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 81 [11-08-18 22:18:43] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 82 [11-08-18 22:18:43] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 83 [11-08-18 22:18:43] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 84 [11-08-18 22:18:45] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 85 [11-08-18 22:18:45] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 86 [11-08-18 22:18:45] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 87 [11-08-18 22:18:45] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 88 [11-08-18 22:18:45] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 89 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 90 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 91 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 92 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 93 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 94 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 95 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 96 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 97 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 98 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 99 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 100 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 101 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 102 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 103 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 104 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 105 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 106 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 107 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 108 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 109 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 110 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 111 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 112 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 113 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 114 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 115 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 116 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 117 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 118 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 119 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 120 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 121 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 122 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 123 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 124 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 125 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 126 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 127 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 128 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 129 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 130 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 131 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 132 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 133 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 134 [11-08-18 22:18:46] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 135 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 136 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 137 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 138 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 139 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 140 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Extension missing .. SKIPPING ! + 141 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] Found #1262 piece items. + 142 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] CacheQueryProperty: Types << Pool + 143 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property = {} + 144 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[1] = "Special" + 145 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[2] = "Concrete" + 146 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[3] = "Metal" + 147 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[4] = "Wood" + 148 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[5] = "Terrain" + 149 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[6] = "Liquid" + 150 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[7] = "Frozen" + 151 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[8] = "Miscellaneous" + 152 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[9] = "Organic" + 153 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property[10] = "Manufactured" + 154 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property["Size"] = 10 + 155 [11-08-18 22:18:47] CLIENT > TRACKASSEMBLY [LUA] TOOL:BuildCPanel: Property["Used"] = 124.25090026855 + 75 [11-08-18 22:18:48] SERVER > TRACKASSEMBLY [LUA] TOOL:ElevateGhost(false): <10.25> + 76 [11-08-18 22:18:48] SERVER > TRACKASSEMBLY [LUA] GetPlayerSpot: Cached <[Sk$Bh]Trick or treat KID!> + 77 [11-08-18 22:18:48] SERVER > TRACKASSEMBLY [LUA] CacheTracePly: Allocate <[Sk$Bh]Trick or treat KID!> + 78 [11-08-18 22:18:48] SERVER > TRACKASSEMBLY [LUA] CacheSpawnPly: Allocate <[Sk$Bh]Trick or treat KID!> + 156 [11-08-18 22:18:48] CLIENT > TRACKASSEMBLY [LUA] TOOL:DrawToolScreen: Create screen + 157 [11-08-18 22:18:48] CLIENT > TRACKASSEMBLY [LUA] GetPlayerSpot: Cached <[Sk$Bh]Trick or treat KID!> + 158 [11-08-18 22:18:48] CLIENT > TRACKASSEMBLY [LUA] CacheTracePly: Allocate <[Sk$Bh]Trick or treat KID!> + 159 [11-08-18 22:18:48] CLIENT > TRACKASSEMBLY [LUA] TOOL:DrawHUD: Create screen + 160 [11-08-18 22:18:48] CLIENT > TRACKASSEMBLY [LUA] CacheRadiusPly: Allocate <[Sk$Bh]Trick or treat KID!> + 161 [11-08-18 22:18:48] CLIENT > TRACKASSEMBLY [LUA] CacheSpawnPly: Allocate <[Sk$Bh]Trick or treat KID!> + 79 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] MakePiece: Unit(false) + 80 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] SetPosBound(LOG): Success + 81 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] AttachBodyGroups: <0> + 82 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] ePiece:SetBodygroup(0,0) [0] + 83 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] AttachBodyGroups: Success + 84 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] CacheQueryAdditions: Record not located + 85 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] AttachAdditions: Model has no additions + 86 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] MakePiece: Entity [896][prop_physics]models/ron/gscale/straight/1024.mdl + 87 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] ApplyPhysicalSettings: {false,true,true,metal} + 88 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] ApplyPhysicalSettings: Success + 89 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] ApplyPhysicalAnchor: {true,true,0} + 90 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] ApplyPhysicalAnchor: Base constraint ignored + 91 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] TOOL:LeftClick(World): Success + 92 [11-08-18 22:18:50] SERVER > TRACKASSEMBLY [LUA] ApplyPhysicalSettings: Freeze + 93 [11-08-18 22:21:26] SERVER > TRACKASSEMBLY [LUA] TOOL:Reload(Prop): Removed a piece diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index f12e3e39..991c004e 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -33,7 +33,7 @@ local asmlib = trackasmlib ------ CONFIGURE ASMLIB ------ asmlib.InitBase("track","assembly") -asmlib.SetOpVar("TOOL_VERSION","5.461") +asmlib.SetOpVar("TOOL_VERSION","5.462") asmlib.SetIndexes("V",1,2,3) asmlib.SetIndexes("A",1,2,3) asmlib.SetIndexes("WV",1,2,3) @@ -48,9 +48,9 @@ local gnServerControled = bitBor(FCVAR_ARCHIVE, FCVAR_ARCHIVE_XBOX, FCVAR_NOTIFY ------ CONFIGURE LOGGING ------ asmlib.SetOpVar("LOG_DEBUGEN",false) -asmlib.MakeAsmVar("logsmax" , "0" , {0} , gnIndependentUsed, "Maximum logging lines to be printed") -asmlib.MakeAsmVar("logfile" , "0" , {0, 1}, gnIndependentUsed, "File to store the logs ( if any )") -asmlib.SetLogControl(asmlib.GetAsmVar("logsmax","INT"),asmlib.GetAsmVar("logfile","STR")) +asmlib.MakeAsmVar("logsmax" , 0 , {0} , gnIndependentUsed, "Maximum logging lines to be printed") +asmlib.MakeAsmVar("logfile" , 0 , {0, 1}, gnIndependentUsed, "File to store the logs ( if any )") +asmlib.SetLogControl(asmlib.GetAsmVar("logsmax","INT"),asmlib.GetAsmVar("logfile","BUL")) asmlib.SettingsLogs("SKIP"); asmlib.SettingsLogs("ONLY") ------ CONFIGURE NON-REPLICATED CVARS ----- Client's got a mind of its own @@ -106,9 +106,11 @@ local conPalette = asmlib.MakeContainer("Colors"); asmlib.SetOpVar("CONTAINER_P conPalette:Insert("wm",asmlib.GetColor(143,244, 66,255)) -- Working mode HUD -------- CALLBACKS ---------- -asmlib.SetAsmVarCallback("maxtrmarg", "FLT", "TRACE_MARGIN") -asmlib.SetAsmVarCallback("logsmax" , "INT", "LOG_MAXLOGS" , function(v) return mathFloor(tonumber(v) or 0) end) -asmlib.SetAsmVarCallback("logfile" , "INT", "LOG_LOGFILE" , tobool) +asmlib.SetAsmVarCallback("maxtrmarg", "FLT", "TRACE_MARGIN", + function(v) local n = (tonumber(v) or 0) return ((n > 0) and n or 0) end) +asmlib.SetAsmVarCallback("logsmax" , "INT", "LOG_MAXLOGS" , + function(v) return mathFloor(tonumber(v) or 0) end) +asmlib.SetAsmVarCallback("logfile" , "BUL", "LOG_LOGFILE" , tobool) -------- ACTIONS ---------- if(SERVER) then @@ -244,50 +246,50 @@ if(CLIENT) then local anchor = asmlib.GetOpVar("MISS_NOID").. asmlib.GetOpVar("OPSYM_REVSIGN").. asmlib.GetOpVar("MISS_NOMD") - asmlib.ConCommandPly(oPly, "weld" , "1") - asmlib.ConCommandPly(oPly, "mass" , "25000") + asmlib.ConCommandPly(oPly, "weld" , 1) + asmlib.ConCommandPly(oPly, "mass" , 25000) asmlib.ConCommandPly(oPly, "model" , "models/props_phx/trains/tracks/track_1x.mdl") - asmlib.ConCommandPly(oPly, "count" , "5") - asmlib.ConCommandPly(oPly, "freeze" , "1") + asmlib.ConCommandPly(oPly, "count" , 5) + asmlib.ConCommandPly(oPly, "freeze" , 1) asmlib.ConCommandPly(oPly, "anchor" , anchor) - asmlib.ConCommandPly(oPly, "igntype" , "0") - asmlib.ConCommandPly(oPly, "spnflat" , "0") - asmlib.ConCommandPly(oPly, "angsnap" , "45") - asmlib.ConCommandPly(oPly, "pointid" , "1") - asmlib.ConCommandPly(oPly, "pnextid" , "2") - asmlib.ConCommandPly(oPly, "spawncn" , "0") + asmlib.ConCommandPly(oPly, "igntype" , 0) + asmlib.ConCommandPly(oPly, "spnflat" , 0) + asmlib.ConCommandPly(oPly, "angsnap" , 45) + asmlib.ConCommandPly(oPly, "pointid" , 1) + asmlib.ConCommandPly(oPly, "pnextid" , 2) + asmlib.ConCommandPly(oPly, "spawncn" , 0) asmlib.ConCommandPly(oPly, "bgskids" , "0/0") - asmlib.ConCommandPly(oPly, "gravity" , "1") - asmlib.ConCommandPly(oPly, "adviser" , "1") - asmlib.ConCommandPly(oPly, "activrad" , "45") - asmlib.ConCommandPly(oPly, "pntasist" , "1") - asmlib.ConCommandPly(oPly, "surfsnap" , "0") - asmlib.ConCommandPly(oPly, "workmode" , "1") - asmlib.ConCommandPly(oPly, "appangfst", "0") - asmlib.ConCommandPly(oPly, "applinfst", "0") - asmlib.ConCommandPly(oPly, "exportdb" , "0") - asmlib.ConCommandPly(oPly, "offsetup" , "0") - asmlib.ConCommandPly(oPly, "forcelim" , "0") - asmlib.ConCommandPly(oPly, "ignphysgn", "0") - asmlib.ConCommandPly(oPly, "ghosthold", "1") - asmlib.ConCommandPly(oPly, "maxstatts", "3") - asmlib.ConCommandPly(oPly, "nocollide", "1") + asmlib.ConCommandPly(oPly, "gravity" , 1) + asmlib.ConCommandPly(oPly, "adviser" , 1) + asmlib.ConCommandPly(oPly, "activrad" , 45) + asmlib.ConCommandPly(oPly, "pntasist" , 1) + asmlib.ConCommandPly(oPly, "surfsnap" , 0) + asmlib.ConCommandPly(oPly, "workmode" , 1) + asmlib.ConCommandPly(oPly, "appangfst", 0) + asmlib.ConCommandPly(oPly, "applinfst", 0) + asmlib.ConCommandPly(oPly, "exportdb" , 0) + asmlib.ConCommandPly(oPly, "offsetup" , 0) + asmlib.ConCommandPly(oPly, "forcelim" , 0) + asmlib.ConCommandPly(oPly, "ignphysgn", 0) + asmlib.ConCommandPly(oPly, "ghosthold", 1) + asmlib.ConCommandPly(oPly, "maxstatts", 3) + asmlib.ConCommandPly(oPly, "nocollide", 1) asmlib.ConCommandPly(oPly, "physmater", "metal") - asmlib.ConCommandPly(oPly, "enpntmscr", "1") - asmlib.ConCommandPly(oPly, "engunsnap", "0") - asmlib.ConCommandPly(oPly, "logsmax" , "0") - asmlib.ConCommandPly(oPly, "logfile" , "") + asmlib.ConCommandPly(oPly, "enpntmscr", 1) + asmlib.ConCommandPly(oPly, "engunsnap", 0) + asmlib.ConCommandPly(oPly, "logsmax" , 0) + asmlib.ConCommandPly(oPly, "logfile" , 0) asmlib.ConCommandPly(oPly, "modedb" , "LUA") asmlib.ConCommandPly(oPly, "timermode", "CQT@1800@1@1/CQT@900@1@1/CQT@600@1@1") - asmlib.ConCommandPly(oPly, "enwiremod", "1") - asmlib.ConCommandPly(oPly, "devmode" , "0") - asmlib.ConCommandPly(oPly, "maxmass" , "50000") - asmlib.ConCommandPly(oPly, "maxlinear", "250") - asmlib.ConCommandPly(oPly, "maxforce" , "100000") - asmlib.ConCommandPly(oPly, "maxactrad", "150") - asmlib.ConCommandPly(oPly, "maxstcnt" , "200") + asmlib.ConCommandPly(oPly, "enwiremod", 1) + asmlib.ConCommandPly(oPly, "devmode" , 0) + asmlib.ConCommandPly(oPly, "maxmass" , 50000) + asmlib.ConCommandPly(oPly, "maxlinear", 250) + asmlib.ConCommandPly(oPly, "maxforce" , 100000) + asmlib.ConCommandPly(oPly, "maxactrad", 150) + asmlib.ConCommandPly(oPly, "maxstcnt" , 200) asmlib.ConCommandPly(oPly, "bnderrmod", "LOG") - asmlib.ConCommandPly(oPly, "maxfruse" , "50") + asmlib.ConCommandPly(oPly, "maxfruse" , 50) asmlib.PrintInstance("RESET_VARIABLES: Variables reset complete") elseif(bgskids:sub(1,7) == "delete ") then local tPref = (" "):Explode(bgskids:sub(8,-1)) @@ -484,8 +486,8 @@ if(CLIENT) then pnListView:AddColumn(languageGetPhrase("tool."..gsToolNameL..".pn_routine_lb4")):SetFixedWidth(wNam) -- (4) pnListView:AddColumn(""):SetFixedWidth(0) -- (5) This is actually the hidden model of the piece used. pnListView.OnRowSelected = function(pnSelf, nIndex, pnLine) - local uiAct = tonumber(pnLine:GetColumnText(2) or 0 ) -- The active points count to be used for change - local uiMod = tostring(pnLine:GetColumnText(5) or "") -- Forth index is actually the model in the table + local uiAct = (tonumber(pnLine:GetColumnText(2)) or 0 ) -- The active points count to be used for change + local uiMod = tostring(pnLine:GetColumnText(5) or "") -- Forth index is actually the model in the table pnModelPanel:SetModel(uiMod) local uiEnt = pnModelPanel:GetEntity() local uiBox = asmlib.CacheBoxLayout(uiEnt,0,nRatio,nRatio-1) diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index c32dc909..a4d25c09 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -1044,15 +1044,12 @@ function GetFrequentModels(snCount) return StatusLog(nil,"GetFrequentModels: Array is empty or not available") end -function RoundValue(nvExact, nFrac) - local nExact = tonumber(nvExact) - if(not IsExistent(nExact)) then - return StatusLog(nil,"RoundValue: Cannot round NAN {"..type(nvExact).."}<"..tostring(nvExact)..">") end - local nFrac = tonumber(nFrac) or 0 - if(nFrac == 0) then +function RoundValue(nvEx, nFr) + local nEx = tonumber(nvEx); if(not IsExistent(nEx)) then + return StatusLog(nil,"RoundValue: Cannot round NAN {"..type(nvEx).."}<"..tostring(nvEx)..">") end + local nFr = (tonumber(nFr) or 0); if(nFr == 0) then return StatusLog(nil,"RoundValue: Fraction must be <> 0") end - local q, f = mathModf(nExact/nFrac) - return nFrac * (q + (f > 0.5 and 1 or 0)) + local q, f = mathModf(nEx / nFr); return nFr * (q + (f > 0.5 and 1 or 0)) end function GetCenter(oEnt) @@ -1112,7 +1109,7 @@ function IncDecPointID(ivPoID,nDir,rPiece) return StatusLog(1,"IncDecPointID: Point ID NAN {"..type(ivPoID).."}<"..tostring(ivPoID)..">") end local stPOA = LocatePOA(rPiece,iPoID); if(not IsExistent(stPOA)) then return StatusLog(1,"IncDecPointID: Point ID #"..tostring(iPoID).." not located") end - local nDir = (tonumber(nDir) or 0); nDir = ((nDir > 0) and 1) or ((nDir < 0) and -1) or 0 + local nDir = (tonumber(nDir) or 0); nDir = (((nDir > 0) and 1) or ((nDir < 0) and -1) or 0) if(nDir == 0) then return StatusLog(iPoID,"IncDecPointID: Direction mismatch") end iPoID = RollValue(iPoID + nDir,1,rPiece.Size) stPOA = LocatePOA(rPiece,iPoID) -- Skip disabled origin parameter @@ -1223,13 +1220,13 @@ end local function ReloadPOA(nXP,nYY,nZR,nSX,nSY,nSZ,nSD) local arPOA = GetOpVar("ARRAY_DECODEPOA") - arPOA[1] = tonumber(nXP) or 0 - arPOA[2] = tonumber(nYY) or 0 - arPOA[3] = tonumber(nZR) or 0 - arPOA[4] = tonumber(nSX) or 1 - arPOA[5] = tonumber(nSY) or 1 - arPOA[6] = tonumber(nSZ) or 1 - arPOA[7] = tobool(nSD) or false + arPOA[1] = (tonumber(nXP) or 0) + arPOA[2] = (tonumber(nYY) or 0) + arPOA[3] = (tonumber(nZR) or 0) + arPOA[4] = (tonumber(nSX) or 1) + arPOA[5] = (tonumber(nSY) or 1) + arPOA[6] = (tonumber(nSZ) or 1) + arPOA[7] = (tobool(nSD) or false) return arPOA end @@ -1303,7 +1300,7 @@ local function DecodePOA(sStr) elseif(sCh == symSep) then iSep = iSep + 1; E = iCnt - 1 if(iSep > 2) then break end - arPOA[dInd] = tonumber(sStr:sub(S,E)) or 0 + arPOA[dInd] = (tonumber(sStr:sub(S,E)) or 0) dInd = dInd + 1; S = iCnt + 1; E = S else E = E + 1 end iCnt = iCnt + 1 @@ -2442,7 +2439,7 @@ end ]]-- function ExportCategory(vEq, tData, sPref) if(SERVER) then return StatusLog(true, "ExportCategory: Working on server") end - local nEq = tonumber(vEq) or 0; if(nEq <= 0) then + local nEq = (tonumber(vEq) or 0); if(nEq <= 0) then return StatusLog(false, "ExportCategory: Wrong equality <"..tostring(vEq)..">") end local sPref = tostring(sPref or GetInstPref()); if(IsEmptyString(sPref)) then return StatusLog(false,"ExportCategory("..sPref.."): Prefix empty") end @@ -2468,7 +2465,7 @@ end function ImportCategory(vEq, sPref) if(SERVER) then return StatusLog(true, "ImportCategory: Working on server") end - local nEq = tonumber(vEq) or 0; if(nEq <= 0) then + local nEq = (tonumber(vEq) or 0); if(nEq <= 0) then return StatusLog(false,"ImportCategory: Wrong equality <"..tostring(vEq)..">") end local fName = GetOpVar("DIRPATH_BAS")..GetOpVar("DIRPATH_DSV") fName = fName..tostring(sPref or GetInstPref()) @@ -2693,25 +2690,22 @@ function SynchronizeDSV(sTable, tData, bRepl, sPref, sDelim) local tLine = sDelim:Explode(sLine) if(tLine[1] == defTable.Name) then for iCnt = 1, #tLine do tLine[iCnt] = StripValue(tLine[iCnt]) end - local sKey = tLine[2] - if(not fData[sKey]) then fData[sKey] = {Kept = 0} end - tKey = fData[sKey] - local nID, vID = 0 -- Where the lime ID must be read from - if (sTable == "PIECES") then vID = tLine[5]; nID = tonumber(vID) or 0 - elseif(sTable == "ADDITIONS") then vID = tLine[5]; nID = tonumber(vID) or 0 - elseif(sTable == "PHYSPROPERTIES") then vID = tLine[3]; nID = tonumber(vID) or 0 end + local sKey = tLine[2]; if(not fData[sKey]) then fData[sKey] = {Size = 0} end + local tKey, nID, vID = fData[sKey], 0 -- Where the lime ID must be read from + if (sTable == "PIECES") then vID = tLine[5]; nID = (tonumber(vID) or 0) + elseif(sTable == "ADDITIONS") then vID = tLine[5]; nID = (tonumber(vID) or 0) + elseif(sTable == "PHYSPROPERTIES") then vID = tLine[3]; nID = (tonumber(vID) or 0) end if((tKey.Size < 0) or (nID <= tKey.Size) or ((nID - tKey.Size) ~= 1)) then I:Close(); return StatusLog(false,"SynchronizeDSV("..fPref.."): Read point ID #".. tostring(vID).." desynchronized <"..sKey.."> of <"..sTable..">") end tKey.Size = nID; tKey[tKey.Size] = {} local kKey, nCnt = tKey[tKey.Size], 3 while(tLine[nCnt]) do -- Do a value matching without quotes - local vMatch = MatchType(defTable,tLine[nCnt],nCnt-1) - if(not IsExistent(vMatch)) then + local vM = MatchType(defTable,tLine[nCnt],nCnt-1); if(not IsExistent(vM)) then I:Close(); return StatusLog(false,"SynchronizeDSV("..fPref.."): Read matching failed <" ..tostring(tLine[nCnt]).."> to <"..tostring(nCnt-1).." # " ..defTable[nCnt-1][1].."> of <"..sTable..">") - end; kKey[nCnt-2] = vMatch; nCnt = nCnt + 1 + end; kKey[nCnt-2] = vM; nCnt = nCnt + 1 end else I:Close() return StatusLog(false,"SynchronizeDSV("..fPref.."): Read table name mismatch <"..sTable..">") end @@ -2719,21 +2713,18 @@ function SynchronizeDSV(sTable, tData, bRepl, sPref, sDelim) end; I:Close() else LogInstance("SynchronizeDSV("..fPref.."): Creating file <"..fName..">") end for key, rec in pairs(tData) do -- Check the given table - for pnID = 1, #rec do - local tRec = rec[pnID] - local nID, vID = 0 -- Where the line ID must be read from - if(sTable == "PIECES") then - vID = tRec[3]; nID = tonumber(vID) or 0 - if(pnID ~= nID) then + for pnID = 1, #rec do -- Where the line ID must be read from + local tRec, nID, vID = rec[pnID], 0 + if(sTable == "PIECES") then vID = tRec[3] + nID = (tonumber(vID) or 0); if(pnID ~= nID) then return StatusLog(false,"SynchronizeDSV("..fPref.."): Given point ID #".. tostring(vID).." desynchronized <"..key.."> of "..sTable) end if(not fileExists(key, "GAME")) then LogInstance("SynchronizeDSV("..fPref.."): Missing piece <"..key..">") end - elseif(sTable == "ADDITIONS") then vID = tRec[3]; nID = tonumber(vID) or 0 - elseif(sTable == "PHYSPROPERTIES") then vID = tRec[1]; nID = tonumber(vID) or 0 end + elseif(sTable == "ADDITIONS") then vID = tRec[3]; nID = (tonumber(vID) or 0) + elseif(sTable == "PHYSPROPERTIES") then vID = tRec[1]; nID = (tonumber(vID) or 0) end for nCnt = 1, #tRec do -- Do a value matching without quotes - local vMatch = MatchType(defTable,tRec[nCnt],nCnt+1) - if(not IsExistent(vMatch)) then + local vM = MatchType(defTable,tRec[nCnt],nCnt+1); if(not IsExistent(vM)) then return StatusLog(false,"SynchronizeDSV("..fPref.."): Given matching failed <" ..tostring(tRec[nCnt]).."> to <"..tostring(nCnt+1).." # " ..defTable[nCnt+1][1].."> of "..sTable) @@ -2749,20 +2740,18 @@ function SynchronizeDSV(sTable, tData, bRepl, sPref, sDelim) end local tSort = Sort(tableGetKeys(fData)); if(not tSort) then return StatusLog(false,"SynchronizeDSV("..fPref.."): Sorting failed") end - local O = fileOpen(fName, "wb" ,"DATA") - if(not O) then return StatusLog(false,"SynchronizeDSV("..fPref.."): Write fileOpen("..fName..") failed") end + local O = fileOpen(fName, "wb" ,"DATA"); if(not O) then + return StatusLog(false,"SynchronizeDSV("..fPref.."): Write fileOpen("..fName..") failed") end O:Write("# SynchronizeDSV("..fPref.."): "..GetDate().." ["..GetOpVar("MODE_DATABASE").."]\n") O:Write("# Data settings:\t"..GetColumns(defTable,sDelim).."\n") - for rcID = 1, tSort.Size do - local key = tSort[rcID].Val - local rec = fData[key] - local sCash, sData = defTable.Name..sDelim..key, "" - for pnID = 1, rec.Size do local tItem = rec[pnID] - for nCnt = 1, #tItem do local vMatch = MatchType(defTable,tItem[nCnt],nCnt+1,true,"\"",true) - if(not IsExistent(vMatch)) then O:Flush(); O:Close() - return StatusLog(false,"SynchronizeDSV("..fPref.."): Write matching failed <" + for rcID = 1, tSort.Size do local key = tSort[rcID].Val + local vRec, sCash, sData = fData[key], defTable.Name..sDelim..key, "" + for pnID = 1, vRec.Size do local tItem = vRec[pnID] + for nCnt = 1, #tItem do + local vM = MatchType(defTable,tItem[nCnt],nCnt+1,true,"\"",true); if(not IsExistent(vM)) then + O:Flush(); O:Close(); return StatusLog(false,"SynchronizeDSV("..fPref.."): Write matching failed <" ..tostring(tItem[nCnt]).."> to <"..tostring(nCnt+1).." # "..defTable[nCnt+1][1].."> of "..sTable) - end; sData = sData..sDelim..tostring(vMatch) + end; sData = sData..sDelim..tostring(vM) end; O:Write(sCash..sData.."\n"); sData = "" end end O:Flush(); O:Close() @@ -3284,8 +3273,9 @@ function IntersectRayModel(sModel, nPntID, nNxtID) return StatusLog(nil,"IntersectRayModel: No start ID <"..tostring(nPntID)..">") end local stPOA2 = LocatePOA(mRec, nNxtID); if(not stPOA2) then return StatusLog(nil,"IntersectRayModel: No end ID <"..tostring(nNxtID)..">") end - local vO1, vD1 = Vector(), Vector(); SetVector(vO1, stPOA1.O); vD1:Set(-stPOA1.A:Forward()) - local vO2, vD2 = Vector(), Vector(); SetVector(vO2, stPOA2.O); vD2:Set(-stPOA2.A:Forward()) + local aD1, aD2 = Angle(), Angle(); SetAngle(aD1, stPOA1.A); SetAngle(aD2, stPOA2.A) + local vO1, vD1 = Vector(), Vector(); SetVector(vO1, stPOA1.O); vD1:Set(-aD1:Forward()) + local vO2, vD2 = Vector(), Vector(); SetVector(vO2, stPOA2.O); vD2:Set(-aD2:Forward()) local f1, f2, x1, x2, xx = IntersectRay(vO1,vD1,vO2,vD2) if(not xx) then -- Attempts taking the mean vector when the rays are parallel for straight tracks f1, f2, x1, x2, xx = IntersectRayParallel(vO1,vD1,vO2,vD2) end @@ -3305,56 +3295,54 @@ function AttachAdditions(ePiece) local eAddit = entsCreate(arRec[defTable[3][1]]) if(eAddit and eAddit:IsValid()) then LogInstance("AttachAdditions: Class <"..arRec[defTable[3][1]]..">") - local AdModel = tostring(arRec[defTable[2][1]]) - if(not fileExists(AdModel, "GAME")) then - return StatusLog(false,"AttachAdditions: Missing attachment file "..AdModel) end - if(not utilIsValidModel(AdModel)) then - return StatusLog(false,"AttachAdditions: Invalid attachment model "..AdModel) end - eAddit:SetModel(AdModel) LogInstance("eAddit:SetModel("..AdModel..")") - local OffPos = arRec[defTable[5][1]] - if(not IsString(OffPos)) then - return StatusLog(false,"AttachAdditions: Position {"..type(OffPos).."}<"..tostring(OffPos).."> not string") end - if(OffPos and OffPos ~= "" and OffPos ~= "NULL") then - local vpAdd, arConv = Vector(), DecodePOA(OffPos) + local adMod = tostring(arRec[defTable[2][1]]) + if(not fileExists(adMod, "GAME")) then + return StatusLog(false,"AttachAdditions: Missing attachment file "..adMod) end + if(not utilIsValidModel(adMod)) then + return StatusLog(false,"AttachAdditions: Invalid attachment model "..adMod) end + eAddit:SetModel(adMod) LogInstance("eAddit:SetModel("..adMod..")") + local ofPos = arRec[defTable[5][1]]; if(not IsString(ofPos)) then + return StatusLog(false,"AttachAdditions: Position {"..type(ofPos).."}<"..tostring(ofPos).."> not string") end + if(ofPos and ofPos ~= "" and ofPos ~= "NULL") then + local vpAdd, arConv = Vector(), DecodePOA(ofPos) arConv[1] = arConv[1] * arConv[4]; vpAdd:Add(arConv[1] * eAng:Forward()) arConv[2] = arConv[2] * arConv[5]; vpAdd:Add(arConv[2] * eAng:Right()) arConv[3] = arConv[3] * arConv[6]; vpAdd:Add(arConv[3] * eAng:Up()) - vpAdd:Set(ePos); eAddit:SetPos(vpAdd); LogInstance("eAddit:SetPos(DB)") + vpAdd:Add(ePos); eAddit:SetPos(vpAdd); LogInstance("eAddit:SetPos(DB)") else eAddit:SetPos(ePos); LogInstance("eAddit:SetPos(ePos)") end - local OffAng = arRec[defTable[6][1]] - if(not IsString(OffAng)) then - return StatusLog(false,"AttachAdditions: Angle {"..type(OffAng).."}<"..tostring(OffAng).."> not string") end - if(OffAng and OffAng ~= "" and OffAng ~= "NULL") then - local aAddAng, arConv = Angle(), DecodePOA(OffAng) - aAddAng[caP] = arConv[1] * arConv[4] + eAng[caP] - aAddAng[caY] = arConv[2] * arConv[5] + eAng[caY] - aAddAng[caR] = arConv[3] * arConv[6] + eAng[caR] - eAddit:SetAngles(aAddAng); LogInstance("eAddit:SetAngles(DB)") + local ofAng = arRec[defTable[6][1]]; if(not IsString(ofAng)) then + return StatusLog(false,"AttachAdditions: Angle {"..type(ofAng).."}<"..tostring(ofAng).."> not string") end + if(ofAng and ofAng ~= "" and ofAng ~= "NULL") then + local apAdd, arConv = Angle(), DecodePOA(ofAng) + apAdd[caP] = arConv[1] * arConv[4] + eAng[caP] + apAdd[caY] = arConv[2] * arConv[5] + eAng[caY] + apAdd[caR] = arConv[3] * arConv[6] + eAng[caR] + eAddit:SetAngles(apAdd); LogInstance("eAddit:SetAngles(DB)") else eAddit:SetAngles(eAng); LogInstance("eAddit:SetAngles(eAng)") end - local MoveType = (tonumber(arRec[defTable[7][1]]) or -1) - if(MoveType >= 0) then eAddit:SetMoveType(MoveType) - LogInstance("eAddit:SetMoveType("..MoveType..")") end - local PhysInit = (tonumber(arRec[defTable[8][1]]) or -1) - if(PhysInit >= 0) then eAddit:PhysicsInit(PhysInit) - LogInstance("eAddit:PhysicsInit("..PhysInit..")") end - local DrShadow = (tonumber(arRec[defTable[9][1]]) or 0) - if(DrShadow ~= 0) then DrShadow = (DrShadow > 0) - eAddit:DrawShadow(DrShadow); LogInstance("eAddit:DrawShadow("..tostring(DrShadow)..")") end + local mvTyp = (tonumber(arRec[defTable[7][1]]) or -1) + if(mvTyp >= 0) then eAddit:SetMoveType(mvTyp) + LogInstance("eAddit:SetMoveType("..mvTyp..")") end + local phInt = (tonumber(arRec[defTable[8][1]]) or -1) + if(phInt >= 0) then eAddit:PhysicsInit(phInt) + LogInstance("eAddit:PhysicsInit("..phInt..")") end + local drShd = (tonumber(arRec[defTable[9][1]]) or 0) + if(drShd ~= 0) then drShd = (drShd > 0) + eAddit:DrawShadow(drShd); LogInstance("eAddit:DrawShadow("..tostring(drShd)..")") end eAddit:SetParent(ePiece); LogInstance("eAddit:SetParent(ePiece)") eAddit:Spawn(); LogInstance("eAddit:Spawn()") phAddit = eAddit:GetPhysicsObject() if(phAddit and phAddit:IsValid()) then - local EnMotion = (tonumber(arRec[defTable[10][1]]) or 0) - if(EnMotion ~= 0) then EnMotion = (EnMotion > 0); phAddit:EnableMotion(EnMotion) - LogInstance("phAddit:EnableMotion("..tostring(EnMotion)..")") end - local EnSleep = (tonumber(arRec[defTable[11][1]]) or 0) - if(EnSleep > 0) then phAddit:Sleep(); LogInstance("phAddit:Sleep()") end + local enMot = (tonumber(arRec[defTable[10][1]]) or 0) + if(enMot ~= 0) then enMot = (enMot > 0); phAddit:EnableMotion(enMot) + LogInstance("phAddit:EnableMotion("..tostring(enMot)..")") end + local nbSlp = (tonumber(arRec[defTable[11][1]]) or 0) + if(nbSlp > 0) then phAddit:Sleep(); LogInstance("phAddit:Sleep()") end end eAddit:Activate(); LogInstance("eAddit:Activate()") ePiece:DeleteOnRemove(eAddit); LogInstance("ePiece:DeleteOnRemove(eAddit)") - local Solid = (tonumber(arRec[defTable[12][1]]) or -1) - if(Solid >= 0) then eAddit:SetSolid(Solid) - LogInstance("eAddit:SetSolid("..tostring(Solid)..")") end + local nbSld = (tonumber(arRec[defTable[12][1]]) or -1) + if(nbSld >= 0) then eAddit:SetSolid(nbSld) + LogInstance("eAddit:SetSolid("..tostring(nbSld)..")") end else return StatusLog(false,"Failed to allocate addition #"..iCnt.." memory:" .."\n "..defTable[1][1].." "..stAddit[iCnt][defTable[1][1]] diff --git a/lua/weapons/gmod_tool/stools/trackassembly.lua b/lua/weapons/gmod_tool/stools/trackassembly.lua index a9b15f8c..faa27810 100644 --- a/lua/weapons/gmod_tool/stools/trackassembly.lua +++ b/lua/weapons/gmod_tool/stools/trackassembly.lua @@ -168,7 +168,7 @@ function TOOL:GetMass() end function TOOL:GetDeveloperMode() - return asmlib.GetAsmVar("devmode" ,"BUL") + return asmlib.GetAsmVar("devmode", "BUL") end function TOOL:GetPosOffsets() @@ -225,11 +225,11 @@ function TOOL:GetExportDB() end function TOOL:GetLogLines() - return (asmlib.GetAsmVar("logsmax","INT") or 0) + return (asmlib.GetAsmVar("logsmax", "INT") or 0) end function TOOL:GetLogFile() - return tostring(asmlib.GetAsmVar("logfile","STR") or "") + return asmlib.GetAsmVar("logfile", "BUL") end function TOOL:GetAdviser() @@ -237,8 +237,7 @@ function TOOL:GetAdviser() end function TOOL:GetPointID() - return (self:GetClientNumber("pointid") or 1), - (self:GetClientNumber("pnextid") or 2) + return (self:GetClientNumber("pointid") or 1), (self:GetClientNumber("pnextid") or 2) end function TOOL:GetActiveRadius() @@ -270,11 +269,11 @@ function TOOL:GetStackAttempts() end function TOOL:GetPhysMeterial() - return (self:GetClientInfo("physmater") or "metal") + return tostring(self:GetClientInfo("physmater") or "metal") end function TOOL:GetBoundErrorMode() - return asmlib.GetAsmVar("bnderrmod" ,"STR") + return asmlib.GetAsmVar("bnderrmod", "STR") end function TOOL:GetSurfaceSnap() @@ -282,7 +281,7 @@ function TOOL:GetSurfaceSnap() end function TOOL:GetScrollMouse() - return asmlib.GetAsmVar("enpntmscr","BUL") + return asmlib.GetAsmVar("enpntmscr", "BUL") end function TOOL:SwitchPoint(nDir, bIsNext) @@ -302,8 +301,7 @@ end function TOOL:IntersectClear(bMute) local oPly = self:GetOwner() local stRay = asmlib.IntersectRayRead(oPly, "ray_relate") - if(stRay) then - asmlib.IntersectRayClear(oPly, "ray_relate") + if(stRay) then asmlib.IntersectRayClear(oPly, "ray_relate") if(SERVER) then local ryEnt, sRel = stRay.Ent netStart(gsLibName.."SendIntersectClear"); netWriteEntity(oPly); netSend(oPly) if(ryEnt and ryEnt:IsValid()) then ryEnt:SetColor(conPalette:Select("w")) @@ -336,15 +334,12 @@ function TOOL:IntersectSnap(trEnt, vHit, stSpawn, bMute) if(not asmlib.IntersectRayCreate(ply, trEnt, vHit, "ray_origin")) then return asmlib.StatusLog(nil,"TOOL:LeftClick(): Failed updating ray") end local xx, x1, x2, stRay1, stRay2 = asmlib.IntersectRayHash(ply, "ray_origin", "ray_relate") - if(not xx) then - if(bMute) then return nil + if(not xx) then if(bMute) then return nil else asmlib.PrintNotifyPly(ply, "Define intersection relation !", "GENERIC") - return asmlib.StatusLog(nil, "TOOL:IntersectSnap(): Active ray mismatch") - end + return asmlib.StatusLog(nil, "TOOL:IntersectSnap(): Active ray mismatch") end end local mx, o1, o2 = asmlib.IntersectRayModel(model, pointid, pnextid) - if(not mx) then - if(bMute) then return nil + if(not mx) then if(bMute) then return nil else return asmlib.StatusLog(nil, "TOOL:IntersectSnap(): Model ray mismatch") end end local aOrg, vx, vy, vz = stSpawn.OAng, stSpawn.PNxt[cvX], stSpawn.PNxt[cvY], stSpawn.PNxt[cvZ]