From 577bdd51ae38c541a7b6148678e549eaaa774418 Mon Sep 17 00:00:00 2001 From: dvdvideo1234 Date: Wed, 11 Sep 2024 19:57:07 +0300 Subject: [PATCH] Added: Synchronization commit from the master branch --- .../{emd.bat => create_report.bat} | 19 +- .../tools/peaces_manager/models_ignored.txt | 4 + lua/autorun/trackassembly_init.lua | 189 +++++++++++++++++- lua/trackassembly/trackasmlib.lua | 82 +++++--- readme.md | 1 + 5 files changed, 265 insertions(+), 30 deletions(-) rename data/trackassembly/tools/peaces_manager/{emd.bat => create_report.bat} (93%) diff --git a/data/trackassembly/tools/peaces_manager/emd.bat b/data/trackassembly/tools/peaces_manager/create_report.bat similarity index 93% rename from data/trackassembly/tools/peaces_manager/emd.bat rename to data/trackassembly/tools/peaces_manager/create_report.bat index dd9a7670..75064077 100644 --- a/data/trackassembly/tools/peaces_manager/emd.bat +++ b/data/trackassembly/tools/peaces_manager/create_report.bat @@ -30,8 +30,8 @@ set emd_chew_dbase=%emd_chew_gmod%\garrysmod\data\trackassembly\exp\trackasmlib_ set emd_chew_skip=%emd_chew_repo%\data\trackassembly\tools\peaces_manager\models_ignored.txt :: How many addons are to be processed -set emd_chew_addfrm=1 -set emd_chew_addcnt=28 +set emd_chew_addfrm=30 +set emd_chew_addcnt=30 :: GMA addons to be processed set emd_chew_addlst[1]=740453553 @@ -62,6 +62,8 @@ set emd_chew_addlst[25]=331192490 set emd_chew_addlst[26]=1888013789 set emd_chew_addlst[27]=1955876643 set emd_chew_addlst[28]=3071058065 +set emd_chew_addlst[29]=3297918081 +set emd_chew_addlst[30]=3314861708 :: Folder list for extraction and the directories they will be extracted set emd_chew_adddir[1]=AlexCookie's 2ft track pack @@ -84,14 +86,17 @@ set emd_chew_adddir[17]=Ron's G Scale Track pack set emd_chew_adddir[18]=Ron's Minitrain Props set emd_chew_adddir[19]=SProps set emd_chew_adddir[20]=Shinji85's Rails -set emd_chew_adddir[21]=SligWolf's Minihover$SligWolf's White Rails -set emd_chew_adddir[22]=SligWolf's Minitrains -set emd_chew_adddir[23]=SligWolf's Railcar -set emd_chew_adddir[24]=SligWolf's Rerailers +set emd_chew_adddir[21]=SligWolf's Modelpack +set emd_chew_adddir[22]=SligWolf's Mini Trains +set emd_chew_adddir[23]=SligWolf's Bodygroup Car +set emd_chew_adddir[24]=SligWolf's Rerailer set emd_chew_adddir[25]=StevenTechno's Buildings 1.0 set emd_chew_adddir[26]=StevenTechno's Buildings 2.0 set emd_chew_adddir[27]=Trackmania United Props set emd_chew_adddir[28]=RockMan's Fortification +set emd_chew_adddir[29]=SligWolf's Suspension Train +set emd_chew_adddir[30]=Modular City Street + :: Show the current folder echo Running in: %emd_chew_pathb% @@ -144,6 +149,7 @@ for /L %%k in (%emd_chew_addfrm%,1,%emd_chew_addcnt%) do ( set emd_chew_fgma=!emd_chew_fgma!!emd_chew_fdid!* set emd_chew_fgma=!emd_chew_fgma!.!emd_chew_adext! set "emd_chew_fdnm=!emd_chew_adddir[%%k]!" + echo Game content: !emd_chew_fgma! for %%i in (!emd_chew_fgma!) do ( set /A emd_chew_match=1 :: Extract the GMA in the current folder @@ -162,6 +168,7 @@ for /L %%k in (%emd_chew_addfrm%,1,%emd_chew_addcnt%) do ( set emd_chew_fgma=!emd_chew_wshop!\ set emd_chew_fgma=!emd_chew_fgma!!emd_chew_fdid!\ set emd_chew_fgma=!emd_chew_fgma!*.!emd_chew_adext! + echo Workshop content: !emd_chew_fgma! for %%i in (!emd_chew_fgma!) do ( set /A emd_chew_match=1 :: Extract the GMA in the current folder diff --git a/data/trackassembly/tools/peaces_manager/models_ignored.txt b/data/trackassembly/tools/peaces_manager/models_ignored.txt index a6c6e873..cd4f130a 100644 --- a/data/trackassembly/tools/peaces_manager/models_ignored.txt +++ b/data/trackassembly/tools/peaces_manager/models_ignored.txt @@ -5661,3 +5661,7 @@ models/props_canal/canal_bridge04.mdl models/props_canal/canal_bridge_railing01.mdl models/props_canal/canal_bridge_railing02.mdl models/props_canal/canal_bridge_railing_lamps.mdl + +# Modular City Street +models/propper/dingles_modular_streets/street_propper_reference_texture_block.mdl +models/propper/dingles_modular_streets/street_propper_reference_texture_block2.mdl diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index 5dd99847..b21bba17 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -86,7 +86,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present ------------ CONFIGURE ASMLIB ------------ asmlib.InitBase("track","assembly") -asmlib.SetOpVar("TOOL_VERSION","8.784") +asmlib.SetOpVar("TOOL_VERSION","8.785") ------------ CONFIGURE GLOBAL INIT OPVARS ------------ @@ -506,6 +506,7 @@ if(CLIENT) then asmlib.ToIcon("bnderrmod_hint" , "shape_square_go" ) asmlib.ToIcon("bnderrmod_generic", "shape_square_link" ) asmlib.ToIcon("bnderrmod_error" , "shape_square_error") + -- Workshop matching crap asmlib.WorkshopID("SligWolf's Rerailer" , "132843280") asmlib.WorkshopID("SligWolf's Mini Trains" , "149759773") @@ -521,10 +522,13 @@ if(CLIENT) then asmlib.WorkshopID("Ron's Minitrain Props" , "728833183") asmlib.WorkshopID("SligWolf's Modelpack" , "147812851") asmlib.WorkshopID("Battleship's abandoned rails", "807162936") + asmlib.WorkshopID("Ron's 2ft track pack" , "634000136") + asmlib.WorkshopID("Ron's G Scale Track pack" , "865735701") asmlib.WorkshopID("AlexCookie's 2ft track pack" , "740453553") asmlib.WorkshopID("CAP Walkway" , "180210973") asmlib.WorkshopID("SligWolf's Tiny Hover Racer" , "1375275167") asmlib.WorkshopID("Joe's track pack" , "1658816805") + asmlib.WorkshopID("Plarail" , "1512053748") asmlib.WorkshopID("StevenTechno's Buildings 2.0", "1888013789") asmlib.WorkshopID("Modular Canals" , "1336622735") asmlib.WorkshopID("Trackmania United Props" , "1955876643") @@ -532,6 +536,7 @@ if(CLIENT) then asmlib.WorkshopID("Modular Sewer" , "2340192251") asmlib.WorkshopID("RockMan's Fortification" , "3071058065") asmlib.WorkshopID("SligWolf's Suspension Train" , "3297918081") + asmlib.WorkshopID("Modular City Street" , "3314861708") asmlib.SetAction("CLEAR_GHOSTS" , function() asmlib.ClearGhosts() end) asmlib.SetAction("CTXMENU_OPEN" , function() asmlib.IsFlag("tg_context_menu", true ) end) @@ -4356,6 +4361,188 @@ else PIECES:Record({"models/sligwolf/rerailer/rerailer_2.mdl", "#", "Double Middle", 2, "-1882.106, 0, 3.031", "-2367.072, 0, -5.412", "0,-180,0"}) PIECES:Record({"models/sligwolf/rerailer/rerailer_3.mdl", "#", "Double Long", 1, "-258.249, -0.01, -0.002", "219.415, 0, -5.409"}) PIECES:Record({"models/sligwolf/rerailer/rerailer_3.mdl", "#", "Double Long", 2, "-3124.199, -0.01, 2.997", "-3601.869, -0.377, -5.416", "0,-180,0"}) + asmlib.Categorize("Modular City Street", {"@highway", "@street" , "endcap", "turn", "ramp", + "connector", "tjunction", "intersection", "elevated"}, "models/propper/dingles_modular_streets/") + PIECES:Record({"models/propper/dingles_modular_streets/street64x512.mdl", "#", "#", 1, "", "0,-32,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street64x512.mdl", "#", "#", 2, "", "0, 32,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street64x768.mdl", "#", "#", 1, "", "0,-32,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street64x768.mdl", "#", "#", 2, "", "0, 32,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x512.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x512.mdl", "#", "#", 2, "", "0, 64,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x768.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x768.mdl", "#", "#", 2, "", "0, 64,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x512_crosswalk.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x512_crosswalk.mdl", "#", "#", 2, "", "0, 64,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x768_crosswalk.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street128x768_crosswalk.mdl", "#", "#", 2, "", "0, 64,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street256x512.mdl", "#", "#", 1, "", "0,-128,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street256x512.mdl", "#", "#", 2, "", "0, 128,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street256x768.mdl", "#", "#", 1, "", "0,-128,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street256x768.mdl", "#", "#", 2, "", "0, 128,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512.mdl", "#", "#", 1, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512.mdl", "#", "#", 2, "", "0, 256,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768.mdl", "#", "#", 1, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768.mdl", "#", "#", 2, "", "0, 256,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x512.mdl", "#", "#", 1, "", "0,-384,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x512.mdl", "#", "#", 2, "", "0, 384,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x768.mdl", "#", "#", 1, "", "0,-384,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x768.mdl", "#", "#", 2, "", "0, 384,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512.mdl", "#", "#", 1, "", "0,-512,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512.mdl", "#", "#", 2, "", "0, 512,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768.mdl", "#", "#", 1, "", "0,-512,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768.mdl", "#", "#", 2, "", "0, 512,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street2048x512.mdl", "#", "#", 1, "", "0,-1024,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street2048x512.mdl", "#", "#", 2, "", "0, 1024,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street2048x768.mdl", "#", "#", 1, "", "0,-1024,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street2048x768.mdl", "#", "#", 2, "", "0, 1024,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512_endcap_fancy1.mdl", "#", "#", 1, "", "0,-128,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512_endcap_fancy2.mdl", "#", "#", 1, "", "0,-128,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512_endcap_simple1.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512_endcap_simple2.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768_endcap_fancy1.mdl", "#", "#", 1, "", "0,-192,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768_endcap_fancy2.mdl", "#", "#", 1, "", "0,-192,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768_endcap_simple1.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768_endcap_simple2.mdl", "#", "#", 1, "", "0,-64,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_concrete_to_stone_connector1.mdl", "#", "#", 1, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_concrete_to_stone_connector1.mdl", "#", "#", 2, "", "0, 256,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_concrete_to_stone_connector2.mdl", "#", "#", 1, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_concrete_to_stone_connector2.mdl", "#", "#", 2, "", "0, 256,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x768_concrete_to_stone_connector1.mdl", "#", "#", 1, "", "0,-384,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x768_concrete_to_stone_connector1.mdl", "#", "#", 2, "", "0, 384,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x768_concrete_to_stone_connector2.mdl", "#", "#", 1, "", "0,-384,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768x768_concrete_to_stone_connector2.mdl", "#", "#", 2, "", "0, 384,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_512_to_768_connector1.mdl", "#", "#", 1, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_512_to_768_connector1.mdl", "#", "#", 2, "", "384, 0, 0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_512_to_768_connector1.mdl", "#", "#", 3, "", "0, 256,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_512_to_768_connector2.mdl", "#", "#", 1, "", "0, 256,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_512_to_768_connector2.mdl", "#", "#", 2, "", "-384,0,0", "0,180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_512_to_768_connector2.mdl", "#", "#", 3, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_512_to_768_connector2.mdl", "#", "#", 4, "", "384,0,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_tjunction512x512.mdl", "#", "#", 1, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_tjunction512x512.mdl", "#", "#", 2, "", "256, 0, 0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_tjunction512x512.mdl", "#", "#", 3, "", "-256, 0, 0", "0,180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_tjunction768x768.mdl", "#", "#", 1, "", "0,-384,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_tjunction768x768.mdl", "#", "#", 2, "", "384, 0, 0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_tjunction768x768.mdl", "#", "#", 3, "", "-384,0,0", "0,180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_turn512x512.mdl", "#", "#", 1, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_turn512x512.mdl", "#", "#", 2, "", "256, 0, 0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_turn768x768.mdl", "#", "#", 1, "", "0,-384,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_turn768x768.mdl", "#", "#", 2, "", "384, 0, 0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection512x512.mdl", "#", "#", 1, "", "0, 256,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection512x512.mdl", "#", "#", 2, "", "-256,0,0", "0,180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection512x512.mdl", "#", "#", 3, "", "0,-256,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection512x512.mdl", "#", "#", 4, "", "256,0,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection768x768.mdl", "#", "#", 1, "", "0, 384,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection768x768.mdl", "#", "#", 2, "", "-384,0,0", "0,180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection768x768.mdl", "#", "#", 3, "", "0,-384,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street_4wayintersection768x768.mdl", "#", "#", 4, "", "384,0,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768_fork.mdl", "#", "#", 1, "", "0,-655,0", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768_fork.mdl", "#", "#", 2, "", " 994,655,-0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street768_fork.mdl", "#", "#", 3, "", "-994,655,0", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated64high.mdl", "#", "#", 1, "", "0,256,24", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated64high.mdl", "#", "#", 2, "", "0,-256,-24", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated128high.mdl", "#", "#", 1, "", "0,256,56", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated128high.mdl", "#", "#", 2, "", "0,-256,-56", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated192high.mdl", "#", "#", 1, "", "0,256,88", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated192high.mdl", "#", "#", 2, "", "0,-256,-88", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated256high.mdl", "#", "#", 1, "", "0,256,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x512_elevated256high.mdl", "#", "#", 2, "", "0,-256,-120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated64high.mdl", "#", "#", 1, "", "0,256,24", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated64high.mdl", "#", "#", 2, "", "0,-256,-24", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated128high.mdl", "#", "#", 1, "", "0,256,56", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated128high.mdl", "#", "#", 2, "", "0,-256,-56", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated192high.mdl", "#", "#", 1, "", "0,256,88", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated192high.mdl", "#", "#", 2, "", "0,-256,-88", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated256high.mdl", "#", "#", 1, "", "0,256,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street512x768_elevated256high.mdl", "#", "#", 2, "", "0,-256,-120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated64high.mdl", "#", "#", 1, "", "0,512,24", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated64high.mdl", "#", "#", 2, "", "0,-512,-24", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated128high.mdl", "#", "#", 1, "", "0,512,56", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated128high.mdl", "#", "#", 2, "", "0,-512,-56", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated192high.mdl", "#", "#", 1, "", "0,512,88", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated192high.mdl", "#", "#", 2, "", "0,-512,-88", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated256high.mdl", "#", "#", 1, "", "0,512,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x512_elevated256high.mdl", "#", "#", 2, "", "0,-512,-120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated64high.mdl", "#", "#", 1, "", "0,512,24", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated64high.mdl", "#", "#", 2, "", "0,-512,-24", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated128high.mdl", "#", "#", 1, "", "0,512,56", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated128high.mdl", "#", "#", 2, "", "0,-512,-56", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated192high.mdl", "#", "#", 1, "", "0,512,88", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated192high.mdl", "#", "#", 2, "", "0,-512,-88", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated256high.mdl", "#", "#", 1, "", "0,512,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/street1024x768_elevated256high.mdl", "#", "#", 2, "", "0,-512,-120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_ramp_street768_short_tall_connector.mdl", "#", "#", 1, "", " 512,0,-8"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_ramp_street768_short_tall_connector.mdl", "#", "#", 2, "", "-512,0,248", "0,180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_ramp_street1024x768.mdl", "#", "#", 1, "", "0, 512, 120", "0, 90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_ramp_street1024x768.mdl", "#", "#", 2, "", "0,-512,-120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_ramp_street2048x768_tall.mdl", "#", "#", 1, "", "0, 1024, 248", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_ramp_street2048x768_tall.mdl", "#", "#", 2, "", "0,-1024,-248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street256x768.mdl", "#", "#", 1, "", "0,64,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street256x768.mdl", "#", "#", 2, "", "0,-64,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street256x768_tall.mdl", "#", "#", 1, "", "0,64,248", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street256x768_tall.mdl", "#", "#", 2, "", "0,-64,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street256x768_overpass.mdl", "#", "#", 1, "", "0,64,40", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street256x768_overpass.mdl", "#", "#", 2, "", "0,-64,40", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street512x768.mdl", "#", "#", 1, "", "0,256,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street512x768.mdl", "#", "#", 2, "", "0,-256,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street512x768_tall.mdl", "#", "#", 1, "", "0,256,248", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street512x768_tall.mdl", "#", "#", 2, "", "0,-256,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street512x768_overpass.mdl", "#", "#", 1, "", "0,256,40", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street512x768_overpass.mdl", "#", "#", 2, "", "0,-256,40", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street768x768.mdl", "#", "#", 1, "", "0,384,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street768x768.mdl", "#", "#", 2, "", "0,-384,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street768x768_tall.mdl", "#", "#", 1, "", "0,384,248", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street768x768_tall.mdl", "#", "#", 2, "", "0,-384,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street768x768_overpass.mdl", "#", "#", 1, "", "0,384,40", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street768x768_overpass.mdl", "#", "#", 2, "", "0,-384,40", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street1024x768.mdl", "#", "#", 1, "", "0,512,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street1024x768.mdl", "#", "#", 2, "", "0,-512,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street1024x768_tall.mdl", "#", "#", 1, "", "0,512,248", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street1024x768_tall.mdl", "#", "#", 2, "", "0,-512,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street1024x768_overpass.mdl", "#", "#", 1, "", "0,512,40", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street1024x768_overpass.mdl", "#", "#", 2, "", "0,-512,40", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street2048x768.mdl", "#", "#", 1, "", "0,1024,120", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street2048x768.mdl", "#", "#", 2, "", "0,-1024,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street2048x768_tall.mdl", "#", "#", 1, "", "0,1024,248", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street2048x768_tall.mdl", "#", "#", 2, "", "0,-1024,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street2048x768_overpass.mdl", "#", "#", 1, "", "0,1024,40", "0,90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street2048x768_overpass.mdl", "#", "#", 2, "", "0,-1024,40", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector.mdl", "#", "#", 1, "", " 384,-384,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector.mdl", "#", "#", 2, "", "-384, 384,120", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector.mdl", "#", "#", 3, "", "-384,-384,120", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_tall.mdl", "#", "#", 1, "", " 384,-384,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_tall.mdl", "#", "#", 2, "", "-384, 384,248", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_tall.mdl", "#", "#", 3, "", "-384,-384,248", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_mirrored.mdl", "#", "#", 1, "", " 384,-384,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_mirrored.mdl", "#", "#", 2, "", " 384, 384,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_mirrored.mdl", "#", "#", 3, "", "-384,-384,120", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_mirrored_tall.mdl", "#", "#", 1, "", " 384,-384,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_mirrored_tall.mdl", "#", "#", 2, "", " 384, 384,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_mirrored_tall.mdl", "#", "#", 3, "", "-384,-384,248", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double.mdl", "#", "#", 1, "", " 384,-384,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double.mdl", "#", "#", 2, "", " 384, 384,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double.mdl", "#", "#", 3, "", "-384, 384,120", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double.mdl", "#", "#", 4, "", "-384,-384,120", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double_tall.mdl", "#", "#", 1, "", " 384,-384,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double_tall.mdl", "#", "#", 2, "", " 384, 384,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double_tall.mdl", "#", "#", 3, "", "-384, 384,248", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768rampconnector_double_tall.mdl", "#", "#", 4, "", "-384,-384,248", "0,-180,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_256turn.mdl", "#", "#", 1, "", "256,128,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_256turn.mdl", "#", "#", 2, "", "-128,-256,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_256turn_tall.mdl", "#", "#", 1, "", "256,128,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_256turn_tall.mdl", "#", "#", 2, "", "-128,-256,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_512turn.mdl", "#", "#", 1, "", "512,256,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_512turn.mdl", "#", "#", 2, "", "-256,-512,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_512turn_tall.mdl", "#", "#", 1, "", "512,256,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_512turn_tall.mdl", "#", "#", 2, "", "-256,-512,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768turn.mdl", "#", "#", 1, "", "768,384,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768turn.mdl", "#", "#", 2, "", "-384,-768,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768turn_tall.mdl", "#", "#", 1, "", "768,384,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_768turn_tall.mdl", "#", "#", 2, "", "-384,-768,248", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_1024turn.mdl", "#", "#", 1, "", "1024,512,120"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_1024turn.mdl", "#", "#", 2, "", "-512,-1024,120", "0,-90,0"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_1024turn_tall.mdl", "#", "#", 1, "", "1024,512,248"}) + PIECES:Record({"models/propper/dingles_modular_streets/highway_street_1024turn_tall.mdl", "#", "#", 2, "", "-512,-1024,248", "0,-90,0"}) if(gsMoDB == "SQL") then sqlCommit() end end diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index a8ec1c7d..de8ac87b 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -1592,7 +1592,7 @@ function NewPOA(vA, vB, vC) end -- Decode the transformation when is not null or empty string else -- When the value is empty use zero otherwise process the value self:Import(sB, sM, ...) -- Try to process the value when present - LogInstance("Missing "..GetReport(sB, sM)) -- No Attachment call + LogInstance("Regular "..GetReport(sB, sM)) -- No Attachment call end -- Try to decode the entry when present end; return self end; if(vA or vB or vC) then self:Set(vA, vB, vC) end @@ -2332,7 +2332,7 @@ function ModelToNameRule(sRule, gCut, gSub, gApp) else LogInstance("Wrong mode: "..sRule); return false end end -function Categorize(oTyp, fCat) +function Categorize(oTyp, fCat, ...) local tCat = GetOpVar("TABLE_CATEGORIES") if(not IsHere(oTyp)) then local sTyp = tostring(GetOpVar("DEFAULT_TYPE") or "") @@ -2343,14 +2343,56 @@ function Categorize(oTyp, fCat) local sTyp = tostring(GetOpVar("DEFAULT_TYPE") or "") local fsLog = GetOpVar("FORM_LOGSOURCE") -- The actual format value local ssLog = "*"..fsLog:format("TYPE","Categorize",tostring(oTyp)) - if(isstring(fCat)) then tCat[sTyp] = {} - tCat[sTyp].Txt = fCat; tTyp = (tCat and tCat[sTyp] or nil) - tCat[sTyp].Cmp = CompileString("return ("..fCat..")", sTyp) - local bS, vO = pcall(tCat[sTyp].Cmp); if(not bS) then - LogInstance("Failed "..GetReport(fCat)..": "..vO, ssLog); return nil end - tCat[sTyp].Cmp = vO; tTyp = tCat[sTyp] - return sTyp, (tTyp and tTyp.Txt), (tTyp and tTyp.Cmp) - else LogInstance("Skip "..GetReport(fCat), ssLog) end + if(isstring(fCat)) then + tTyp = (tCat[sTyp] or {}); tCat[sTyp] = tTyp; tTyp.Txt = fCat + elseif(istable(fCat)) then local tArg = {...} + local sTr = GetOpVar("OPSYM_REVISION") -- Trigger + local sSe = GetOpVar("OPSYM_DIRECTORY") -- Separator + tTyp = (tCat[sTyp] or {}); tCat[sTyp] = tTyp + tTyp.Txt = [[function(m) + local o = {} + function setBranch(v, p, b, q) + if(v:find(p)) then + local e = v:gsub("%W*"..p.."%W*", "_") + if(b and o.M) then return e end + if(b and not o.M) then o.M = true end + table.insert(o, (q or p)); return e + end; return v + end]] + tTyp.Txt = tTyp.Txt.."\nlocal r = m:gsub(\""..tostring(tArg[1] or "").."\",\"\"):gsub(\"%.mdl$\",\"\");" + for iD = 1, #fCat do + local tV = sSe:Explode(fCat[iD]) + local sR = tostring(tV[2] and ("\""..tostring(tV[2]).."\"") or nil) + if(tV[1]:sub(1,1) == sTr) then tV[1] = tV[1]:sub(2,-1) + tTyp.Txt = tTyp.Txt.."\nr = setBranch(r, \""..tostring(tV[1]).."\", true, "..sR..")" + else + tTyp.Txt = tTyp.Txt.."\nr = setBranch(r, \""..tostring(tV[1]).."\", false, "..sR..")" + end + end + tTyp.Txt = tTyp.Txt.."\no.M = nil; return o, r:gsub(\"^_+\", \"\"):gsub(\"_+$\", \"\"):gsub(\"_+\", \"_\") end" + elseif(isnumber(fCat)) then local tArg = {...} + tTyp = (tCat[sTyp] or {}); tCat[sTyp] = tTyp + tTyp.Txt = "function(m)" + tTyp.Txt = tTyp.Txt.."\nlocal n = math.floor(tonumber("..fCat..") or 0)" + tTyp.Txt = tTyp.Txt.."\nlocal m = m:gsub(\""..tostring(tArg[1] or "").."\", \"\")\n" + for i = 2, #tArg do local aP, aN = tArg[i], tArg[i+1] + if(aP and aN) then tTyp.Txt = tTyp.Txt.."\nlocal m = m:gsub(\""..aP.."\", \""..aN.."\")\n" end end + tTyp.Txt = tTyp.Txt..[[local t, x = {n = 0}, m:find("/", 1, true) + while(x and x > 0) do + t.n = t.n + 1; t[t.n] = m:sub(1, x-1) + m = m:sub(x+1, -1); x = m:find("/", 1, true) + end; m = m:gsub("%.mdl$","") + if(n == 0) then return t, m end; local a = math.abs(n) + if(a > t.n) then return t, m end; local s = #t-a + if(n < 0) then for i = 1, a do t[i] = t[i+s] end end + while(s > 0) do table.remove(t); s = s - 1 end + return t, m + end]] + else LogInstance("Skip "..GetReport(fCat), ssLog); return nil end + tTyp.Cmp = CompileString("return ("..tTyp.Txt..")", sTyp) + local bS, vO = pcall(tTyp.Cmp); if(not bS) then + LogInstance("Failed "..GetReport(fCat)..": "..vO, ssLog); return nil end + tTyp.Cmp = vO; return sTyp, tTyp.Txt, tTyp.Cmp end end @@ -4562,24 +4604,19 @@ function AttachAdditions(ePiece) local sCass = GetEmpty(arRec[coEN], nil, dCass) local eBonus = entsCreate(sCass); LogInstance("ents.Create("..sCass..")") if(eBonus and eBonus:IsValid()) then - local sMoa = tostring(arRec[coMA]) - if(not IsModel(sMoa, true)) then + local sMoa = tostring(arRec[coMA]); if(not IsModel(sMoa, true)) then LogInstance("Invalid attachment "..GetReport(iCnt, sMoc, sMoa)); return false end eBonus:SetModel(sMoa) LogInstance("ENT:SetModel("..sMoa..")") local sPos = arRec[coPO]; if(not isstring(sPos)) then LogInstance("Position mismatch "..GetReport(iCnt, sMoc, sPos)); return false end - if(not GetEmpty(sPos)) then - oPOA:Decode(sPos, eBonus, "Pos") - vPos:SetUnpacked(oPOA:Get()) - vPos:Set(ePiece:LocalToWorld(vPos)) + if(not GetEmpty(sPos)) then oPOA:Decode(sPos, eBonus, "Pos") + local vPos = oPOA:Vector(); vPos:Set(ePiece:LocalToWorld(vPos)) eBonus:SetPos(vPos); LogInstance("ENT:SetPos(DB)") else eBonus:SetPos(ePos); LogInstance("ENT:SetPos(PIECE:POS)") end local sAng = arRec[coAN]; if(not isstring(sAng)) then LogInstance("Angle mismatch "..GetReport(iCnt, sMoc, sAng)); return false end - if(not GetEmpty(sAng)) then - oPOA:Decode(sAng, eBonus, "Ang") - aAng:SetUnpacked(oPOA:Get()) - aAng:Set(ePiece:LocalToWorldAngles(aAng)) + if(not GetEmpty(sAng)) then oPOA:Decode(sAng, eBonus, "Ang") + local aAng = oPOA:Angle(); aAng:Set(ePiece:LocalToWorldAngles(aAng)) eBonus:SetAngles(aAng); LogInstance("ENT:SetAngles(DB)") else eBonus:SetAngles(eAng); LogInstance("ENT:SetAngles(PIECE:ANG)") end local nMo = (tonumber(arRec[coMO]) or -1) @@ -4607,8 +4644,7 @@ function AttachAdditions(ePiece) if(nSo >= 0) then eBonus:SetSolid(nSo) LogInstance("ENT:SetSolid("..tostring(nSo)..")") end else - local mA = stData[iCnt][coMA] - local mC = stData[iCnt][coEN] + local mA, mC = arRec[coMA], arRec[coEN] LogInstance("Entity invalid "..GetReport(iCnt, sMoc, mA, mC)); return false end end; LogInstance("Success"); return true @@ -4673,7 +4709,7 @@ function AttachBodyGroups(ePiece,sBgID) while(tBG[iCnt] and IDs[iCnt]) do local vBG = tBG[iCnt] local maxID = (ePiece:GetBodygroupCount(vBG.id) - 1) local curID = mathClamp(mathFloor(tonumber(IDs[iCnt]) or 0), 0, maxID) - LogInstance("SetBodygroup "..GetReport(iCnt, maxID, vBG.id, curID)) + LogInstance("SetBodygroup "..GetReport(iCnt, vBG.id, maxID, curID)) ePiece:SetBodygroup(vBG.id, curID); iCnt = iCnt + 1 end; LogInstance("Success "..GetReport(sBgID)); return true end diff --git a/readme.md b/readme.md index e3bf08d9..2eba778f 100644 --- a/readme.md +++ b/readme.md @@ -395,6 +395,7 @@ anymore to maintain cetain track packs leading in **NO SUPPORT**, which is also * Portal 2 High Walkway **(MOUNT)** * [RockMan's Fortification](https://steamcommunity.com/sharedfiles/filedetails/?id=3071058065) * [SligWolf's Suspension train](https://steamcommunity.com/sharedfiles/filedetails/?id=3297918081) [**(AUTHOR)**][ref-maintained] + * [Modular City Street](https://steamcommunity.com/sharedfiles/filedetails/?id=3314861708) #### 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