Fixed: Track assembly data folder gets merged with the Gmod data folder

This commit is contained in:
Deyan Dobromirov 2021-01-09 17:59:10 +02:00 committed by dvdvideo1234
parent 29b0bff59c
commit e32fc75750
38 changed files with 76 additions and 48 deletions

View File

@ -1,24 +0,0 @@
set InpFile=tmp.lua
set OutFile=trackassembly_init.lua
set BasPath=%~dp0
set LuaPath=%1
set LogFile=%2
set CpyPath=%BasPath%..\..\lua\autorun
set FrmEnds=UNX
echo Base: %BasPath%> %LogFile%
echo Lua : %LuaPath%>> %LogFile%
copy %CpyPath%\%OutFile% %CpyPath%\%InpFile%
echo Calling %LuaPath%\lua.exe>>%LogFile%
echo Call[0]: %BasPath%pre-commit.lua>>%LogFile%
echo Call[1]: %CpyPath%>>%LogFile%
echo Call[2]: %OutFile%>>%LogFile%
echo Call[3]: %FrmEnds%>>%LogFile%
echo Call[4]: %LogFile%>>%LogFile%
call %LuaPath%\lua.exe %BasPath%pre-commit.lua %CpyPath% %OutFile% %FrmEnds% %LogFile%
del %BasPath%..\..\lua\autorun\tmp.lua
echo Cleanup pieces manager buid...>>%LogFile%
rd /s /q %BasPath%..\..\data\peaces_manager\bin
rd /s /q %BasPath%..\..\data\peaces_manager\obj
del %BasPath%..\..\data\peaces_manager\peaces_manager.layout
timeout 500
exit 0

View File

@ -0,0 +1,41 @@
:: The name of the temporary file
set hookInpFile=tmp.lua
:: The name of the modify file
set hookOutFile=trackassembly_init.lua
:: Current path of this batch file
set hookBasPath=%~dp0
:: The path to the Lua eceutable including
set hookLuaPath=%1
:: The path to the log file. Folder must exist!
set hookLogFile=%2
:: Where to read the revision file from
set hookCpyPath=%hookBasPath%..\..\..\..\lua\autorun
:: The path where pieces manager tool is located
set hookPimMath=%hookBasPath%..\peaces_manager
:: The output format of the revision file
set hookFrmEnds=UNX
echo Base: %hookBasPath%> %hookLogFile%
echo Lua : %hookLuaPath%>> %hookLogFile%
copy %hookCpyPath%\%hookOutFile% %hookCpyPath%\%hookInpFile%
echo Calling %hookLuaPath%>>%hookLogFile%
echo Call[0]: %hookBasPath%pre-commit.lua>>%hookLogFile%
echo Call[1]: %hookCpyPath%>>%hookLogFile%
echo Call[2]: %hookOutFile%>>%hookLogFile%
echo Call[3]: %hookFrmEnds%>>%hookLogFile%
echo Call[4]: %hookLogFile%>>%hookLogFile%
call %hookLuaPath% %hookBasPath%pre-commit.lua %hookCpyPath% %hookOutFile% %hookFrmEnds% %hookLogFile%
del %hookCpyPath%\%hookInpFile%
echo Cleanup pieces manager buid...>>%hookLogFile%
rd /s /q %hookPimMath%\bin
rd /s /q %hookPimMath%\obj
del %hookPimMath%\peaces_manager.layout
timeout 500
exit 0

View File

Before

Width:  |  Height:  |  Size: 43 KiB

After

Width:  |  Height:  |  Size: 43 KiB

View File

Before

Width:  |  Height:  |  Size: 203 KiB

After

Width:  |  Height:  |  Size: 203 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 92 KiB

View File

Before

Width:  |  Height:  |  Size: 164 KiB

After

Width:  |  Height:  |  Size: 164 KiB

View File

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 138 KiB

View File

Before

Width:  |  Height:  |  Size: 284 KiB

After

Width:  |  Height:  |  Size: 284 KiB

View File

Before

Width:  |  Height:  |  Size: 289 KiB

After

Width:  |  Height:  |  Size: 289 KiB

View File

Before

Width:  |  Height:  |  Size: 47 KiB

After

Width:  |  Height:  |  Size: 47 KiB

View File

Before

Width:  |  Height:  |  Size: 321 KiB

After

Width:  |  Height:  |  Size: 321 KiB

