rename liquid field to name
This commit is contained in:
parent
732d306c94
commit
86d4dbb426
2
API
2
API
@ -49,7 +49,7 @@ node definition implements all or some of these functions:
|
|||||||
-- want_count should be greater than zero
|
-- want_count should be greater than zero
|
||||||
-- returned itemstack shouldn't exceed max stack size, even if want_count does
|
-- returned itemstack shouldn't exceed max stack size, even if want_count does
|
||||||
node_io_take_liquid(pos, node, side, taker, want_liquid, want_millibuckets)
|
node_io_take_liquid(pos, node, side, taker, want_liquid, want_millibuckets)
|
||||||
-- returns {liquid:string, millibuckets:int} with <= want_millibuckets or nil if inventory is empty or doesn't have want_liquid
|
-- returns {name:string, millibuckets:int} with <= want_millibuckets or nil if inventory is empty or doesn't have want_liquid
|
||||||
-- want_liquid should be the name of a source liquid (in bucket.liquids of bucket mod)
|
-- want_liquid should be the name of a source liquid (in bucket.liquids of bucket mod)
|
||||||
|
|
||||||
-- items and liquid should not be put back after taken
|
-- items and liquid should not be put back after taken
|
||||||
|
2
init.lua
2
init.lua
@ -113,7 +113,7 @@ node_io.take_item = function(pos, node, side, taker, want_item, want_count) -- r
|
|||||||
if not ndef.node_io_take_item then return nil end
|
if not ndef.node_io_take_item then return nil end
|
||||||
return ndef.node_io_take_item(pos, node, side, taker, want_item, want_count)
|
return ndef.node_io_take_item(pos, node, side, taker, want_item, want_count)
|
||||||
end
|
end
|
||||||
node_io.take_liquid = function(pos, node, side, taker, want_liquid, want_count) -- returns {liquid:string, millibuckets:int} or nil
|
node_io.take_liquid = function(pos, node, side, taker, want_liquid, want_count) -- returns {name:string, millibuckets:int} or nil
|
||||||
local ndef = minetest.registered_nodes[node.name]
|
local ndef = minetest.registered_nodes[node.name]
|
||||||
if not ndef.node_io_take_liquid then return nil end
|
if not ndef.node_io_take_liquid then return nil end
|
||||||
return ndef.node_io_take_liquid(pos, node, side, taker, want_liquid, want_count)
|
return ndef.node_io_take_liquid(pos, node, side, taker, want_liquid, want_count)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user