mirror of
https://github.com/minetest-mods/hopper.git
synced 2024-12-22 13:22:28 +01:00
changed a few descriptions
This commit is contained in:
parent
35d34ae5d6
commit
3b653f6da1
9
api.txt
9
api.txt
@ -14,8 +14,9 @@ Make sure any mods using this function has 'hopper' in the depends.txt file.
|
||||
hopper:add_container({ {"where_from", "node_name", "inventory_name"} })
|
||||
|
||||
'where_from' is a string telling the api that items are coming from either
|
||||
the 'top' node into a hopper, going into the 'bottom' node from a
|
||||
hopper or coming from a 'side' hopper into a container.
|
||||
the 'top' node into a hopper below, going into the 'bottom' node
|
||||
from the hopper above or coming from a 'side' hopper into the
|
||||
node next door.
|
||||
|
||||
'node_name" is the name of the container itself (e.g. "default:chest")
|
||||
|
||||
@ -24,8 +25,8 @@ hopper:add_container({ {"where_from", "node_name", "inventory_name"} })
|
||||
e.g.
|
||||
|
||||
hopper:add_container({
|
||||
{"top", "default:furnace", "dst"}, -- take cooked items from above into hopper
|
||||
{"bottom", "default:furnace", "src"}, -- insert items below to be cooked from hopper
|
||||
{"top", "default:furnace", "dst"}, -- take cooked items from above into hopper below
|
||||
{"bottom", "default:furnace", "src"}, -- insert items below to be cooked from hopper above
|
||||
{"side", "default:furnace", "fuel"}, -- replenish furnace fuel from hopper at side
|
||||
})
|
||||
|
||||
|
6
init.lua
6
init.lua
@ -3,7 +3,7 @@
|
||||
hopper = {}
|
||||
|
||||
|
||||
-- default containers ( from position [into hopper], from node, into node inventory )
|
||||
-- default containers
|
||||
local containers = {
|
||||
|
||||
{"top", "hopper:hopper", "main"},
|
||||
@ -395,7 +395,7 @@ minetest.register_abm({
|
||||
nod = containers[n][2]
|
||||
inv = containers[n][3]
|
||||
|
||||
-- hopper on top into container below
|
||||
-- from top node into hopper below
|
||||
if where == "top" and top == nod
|
||||
and (node.name == "hopper:hopper" or node.name == "hopper:hopper_side") then
|
||||
--print ("-- top")
|
||||
@ -404,7 +404,7 @@ minetest.register_abm({
|
||||
{x = pos.x, y = pos.y + 1, z = pos.z}):start(0.5)
|
||||
return
|
||||
|
||||
-- container on top into hopper below
|
||||
-- from top hopper into node below
|
||||
elseif where == "bottom" and out == nod
|
||||
and node.name == "hopper:hopper" then
|
||||
--print ("-- bot")
|
||||
|
Loading…
Reference in New Issue
Block a user