Camas/mods/mobs/crafts.lua

82 lines
1.5 KiB
Lua
Raw Normal View History

--
-- Crafts and items
--
2019-08-28 17:31:41 +02:00
local S = minetest.get_translator("mobs")
-- Wool
minetest.register_node(
2015-09-01 17:15:24 +02:00
"mobs:wool",
{
2019-08-28 17:31:41 +02:00
description = S("Wool Bundle"),
2015-09-01 17:15:24 +02:00
tiles ={"mobs_wool.png"},
is_ground_content = false,
groups = {snappy = 2, oddly_breakable_by_hand = 3, fall_damage_add_percent = -25, fuzzy = 1},
sounds = default.node_sound_leaves_defaults(),
})
-- Raw meat
2015-09-01 17:15:24 +02:00
minetest.register_craftitem(
2015-09-01 17:15:24 +02:00
"mobs:meat_raw",
{
2019-08-28 17:31:41 +02:00
description = S("Raw Meat"),
2015-09-01 17:15:24 +02:00
inventory_image = "mobs_meat_raw.png",
on_use = minetest.item_eat({hp = 3, sat = 30}),
})
-- Cooked meat
2015-09-01 17:15:24 +02:00
minetest.register_craftitem(
"mobs:meat",
2015-09-01 17:15:24 +02:00
{
2019-08-28 17:31:41 +02:00
description = S("Cooked Meat"),
2015-09-01 17:15:24 +02:00
inventory_image = "mobs_meat_cooked.png",
on_use = minetest.item_eat({hp = 7, sat = 70}),
})
2015-09-01 17:15:24 +02:00
minetest.register_craft(
2015-09-01 17:15:24 +02:00
{
type = "cooking",
output = "mobs:meat",
recipe = "mobs:meat_raw",
cooktime = 5,
})
-- Net
2015-09-01 17:15:24 +02:00
minetest.register_tool(
2015-09-01 17:15:24 +02:00
"mobs:net",
{
2019-08-28 17:31:41 +02:00
description = S("Net").."\n"..S("(Right-click to capture)"),
2015-09-01 17:15:24 +02:00
inventory_image = "mobs_net.png",
})
2015-09-01 17:15:24 +02:00
crafting.register_craft(
2015-09-01 17:15:24 +02:00
{
output = "mobs:net",
items= {
"default:fiber 3",
"default:stick",
2015-09-01 17:15:24 +02:00
}
})
-- Lasso
2015-09-01 17:15:24 +02:00
minetest.register_tool(
2015-09-01 17:15:24 +02:00
"mobs:lasso",
{
2019-08-28 17:31:41 +02:00
description = S("Lasso").."\n"..S("(Right-click to capture)"),
2015-09-01 17:15:24 +02:00
inventory_image = "mobs_lasso.png",
})
2015-09-01 17:15:24 +02:00
crafting.register_craft(
2015-09-01 17:15:24 +02:00
{
output = "mobs:lasso",
items = {
"default:rope 4",
"default:stick",
2015-09-01 17:15:24 +02:00
}
})