summaryrefslogtreecommitdiff
path: root/cocoa.lua
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2016-05-30 12:30:00 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2016-05-30 12:30:00 +0100
commitcbf7bee93af73f0c5fc3098a81149fb3b884b91b (patch)
tree28bd29fe3933cf94a5d41a5a1488ddc3887d9ed4 /cocoa.lua
parent3d59270aef645f2d98384609d806f591cb6086fa (diff)
Added intllib support (thanks Xanthin)
Diffstat (limited to 'cocoa.lua')
-rw-r--r--cocoa.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/cocoa.lua b/cocoa.lua
index a11a611..860807a 100644
--- a/cocoa.lua
+++ b/cocoa.lua
@@ -1,4 +1,6 @@
+local S = farming.intllib
+
-- place cocoa
function place_cocoa(itemstack, placer, pointed_thing, plantname)
@@ -48,7 +50,7 @@ end
-- cocoa beans
minetest.register_craftitem("farming:cocoa_beans", {
- description = "Cocoa Beans",
+ description = S("Cocoa Beans"),
inventory_image = "farming_cocoa_beans.png",
on_place = function(itemstack, placer, pointed_thing)
return place_cocoa(itemstack, placer, pointed_thing, "farming:cocoa_1")
@@ -64,7 +66,7 @@ minetest.register_craft( {
-- chocolate cookie
minetest.register_craftitem("farming:cookie", {
- description = "Cookie",
+ description = S("Cookie"),
inventory_image = "farming_cookie.png",
on_use = minetest.item_eat(2),
})
@@ -78,7 +80,7 @@ minetest.register_craft( {
-- bar of dark chocolate (thanks to Ice Pandora for her deviantart.com chocolate tutorial)
minetest.register_craftitem("farming:chocolate_dark", {
- description = "Bar of Dark Chocolate",
+ description = S("Bar of Dark Chocolate"),
inventory_image = "farming_chocolate_dark.png",
on_use = minetest.item_eat(3),
})