203 lines
4.4 KiB
Lua
203 lines
4.4 KiB
Lua
---------
|
|
--ALIASES
|
|
---------
|
|
minetest.register_alias("bbq:mutton_raw", "mobs:mutton_raw")
|
|
minetest.register_alias("bbq:mutton", "mobs:mutton_cooked")
|
|
minetest.register_alias("bbq:wood_pile", "bbq:woodpile_aspen")
|
|
|
|
--------------------------
|
|
--COMPATIBILITY WITH CROPS
|
|
--------------------------
|
|
|
|
if minetest.registered_items["crops:tomato"] ~= nil then
|
|
minetest.override_item("crops:tomato", {
|
|
groups = {food_tomato=1},
|
|
})
|
|
end
|
|
|
|
if minetest.registered_items["crops:pepper"] ~= nil then
|
|
minetest.override_item("crops:pepper", {
|
|
groups = {food_pepper=1},
|
|
})
|
|
end
|
|
|
|
if minetest.registered_items["crops:peppercorn"] ~= nil then
|
|
minetest.override_item("crops:peppercorn", {
|
|
groups = {food_peppercorn=1},
|
|
})
|
|
end
|
|
|
|
if minetest.registered_items["crops:corn_cob"] ~= nil then
|
|
minetest.override_item("crops:corn_cob", {
|
|
groups = {food_corn=1},
|
|
})
|
|
end
|
|
|
|
if minetest.registered_items["crops:potato"] ~= nil then
|
|
minetest.override_item("crops:potato", {
|
|
groups = {food_potato=1},
|
|
})
|
|
end
|
|
|
|
|
|
--------------------xdecor-----------------------------
|
|
|
|
if minetest.registered_items["xdecor:honey"] ~= nil then
|
|
minetest.override_item("xdecor:honey", {
|
|
groups = {food_sugar=1, food_honey=1},
|
|
})
|
|
end
|
|
|
|
---------------------------------
|
|
--UPGRADE MEAT DROPS IN MOBS REDO
|
|
---------------------------------
|
|
if minetest.registered_items["mobs_animal:cow"] ~= nil then
|
|
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},
|
|
}
|
|
end
|
|
|
|
-------------------------------
|
|
--MAKE YEAST NATURALLY OCCURING
|
|
-------------------------------
|
|
|
|
local function append_drops(itemstring, items)
|
|
local def = minetest.registered_items[itemstring]
|
|
local newdrop
|
|
if type(def.drop) == "table" then
|
|
newdrop = {max_items = def.drop.max_items, items = {}}
|
|
local olditems = def.drop.items
|
|
local savedpos = nil
|
|
for i, it in ipairs(olditems) do
|
|
if it.rarity == nil then
|
|
savedpos = i
|
|
break
|
|
end
|
|
table.insert(newdrop.items, it)
|
|
end
|
|
for _, it in ipairs(items) do
|
|
table.insert(newdrop.items, it)
|
|
end
|
|
if savedpos ~= nil then
|
|
for i = savedpos, #olditems do
|
|
table.insert(newdrop.items, olditems[i])
|
|
end
|
|
end
|
|
else
|
|
newdrop = {max_items = 1, items = table.copy(items)}
|
|
if type(def.drop) == "string" then
|
|
table.insert(newdrop.items, {items = {def.drop}})
|
|
end
|
|
end
|
|
minetest.override_item(itemstring, {drop = newdrop})
|
|
end
|
|
|
|
for i = 1, 5 do
|
|
append_drops("default:grass_"..i, {
|
|
{items = {"bbq:yeast"}, rarity = 8},
|
|
})
|
|
end
|
|
|
|
append_drops("default:junglegrass", {
|
|
{items = {"bbq:yeast"}, rarity = 8},
|
|
})
|
|
|
|
-----------------------------------------------
|
|
--MAKE VESSEL TYPE ITEMS WORK WITH VESSEL SHELF
|
|
-----------------------------------------------
|
|
if minetest.registered_items["bucket:bucket_empty"] ~= nil then
|
|
minetest.override_item("bucket:bucket_empty", {
|
|
groups = {vessel=1},
|
|
})
|
|
|
|
minetest.override_item("bucket:bucket_water", {
|
|
groups = {vessel=1},
|
|
})
|
|
|
|
minetest.override_item("bucket:bucket_river_water", {
|
|
groups = {vessel=1},
|
|
})
|
|
|
|
minetest.override_item("bucket:bucket_lava", {
|
|
groups = {vessel=1},
|
|
})
|
|
end
|
|
|
|
if minetest.registered_items["mobs:bucket_milk"] ~= nil then
|
|
minetest.override_item("mobs:bucket_milk", {
|
|
groups = {vessel=1},
|
|
})
|
|
end
|
|
|
|
----------------------
|
|
--UPGRADING WOOD FUELS
|
|
----------------------
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "default:junglewood",
|
|
burntime = 100,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "default:acacia_wood",
|
|
burntime = 92,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "default:wood",
|
|
burntime = 85,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "default:pine_wood",
|
|
burntime = 75,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "default:aspen_wood",
|
|
burntime = 65,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "stairs:slab_junglewood",
|
|
burntime = 12,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "stairs:slab_acacia_wood",
|
|
burntime = 11,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "stairs:slab_wood",
|
|
burntime = 10,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "stairs:slab_pine_wood",
|
|
burntime = 8,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "stairs:slab_aspen_wood",
|
|
burntime = 7,
|
|
})
|
|
|
|
minetest.register_craft({
|
|
type = "fuel",
|
|
recipe = "default:stick",
|
|
burntime = 2,
|
|
})
|