Reorder: SQLCacheStmt validating the base query

Reorder: TOOL:DrawTextSpawn(oScreen, sCol, sMeth, tArgs)
This commit is contained in:
Deyan Dobromirov 2018-04-12 17:20:30 +03:00
parent 0d18b57ec9
commit ead25af39e
4 changed files with 16 additions and 15 deletions

View File

@ -35,7 +35,7 @@ local asmlib = trackasmlib
------ CONFIGURE ASMLIB ------
asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","5.435")
asmlib.SetOpVar("TOOL_VERSION","5.436")
asmlib.SetIndexes("V",1,2,3)
asmlib.SetIndexes("A",1,2,3)
asmlib.SetIndexes("S",4,5,6,7)

View File

@ -1789,8 +1789,8 @@ local function SQLCacheStmt(sHash,sStmt,...)
return StatusLog(nil, "SQLCacheStmt: Store place missing") end
if(IsExistent(sStmt)) then
tStore[sHash] = tostring(sStmt); Print(tStore,"SQLCacheStmt: stmt") end
local sBase = tStore[sHash]
if(not sBase) then return StatusLog(nil, "SQLCacheStmt: Stmt missing <"..sHash..">") end
local sBase = tStore[sHash]; if(not IsExistent(sBase)) then
return StatusLog(nil, "SQLCacheStmt: Stmt missing <"..sHash..">") end
return sBase:format(...)
end
@ -2813,7 +2813,7 @@ function SynchronizeDSV(sTable, tData, bRepl, sPref, sDelim)
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
elseif(sTable == "PHYSPROPERTIES") then vID = tLine[3]; nID = tonumber(vID) or 0 end
if((tKey.Kept < 0) or (nID <= tKey.Kept) or ((nID - tKey.Kept) ~= 1)) then
I:Close(); return StatusLog(false,"SynchronizeDSV("..fPref.."): Read point ID #"..
tostring(vID).." desynchronized <"..sKey.."> of <"..sTable..">") end

View File

@ -873,9 +873,9 @@ function TOOL:DrawTextSpawn(oScreen, sCol, sMeth, tArgs)
oScreen:DrawText("Spawn debug information",sCol,sMeth,tArgs)
for ID = 1, #arK, 1 do local def = arK[ID]
local key, typ, inf = def[1], def[2], tostring(def[3] or "")
local cnv, val = ((not asmlib.IsEmptyString(inf)) and (" > "..inf) or ""), stS[key]
if(not typ) then oScreen:DrawText(tostring(key))
else typ, val = tostring(typ or ""), tostring(val or "")
local cnv = ((not asmlib.IsEmptyString(inf)) and (" > "..inf) or "")
if(not asmlib.IsExistent(typ)) then oScreen:DrawText(tostring(key))
else local typ, val = tostring(typ or ""), tostring(stS[key] or "")
oScreen:DrawText("<"..key.."> "..typ..": "..val..cnv) end
end
end

View File

@ -45,6 +45,7 @@ about their track packs or in some other way. It is possible that missed someone
* [Puppyjaws](https://steamcommunity.com/profiles/76561198146226478)
* [Bullseye SBT](http://steamcommunity.com/profiles/76561198082120871)
* [AlexALX](http://steamcommunity.com/profiles/76561198049628741)
* [Gedo789](https://github.com/Gedo789)
* Arbitor 90
* PePena
* meme
@ -210,15 +211,15 @@ Here they are, with available status, why I did not do some of them ( at the tim
* [Bobsters's two gauge rails](https://steamcommunity.com/sharedfiles/filedetails/?id=489114511)
* [Mr. Train's G-Gauge rails](https://steamcommunity.com/sharedfiles/filedetails/?id=590574800)
* Ron's 56 gauge rails ( Removed by the addon owner. Discontinued )
* [Ron's 2ft track pack](http://steamcommunity.com/sharedfiles/filedetails/?id=634000136) ( Maintained by the owner )
* [Ron's 2ft track pack](https://steamcommunity.com/sharedfiles/filedetails/?id=634000136) ( Maintained by the owner )
* PHX Tubes
* Magnum's second track pack ( Ignore, it's not designed to be a prop )
* [qwertyaaa's G Scale Track Pack](http://steamcommunity.com/sharedfiles/filedetails/?id=718239260)
* [qwertyaaa's G Scale Track Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=718239260)
* [SligWolf's ModelPack](https://steamcommunity.com/sharedfiles/filedetails/?id=147812851) ( Mini hover tracks ) ( White rails )
* [Ron's Minitrain Props](http://steamcommunity.com/sharedfiles/filedetails/?id=728833183)
* [Battleship's abandoned rails](http://steamcommunity.com/sharedfiles/filedetails/?id=807162936)
* [Ron's Minitrain Props](https://steamcommunity.com/sharedfiles/filedetails/?id=728833183)
* [Battleship's abandoned rails](https://steamcommunity.com/sharedfiles/filedetails/?id=807162936)
* [Ron's G-Scale track pack](https://steamcommunity.com/sharedfiles/filedetails/?id=865735701) ( Maintained by the owner )
* [AlexCookie's 2ft track pack](http://steamcommunity.com/sharedfiles/filedetails/?id=740453553)
* [AlexCookie's 2ft track pack](https://steamcommunity.com/sharedfiles/filedetails/?id=740453553)
#### Where are the trains/vehicles[,](https://tfwiki.net/wiki/Team_Bullet_Train) are there any of these?
Dude seriously, make them yourself, what's the point of playing Gmod then ... xD
@ -545,10 +546,10 @@ For every active point, you have to add a line in the table PIECES.
path or piece prefix/suffix
* Open the file `dsv/MyStuff_TRACKASSEMBLY_ADDITIONS.txt`
This is optional ! If it does not exist then just create it. This file hold definitions of what props
must be spawned with the track pieces. The are like scenery, button and stuff.
A good example for an addon which uses ADDITIONS parameters is `Shinji's track pack`
must be spawned with the track pieces. These are like scenery, buttons and stuff.
A good example for an addon which uses [ADDITIONS](https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/cl_TRACKASSEMBLY_ADDITIONS.txt) parameters is `Shinji's track pack`
* Open the file `dsv/MyStuff_TRACKASSEMBLY_PHYSPROPERTIES.txt`
This is optional ! If it does not exist then just create it. This part is optional if you heed
This is optional ! If it does not exist then just create it. This part is optional if you need
additional physical properties
*Note: After adding these models, the database can be exported again.