Fixed: Readme Modular Dungeons link extra arguments

Renamed: `FixColor` to `ToColor` so code coloring will work
This commit is contained in:
dvdvideo1234 2025-01-09 22:13:26 +02:00
parent 5b39bb1910
commit 016185dce1
4 changed files with 6 additions and 6 deletions

View File

@ -87,7 +87,7 @@ local asmlib = trackasmlib; if(not asmlib) then -- Module present
------------ CONFIGURE ASMLIB ------------ ------------ CONFIGURE ASMLIB ------------
asmlib.InitBase("track","assembly") asmlib.InitBase("track","assembly")
asmlib.SetOpVar("TOOL_VERSION","9.771") asmlib.SetOpVar("TOOL_VERSION","9.772")
------------ CONFIGURE GLOBAL INIT OPVARS ------------ ------------ CONFIGURE GLOBAL INIT OPVARS ------------

View File

@ -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 enFlag) then return nil end
if(not asmlib.IsPlayer(oPly)) then return nil end if(not asmlib.IsPlayer(oPly)) then return nil end
if(oEnt and not oEnt:IsValid()) 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 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 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() if(not nMs and oEnt and oEnt:IsValid()) then local oPhy = oEnt:GetPhysicsObject()

View File

@ -819,14 +819,14 @@ end
------------- COLOR --------------- ------------- COLOR ---------------
function FixColor(nC) function ToColor(nC)
local tC = GetOpVar("COLOR_CLAMP") local tC = GetOpVar("COLOR_CLAMP")
return mathFloor(mathClamp((tonumber(nC) or 0), tC[1], tC[2])) return mathFloor(mathClamp((tonumber(nC) or 0), tC[1], tC[2]))
end end
function GetColor(xR, xG, xB, xA) function GetColor(xR, xG, xB, xA)
local nR, nG = FixColor(xR), FixColor(xG) local nR, nG = ToColor(xR), ToColor(xG)
local nB, nA = FixColor(xB), FixColor(xA) local nB, nA = ToColor(xB), ToColor(xA)
return Color(nR, nG, nB, nA) return Color(nR, nG, nB, nA)
end end

View File

@ -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] * [SligWolf's Suspension train](https://steamcommunity.com/sharedfiles/filedetails/?id=3297918081) [**(AUTHOR)**][ref-maintained]
* [Modular City Street](https://steamcommunity.com/sharedfiles/filedetails/?id=3314861708) * [Modular City Street](https://steamcommunity.com/sharedfiles/filedetails/?id=3314861708)
* [Scene Builder](https://steamcommunity.com/sharedfiles/filedetails/?id=2233731395) * [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? #### 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 Dude seriously, make them yourself, what's the point of playing Gmod then ... xD