Woodpile accepts all items

This commit is contained in:
Grizzly Adam 2018-03-15 18:51:14 -05:00 committed by GitHub
parent 9c244a4d57
commit 978dd6b14f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 136 deletions

View File

@ -179,109 +179,3 @@ minetest.register_craft({
recipe = "default:stick", recipe = "default:stick",
burntime = 2, burntime = 2,
}) })
--------------------------------------------------
--ADD WOOD SLABWOOD, TREES AND STICKS TO WOOD PILE
--------------------------------------------------
minetest.override_item("default:wood", {
groups = {wood_pile=1, wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:aspen_wood", {
groups = {wood_pile=1, wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:junglewood", {
groups = {wood_pile=1, wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:acacia_wood", {
groups = {wood_pile=1, wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:pine_wood", {
groups = {wood_pile=1, wood = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_wood", {
groups = {wood_pile=1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_aspen_wood", {
groups = {wood_pile=1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_junglewood", {
groups = {wood_pile=1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_acacia_wood", {
groups = {wood_pile=1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_pine_wood", {
groups = {wood_pile=1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:tree", {
groups = {wood_pile=1, tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:aspen_tree", {
groups = {wood_pile=1, tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:jungletree", {
groups = {wood_pile=1, tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:acacia_tree", {
groups = {wood_pile=1, tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:pine_tree", {
groups = {wood_pile=1, tree = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("default:stick", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_aspen_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_junglewood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_acacia_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:slab_pine_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:stair_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:stair_aspen_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:stair_junglewood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:stair_acacia_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})
minetest.override_item("stairs:stair_pine_wood", {
groups = {wood_pile=1, stick = 1, choppy = 2, oddly_breakable_by_hand = 1, flammable = 2},
})

View File

@ -52,12 +52,7 @@ minetest.register_node("bbq:woodpile", {
local inv = minetest.get_meta(pos):get_inventory() local inv = minetest.get_meta(pos):get_inventory()
return inv:is_empty("bbq") return inv:is_empty("bbq")
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if minetest.get_item_group(stack:get_name(), "wood_pile") ~= 0 then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name() .. minetest.log("action", player:get_player_name() ..
" moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos))
@ -105,12 +100,7 @@ minetest.register_node("bbq:woodpile_acacia", {
local inv = minetest.get_meta(pos):get_inventory() local inv = minetest.get_meta(pos):get_inventory()
return inv:is_empty("bbq") return inv:is_empty("bbq")
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if minetest.get_item_group(stack:get_name(), "wood_pile") ~= 0 then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name() .. minetest.log("action", player:get_player_name() ..
" moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos))
@ -158,12 +148,7 @@ minetest.register_node("bbq:woodpile_pine", {
local inv = minetest.get_meta(pos):get_inventory() local inv = minetest.get_meta(pos):get_inventory()
return inv:is_empty("bbq") return inv:is_empty("bbq")
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if minetest.get_item_group(stack:get_name(), "wood_pile") ~= 0 then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name() .. minetest.log("action", player:get_player_name() ..
" moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos))
@ -211,12 +196,7 @@ minetest.register_node("bbq:woodpile_junglewood", {
local inv = minetest.get_meta(pos):get_inventory() local inv = minetest.get_meta(pos):get_inventory()
return inv:is_empty("bbq") return inv:is_empty("bbq")
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if minetest.get_item_group(stack:get_name(), "wood_pile") ~= 0 then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name() .. minetest.log("action", player:get_player_name() ..
" moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos))
@ -264,12 +244,7 @@ minetest.register_node("bbq:woodpile_aspen", {
local inv = minetest.get_meta(pos):get_inventory() local inv = minetest.get_meta(pos):get_inventory()
return inv:is_empty("bbq") return inv:is_empty("bbq")
end, end,
allow_metadata_inventory_put = function(pos, listname, index, stack, player)
if minetest.get_item_group(stack:get_name(), "wood_pile") ~= 0 then
return stack:get_count()
end
return 0
end,
on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player) on_metadata_inventory_move = function(pos, from_list, from_index, to_list, to_index, count, player)
minetest.log("action", player:get_player_name() .. minetest.log("action", player:get_player_name() ..
" moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos)) " moves stuff in bbq woodpile at ".. minetest.pos_to_string(pos))