summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-09 20:33:03 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2017-04-09 20:33:03 -0400
commit7af18188490f514e7768ca0aae7454134f85140f (patch)
tree1e864d4e18428cb5f2dc8fd7e4840c3ad31acddf
parentc4ea0a8dd17ee1cbe678c3be811724d9e59747ba (diff)
downloaddreambuilder_modpack-7af18188490f514e7768ca0aae7454134f85140f.tar
dreambuilder_modpack-7af18188490f514e7768ca0aae7454134f85140f.tar.gz
dreambuilder_modpack-7af18188490f514e7768ca0aae7454134f85140f.tar.bz2
dreambuilder_modpack-7af18188490f514e7768ca0aae7454134f85140f.tar.xz
dreambuilder_modpack-7af18188490f514e7768ca0aae7454134f85140f.zip
update pipeworks and technic
-rw-r--r--pipeworks/compat.lua16
-rw-r--r--technic/machines/MV/tool_workshop.lua3
-rw-r--r--technic/machines/other/injector.lua5
-rw-r--r--technic/machines/register/battery_box.lua5
-rw-r--r--technic/machines/register/generator.lua3
-rw-r--r--technic/machines/register/machine_base.lua3
-rw-r--r--technic_chests/common.lua3
7 files changed, 24 insertions, 14 deletions
diff --git a/pipeworks/compat.lua b/pipeworks/compat.lua
index 9c956e6..c0e5e8c 100644
--- a/pipeworks/compat.lua
+++ b/pipeworks/compat.lua
@@ -26,12 +26,13 @@ minetest.override_item("default:furnace", {
end
end,
can_insert = function(pos,node,stack,direction)
+ local onestack = stack:peek_item(1)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
if direction.y == 1 then
- return inv:room_for_item("fuel", stack)
+ return inv:room_for_item("fuel", onestack)
else
- return inv:room_for_item("src", stack)
+ return inv:room_for_item("src", onestack)
end
end,
input_inventory = "dst",
@@ -77,10 +78,11 @@ minetest.override_item("default:furnace_active", {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
+ local onestack = stack:peek_item(1)
if direction.y == 1 then
- return inv:room_for_item("fuel", stack)
+ return inv:room_for_item("fuel", onestack)
else
- return inv:room_for_item("src", stack)
+ return inv:room_for_item("src", onestack)
end
end,
input_inventory = "dst",
@@ -109,7 +111,8 @@ minetest.override_item("default:chest", {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- return inv:room_for_item("main", stack)
+ local onestack = stack:peek_item(1)
+ return inv:room_for_item("main", onestack)
end,
input_inventory = "main",
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
@@ -137,7 +140,8 @@ minetest.override_item("default:chest_locked", {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- return inv:room_for_item("main", stack)
+ local onestack = stack:peek_item(1)
+ return inv:room_for_item("main", onestack)
end,
connect_sides = {left = 1, right = 1, back = 1, front = 1, bottom = 1, top = 1}
},
diff --git a/technic/machines/MV/tool_workshop.lua b/technic/machines/MV/tool_workshop.lua
index 4076cc1..9219717 100644
--- a/technic/machines/MV/tool_workshop.lua
+++ b/technic/machines/MV/tool_workshop.lua
@@ -103,7 +103,8 @@ minetest.register_node("technic:tool_workshop", {
allow_metadata_inventory_take = technic.machine_inventory_take,
tube = {
can_insert = function (pos, node, stack, direction)
- return minetest.get_meta(pos):get_inventory():room_for_item("src", stack)
+ local onestack = stack:peek_item(1)
+ return minetest.get_meta(pos):get_inventory():room_for_item("src", onestack)
end,
insert_object = function (pos, node, stack, direction)
return minetest.get_meta(pos):get_inventory():add_item("src", stack)
diff --git a/technic/machines/other/injector.lua b/technic/machines/other/injector.lua
index 7dc5d0c..f803a25 100644
--- a/technic/machines/other/injector.lua
+++ b/technic/machines/other/injector.lua
@@ -69,10 +69,11 @@ minetest.register_node("technic:injector", {
groups = {snappy=2, choppy=2, oddly_breakable_by_hand=2, tubedevice=1, tubedevice_receiver=1},
tube = {
can_insert = function(pos, node, stack, direction)
- return minetest.get_meta(pos):get_inventory():room_for_item("main",stack)
+ local onestack = stack:peek_item(1)
+ return minetest.get_meta(pos):get_inventory():room_for_item("main", onestack)
end,
insert_object = function(pos, node, stack, direction)
- return minetest.get_meta(pos):get_inventory():add_item("main",stack)
+ return minetest.get_meta(pos):get_inventory():add_item("main", stack)
end,
connect_sides = {left=1, right=1, front=1, back=1, top=1, bottom=1},
},
diff --git a/technic/machines/register/battery_box.lua b/technic/machines/register/battery_box.lua
index 83bedf2..2a45b13 100644
--- a/technic/machines/register/battery_box.lua
+++ b/technic/machines/register/battery_box.lua
@@ -50,10 +50,11 @@ local tube = {
end
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
+ local onestack = stack:peek_item(1)
if direction.y > 0 then
- return inv:room_for_item("src", stack)
+ return inv:room_for_item("src", onestack)
else
- return inv:room_for_item("dst", stack)
+ return inv:room_for_item("dst", onestack)
end
end,
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
diff --git a/technic/machines/register/generator.lua b/technic/machines/register/generator.lua
index 2cdc336..f3ada1f 100644
--- a/technic/machines/register/generator.lua
+++ b/technic/machines/register/generator.lua
@@ -9,7 +9,8 @@ local tube = {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- return inv:room_for_item("src", stack)
+ local onestack = stack:peek_item(1)
+ return inv:room_for_item("src", onestack)
end,
connect_sides = {left=1, right=1, back=1, top=1, bottom=1},
}
diff --git a/technic/machines/register/machine_base.lua b/technic/machines/register/machine_base.lua
index 8cf851b..d479773 100644
--- a/technic/machines/register/machine_base.lua
+++ b/technic/machines/register/machine_base.lua
@@ -10,7 +10,8 @@ local tube = {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- return inv:room_for_item("src", stack)
+ local onestack = stack:peek_item(1)
+ return inv:room_for_item("src", onestack)
end,
connect_sides = {left = 1, right = 1, back = 1, top = 1, bottom = 1},
}
diff --git a/technic_chests/common.lua b/technic_chests/common.lua
index 32b34eb..1241c5e 100644
--- a/technic_chests/common.lua
+++ b/technic_chests/common.lua
@@ -13,7 +13,8 @@ technic.chests.tube = {
can_insert = function(pos, node, stack, direction)
local meta = minetest.get_meta(pos)
local inv = meta:get_inventory()
- return inv:room_for_item("main",stack)
+ local onestack = stack:peek_item(1)
+ return inv:room_for_item("main", onestack)
end,
input_inventory = "main",
connect_sides = {left=1, right=1, front=1, back=1, top=1, bottom=1},