Even newer valid_sides method

This commit is contained in:
Cam B 2021-01-23 17:41:09 +00:00
parent a2f903cac2
commit 87ea208d64
9 changed files with 9 additions and 9 deletions

@ -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()

@ -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

@ -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")

@ -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")

@ -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,

@ -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)

@ -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,

@ -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")

@ -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)