From 3f0ffe0b525d5a45a2299b0d121b5f78075caaa1 Mon Sep 17 00:00:00 2001 From: Niklp <89982526+Niklp09@users.noreply.github.com> Date: Tue, 11 Jul 2023 21:16:37 +0200 Subject: [PATCH] remove broken recipes + maintenance (#5) --- .github/workflows/luacheck.yml | 10 +++ .luacheckrc | 9 +++ crafting.lua | 126 ++++++++------------------------- init.lua | 18 +++-- locale/basic_signs.de.tr | 2 +- 5 files changed, 62 insertions(+), 103 deletions(-) create mode 100644 .github/workflows/luacheck.yml create mode 100644 .luacheckrc diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 0000000..1cdff3f --- /dev/null +++ b/.github/workflows/luacheck.yml @@ -0,0 +1,10 @@ +name: luacheck +on: [push, pull_request] +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - uses: Roang-zero1/factorio-mod-luacheck@master + with: + luacheckrc_url: "" \ No newline at end of file diff --git a/.luacheckrc b/.luacheckrc new file mode 100644 index 0000000..c48a7f9 --- /dev/null +++ b/.luacheckrc @@ -0,0 +1,9 @@ +read_globals = { + "minetest", + "signs_lib", + "default" +} + +globals = { + "basic_signs" +} \ No newline at end of file diff --git a/crafting.lua b/crafting.lua index 51a3647..3aca3e6 100644 --- a/crafting.lua +++ b/crafting.lua @@ -12,172 +12,108 @@ minetest.register_craft({ minetest.register_craft( { output = "basic_signs:sign_wall_steel_green", recipe = { - { "dye:dark_green", "dye:white", "dye:dark_green" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_green 2", - recipe = { - { "dye:dark_green", "dye:white", "dye:dark_green" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:dark_green", "dye:white", "dye:dark_green"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_steel_yellow", recipe = { - { "dye:yellow", "dye:black", "dye:yellow" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_yellow 2", - recipe = { - { "dye:yellow", "dye:black", "dye:yellow" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:yellow", "dye:black", "dye:yellow"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_steel_red", recipe = { - { "dye:red", "dye:white", "dye:red" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_red 2", - recipe = { - { "dye:red", "dye:white", "dye:red" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:red", "dye:white", "dye:red"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_steel_white_red", recipe = { - { "dye:white", "dye:red", "dye:white" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_white_red 2", - recipe = { - { "dye:white", "dye:red", "dye:white" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:white", "dye:red", "dye:white"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_steel_white_black", recipe = { - { "dye:white", "dye:black", "dye:white" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_white_black 2", - recipe = { - { "dye:white", "dye:black", "dye:white" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:white", "dye:black", "dye:white"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_steel_orange", recipe = { - { "dye:orange", "dye:black", "dye:orange" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_orange 2", - recipe = { - { "dye:orange", "dye:black", "dye:orange" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:orange", "dye:black", "dye:orange"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_steel_blue", recipe = { - { "dye:blue", "dye:white", "dye:blue" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_blue 2", - recipe = { - { "dye:blue", "dye:white", "dye:blue" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:blue", "dye:white", "dye:blue"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_steel_brown", recipe = { - { "dye:brown", "dye:white", "dye:brown" }, - { "", "default:sign_wall_steel", "" } - }, -}) - -minetest.register_craft( { - output = "basic_signs:sign_wall_steel_brown 2", - recipe = { - { "dye:brown", "dye:white", "dye:brown" }, - { "steel:sheet_metal", "steel:sheet_metal", "steel:sheet_metal" } + {"dye:brown", "dye:white", "dye:brown"}, + {"", "default:sign_wall_steel", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_glass 8", recipe = { - { "default:glass", "default:glass", "default:glass" }, - { "default:glass", "default:glass", "default:glass" }, - { "", "default:glass", "" } + {"default:glass", "default:glass", "default:glass"}, + {"default:glass", "default:glass", "default:glass"}, + {"", "default:glass", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_obsidian_glass 8", recipe = { - { "default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass" }, - { "default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass" }, - { "", "default:obsidian_glass", "" } + {"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"}, + {"default:obsidian_glass", "default:obsidian_glass", "default:obsidian_glass"}, + {"", "default:obsidian_glass", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_glass 3", recipe = { - { "xpanes:pane_flat", "xpanes:pane_flat", "xpanes:pane_flat" }, - { "xpanes:pane_flat", "xpanes:pane_flat", "xpanes:pane_flat" }, - { "", "xpanes:pane_flat", "" } + {"xpanes:pane_flat", "xpanes:pane_flat", "xpanes:pane_flat"}, + {"xpanes:pane_flat", "xpanes:pane_flat", "xpanes:pane_flat"}, + {"", "xpanes:pane_flat", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_obsidian_glass 3", recipe = { - { "xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat" }, - { "xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat" }, - { "", "xpanes:obsidian_pane_flat", "" } + {"xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat"}, + {"xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat", "xpanes:obsidian_pane_flat"}, + {"", "xpanes:obsidian_pane_flat", ""} }, }) minetest.register_craft( { output = "basic_signs:sign_wall_plastic 3", recipe = { - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, - { "basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet" }, - { "", "default:steel_ingot", "" } + {"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"}, + {"basic_materials:plastic_sheet", "basic_materials:plastic_sheet", "basic_materials:plastic_sheet"}, + {"", "default:steel_ingot", ""} }, }) diff --git a/init.lua b/init.lua index a4a6cd6..6317fd6 100644 --- a/init.lua +++ b/init.lua @@ -29,7 +29,7 @@ signs_lib.register_sign("basic_signs:sign_wall_glass", { description = S("Glass Sign"), yard_mesh = "signs_lib_standard_sign_yard_two_sticks.obj", tiles = { - { name = "basic_signs_sign_wall_glass.png", backface_culling = true}, + {name = "basic_signs_sign_wall_glass.png", backface_culling = true}, "basic_signs_sign_wall_glass_edges.png", "basic_signs_pole_mount_glass.png", nil, @@ -52,7 +52,7 @@ signs_lib.register_sign("basic_signs:sign_wall_obsidian_glass", { description = S("Obsidian Glass Sign"), yard_mesh = "signs_lib_standard_sign_yard_two_sticks.obj", tiles = { - { name = "basic_signs_sign_wall_obsidian_glass.png", backface_culling = true}, + {name = "basic_signs_sign_wall_obsidian_glass.png", backface_culling = true}, "basic_signs_sign_wall_obsidian_glass_edges.png", "basic_signs_pole_mount_obsidian_glass.png", nil, @@ -111,7 +111,7 @@ local sign_colors = { local cbox = signs_lib.make_selection_boxes(35, 25, true, 0, 0, 0, true) -for i, color in ipairs(sign_colors) do +for _, color in ipairs(sign_colors) do signs_lib.register_sign("basic_signs:sign_wall_steel_"..color[1], { description = S("Sign (@1, steel)", color[2]), paramtype2 = "facedir", @@ -140,10 +140,14 @@ for i, color in ipairs(sign_colors) do use_texture_alpha = "clip", }) - minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_onpole", "basic_signs:sign_steel_"..color[1].."_onpole") - minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_onpole_horiz", "basic_signs:sign_steel_"..color[1].."_onpole_horiz") - minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_hanging", "basic_signs:sign_steel_"..color[1].."_hanging") - minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_yard", "basic_signs:sign_steel_"..color[1].."_yard") + minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_onpole", + "basic_signs:sign_steel_"..color[1].."_onpole") + minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_onpole_horiz", + "basic_signs:sign_steel_"..color[1].."_onpole_horiz") + minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_hanging", + "basic_signs:sign_steel_"..color[1].."_hanging") + minetest.register_alias("basic_signs:sign_wall_steel_"..color[1].."_yard", + "basic_signs:sign_steel_"..color[1].."_yard") table.insert(signs_lib.lbm_restore_nodes, "signs:sign_wall_"..color[1]) minetest.register_alias("signs:sign_wall_"..color[1], "basic_signs:sign_wall_steel_"..color[1]) diff --git a/locale/basic_signs.de.tr b/locale/basic_signs.de.tr index 10cdd43..c6e8a07 100644 --- a/locale/basic_signs.de.tr +++ b/locale/basic_signs.de.tr @@ -1,5 +1,5 @@ # textdomain: basic_signs -Locked Sign=gesperrter Schild +Locked Sign=Abgeschlossenes Schild Glass Sign=Glas Schild Obsidian Glass Sign=Obsidian Glas Schild Plastic Sign=Plastik Schild