mirror of
https://git.minetest.land/MineClone2/MineClone2.git
synced 2024-11-28 05:43:43 +01:00
Update to comply with coding guidelines
This commit is contained in:
parent
bdcd89e1bf
commit
e02d1c0e27
@ -475,7 +475,7 @@ minetest.register_node("mcl_books:bookshelf", {
|
|||||||
_mcl_hoppers_on_try_push = function(pos, hop_pos, hop_inv, hop_list)
|
_mcl_hoppers_on_try_push = function(pos, hop_pos, hop_inv, hop_list)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local inv = meta:get_inventory()
|
local inv = meta:get_inventory()
|
||||||
local filter = function(stack)
|
local function filter(stack)
|
||||||
return minetest.get_item_group(stack:get_name(), "book") == 1 or
|
return minetest.get_item_group(stack:get_name(), "book") == 1 or
|
||||||
stack:get_name() == "mcl_enchanting:book_enchanted"
|
stack:get_name() == "mcl_enchanting:book_enchanted"
|
||||||
end
|
end
|
||||||
|
@ -382,7 +382,7 @@ local function hoppers_on_try_push(pos, hop_pos, hop_inv, hop_list)
|
|||||||
|
|
||||||
if math.abs(pos.y - hop_pos.y) > math.abs(pos.x - hop_pos.x) and math.abs(pos.y - hop_pos.y) > math.abs(pos.z - hop_pos.z)
|
if math.abs(pos.y - hop_pos.y) > math.abs(pos.x - hop_pos.x) and math.abs(pos.y - hop_pos.y) > math.abs(pos.z - hop_pos.z)
|
||||||
then
|
then
|
||||||
local filter = function(stack)
|
local function filter(stack)
|
||||||
return minetest.get_item_group(stack:get_name(), "brewitem") == 1 and
|
return minetest.get_item_group(stack:get_name(), "brewitem") == 1 and
|
||||||
minetest.get_item_group(stack:get_name(), "bottle") == 0
|
minetest.get_item_group(stack:get_name(), "bottle") == 0
|
||||||
end
|
end
|
||||||
@ -396,7 +396,7 @@ local function hoppers_on_try_push(pos, hop_pos, hop_inv, hop_list)
|
|||||||
if stack then
|
if stack then
|
||||||
return inv, "fuel", stack
|
return inv, "fuel", stack
|
||||||
else
|
else
|
||||||
local filter = function(stack)
|
local function filter(stack)
|
||||||
return minetest.get_item_group(stack:get_name(), "bottle") == 1
|
return minetest.get_item_group(stack:get_name(), "bottle") == 1
|
||||||
end
|
end
|
||||||
return inv, "stand", mcl_util.select_stack(hop_inv, hop_list, inv, "stand", filter, 1)
|
return inv, "stand", mcl_util.select_stack(hop_inv, hop_list, inv, "stand", filter, 1)
|
||||||
|
Loading…
Reference in New Issue
Block a user