Skip to content

Commit

Permalink
add lucheck+github action and fix up warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
wsor4035 committed Dec 3, 2023
1 parent cf3440e commit d8e0752
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 17 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/luacheck.yml
Original file line number Diff line number Diff line change
@@ -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
25 changes: 25 additions & 0 deletions .luacheckrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
unused_args = false
allow_defined_top = true

exclude_files = {".luacheckrc"}

globals = {
"minetest", "core",

--mod provided
"columnia",
}

read_globals = {
string = {fields = {"split"}},
table = {fields = {"copy", "getn"}},

--luac
"math", "table",

-- Builtin
"vector", "ItemStack", "dump", "DIR_DELIM", "VoxelArea", "Settings", "PcgRandom", "VoxelManip", "PseudoRandom",

--mod produced
"default", "stairsplus",
}
42 changes: 25 additions & 17 deletions init.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
-- Minetest 0.4 mod: columnia by Glunggi(former Stairs Copyright by(C) 2011-2012 Kahrl <[email protected]> Copyright (C) 2011-2012 celeron55, Perttu Ahola)
-- See README.txt for licensing and other information.

--[[
Minetest mod:
* columnia by Glunggi
* (former Stairs Copyright by(C) 2011-2012 Kahrl <[email protected]>
* Copyright (C) 2011-2012 celeron55, Perttu Ahola)
* improvements: wsor4035, verymilan,
See README.txt for licensing and other information.
]]
columnia = {}

-- The Blueprint
Expand All @@ -18,8 +23,8 @@ minetest.register_craft({
}
})

-- Bracket
minetest.register_node("columnia:bracket", {
-- Bracket
minetest.register_node("columnia:bracket", {
description = 'Bracket (Column)',
tiles = {"columnia_rusty.png",},
drawtype = "nodebox",
Expand All @@ -40,7 +45,7 @@ minetest.register_node("columnia:bracket", {
groups = {choppy=2, oddly_breakable_by_hand=2,},
sounds = default.node_sound_stone_defaults(),
})

minetest.register_craft({
output = 'columnia:bracket 4',
recipe = {
Expand Down Expand Up @@ -70,7 +75,7 @@ minetest.register_node("columnia:lamp_ceiling", {
type = "fixed",
fixed = {
{-0.1875, 0.4375, -0.1875, 0.1875, 0.5, 0.1875},
{-0.125, 0.375, -0.125, 0.125, 0.4375, 0.125},
{-0.125, 0.375, -0.125, 0.125, 0.4375, 0.125},
},
},
sounds = default.node_sound_glass_defaults(),
Expand Down Expand Up @@ -189,7 +194,7 @@ function columnia.register_column_top(subname, recipeitem, groups, images, descr
type = "fixed",
fixed = {
{-0.25, -0.5, -0.25, 0.25, 0.5, 0.25},
{-0.5, 0.25, -0.5, 0.5, 0.5, 0.5},
{-0.5, 0.25, -0.5, 0.5, 0.5, 0.5},
{-0.375, 0, -0.375, 0.375, 0.5, 0.375},
},
},
Expand Down Expand Up @@ -515,7 +520,10 @@ end


-- Nodes will be called columnia:{column}_<subname>
function columnia.register_column_ia(subname, recipeitem, groups, images, desc_column_mid, desc_column_top, desc_column_bottom, desc_column_crosslink, desc_column_link, desc_column_linkdown, sounds)
function columnia.register_column_ia(
subname, recipeitem, groups, images, desc_column_mid, desc_column_top, desc_column_bottom,
desc_column_crosslink, desc_column_link, desc_column_linkdown, sounds
)
columnia.register_column_mid(subname, recipeitem, groups, images, desc_column_mid, sounds)
columnia.register_column_top(subname, recipeitem, groups, images, desc_column_top, sounds)
columnia.register_column_bottom(subname, recipeitem, groups, images, desc_column_bottom, sounds)
Expand Down Expand Up @@ -547,7 +555,7 @@ columnia.register_column_ia("stone", "default:stone",
"Stone Column Linkdown",
default.node_sound_stone_defaults()
)

columnia.register_column_ia("stonebrick", "default:stonebrick",
{cracky=3},
{"default_stone_brick.png"},
Expand All @@ -570,7 +578,7 @@ columnia.register_column_ia("desert_stonebrick", "default:desert_stonebrick",
"Desert Stone Brick Column Link",
"Desert Stone Brick Column Linkdown",
default.node_sound_stone_defaults()
)
)

columnia.register_column_ia("desert_stone", "default:desert_stone",
{cracky=3},
Expand All @@ -582,8 +590,8 @@ columnia.register_column_ia("desert_stone", "default:desert_stone",
"Desert Stone Column Link",
"Desert Stone Column Linkdown",
default.node_sound_stone_defaults()
)
)

columnia.register_column_ia("cobble", "default:cobble",
{cracky=3},
{"default_cobble.png"},
Expand All @@ -606,8 +614,8 @@ columnia.register_column_ia("brick", "default:brick",
"Brick Column Link",
"Brick Column Linkdown",
default.node_sound_stone_defaults()
)
)

columnia.register_column_ia("sandstone", "default:sandstone",
{crumbly=2,cracky=2},
{"default_sandstone.png"},
Expand All @@ -619,7 +627,7 @@ columnia.register_column_ia("sandstone", "default:sandstone",
"Sandstone Column Linkdown",
default.node_sound_stone_defaults()
)

columnia.register_column_ia("sandstonebrick", "default:sandstonebrick",
{crumbly=2,cracky=2},
{"default_sandstone_brick.png"},
Expand All @@ -631,7 +639,7 @@ columnia.register_column_ia("sandstonebrick", "default:sandstonebrick",
"Sandstone Brick Column Linkdown",
default.node_sound_stone_defaults()
)

columnia.register_column_ia("wood", "default:wood",
{snappy=2,choppy=2,oddly_breakable_by_hand=2,flammable=3},
{"default_wood.png"},
Expand Down

0 comments on commit d8e0752

Please sign in to comment.