summaryrefslogtreecommitdiff
path: root/polebean.lua
diff options
context:
space:
mode:
authorxisd <zlexis.dnl@googlemail.com>2016-10-18 18:13:59 +0200
committerAuke Kok <sofar+github@foo-projects.org>2016-10-18 09:13:59 -0700
commite6421d8d495c4415eeae80c7b1a2ce20d55e443d (patch)
tree1f2c38e7e72f7bd5dbd04888d7bc758d007326af /polebean.lua
parent65729b9d33fde507a4044b25cd29fba2d8a5eb50 (diff)
Intllib (#5)
Support for translation via intllib.
Diffstat (limited to 'polebean.lua')
-rw-r--r--polebean.lua17
1 files changed, 8 insertions, 9 deletions
diff --git a/polebean.lua b/polebean.lua
index a729288..6af7cff 100644
--- a/polebean.lua
+++ b/polebean.lua
@@ -10,6 +10,9 @@ of the license, or (at your option) any later version.
--]]
+-- Intllib
+local S = crops.intllib
+
minetest.register_craft({
output = "crops:beanpoles",
recipe = {
@@ -20,7 +23,7 @@ minetest.register_craft({
})
minetest.register_craftitem("crops:green_bean", {
- description = "Green Bean",
+ description = S("Green Bean"),
inventory_image = "crops_green_bean.png",
on_use = minetest.item_eat(1)
})
@@ -127,7 +130,6 @@ minetest.register_node("crops:beanpole_base", {
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
drop = {},
sounds = default.node_sound_leaves_defaults(),
-
on_dig = crops_beanpole_on_dig,
})
@@ -142,12 +144,11 @@ minetest.register_node("crops:beanpole_top", {
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
drop = {},
sounds = default.node_sound_leaves_defaults(),
-
on_dig = crops_beanpole_on_dig,
})
minetest.register_node("crops:beanpoles", {
- description = "beanpoles",
+ description = "S(Beanpoles)",
inventory_image = "crops_beanpole_top.png",
wield_image = "crops_beanpole_top.png",
tiles = { "crops_beanpole_base.png" },
@@ -179,7 +180,7 @@ minetest.register_node("crops:beanpoles", {
})
minetest.register_craftitem("crops:green_bean_seed", {
- description = "green bean seed",
+ description = S("Green bean seed"),
inventory_image = "crops_green_bean_seed.png",
wield_image = "crops_green_bean_seed.png",
node_placement_prediction = "", -- disabled, prediction assumes pointed_think.above!
@@ -212,7 +213,7 @@ minetest.register_craftitem("crops:green_bean_seed", {
for stage = 1,6 do
minetest.register_node("crops:beanpole_plant_base_" .. stage, {
- description = "green bean plant",
+ description = S("Green Bean plant"),
tiles = { "crops_beanpole_plant_base_" .. stage .. ".png" },
drawtype = "plantlike",
sunlight_propagates = true,
@@ -222,14 +223,13 @@ minetest.register_node("crops:beanpole_plant_base_" .. stage, {
groups = { snappy=3,flammable=3,flora=1,attached_node=1,not_in_creative_inventory=1 },
drop = {},
sounds = default.node_sound_leaves_defaults(),
-
on_dig = crops_beanpole_on_dig
})
end
for stage = 1,4 do
minetest.register_node("crops:beanpole_plant_top_" .. stage, {
- description = "green bean plant",
+ description = S("green bean plant"),
tiles = { "crops_beanpole_plant_top_" .. stage .. ".png" },
drawtype = "plantlike",
sunlight_propagates = true,
@@ -239,7 +239,6 @@ minetest.register_node("crops:beanpole_plant_top_" .. stage, {
groups = { snappy=3,flammable=3,flora=1,not_in_creative_inventory=1 },
drop = {},
sounds = default.node_sound_leaves_defaults(),
-
on_dig = crops_beanpole_on_dig
})
end