-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12 from Byte-Labs-Project/rewriting-mods
Rewrited
- Loading branch information
Showing
35 changed files
with
1,909 additions
and
3,630 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"Lua.diagnostics.disable": [ | ||
"unbalanced-assignments" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
local categories = require 'data.categories' | ||
local colors = require 'data.colors' | ||
local colorFunctions = colors.functions | ||
|
||
local table_deepcopy = lib.table.deepclone | ||
|
||
local filteredCategories = {} | ||
local namedCategories = {} | ||
local colorTypes = {} | ||
|
||
for paint in pairs(colorFunctions) do | ||
colorTypes[#colorTypes+1] = paint | ||
end | ||
|
||
for _, v in ipairs(categories) do | ||
local mod = v.id | ||
if v.selector and v.selector.onOpen then | ||
v.selector.onOpen(v) | ||
end | ||
namedCategories[mod] = v | ||
end | ||
|
||
for _, v in ipairs(table_deepcopy(categories)) do | ||
v.selector = nil | ||
filteredCategories[_] = v | ||
end | ||
|
||
return { | ||
filtered = filteredCategories, | ||
named = namedCategories, | ||
colorTypes = colorTypes | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.