add luacheck and basic integration test (#9)
Co-authored-by: BuckarooBanzay <BuckarooBanzay@users.noreply.github.com>
This commit is contained in:
parent
b002fb8127
commit
8a29455e1c
10
.github/workflows/luacheck.yml
vendored
Normal file
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@main
|
||||
- name: Luacheck
|
||||
uses: lunarmodules/luacheck@master
|
13
.github/workflows/test.yml
vendored
Normal file
13
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
name: test
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: buckaroobanzay/mtt@main
|
||||
with:
|
||||
modname: framedglass
|
20
.luacheckrc
Normal file
20
.luacheckrc
Normal file
@ -0,0 +1,20 @@
|
||||
globals = {
|
||||
"framedglass"
|
||||
}
|
||||
|
||||
read_globals = {
|
||||
-- Stdlib
|
||||
string = {fields = {"split", "trim"}},
|
||||
table = {fields = {"copy", "getn"}},
|
||||
|
||||
-- Minetest
|
||||
"minetest",
|
||||
"ItemStack",
|
||||
"dump", "dump2",
|
||||
"VoxelArea", "vector",
|
||||
|
||||
-- deps
|
||||
"default",
|
||||
"unifieddyes",
|
||||
"mtt"
|
||||
}
|
7
init.lua
7
init.lua
@ -142,7 +142,7 @@ if minetest.get_modpath("unifieddyes") then
|
||||
}
|
||||
|
||||
local old_nodes = {}
|
||||
for k, v in pairs(static_colors) do
|
||||
for k in pairs(static_colors) do
|
||||
table.insert(old_nodes, "framedglass:steel_framed_obsidian_glass" .. k)
|
||||
end
|
||||
|
||||
@ -167,3 +167,8 @@ if minetest.get_modpath("unifieddyes") then
|
||||
end
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.get_modpath("mtt") and mtt.enabled then
|
||||
-- validate nodenames
|
||||
mtt.validate_nodenames(minetest.get_modpath("framedglass") .. "/nodenames.txt")
|
||||
end
|
2
mod.conf
2
mod.conf
@ -1,2 +1,2 @@
|
||||
name = framedglass
|
||||
optional_depends = default, unifieddyes
|
||||
optional_depends = default, unifieddyes, mtt
|
5
nodenames.txt
Normal file
5
nodenames.txt
Normal file
@ -0,0 +1,5 @@
|
||||
framedglass:wooden_framed_glass
|
||||
framedglass:steel_framed_obsidian_glass
|
||||
framedglass:steel_framed_obsidian_glass_tinted
|
||||
framedglass:steel_framed_glass
|
||||
framedglass:wooden_framed_obsidian_glass
|
Loading…
x
Reference in New Issue
Block a user