Add some item help

master
Wuzzy 2016-08-08 04:52:05 +02:00
parent f04474315b
commit 5264702f36
2 changed files with 25 additions and 8 deletions

View File

@ -1,3 +1,4 @@
default
playereffects
intllib?
doc_items?

View File

@ -8,7 +8,7 @@ end
--Register beanstalk nodes
minetest.register_node("magicbeans_w:leaves", {
description = S("magic beanstalk leaves"),
description = S("Magic beanstalk leaves"),
tiles = {"magicbeans_w_leaves.png"},
inventory_image = "magicbeans_w_leaves.png",
drawtype = "plantlike",
@ -20,7 +20,7 @@ minetest.register_node("magicbeans_w:leaves", {
})
minetest.register_node("magicbeans_w:blank", {
description = S("magic beanstalk climbable blank"),
description = S("Magic beanstalk climbable blank"),
drawtype = "airlike",
inventory_image = "unknown_node.png",
wield_image = "unknown_node.png",
@ -35,7 +35,7 @@ minetest.register_node("magicbeans_w:blank", {
})
minetest.register_node("magicbeans_w:stem", {
description = S("magic beanstalk stem"),
description = S("Magic beanstalk stem"),
tiles = {"magicbeans_w_stem_topbottom.png", "magicbeans_w_stem_topbottom.png", "magicbeans_w_stem.png"},
paramtype2 = "facedir",
groups = {oddly_breakable_by_hand = 1, choppy = 3, flammable = 2},
@ -44,7 +44,7 @@ minetest.register_node("magicbeans_w:stem", {
})
minetest.register_node("magicbeans_w:cloud", {
description = S("cloud"),
description = S("Cloud"),
tiles = {"default_cloud.png"},
walkable = false,
climbable = true,
@ -56,10 +56,10 @@ minetest.register_node("magicbeans_w:cloud", {
})
magicbeans_w_list = {
{ S("magic jumping bean"), S("Magic super jump"), "jumping", nil, 5, nil, {"jump"}},
{ S("magic flying bean"), S("Magic flying"), "flying", 2, nil, 0.02, {"speed", "gravity"}},
{ S("magic running bean"), S("Magic super speed"), "running", 3, nil, nil, {"speed"}},
{ S("magic beanstalk bean"), nil, "beanstalk", nil, nil, nil, nil},
{ S("Magic jumping bean"), S("Magic super jump"), "jumping", nil, 5, nil, {"jump"}},
{ S("Magic flying bean"), S("Magic flying"), "flying", 2, nil, 0.02, {"speed", "gravity"}},
{ S("Magic running bean"), S("Magic super speed"), "running", 3, nil, nil, {"speed"}},
{ S("Magic beanstalk bean"), nil, "beanstalk", nil, nil, nil, nil},
}
for i in ipairs(magicbeans_w_list) do
@ -201,3 +201,19 @@ minetest.register_abm(
end
end
})
if minetest.get_modpath("doc_items") ~= nil then
doc.sub.items.set_items_longdesc({
["magicbeans_w:jumping"] = S("Eating this bean will make your jumps much, much higher for 30 seconds. In fact, you can jump so high that you may hurt yourself when you fall down again. Use with caution. It also cancels any previous jumping effects."),
["magicbeans_w:running"] = S("Eating a running bean will greatly increase your walking speed for 30 seconds. It also cancels out any previous walking speed effects."),
["magicbeans_w:flying"] = S("Eating a flying bean will allow you to fly for 30 seconds, after which your flight will apruptly end. Use with caution. It also cancels out any gravity and walking speed effects you have."),
["magicbeans_w:beanstalk"] = S("This magic bean will grow into a giant beanstalk when planted. The beanstalk can grop up to a height of about 100 blocks, easily reaching into the clouds."),
})
doc.sub.items.set_items_usagehelp({
["magicbeans_w:jumping"] = doc.sub.items.temp.eat,
["magicbeans_w:running"] = doc.sub.items.temp.eat,
["magicbeans_w:flying"] = S("Hold it in your hand, then leftclick to eat the bean. To initiate the flight, just jump. You will very slowly rise high in the skies and eventually sink again. Plan your flights carefully as falling down in mid-flight can be very harmful."),
["magicbeans_w:beanstalk"] = S("Rightclick with it on the floor to plant it, then wait for a short while for the giant beanstalk to appear."),
})
end