Woodpile accepts all items
This commit is contained in:
parent
9c244a4d57
commit
978dd6b14f
106
overrides.lua
106
overrides.lua
@ -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},
|
|
||||||
})
|
|
||||||
|
35
woodpile.lua
35
woodpile.lua
@ -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))
|
||||||
|
Loading…
Reference in New Issue
Block a user