Skip to content

Commit

Permalink
Fixed: Readme Modular Dungeons link extra arguments
Browse files Browse the repository at this point in the history
Renamed: `FixColor` to `ToColor` so code coloring will work
  • Loading branch information
dvdvideo1234 committed Jan 9, 2025
1 parent 5b39bb1 commit 016185d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lua/autorun/trackassembly_init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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 ------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
6 changes: 3 additions & 3 deletions lua/trackassembly/trackasmlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 016185d

Please sign in to comment.