Add files via upload
31
README.md
@ -1,8 +1,33 @@
|
||||
BBQ v1.0 by Grizzly Adam
|
||||
BBQ v1.01 by Grizzly Adam
|
||||
|
||||
https://forum.minetest.net/viewtopic.php?f=9&t=19324
|
||||
|
||||
https://github.com/Grizzly-Adam/BBQ-MINETEST-
|
||||
https://github.com/Grizzly-Adam/BBQ
|
||||
|
||||
New In This Version
|
||||
-------------------
|
||||
Bug Fix: All Colours of Sheep Now Drop Mutton
|
||||
|
||||
Added support for Farming Redo
|
||||
|
||||
New Items:
|
||||
Wood Pile (can store trees, wood slabs, and sticks)
|
||||
Smoker Blue Print (wall hanging)
|
||||
Yeast (Can be found when harvesting grass and jungle grass)
|
||||
Bacon Cheeseburger
|
||||
|
||||
|
||||
Updated Textures:
|
||||
Raw Mutton
|
||||
Cooked Mutton
|
||||
Raw Leg of Lamb
|
||||
Cooked Leg of Lamb
|
||||
Sugar
|
||||
Brine
|
||||
Hotdog
|
||||
Hamburger
|
||||
|
||||
|
||||
|
||||
Goals
|
||||
-----
|
||||
@ -28,7 +53,7 @@ Exceptions:
|
||||
|
||||
* Tomato image taken from Rubenwardy's Food Mod
|
||||
* Beef designs taken from Daniel_Smith, some were further modified
|
||||
* Other meats, hotdog, sugar and Beef Map images were found through internet searches and modified, some more severely than others.
|
||||
* All other textures created by Grizzly Adam
|
||||
|
||||
Have I missed out credit? Please tell me.
|
||||
|
||||
|
24
cooking.lua
@ -21,6 +21,16 @@ minetest.register_craft( {
|
||||
}
|
||||
})
|
||||
|
||||
--Smoker Blueprint Recipe
|
||||
minetest.register_craft( {
|
||||
output = "bbq:smoker_blueprint",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "dye:blue", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
})
|
||||
|
||||
--Leg of Lamb Craft Recipe
|
||||
minetest.register_craft( {
|
||||
output = "bbq:rack_lamb_raw",
|
||||
@ -67,7 +77,7 @@ minetest.register_craft( {
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"", "", ""},
|
||||
{"bbq:bbq_sauce", "bbq:beef_raw", "bbq:pepper_ground"}
|
||||
{"bbq:bbq_sauce", "bbq:beef_raw", "group:pepper_ground"}
|
||||
}
|
||||
})
|
||||
|
||||
@ -77,7 +87,17 @@ minetest.register_craft( {
|
||||
recipe = {
|
||||
{"", "", ""},
|
||||
{"", "", ""},
|
||||
{"bbq:hot_sauce", "mobs:chicken_raw", "bbq:pepper_ground"}
|
||||
{"bbq:hot_sauce", "mobs:chicken_raw", "group:pepper_ground"}
|
||||
}
|
||||
})
|
||||
|
||||
--Bacon Cheeseburger Craft Recipe
|
||||
minetest.register_craft( {
|
||||
output = "bbq:bacon_cheeseburger",
|
||||
recipe = {
|
||||
{"", "farming:bread", ""},
|
||||
{"bbq:bacon", "bbq:beef", "group:cheese"},
|
||||
{"", "farming:bread", ""}
|
||||
}
|
||||
})
|
||||
|
||||
|
41
crafts.lua
@ -82,6 +82,13 @@ minetest.register_craftitem("bbq:hot_wings", {
|
||||
on_use = minetest.item_eat(9),
|
||||
})
|
||||
|
||||
-- Bacon Cheeseburger
|
||||
minetest.register_craftitem("bbq:bacon_cheeseburger", {
|
||||
description = ("Bacon Cheeseburger"),
|
||||
inventory_image = "bbq_bacon_cheeseburger.png",
|
||||
on_use = minetest.item_eat(9),
|
||||
})
|
||||
|
||||
-- Hamburger
|
||||
minetest.register_craftitem("bbq:hamburger", {
|
||||
description = ("Hamburger"),
|
||||
@ -281,6 +288,40 @@ minetest.register_node("bbq:beef_map", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_node("bbq:smoker_blueprint", {
|
||||
description = "Beef Map",
|
||||
inventory_image = "bbq_smoker_blueprint.png",
|
||||
tiles = {
|
||||
"default_pine_wood.png", "default_pine_wood.png",
|
||||
"default_pine_wood.png", "default_pine_wood.png",
|
||||
"default_pine_wood.png", "bbq_smoker_blueprint.png",
|
||||
},
|
||||
|
||||
paramtype2 = "facedir",
|
||||
paramtype = "light",
|
||||
drawtype = "nodebox",
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = {
|
||||
{-0.5, -0.5, 0.4, 0.5, 0.5, 0.5},
|
||||
|
||||
},
|
||||
},
|
||||
groups = {choppy=3, oddly_breakable_by_hand=2, flammable=3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
-- Yeast
|
||||
minetest.register_node("bbq:yeast", {
|
||||
description = ("Yeast"),
|
||||
inventory_image = "bbq_yeast.png",
|
||||
wield_image = "bbq_yeast.png",
|
||||
drawtype = "plantlike",
|
||||
tiles = {"bbq_yeast.png"},
|
||||
groups = {vessel = 1, dig_immediate = 3, attached_node = 1},
|
||||
sounds = default.node_sound_glass_defaults(),
|
||||
})
|
||||
|
||||
-------------------
|
||||
--Animal Drop Meats
|
||||
-------------------
|
||||
|
@ -3,9 +3,9 @@ A BBQ add-on for Minetest.
|
||||
Depends on (and expands upon) Mobs-Redo and it's animals add-ons.
|
||||
Causes cows to drop beef and lambs to drop button.
|
||||
|
||||
Play's nice with Crops and Food addons. Can use tomatos, cheese, sugar, and honey from Crops, Food, and Mobs-Redo add-ons. Also compatible with my expansion of the Crops add-on (adds peppers, peppercorns, and ground pepper to the Crops add-on, all are present in this addon but without the actual pepper plant).
|
||||
Play's nice with Crops, Food, and Farming Redo addons. Can use tomatos, chili peppers, cheese, sugar, and honey from Crops, Food, Farming Redo, and Mobs-Redo add-ons. Also compatible with my expansion of the Crops add-on (adds peppers, peppercorns, and ground pepper to the Crops add-on, all are present in this addon but without the actual pepper plant).
|
||||
|
||||
Upgrades the BTUs of wood and wood planks in a realistic way when used in furnaces (including the smoker).
|
||||
Upgrades the BTUs of wood and wood planks in a realistic way when used in furnaces (including the smoker). Allows trees, slabs, and sticks to be stored in woodpile.
|
||||
|
||||
All spices and sauces can be placed on the vessels shelf. Also added support for placing the bucket in the vessels shelf.
|
||||
|
||||
@ -13,11 +13,14 @@ Adds the following items:
|
||||
|
||||
Smoker
|
||||
Beef Map (Wall Hanging)
|
||||
Smoker Blueprint (Wall Hanging)
|
||||
Wood Pile
|
||||
|
||||
Peppercorn
|
||||
Ground Pepper
|
||||
Sea Salt
|
||||
Sugar
|
||||
Yeast (Can be found when harvesting grass and jungle grass)
|
||||
|
||||
Bell Pepper
|
||||
Tomato
|
||||
@ -36,6 +39,7 @@ BBQ Chicken (Raw & Cooked)
|
||||
BBQ Beef Ribs (Raw & Cooked)
|
||||
Hot Wings (Raw & Cooked)
|
||||
Hamburger
|
||||
Bacon Cheeseburger
|
||||
Hot Dog
|
||||
Beef Jerky (Raw & Cooked)
|
||||
Pepper Steak (Raw & Cooked)
|
||||
|
1
init.lua
@ -2,3 +2,4 @@ dofile(minetest.get_modpath("bbq").."/cooking.lua")
|
||||
dofile(minetest.get_modpath("bbq").."/crafts.lua")
|
||||
dofile(minetest.get_modpath("bbq").."/smoker.lua")
|
||||
dofile(minetest.get_modpath("bbq").."/overrides.lua")
|
||||
dofile(minetest.get_modpath("bbq").."/woodpile.lua")
|
||||
|
234
overrides.lua
@ -7,14 +7,40 @@ if minetest.registered_items["food:tomato"] ~= nil then
|
||||
minetest.override_item("food:tomato", {
|
||||
groups = {tomato=1},
|
||||
})
|
||||
end
|
||||
|
||||
|
||||
if minetest.registered_items["food:cheese"] ~= nil then
|
||||
minetest.override_item("food:cheese", {
|
||||
groups = {cheese=1},
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_items["food:sugar"] ~= nil then
|
||||
minetest.override_item("food:sugar", {
|
||||
groups = {sugar=1},
|
||||
})
|
||||
end
|
||||
|
||||
---------------------------------------------------------
|
||||
|
||||
-----CHECK FOR FARMING REDO ADDON-------------------------------
|
||||
if minetest.registered_items["farming:chili_pepper"] ~= nil then
|
||||
minetest.override_item("farming:chili_pepper", {
|
||||
groups = {pepper=1},
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_items["farming:sugar"] ~= nil then
|
||||
minetest.override_item("farming:sugar", {
|
||||
groups = {sugar=1},
|
||||
})
|
||||
end
|
||||
|
||||
if minetest.registered_items["farming:tomato"] ~= nil then
|
||||
minetest.override_item("farming:tomato", {
|
||||
groups = {tomato=1},
|
||||
})
|
||||
|
||||
end
|
||||
---------------------------------------------------------
|
||||
@ -27,45 +53,133 @@ minetest.override_item("mobs:cheese", {
|
||||
groups = {cheese=1},
|
||||
})
|
||||
|
||||
|
||||
|
||||
---------
|
||||
--Aliases
|
||||
---------
|
||||
minetest.register_alias("crops:tomato", "bbq:tomato")
|
||||
minetest.register_alias("food:tomato", "bbq:tomato")
|
||||
|
||||
|
||||
minetest.register_alias("mobs:cheese", "bbq:cheese")
|
||||
minetest.register_alias("food:cheese", "bbq:cheese")
|
||||
|
||||
minetest.register_alias("crops:pepper", "bbq:pepper")
|
||||
|
||||
|
||||
minetest.register_alias("crops:peppercorn", "bbq:peppercorn")
|
||||
|
||||
minetest.register_alias("crops:pepper_ground", "bbq:pepper_ground")
|
||||
|
||||
minetest.register_alias("crops:pepper", "bbq:pepper")
|
||||
|
||||
minetest.register_alias("food:sugar", "bbq:sugar")
|
||||
|
||||
|
||||
---------------------------------
|
||||
--UPGRADE MEAT DROPS IN MOBS REDO
|
||||
---------------------------------
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_black"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_blue"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_brown"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_cyan"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_dark_green"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_dark_grey"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_green"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_grey"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_magenta"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_orange"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_pink"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_red"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_violet"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_white"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:sheep_yellow"]
|
||||
assert(def, "mobs:sheep not found")
|
||||
def.drops = {
|
||||
{name = "bbq:mutton_raw", chance = 1, min = 1, max = 2 },
|
||||
}
|
||||
|
||||
|
||||
|
||||
local def = minetest.registered_entities["mobs_animal:cow"]
|
||||
assert(def, "mobs:cow not found")
|
||||
def.drops = {
|
||||
{name = "bbq:beef_raw", chance = 1, min = 1, max = 3},
|
||||
{name = "mobs:leather", chance = 1, min = 1, max = 2},
|
||||
}
|
||||
|
||||
-------------------------------
|
||||
--MAKE YEAST NATURALLY OCCURING
|
||||
-------------------------------
|
||||
|
||||
for i = 1, 5 do
|
||||
minetest.override_item("default:grass_"..i, {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'farming:seed_wheat'},rarity = 5},
|
||||
{items = {'bbq:yeast'},rarity = 8},
|
||||
{items = {'default:grass_1'}},
|
||||
}
|
||||
}})
|
||||
end
|
||||
|
||||
minetest.override_item("default:junglegrass", {drop = {
|
||||
max_items = 1,
|
||||
items = {
|
||||
{items = {'farming:seed_cotton'},rarity = 8},
|
||||
{items = {'bbq:yeast'},rarity = 8},
|
||||
{items = {'default:junglegrass'}},
|
||||
}
|
||||
}})
|
||||
|
||||
-----------------------------------------------
|
||||
--MAKE VESSEL TYPE ITEMS WORK WITH VESSEL SHELF
|
||||
-----------------------------------------------
|
||||
@ -147,3 +261,75 @@ minetest.register_craft({
|
||||
recipe = "stairs:slab_aspen_wood",
|
||||
burntime = 7,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "default:stick",
|
||||
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, flammable = 2},
|
||||
})
|
||||
|
BIN
textures/bbq_bacon_cheeseburger.png
Normal file
After Width: | Height: | Size: 737 B |
Before Width: | Height: | Size: 398 B After Width: | Height: | Size: 367 B |
Before Width: | Height: | Size: 835 B After Width: | Height: | Size: 835 B |
Before Width: | Height: | Size: 775 B After Width: | Height: | Size: 794 B |
Before Width: | Height: | Size: 740 B After Width: | Height: | Size: 763 B |
Before Width: | Height: | Size: 864 B After Width: | Height: | Size: 697 B |
Before Width: | Height: | Size: 543 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 399 B |
Before Width: | Height: | Size: 1006 B After Width: | Height: | Size: 3.1 KiB |
Before Width: | Height: | Size: 994 B After Width: | Height: | Size: 3.1 KiB |
BIN
textures/bbq_smoker_blueprint.png
Normal file
After Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 237 B After Width: | Height: | Size: 572 B |
BIN
textures/bbq_wood_pile_front.png
Normal file
After Width: | Height: | Size: 5.6 KiB |
BIN
textures/bbq_wood_pile_side.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
BIN
textures/bbq_wood_pile_slot.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
textures/bbq_wood_pile_top.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
textures/bbq_yeast.png
Normal file
After Width: | Height: | Size: 1.6 KiB |
94
woodpile.lua
Normal file
@ -0,0 +1,94 @@
|
||||
-- Minetest 0.4 mod: bbq
|
||||
-- See README.txt for licensing and other information.
|
||||
|
||||
local bbq_wood_pile_formspec =
|
||||
"size[8,7;]" ..
|
||||
default.gui_bg ..
|
||||
default.gui_bg_img ..
|
||||
default.gui_slots ..
|
||||
"list[context;bbq;0,0.3;8,2;]" ..
|
||||
"list[current_player;main;0,2.85;8,1;]" ..
|
||||
"list[current_player;main;0,4.08;8,3;8]" ..
|
||||
"listring[context;bbq]" ..
|
||||
"listring[current_player;main]" ..
|
||||
default.get_hotbar_bg(0, 2.85)
|
||||
|
||||
local function get_bbq_wood_pile_formspec(inv)
|
||||
local formspec = bbq_wood_pile_formspec
|
||||
local invlist = inv and inv:get_list("bbq")
|
||||
-- Inventory slots overlay
|
||||
local vx, vy = 0, 0.3
|
||||
for i = 1, 16 do
|
||||
if i == 9 then
|
||||
vx = 0
|
||||
vy = vy + 1
|
||||
end
|
||||
if not invlist or invlist[i]:is_empty() then
|
||||
formspec = formspec ..
|
||||
"image[" .. vx .. "," .. vy .. ";1,1;bbq_wood_pile_slot.png]"
|
||||
end
|
||||
vx = vx + 1
|
||||
end
|
||||
return formspec
|
||||
end
|
||||
|
||||
minetest.register_node("bbq:wood_pile", {
|
||||
description = "Wood Pile",
|
||||
tiles = {"bbq_wood_pile_top.png", "bbq_wood_pile_top.png", "bbq_wood_pile_side.png",
|
||||
"bbq_wood_pile_side.png", "bbq_wood_pile_front.png", "bbq_wood_pile_front.png"},
|
||||
paramtype2 = "facedir",
|
||||
is_ground_content = false,
|
||||
groups = {choppy = 3, oddly_breakable_by_hand = 2, flammable = 3},
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
|
||||
on_construct = function(pos)
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", get_bbq_wood_pile_formspec(nil))
|
||||
local inv = meta:get_inventory()
|
||||
inv:set_size("bbq", 8 * 2)
|
||||
end,
|
||||
can_dig = function(pos,player)
|
||||
local inv = minetest.get_meta(pos):get_inventory()
|
||||
return inv:is_empty("bbq")
|
||||
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)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff in bbq wood_pile at ".. minetest.pos_to_string(pos))
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", get_bbq_wood_pile_formspec(meta:get_inventory()))
|
||||
end,
|
||||
on_metadata_inventory_put = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" moves stuff to bbq wood_pile at ".. minetest.pos_to_string(pos))
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", get_bbq_wood_pile_formspec(meta:get_inventory()))
|
||||
end,
|
||||
on_metadata_inventory_take = function(pos, listname, index, stack, player)
|
||||
minetest.log("action", player:get_player_name() ..
|
||||
" takes stuff from bbq wood_pile at ".. minetest.pos_to_string(pos))
|
||||
local meta = minetest.get_meta(pos)
|
||||
meta:set_string("formspec", get_bbq_wood_pile_formspec(meta:get_inventory()))
|
||||
end,
|
||||
on_blast = function(pos)
|
||||
local drops = {}
|
||||
default.get_inventory_drops(pos, "bbq", drops)
|
||||
drops[#drops + 1] = "bbq:wood_pile"
|
||||
minetest.remove_node(pos)
|
||||
return drops
|
||||
end,
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "bbq:wood_pile",
|
||||
recipe = {
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
{"group:wood", "group:wood", "group:wood"},
|
||||
}
|
||||
})
|