From 87ea208d64e4a3db32d89d6986713ff4256d339d Mon Sep 17 00:00:00 2001 From: Cam B Date: Sat, 23 Jan 2021 17:41:09 +0000 Subject: [PATCH] Even newer valid_sides method --- tubelib/blackhole.lua | 2 +- tubelib/pusher.lua | 2 +- tubelib_addons1/detector.lua | 2 +- tubelib_addons1/funnel.lua | 2 +- tubelib_addons1/liquidsampler.lua | 2 +- tubelib_addons1/pusher_fast.lua | 2 +- tubelib_addons1/quarry.lua | 2 +- tubelib_addons3/funnel.lua | 2 +- tubelib_addons3/pusher.lua | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tubelib/blackhole.lua b/tubelib/blackhole.lua index cf00c9b..70966f7 100644 --- a/tubelib/blackhole.lua +++ b/tubelib/blackhole.lua @@ -76,7 +76,7 @@ tubelib.register_node("tubelib:blackhole", {}, { on_pull_item = nil, -- not needed on_unpull_item = nil, -- not needed - valid_sides = {R=false, L=true, B=false, F=false, D=false, U=false}, + valid_sides = {"L"}, on_push_item = function(pos, side, item) local meta = minetest.get_meta(pos) local disappeared = meta:get_int("disappeared") + item:get_count() diff --git a/tubelib/pusher.lua b/tubelib/pusher.lua index aac0f75..c39f287 100644 --- a/tubelib/pusher.lua +++ b/tubelib/pusher.lua @@ -238,7 +238,7 @@ tubelib.register_node("tubelib:pusher", on_push_item = nil, -- pusher has no inventory on_unpull_item = nil, -- pusher has no inventory is_pusher = true, -- is a pulling/pushing node - valid_sides = {R=true, L=true, B=false, F=false, D=false, U=false}, + valid_sides = {"R","L"}, on_recv_message = function(pos, topic, payload) local resp = State:on_receive_message(pos, topic, payload) if resp then diff --git a/tubelib_addons1/detector.lua b/tubelib_addons1/detector.lua index 9d6cc36..2bcce35 100644 --- a/tubelib_addons1/detector.lua +++ b/tubelib_addons1/detector.lua @@ -132,7 +132,7 @@ minetest.register_craft({ tubelib.register_node("tubelib_addons1:detector", {"tubelib_addons1:detector_active"}, { - valid_sides = {R=true, L=true, B=false, F=false, D=false, U=false}, + valid_sides = {"R","L"}, on_push_item = function(pos, side, item) if side ~= "L" then return false end local player_name = minetest.get_meta(pos):get_string("player_name") diff --git a/tubelib_addons1/funnel.lua b/tubelib_addons1/funnel.lua index 6d9d1bc..4d17bab 100644 --- a/tubelib_addons1/funnel.lua +++ b/tubelib_addons1/funnel.lua @@ -139,7 +139,7 @@ minetest.register_craft({ tubelib.register_node("tubelib_addons1:funnel", {}, { - valid_sides = {U=false}, + invalid_sides = {"U"}, on_pull_item = function(pos, side) local meta = minetest.get_meta(pos) return tubelib.get_item(meta, "main") diff --git a/tubelib_addons1/liquidsampler.lua b/tubelib_addons1/liquidsampler.lua index 8839b55..133d33f 100644 --- a/tubelib_addons1/liquidsampler.lua +++ b/tubelib_addons1/liquidsampler.lua @@ -281,7 +281,7 @@ minetest.register_craft({ tubelib.register_node("tubelib_addons1:liquidsampler", {"tubelib_addons1:liquidsampler_active", "tubelib_addons1:liquidsampler_defect"}, { - valid_sides = {L=false}, + invalid_sides = {"L"}, on_pull_item = function(pos, side) return tubelib.get_item(M(pos), "dst") end, diff --git a/tubelib_addons1/pusher_fast.lua b/tubelib_addons1/pusher_fast.lua index 89bf73c..bfcf2bb 100644 --- a/tubelib_addons1/pusher_fast.lua +++ b/tubelib_addons1/pusher_fast.lua @@ -237,7 +237,7 @@ tubelib.register_node("tubelib_addons1:pusher_fast", on_push_item = nil, -- pusher has no inventory on_unpull_item = nil, -- pusher has no inventory is_pusher = true, -- is a pulling/pushing node - valid_sides = {R=true, L=true, B=false, F=false, D=false, U=false}, + valid_sides = {"R","L"}, on_recv_message = function(pos, topic, payload) local resp = State:on_receive_message(pos, topic, payload) diff --git a/tubelib_addons1/quarry.lua b/tubelib_addons1/quarry.lua index 5129546..ca1d381 100644 --- a/tubelib_addons1/quarry.lua +++ b/tubelib_addons1/quarry.lua @@ -448,7 +448,7 @@ minetest.register_craft({ tubelib.register_node("tubelib_addons1:quarry", {"tubelib_addons1:quarry_active", "tubelib_addons1:quarry_defect"}, { - valid_sides = {L=false}, + invalid_sides = {"L"}, on_pull_item = function(pos, side) return tubelib.get_item(M(pos), "main") end, diff --git a/tubelib_addons3/funnel.lua b/tubelib_addons3/funnel.lua index 20cc9a4..1eeba23 100644 --- a/tubelib_addons3/funnel.lua +++ b/tubelib_addons3/funnel.lua @@ -141,7 +141,7 @@ minetest.register_craft({ tubelib.register_node("tubelib_addons3:funnel", {}, { - valid_sides = {U=false}, + invalid_sides = {"U"}, on_pull_stack = function(pos, side) local meta = minetest.get_meta(pos) return tubelib.get_stack(meta, "main") diff --git a/tubelib_addons3/pusher.lua b/tubelib_addons3/pusher.lua index cf4fc49..f6e2fbc 100644 --- a/tubelib_addons3/pusher.lua +++ b/tubelib_addons3/pusher.lua @@ -219,7 +219,7 @@ minetest.register_craft({ tubelib.register_node("tubelib_addons3:pusher", {"tubelib_addons3:pusher_active", "tubelib_addons3:pusher_defect"}, { is_pusher = true, -- is a pulling/pushing node - valid_sides = {R=true, L=true, B=false, F=false, D=false, U=false}, + valid_sides = {"R","L"}, on_recv_message = function(pos, topic, payload) local resp = State:on_receive_message(pos, topic, payload)