added craftings for class specific items

This commit is contained in:
cale 2016-01-23 11:36:39 +01:00
parent e5148df29d
commit f379286f93
9 changed files with 70 additions and 0 deletions

View File

@ -41,6 +41,12 @@ classes.register_weapon = function(name,fromLevel,levels, def)
})
end
end
if def.recipe then
minetest.register_craft({
output = "classes:"..name .. "_lvl_" .. tostring(fromLevel),
recipe = def.recipe,
})
end
end
-- load save
@ -121,6 +127,11 @@ classes.register_weapon("spear",2, 12, {
wield_scale = {x = 2, y=2, z = 1},
damage = 17,
class = "warrior",
recipe = {
{"", "default:flint", ""},
{"", "default:string_strong", ""},
{"", "default:log_3", ""},
}
})
classes.register_weapon("chemical_spear",2, 17, {
@ -172,3 +183,14 @@ classes.register_weapon("long_stick",20, 60, {
class = "thief",
})
-- crafts
minetest.register_craft({
output = "default:axe_stone",
recipe = {
{"", "default:stone_item", ""},
{"", "default:string_strong", ""},
{"", "default:log_3", ""},
}
})

View File

@ -41,6 +41,12 @@ classes.register_weapon = function(name,fromLevel,levels, def)
})
end
end
if def.recipe then
minetest.register_craft({
output = "classes:"..name .. "_lvl_" .. tostring(fromLevel),
recipe = def.recipe,
})
end
end
-- load save
@ -121,6 +127,11 @@ classes.register_weapon("spear",2, 12, {
wield_scale = {x = 2, y=2, z = 1},
damage = 17,
class = "warrior",
recipe = {
{"", "default:flint", ""},
{"", "default:string_strong", ""},
{"", "default:log_3", ""},
}
})
classes.register_weapon("chemical_spear",2, 17, {
@ -172,3 +183,14 @@ classes.register_weapon("long_stick",20, 60, {
class = "thief",
})
-- crafts
minetest.register_craft({
output = "default:axe_stone",
recipe = {
{"", "default:stone_item", ""},
{"", "default:string_strong", ""},
{"", "default:log_3", ""},
}
})

View File

@ -8,6 +8,11 @@ minetest.register_craftitem("default:stone_item", {
inventory_image = "default_stone_item.png",
})
minetest.register_craftitem("default:flint", {
description = "Flint",
inventory_image = "default_flint.png",
})
minetest.register_craftitem("default:coal_lump", {
description = "Coal Lump",
inventory_image = "default_coal_lump.png",

View File

@ -8,6 +8,11 @@ minetest.register_craftitem("default:stone_item", {
inventory_image = "default_stone_item.png",
})
minetest.register_craftitem("default:flint", {
description = "Flint",
inventory_image = "default_flint.png",
})
minetest.register_craftitem("default:coal_lump", {
description = "Coal Lump",
inventory_image = "default_coal_lump.png",

View File

@ -505,6 +505,13 @@ minetest.register_node("default:gravel", {
description = "Gravel",
tiles = {"default_gravel.png"},
groups = {crumbly = 2, falling_node=1},
drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}
})
-- ores

View File

@ -505,6 +505,13 @@ minetest.register_node("default:gravel", {
description = "Gravel",
tiles = {"default_gravel.png"},
groups = {crumbly = 2, falling_node=1},
drop = {
max_items = 1,
items = {
{items = {'farming:wheat_seeds'},rarity = 5},
{items = {'default:plant_grass'}},
}
}
})
-- ores

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 B

View File

@ -7,6 +7,7 @@ function farming.register_plant(name, steps, def)
tiles = {def.texture.."_"..tostring(i)..".png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = def.texture.."_"..tostring(i)..".png",
drop = def.drop .. " " .. tostring(i),
groups = {crumbly=3},
walkable = false,

View File

@ -7,6 +7,7 @@ function farming.register_plant(name, steps, def)
tiles = {def.texture.."_"..tostring(i)..".png"},
drawtype = "plantlike",
paramtype = "light",
inventory_image = def.texture.."_"..tostring(i)..".png",
drop = def.drop .. " " .. tostring(i),
groups = {crumbly=3},
walkable = false,