From e082ea473b2c9a50a6ab3c1cf70ca8f39f50ad5b Mon Sep 17 00:00:00 2001 From: OgelGames Date: Sun, 28 Nov 2021 14:40:40 +1100 Subject: [PATCH 1/8] fix missing argument when calling `on_rightclick` --- devices.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/devices.lua b/devices.lua index 49875c8..6e6b6e4 100644 --- a/devices.lua +++ b/devices.lua @@ -28,7 +28,9 @@ function pipeworks.rotate_on_place(itemstack, placer, pointed_thing) if (not placer:get_player_control().sneak) and minetest.registered_nodes[node.name] and minetest.registered_nodes[node.name].on_rightclick then - minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, node, placer, itemstack) + minetest.registered_nodes[node.name].on_rightclick(pointed_thing.under, + node, placer, itemstack, pointed_thing) + else local pitch = placer:get_look_pitch() From 8f067db7cd69fc05cc6e72fdd53b82de98f169ed Mon Sep 17 00:00:00 2001 From: OgelGames Date: Sun, 28 Nov 2021 16:13:11 +1100 Subject: [PATCH 2/8] github luacheck workflow --- .github/workflows/luacheck.yml | 13 +++++++++++++ .gitlab-ci.yml | 8 -------- 2 files changed, 13 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/luacheck.yml delete mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/luacheck.yml b/.github/workflows/luacheck.yml new file mode 100644 index 0000000..a13efa9 --- /dev/null +++ b/.github/workflows/luacheck.yml @@ -0,0 +1,13 @@ +name: luacheck +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: apt + run: sudo apt-get install -y luarocks + - name: luacheck install + run: luarocks install --local luacheck + - name: luacheck run + run: $HOME/.luarocks/bin/luacheck ./ diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml deleted file mode 100644 index ff51e7e..0000000 --- a/.gitlab-ci.yml +++ /dev/null @@ -1,8 +0,0 @@ -stages: - - test - -luacheck: - stage: test - image: pipelinecomponents/luacheck:latest - script: - - luacheck . From 23fe215721a816d49652f4523c9ff6458b010b4b Mon Sep 17 00:00:00 2001 From: sfence Date: Mon, 29 Nov 2021 17:01:16 +0100 Subject: [PATCH 3/8] Fix furnace block fuel (#2) * Fix blocking of fuel inventory by fuel replacement and losing of fuel replacements. --- compat-furnaces.lua | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/compat-furnaces.lua b/compat-furnaces.lua index 1894056..797ecfd 100644 --- a/compat-furnaces.lua +++ b/compat-furnaces.lua @@ -189,8 +189,25 @@ local function furnace_node_timer(pos, elapsed) fuel_totaltime = 0 src_time = 0 else - -- Take fuel from fuel list - inv:set_stack("fuel", 1, afterfuel.items[1]) + -- prevent blocking of fuel inventory (for automatization mods) + local is_fuel = minetest.get_craft_result({method = "fuel", width = 1, items = {afterfuel.items[1]:to_string()}}) + if is_fuel.time == 0 then + table.insert(fuel.replacements, afterfuel.items[1]) + inv:set_stack("fuel", 1, "") + else + -- Take fuel from fuel list + inv:set_stack("fuel", 1, afterfuel.items[1]) + end + -- Put replacements in dst list or drop them on the furnace. + local replacements = fuel.replacements + if replacements[1] then + local leftover = inv:add_item("dst", replacements[1]) + if not leftover:is_empty() then + local above = vector.new(pos.x, pos.y + 1, pos.z) + local drop_pos = minetest.find_node_near(above, 1, {"air"}) or above + minetest.item_drop(replacements[1], nil, drop_pos) + end + end update = true fuel_totaltime = fuel.time + (fuel_time - fuel_totaltime) src_time = src_time + elapsed From a70115ab8dce5b0930dc4aef0a486f22d0ac40de Mon Sep 17 00:00:00 2001 From: wsor4035 <24964441+wsor4035@users.noreply.github.com> Date: Mon, 13 Dec 2021 20:20:47 -0500 Subject: [PATCH 4/8] update wiki link --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 8b74b76..4af070d 100644 --- a/README +++ b/README @@ -1,7 +1,7 @@ This mod uses nodeboxes to supply a complete set of 3D pipes and tubes, along devices that work with them. -See https://gitlab.com/VanessaE/pipeworks/wikis/ for detailed information about usage of this mod. +See https://github.com/mt-mods/pipeworks/wiki/ for detailed information about usage of this mod. Unlike the previous version of this mod, these pipes are rounded, and when placed, they'll automatically join together as needed. Pipes can go vertically From 7d3a61e595eee35dcedeea685744185deca5cbbb Mon Sep 17 00:00:00 2001 From: zichen <34205903+IFRFSX@users.noreply.github.com> Date: Sun, 26 Dec 2021 14:12:15 +0800 Subject: [PATCH 5/8] Fix toggling of autocrafter when `digilines` is not installed (#5) Co-authored-by: SX <50966843+S-S-X@users.noreply.github.com> --- autocrafter.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/autocrafter.lua b/autocrafter.lua index 8e3e779..2404188 100644 --- a/autocrafter.lua +++ b/autocrafter.lua @@ -277,8 +277,7 @@ minetest.register_node("pipeworks:autocrafter", { update_meta(meta, false) end, on_receive_fields = function(pos, formname, fields, sender) - if not fields.channel or (fields.quit and not fields.key_enter_field) - or not pipeworks.may_configure(pos, sender) then + if (fields.quit and not fields.key_enter_field) or not pipeworks.may_configure(pos, sender) then return end local meta = minetest.get_meta(pos) From 794cae675e3e065077239e0e14391067a8c48ae6 Mon Sep 17 00:00:00 2001 From: SX <50966843+S-S-X@users.noreply.github.com> Date: Sun, 2 Jan 2022 16:14:14 +0200 Subject: [PATCH 6/8] Expose set_tube on public API (#6) * Expose set_tube on public API * Added update_meta to public tptube API --- teleport_tube.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/teleport_tube.lua b/teleport_tube.lua index e812b70..c59f740 100644 --- a/teleport_tube.lua +++ b/teleport_tube.lua @@ -287,5 +287,7 @@ pipeworks.tptube = { hash = hash, save_tube_db = save_tube_db, get_db = function() return tp_tube_db or read_tube_db() end, + set_tube = set_tube, + update_meta = update_meta, tp_tube_db_version = tp_tube_db_version } From 06fd75421607c97c861cc4e9034b73e5f82af91f Mon Sep 17 00:00:00 2001 From: OgelGames Date: Fri, 7 Jan 2022 13:42:08 +1100 Subject: [PATCH 7/8] fix `pipeworks_enable_items_per_tube_limit` setting fixes #7 --- item_transport.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/item_transport.lua b/item_transport.lua index e1ee192..76fe538 100644 --- a/item_transport.lua +++ b/item_transport.lua @@ -1,5 +1,5 @@ local luaentity = pipeworks.luaentity -local enable_max_limit = minetest.settings:get("pipeworks_enable_items_per_tube_limit") +local enable_max_limit = minetest.settings:get_bool("pipeworks_enable_items_per_tube_limit") local max_tube_limit = tonumber(minetest.settings:get("pipeworks_max_items_per_tube")) or 30 if enable_max_limit == nil then enable_max_limit = true end From 5618003be30951233ea575cca56789f6d32385f5 Mon Sep 17 00:00:00 2001 From: OgelGames Date: Mon, 7 Feb 2022 15:53:29 +1100 Subject: [PATCH 8/8] fix remaining `use_texture_alpha` warnings extension of d2954c52, using the same compatibility check for now, though it would be good to bump the minimum minetest version to 5.4 at some point fixes #11 --- devices.lua | 5 +++++ routing_tubes.lua | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/devices.lua b/devices.lua index 6e6b6e4..0acbc76 100644 --- a/devices.lua +++ b/devices.lua @@ -1,6 +1,8 @@ local S = minetest.get_translator("pipeworks") local new_flow_logic_register = pipeworks.flowables.register +local texture_alpha_mode = minetest.features.use_texture_alpha_string_modes + local polys = "" if pipeworks.enable_lowpoly then polys = "_lowpoly" end @@ -142,6 +144,7 @@ for s in ipairs(states) do drawtype = "mesh", mesh = "pipeworks_pump"..polys..".obj", tiles = { "pipeworks_pump_"..states[s]..".png" }, + use_texture_alpha = texture_alpha_mode and "clip" or true, paramtype = "light", paramtype2 = "facedir", groups = dgroups, @@ -286,6 +289,7 @@ minetest.register_node("pipeworks:grating", { "pipeworks_grating_sides.png", "pipeworks_grating_sides.png" }, + use_texture_alpha = texture_alpha_mode and "clip" or true, drawtype = "nodebox", node_box = { type = "fixed", @@ -357,6 +361,7 @@ minetest.register_node(nodename_spigot_loaded, { }, { name = "pipeworks_spigot.png" } }, + use_texture_alpha = texture_alpha_mode and "blend" or true, sunlight_propagates = true, paramtype = "light", paramtype2 = "facedir", diff --git a/routing_tubes.lua b/routing_tubes.lua index e7bc596..a99d1c3 100644 --- a/routing_tubes.lua +++ b/routing_tubes.lua @@ -163,11 +163,15 @@ if pipeworks.enable_crossing_tube then }) end +local texture_alpha_mode = minetest.features.use_texture_alpha_string_modes + and "clip" or true + if pipeworks.enable_one_way_tube then minetest.register_node("pipeworks:one_way_tube", { description = S("One way tube"), tiles = {"pipeworks_one_way_tube_top.png", "pipeworks_one_way_tube_top.png", "pipeworks_one_way_tube_output.png", "pipeworks_one_way_tube_input.png", "pipeworks_one_way_tube_side.png", "pipeworks_one_way_tube_top.png"}, + use_texture_alpha = texture_alpha_mode, paramtype2 = "facedir", drawtype = "nodebox", paramtype = "light",