From 016185dce145d067ae11b4b56cc22eb040c4ca58 Mon Sep 17 00:00:00 2001 From: dvdvideo1234 Date: Thu, 9 Jan 2025 22:13:26 +0200 Subject: [PATCH] Fixed: Readme `Modular Dungeons` link extra arguments Renamed: `FixColor` to `ToColor` so code coloring will work --- lua/autorun/trackassembly_init.lua | 2 +- .../gmod_wire_expression2/core/custom/trackasmlib_wire.lua | 2 +- lua/trackassembly/trackasmlib.lua | 6 +++--- readme.md | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/autorun/trackassembly_init.lua b/lua/autorun/trackassembly_init.lua index 4571d8b..67ca8ea 100644 --- a/lua/autorun/trackassembly_init.lua +++ b/lua/autorun/trackassembly_init.lua @@ -87,7 +87,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present ------------ CONFIGURE ASMLIB ------------ asmlib.InitBase("track","assembly") -asmlib.SetOpVar("TOOL_VERSION","9.771") +asmlib.SetOpVar("TOOL_VERSION","9.772") ------------ CONFIGURE GLOBAL INIT OPVARS ------------ diff --git a/lua/entities/gmod_wire_expression2/core/custom/trackasmlib_wire.lua b/lua/entities/gmod_wire_expression2/core/custom/trackasmlib_wire.lua index 1d7c4df..4cb63fa 100644 --- a/lua/entities/gmod_wire_expression2/core/custom/trackasmlib_wire.lua +++ b/lua/entities/gmod_wire_expression2/core/custom/trackasmlib_wire.lua @@ -275,7 +275,7 @@ local function newPiece(oPly, oEnt, sModel, vPos, aAng, nMass, sBgpID, nR, nG, n if(not enFlag) then return nil end if(not asmlib.IsPlayer(oPly)) then return nil end if(oEnt and not oEnt:IsValid()) then return nil end - local sMod, sBsID, nA, nMs, oCol = sModel, sBgpID, asmlib.FixColor(nA or 255), nMass, nR + local sMod, sBsID, nA, nMs, oCol = sModel, sBgpID, asmlib.ToColor(nA or 255), nMass, nR if(not sMod and oEnt and oEnt:IsValid()) then sMod = oEnt:GetModel() end local stRec = asmlib.CacheQueryPiece(sMod); if(not stRec) then return nil end if(not nMs and oEnt and oEnt:IsValid()) then local oPhy = oEnt:GetPhysicsObject() diff --git a/lua/trackassembly/trackasmlib.lua b/lua/trackassembly/trackasmlib.lua index e30d199..b99b63c 100644 --- a/lua/trackassembly/trackasmlib.lua +++ b/lua/trackassembly/trackasmlib.lua @@ -819,14 +819,14 @@ end ------------- COLOR --------------- -function FixColor(nC) +function ToColor(nC) local tC = GetOpVar("COLOR_CLAMP") return mathFloor(mathClamp((tonumber(nC) or 0), tC[1], tC[2])) end function GetColor(xR, xG, xB, xA) - local nR, nG = FixColor(xR), FixColor(xG) - local nB, nA = FixColor(xB), FixColor(xA) + local nR, nG = ToColor(xR), ToColor(xG) + local nB, nA = ToColor(xB), ToColor(xA) return Color(nR, nG, nB, nA) end diff --git a/readme.md b/readme.md index abd1ee1..38e26ec 100644 --- a/readme.md +++ b/readme.md @@ -397,7 +397,7 @@ anymore to maintain cetain track packs leading in **NO SUPPORT**, which is also * [SligWolf's Suspension train](https://steamcommunity.com/sharedfiles/filedetails/?id=3297918081) [**(AUTHOR)**][ref-maintained] * [Modular City Street](https://steamcommunity.com/sharedfiles/filedetails/?id=3314861708) * [Scene Builder](https://steamcommunity.com/sharedfiles/filedetails/?id=2233731395) - * [Modular Dungeons](https://steamcommunity.com/sharedfiles/filedetails/?id=3302818415&searchtext=dungeon) + * [Modular Dungeons](https://steamcommunity.com/sharedfiles/filedetails/?id=3302818415) #### 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