From 11ceefa358d2e9e056631d536a429a3a624f224a Mon Sep 17 00:00:00 2001 From: FaceDeer Date: Fri, 13 Jan 2017 01:17:05 -0700 Subject: add compatibility with the hopper mod, via the API I just added over in a fork of the hopper mod. Hopefully this API will be merged. --- node_storage.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'node_storage.lua') diff --git a/node_storage.lua b/node_storage.lua index 3362258..86a3eff 100644 --- a/node_storage.lua +++ b/node_storage.lua @@ -230,5 +230,21 @@ minetest.register_node("digtron:combined_storage", after_place_node = (function() if minetest.get_modpath("pipeworks") then return pipeworks.after_place end end)(), after_dig_node = (function() if minetest.get_modpath("pipeworks") then return pipeworks.after_dig end end)() - }) + +-- 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") + + 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") +end -- cgit v1.2.3