Use mod.conf and add luacheck (#10)

This commit is contained in:
Niklp 2023-10-01 11:11:01 +02:00 committed by GitHub
parent f341d63b01
commit 1011023d6c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 30 additions and 27 deletions

10
.github/workflows/luacheck.yml vendored Normal file

@ -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

9
.luacheckrc Normal file

@ -0,0 +1,9 @@
read_globals = {
"minetest",
"unifieddyes",
"default"
}
globals = {
"unifiedbricks"
}

@ -1,4 +0,0 @@
default
bucket
unifieddyes
vessels

@ -1 +0,0 @@
This mod allows the user to re-color default bricks using Unified Dyes, and provides some pattern variations as well.

@ -16,7 +16,7 @@ minetest.register_alias("unifieddyes:lightgrey","unifieddyes:lightgrey_paint")
minetest.register_alias("unifieddyes:grey","unifieddyes:grey_paint") minetest.register_alias("unifieddyes:grey","unifieddyes:grey_paint")
minetest.register_alias("unifieddyes:darkgrey","unifieddyes:darkgrey_paint") minetest.register_alias("unifieddyes:darkgrey","unifieddyes:darkgrey_paint")
HUES = { local HUES = {
"red", "red",
"orange", "orange",
"yellow", "yellow",
@ -35,25 +35,18 @@ HUES = {
"lightgrey", "lightgrey",
"white" "white"
} }
TYPES = { local SATURATION = {
"clayblock_",
"clay_",
"brick_",
"brickblock_",
"multicolor_"
}
SATURATION = {
"_s50", "_s50",
"" ""
} }
DARKNESS = { local DARKNESS = {
"dark_", "dark_",
"medium_", "medium_",
"", "",
"light_" "light_"
} }
--formal versions --formal versions
FORMALHUES = { local FORMALHUES = {
"Red", "Red",
"Orange", "Orange",
"Yellow", "Yellow",
@ -72,18 +65,11 @@ FORMALHUES = {
"Light grey", "Light grey",
"White" "White"
} }
FORMALTYPES = { local FORMALSATURATION = {
" clay",
" clay lump",
" brick",
" bricks",
" multicolor bricks"
}
FORMALSATURATION = {
" (low saturation)", " (low saturation)",
"" ""
} }
FORMALDARKNESS = { local FORMALDARKNESS = {
"Dark ", "Dark ",
"Medium ", "Medium ",
"Bright ", "Bright ",
@ -301,8 +287,8 @@ table.insert(unifiedbricks.old_static_list, "unifiedbricks:multicolor_lightgrey"
for i = 1,17 do for i = 1,17 do
for j = 1,4 do for j = 1,4 do
if i > 12 then if i > 12 then
formalname = FORMALHUES[i] local formalname = FORMALHUES[i]
name = HUES[i] local name = HUES[i]
if j == 1 then if j == 1 then
unifiedbricks.register_old_static_block(name, formalname, "clayblock") unifiedbricks.register_old_static_block(name, formalname, "clayblock")
elseif j == 4 then elseif j == 4 then
@ -310,6 +296,7 @@ for i = 1,17 do
end end
else else
for k = 1,4 do for k = 1,4 do
local formalname, name
if k == 4 then if k == 4 then
formalname = FORMALDARKNESS[k] .. FORMALHUES[i] formalname = FORMALDARKNESS[k] .. FORMALHUES[i]
name = DARKNESS[k] .. HUES[i] name = DARKNESS[k] .. HUES[i]

@ -1 +1,3 @@
name = unifiedbricks 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