rename liquid field to name

This commit is contained in:
auouymous 2018-08-13 04:24:01 -06:00
parent 732d306c94
commit 86d4dbb426
2 changed files with 2 additions and 2 deletions

2
API
View File

@ -49,7 +49,7 @@ node definition implements all or some of these functions:
-- want_count should be greater than zero
-- 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)
-- 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)
-- items and liquid should not be put back after taken

View File

@ -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
return ndef.node_io_take_item(pos, node, side, taker, want_item, want_count)
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]
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)