mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-29 18:43:53 +01:00
Even newer valid_sides method
This commit is contained in:
parent
a2f903cac2
commit
87ea208d64
@ -76,7 +76,7 @@ tubelib.register_node("tubelib:blackhole", {}, {
|
|||||||
on_pull_item = nil, -- not needed
|
on_pull_item = nil, -- not needed
|
||||||
on_unpull_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)
|
on_push_item = function(pos, side, item)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local disappeared = meta:get_int("disappeared") + item:get_count()
|
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_push_item = nil, -- pusher has no inventory
|
||||||
on_unpull_item = nil, -- pusher has no inventory
|
on_unpull_item = nil, -- pusher has no inventory
|
||||||
is_pusher = true, -- is a pulling/pushing node
|
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)
|
on_recv_message = function(pos, topic, payload)
|
||||||
local resp = State:on_receive_message(pos, topic, payload)
|
local resp = State:on_receive_message(pos, topic, payload)
|
||||||
if resp then
|
if resp then
|
||||||
|
@ -132,7 +132,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
|
|
||||||
tubelib.register_node("tubelib_addons1:detector", {"tubelib_addons1:detector_active"}, {
|
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)
|
on_push_item = function(pos, side, item)
|
||||||
if side ~= "L" then return false end
|
if side ~= "L" then return false end
|
||||||
local player_name = minetest.get_meta(pos):get_string("player_name")
|
local player_name = minetest.get_meta(pos):get_string("player_name")
|
||||||
|
@ -139,7 +139,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
|
|
||||||
tubelib.register_node("tubelib_addons1:funnel", {}, {
|
tubelib.register_node("tubelib_addons1:funnel", {}, {
|
||||||
valid_sides = {U=false},
|
invalid_sides = {"U"},
|
||||||
on_pull_item = function(pos, side)
|
on_pull_item = function(pos, side)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
return tubelib.get_item(meta, "main")
|
return tubelib.get_item(meta, "main")
|
||||||
|
@ -281,7 +281,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
tubelib.register_node("tubelib_addons1:liquidsampler",
|
tubelib.register_node("tubelib_addons1:liquidsampler",
|
||||||
{"tubelib_addons1:liquidsampler_active", "tubelib_addons1:liquidsampler_defect"}, {
|
{"tubelib_addons1:liquidsampler_active", "tubelib_addons1:liquidsampler_defect"}, {
|
||||||
valid_sides = {L=false},
|
invalid_sides = {"L"},
|
||||||
on_pull_item = function(pos, side)
|
on_pull_item = function(pos, side)
|
||||||
return tubelib.get_item(M(pos), "dst")
|
return tubelib.get_item(M(pos), "dst")
|
||||||
end,
|
end,
|
||||||
|
@ -237,7 +237,7 @@ tubelib.register_node("tubelib_addons1:pusher_fast",
|
|||||||
on_push_item = nil, -- pusher has no inventory
|
on_push_item = nil, -- pusher has no inventory
|
||||||
on_unpull_item = nil, -- pusher has no inventory
|
on_unpull_item = nil, -- pusher has no inventory
|
||||||
is_pusher = true, -- is a pulling/pushing node
|
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)
|
on_recv_message = function(pos, topic, payload)
|
||||||
local resp = State:on_receive_message(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.register_node("tubelib_addons1:quarry",
|
||||||
{"tubelib_addons1:quarry_active", "tubelib_addons1:quarry_defect"}, {
|
{"tubelib_addons1:quarry_active", "tubelib_addons1:quarry_defect"}, {
|
||||||
valid_sides = {L=false},
|
invalid_sides = {"L"},
|
||||||
on_pull_item = function(pos, side)
|
on_pull_item = function(pos, side)
|
||||||
return tubelib.get_item(M(pos), "main")
|
return tubelib.get_item(M(pos), "main")
|
||||||
end,
|
end,
|
||||||
|
@ -141,7 +141,7 @@ minetest.register_craft({
|
|||||||
|
|
||||||
|
|
||||||
tubelib.register_node("tubelib_addons3:funnel", {}, {
|
tubelib.register_node("tubelib_addons3:funnel", {}, {
|
||||||
valid_sides = {U=false},
|
invalid_sides = {"U"},
|
||||||
on_pull_stack = function(pos, side)
|
on_pull_stack = function(pos, side)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
return tubelib.get_stack(meta, "main")
|
return tubelib.get_stack(meta, "main")
|
||||||
|
@ -219,7 +219,7 @@ minetest.register_craft({
|
|||||||
tubelib.register_node("tubelib_addons3:pusher",
|
tubelib.register_node("tubelib_addons3:pusher",
|
||||||
{"tubelib_addons3:pusher_active", "tubelib_addons3:pusher_defect"}, {
|
{"tubelib_addons3:pusher_active", "tubelib_addons3:pusher_defect"}, {
|
||||||
is_pusher = true, -- is a pulling/pushing node
|
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)
|
on_recv_message = function(pos, topic, payload)
|
||||||
local resp = State:on_receive_message(pos, topic, payload)
|
local resp = State:on_receive_message(pos, topic, payload)
|
||||||
|
Loading…
Reference in New Issue
Block a user