diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 0000000..b501650 --- /dev/null +++ b/.github/workflows/luacheck.yml @@ -0,0 +1,10 @@ +name: luacheck +on: [push, pull_request] +jobs: + luacheck: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + - name: Luacheck + uses: lunarmodules/luacheck@master \ No newline at end of file diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..1036838 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,9 @@ +read_globals = { + "minetest", + "unifieddyes", + "default" +} + +globals = { + "unifiedbricks" +} \ No newline at end of file diff --git a/depends.txt b/depends.txt deleted file mode 100644 index 7274ef6..0000000 --- a/depends.txt +++ /dev/null @@ -1,4 +0,0 @@ -default -bucket -unifieddyes -vessels diff --git a/description.txt b/description.txt deleted file mode 100644 index e6c198a..0000000 --- a/description.txt +++ /dev/null @@ -1 +0,0 @@ -This mod allows the user to re-color default bricks using Unified Dyes, and provides some pattern variations as well. diff --git a/init.lua b/init.lua index cf8b7ff..55c3af1 100644 --- a/init.lua +++ b/init.lua @@ -16,7 +16,7 @@ minetest.register_alias("unifieddyes:lightgrey","unifieddyes:lightgrey_paint") minetest.register_alias("unifieddyes:grey","unifieddyes:grey_paint") minetest.register_alias("unifieddyes:darkgrey","unifieddyes:darkgrey_paint") -HUES = { +local HUES = { "red", "orange", "yellow", @@ -35,25 +35,18 @@ HUES = { "lightgrey", "white" } -TYPES = { - "clayblock_", - "clay_", - "brick_", - "brickblock_", - "multicolor_" -} -SATURATION = { +local SATURATION = { "_s50", "" } -DARKNESS = { +local DARKNESS = { "dark_", "medium_", "", "light_" } --formal versions -FORMALHUES = { +local FORMALHUES = { "Red", "Orange", "Yellow", @@ -72,18 +65,11 @@ FORMALHUES = { "Light grey", "White" } -FORMALTYPES = { - " clay", - " clay lump", - " brick", - " bricks", - " multicolor bricks" -} -FORMALSATURATION = { +local FORMALSATURATION = { " (low saturation)", "" } -FORMALDARKNESS = { +local FORMALDARKNESS = { "Dark ", "Medium ", "Bright ", @@ -301,8 +287,8 @@ table.insert(unifiedbricks.old_static_list, "unifiedbricks:multicolor_lightgrey" for i = 1,17 do for j = 1,4 do if i > 12 then - formalname = FORMALHUES[i] - name = HUES[i] + local formalname = FORMALHUES[i] + local name = HUES[i] if j == 1 then unifiedbricks.register_old_static_block(name, formalname, "clayblock") elseif j == 4 then @@ -310,6 +296,7 @@ for i = 1,17 do end else for k = 1,4 do + local formalname, name if k == 4 then formalname = FORMALDARKNESS[k] .. FORMALHUES[i] name = DARKNESS[k] .. HUES[i] diff --git a/mod.conf b/mod.conf index 266e0dc..a52de5a 100644 --- a/mod.conf +++ b/mod.conf @@ -1 +1,3 @@ name = unifiedbricks +description = This mod allows the user to re-color default bricks using Unified Dyes, and provides some pattern variations as well. +depends = default, bucket, unifieddyes, vessels