summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFaceDeer <derksenmobile@gmail.com>2017-01-28 12:14:54 -0700
committerFaceDeer <derksenmobile@gmail.com>2017-01-28 12:14:54 -0700
commita9456774e19266ff33362f177c1019f95db23007 (patch)
tree0a1b2f833f56a50a9df1d7c8db35683d8b2994a6
parent12f4a03ef242cc51457be8fabb4bdb10915cccf2 (diff)
update hopper API to tenplus1's standard
-rw-r--r--node_storage.lua26
1 files changed, 13 insertions, 13 deletions
diff --git a/node_storage.lua b/node_storage.lua
index e933277..51575ad 100644
--- a/node_storage.lua
+++ b/node_storage.lua
@@ -261,18 +261,18 @@ minetest.register_node("digtron:combined_storage", {
})
-- Hopper compatibility
-if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_source ~= nil and hopper.add_destination ~= nil then
- hopper.add_source("hopper:hopper", "digtron:inventory", "main")
- hopper.add_source("hopper:hopper", "digtron:fuelstore", "fuel")
- hopper.add_source("hopper:hopper", "digtron:combined_storage", "main")
- hopper.add_destination("hopper:hopper", "digtron:inventory", "main")
- hopper.add_destination("hopper:hopper", "digtron:fuelstore", "fuel")
- hopper.add_destination("hopper:hopper", "digtron:combined_storage", "main")
+if minetest.get_modpath("hopper") and hopper ~= nil and hopper.add_container ~= nil then
+ hopper:add_container({
+ {"top", "digtron:inventory", "main"},
+ {"bottom", "digtron:inventory", "main"},
+ {"side", "digtron:inventory", "main"},
- hopper.add_source("hopper:hopper_side", "digtron:inventory", "main")
- hopper.add_source("hopper:hopper_side", "digtron:fuelstore", "fuel")
- hopper.add_source("hopper:hopper_side", "digtron:combined_storage", "main")
- hopper.add_destination("hopper:hopper_side", "digtron:inventory", "main")
- hopper.add_destination("hopper:hopper_side", "digtron:fuelstore", "fuel")
- hopper.add_destination("hopper:hopper_side", "digtron:combined_storage", "fuel")
+ {"top", "digtron:fuelstore", "fuel"},
+ {"bottom", "digtron:fuelstore", "fuel"},
+ {"side", "digtron:fuelstore", "fuel"},
+
+ {"top", "digtron:combined_storage", "main"},
+ {"bottom", "digtron:combined_storage", "main"},
+ {"side", "digtron:combined_storage", "fuel"},
+ })
end