View File

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -1,5 +1,7 @@
[img=https://i.imgur.com/2txEPIN.gif][/img]
This page uses [url=https://steamcommunity.com/comment/Guide/formattinghelp]steam formatting[/url]. I prefer markdawn though.
[h1] Description [/h1]
This script can give you the ability to connect prop-segmented track pieces fast. It is optimized and brings the track building time consuming to a minimum. It uses pre-defined active points to snap the segments the best way there is in Garry's Mod
@ -12,17 +14,17 @@ This script can give you the ability to connect prop-segmented track pieces fast
[*] Track segment [url=https://youtu.be/3Ws6Jh3JUew?t=1358]flip over mode for mirroring[/url] already created [url=https://youtu.be/3Ws6Jh3JUew?t=1722]loops and curves[/url]
[*] Track segment [url=https://youtu.be/3Ws6Jh3JUew?t=200]curve node interpolation[/url] for building custom track layouts
[*] Track curve fitting aligment based on [url=https://www.youtube.com/watch?v=1rsDHU79J50]ray intersection for precise piece layout[/url]
[*] Extendable database via [url=https://www.youtube.com/watch?v=Pz0_RGwgfaY]text file[/url] or a [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/autosave/z_autorun_add_pieces.lua]lua script[/url]
[*] Extendable database via [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/set/trackasmlib_dsv.txt]text file load list[/url] and [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/Test_s_track_packTRACKASSEMBLY_PIECES.txt]list prefixes[/url] [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/Test_s_track_packTRACKASSEMBLY_CATEGORY.txt]categories[/url]
[*] Switching database storage between Lua table and SQL
[*] Spawning pieces on the map
[*] Extendable DB [url=https://www.youtube.com/watch?v=Pz0_RGwgfaY]text file[/url] or a [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/set/z_autorun_%5Btrackassembly%5D.txt]lua script[/url]
[*] Extendable DB [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/set/trackasmlib_dsv.txt]text file load list[/url] and [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/Test_s_track_packTRACKASSEMBLY_PIECES.txt]list prefixes[/url] [url=https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/Test_s_track_packTRACKASSEMBLY_CATEGORY.txt]categories[/url]
[*] Switching DB storage between [b]SQL[/b] for SQL mode and [b]LUA[/b] for Lua mode
[*] Spawning pieces on the map for creating custom track layouts
[*] Snapping pieces on the map surface ( if checked )
[*] Snapping/spawning with [url=https://www.youtube.com/watch?v=e1IK2zJ_Djk]custom user offsets[/url]
[*] Snapping/spawning with zero pitch ( good for track leveling )
[*] Snapping/spawning at the mass-center or the active point ( if checked )
[*] Snapping the first piece yaw to user defined angle
[*] Snapping already spawned pieces by [url=https://www.youtube.com/watch?v=BxMlZMMGHrs]using only the physgun[/url]
[*] Fast changing the active track ends ( Alt + mouse scroll good switching turns direction )
[*] Fast changing the active track ends ( Alt + SCROLL good switching turns direction )
[*] Custom user defined active radius based snapping
[*] Custom active point and radius location assistant
[*] Custom active point position angle and orientation adviser
@ -56,6 +58,11 @@ E2 API: https://github.com/dvdvideo1234/TrackAssemblyTool/wiki/Wiremod-API
One way turns problem: https://github.com/dvdvideo1234/TrackAssemblyTool#how-can-i-chose-and-select-a-desired-track-end-
If the tool database does not seem to be correct please reset the external
DSV by deleting the [url=https://github.com/dvdvideo1234/TrackAssemblyTool/tree/master/data/trackassembly]data/trackassembly[/url] folder!
Please remember to backup your personal pluggable DSV database if you have created any!
The DSV database is located in the [url=https://github.com/dvdvideo1234/TrackAssemblyTool/tree/master/data/trackassembly/dsv]data/trackassembly/dsv[/url] folder!
Reuploading and source stealing will not be tolerated !
Selling it is also out of option, as the open source suggests !

View File

@ -88,7 +88,7 @@ local gtInitLogs = {"*Init", false, 0}
------------ CONFIGURE ASMLIB ------------
asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","8.640")
asmlib.SetOpVar("TOOL_VERSION","8.641")
asmlib.SetIndexes("V" ,1,2,3)
asmlib.SetIndexes("A" ,1,2,3)
asmlib.SetIndexes("WV",1,2,3)

View File

@ -293,7 +293,7 @@ pointing at a piece. Keep this maxed out if you don't want to bother with track
5. `Stack count` control value shows the maximum number of pieces to be snapped in `Stacking` mode.
Change this to something larger than one if you want to extend your track by stacking.
6. `Angular alignment` control
The slider is used to snap the first piece ( Requested by [Magnum](http://steamcommunity.com/profiles/76561198004847743) )
The slider is used to snap the first piece ( Requested by [Magnum][ref-magnum] )
to a user-defined angle ( Usually `45` ) so that the track building process becomes easier. The
whole track build will be snapped also because you are building it relative to the first piece.
7. `Force limit` control ( Requested by `The Arbitor 90` ) defines the maximum force to be applied
@ -330,7 +330,7 @@ additional user offset regarding the next track piece to be spawned.
#### What will happen if something gets updated?
First of all this FAQ will be UPDATED AS THE TOOL GOES. So everything that
the tool supports will be represented here as a manual or something.
More information I publish you can also find in [the wiki page here](https://github.com/dvdvideo1234/TrackAssemblyTool/wiki).
More information I publish you can also find in [the wiki page here][ref-wiki].
That's what is this FAQ for anyway ( Though most people don't bother to read it before asking )...
#### Which addons did you work on?
@ -357,7 +357,7 @@ The ones that are **included** in Garry's mod do not have links and are marked b
* [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 and [discontinued][ref-discontinued] )
* [Ron's 2ft track pack](https://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][ref-maintained] )
* PHX Tubes **(INCLUDED)**
* [Magnum's second track pack](https://steamcommunity.com/sharedfiles/filedetails/?id=391016040) ( Ignore, not designed as prop )
* [qwertyaaa's G Scale Track Pack](https://steamcommunity.com/sharedfiles/filedetails/?id=718239260)
@ -370,6 +370,7 @@ The ones that are **included** in Garry's mod do not have links and are marked b
* [Joe's track pack](https://steamcommunity.com/sharedfiles/filedetails/?id=1658816805)
* [StevenTechno's Buildings pack 2.0](https://steamcommunity.com/sharedfiles/filedetails/?id=1888013789)
* [Modular canal props](https://steamcommunity.com/sharedfiles/filedetails/?id=1336622735) ( Interior only )
* [Anyone's Horrible Trackpack](https://steamcommunity.com/sharedfiles/filedetails/?id=2194528273) ( [Maintained by the owner][ref-maintained] )
#### Where are the trains/vehicles[,](ref-easter) are there any of these?
Dude seriously, make them yourself, what's the point of playing Gmod then ... xD
@ -428,14 +429,17 @@ Yes, it does. You can find the manipulation panels description in the
That way you will upload some half-baked malicious tool, waste your time with stupid
things and confuse everybody with this so-called `unofficial` version of the Track assembly tool.
Not to mention that the stunned people ***will NOT GET ANY updates*** !
The best you can do is just point to the [original GIT repository](https://github.com/dvdvideo1234/TrackAssemblyTool)
The best you can do is just point to the [original GIT repository][ref-TA-GIT]
avoiding any version mismatches and confusions. So please don't upload the script to any other sites. ***[I mean it!](https://www.youtube.com/watch?v=b1Om3vX1GlA)***
[ref-wiki]: https://github.com/dvdvideo1234/TrackAssemblyTool/wiki
[ref-magnum]: http://steamcommunity.com/profiles/76561198004847743
[ref-TA-GIT]: https://github.com/dvdvideo1234/TrackAssemblyTool
[ref-entity]: https://wiki.facepunch.com/gmod/Entity
[ref-dbext]: https://github.com/dvdvideo1234/TrackAssemblyTool/wiki/Database-extension
[ref-text-file]: https://www.youtube.com/watch?v=Pz0_RGwgfaY
[ref-value-exp]: https://www.youtube.com/watch?v=mEEpO3w8BLs
[ref-lua-script]: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/autosave/z_autorun_%5Btrackassembly%5D.txt
[ref-lua-script]: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/set/z_autorun_%5Btrackassembly%5D.txt
[ref-load-list]: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/set/trackasmlib_dsv.txt
[ref-list-pref]: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/Test_s_track_packTRACKASSEMBLY_PIECES.txt
[ref-categ]: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/Test_s_track_packTRACKASSEMBLY_CATEGORY.txt
@ -450,13 +454,13 @@ avoiding any version mismatches and confusions. So please don't upload the scrip
[ref-dsv-dir]: https://github.com/dvdvideo1234/TrackAssemblyTool/tree/master/data/trackassembly/dsv
[ref-sv-db]: https://github.com/dvdvideo1234/TrackAssemblyTool/blob/master/data/trackassembly/dsv/sv_TRACKASSEMBLY_PIECES.txt
[ref-phys-snap]: https://github.com/dvdvideo1234/TrackAssemblyTool/wiki/Additional-features#physgun-snapping-feature
[ref-discontinued]: https://github.com/dvdvideo1234/TrackAssemblyTool/tree/master/data/discontinued/owner-discontinued
[ref-maintained]: https://github.com/dvdvideo1234/TrackAssemblyTool/tree/master/data/discontinued/owner-maintained
[ref-discontinued]: https://github.com/dvdvideo1234/TrackAssemblyTool/tree/master/data/trackassembly/tools/discontinued/owner-discontinued
[ref-maintained]: https://github.com/dvdvideo1234/TrackAssemblyTool/tree/master/data/trackassembly/tools/discontinued/owner-maintained
[ref-easter]: https://tfwiki.net/wiki/Team_Bullet_Train
[ref-surf-snap]: https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/pictures/surfsnap.jpg
[ref-adviser]:https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/pictures/snapadvaiser.jpg
[ref-screenshot]: https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/pictures/screenshot.jpg
[ref-pnt-assist]: https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/pictures/pointassist.jpg
[ref-surf-snap]: https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/trackassembly/tools/pictures/surfsnap.jpg
[ref-adviser]:https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/trackassembly/tools/pictures/snapadvaiser.jpg
[ref-screenshot]: https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/trackassembly/tools/pictures/screenshot.jpg
[ref-pnt-assist]: https://raw.githubusercontent.com/dvdvideo1234/TrackAssemblyTool/master/data/trackassembly/tools/pictures/pointassist.jpg
[ref-ctx-menu]: https://wiki.facepunch.com/gmod/The_Context_Menu
[ref-model]: https://developer.valvesoftware.com/wiki/Model
[ref-glua]: https://nodecraft.com/support/games/gmod/glua-101-an-introduction-to-garrys-mod-coding

View File

@ -15,6 +15,7 @@ set gmadName=TrackAssemblyTool
set gmadCommits=https://github.com/dvdvideo1234/%gmadName%/commit/
set gmadPathGIT=D:\Git\bin
set gmadBinPath=F:\Games\Steam\steamapps\common\GarrysMod\bin
set gmadADTools=%gmadRevPath%data\trackassembly\tools
set "gmadTime=%date% %time%"
set gmadID=287012681
set gmadDirs=(lua)
@ -22,8 +23,7 @@ set gmadLogs=
set gmadCRLF=^
:: Ne new line is actually needed when escaped
:: New line is actually needed when escaped
title Addon %gmadName% updater/publisher
@ -44,9 +44,9 @@ md %gmadRevPath%Workshop\!gmadName!
for %%i in %gmadDirs% do (
echo Extracting %%i
timeout 3
xcopy !gmadRevPath!%%i !gmadRevPath!Workshop\!gmadName!\%%i /EXCLUDE:!gmadRevPath!data\workshop\key.txt /E /C /I /F /R /Y
xcopy !gmadRevPath!%%i !gmadRevPath!Workshop\!gmadName!\%%i /EXCLUDE:!gmadADTools!\workshop\key.txt /E /C /I /F /R /Y
)
copy !gmadRevPath!data\workshop\addon.json !gmadRevPath!Workshop\!gmadName!\addon.json
copy !gmadADTools!\workshop\addon.json !gmadRevPath!Workshop\!gmadName!\addon.json
call !gmadBinPath!\gmad.exe create -folder "!gmadRevPath!Workshop\!gmadName!" -out "!gmadRevPath!Workshop\!gmadName!.gma"
:: Obtain the latest commit hash from the repository
@ -70,7 +70,7 @@ for /f "delims=" %%i in ('type !gmadNameLOG!') do (
)
)
:: Publish if ID is available or create if it is not.
:: Publish if ID is available or create if it is not.
echo .
echo .
@ -83,9 +83,9 @@ echo .
timeout 15
IF DEFINED gmadID (
call !gmadBinPath!\gmpublish.exe update -addon "!gmadRevPath!Workshop\!gmadName!.gma" -id "!gmadID!" -icon "!gmadRevPath!data\pictures\icon.jpg" -changes "Generated by batch !"
call !gmadBinPath!\gmpublish.exe update -addon "!gmadRevPath!Workshop\!gmadName!.gma" -id "!gmadID!" -icon "!gmadADTools!\pictures\icon.jpg" -changes "Generated by batch !"
) ELSE (
call !gmadBinPath!\gmpublish.exe create -addon "!gmadRevPath!Workshop\!gmadName!.gma" -icon "!gmadRevPath!data\pictures\icon.jpg"
call !gmadBinPath!\gmpublish.exe create -addon "!gmadRevPath!Workshop\!gmadName!.gma" -icon "!gmadADTools!\pictures\icon.jpg"
)
:: Tell the user we are done and clean-up the directory