summaryrefslogtreecommitdiff
path: root/food_basic
diff options
context:
space:
mode:
authorrubenwardy <rubenwardy@gmail.com>2015-01-04 17:31:30 +0000
committerrubenwardy <rubenwardy@gmail.com>2015-01-04 17:31:30 +0000
commitca32dc17ce600a7f7ec268016150bcffb49eb948 (patch)
tree059c122e45770d7792c785726a2053e40b419d93 /food_basic
parent2897fe334f478d9c80c70bb558fd83b5904e56d4 (diff)
Fix bug
Diffstat (limited to 'food_basic')
-rw-r--r--food_basic/depends.txt2
-rw-r--r--food_basic/ingredients.lua9
-rw-r--r--food_basic/init.lua8
3 files changed, 17 insertions, 2 deletions
diff --git a/food_basic/depends.txt b/food_basic/depends.txt
index 974ed7c..bb93f51 100644
--- a/food_basic/depends.txt
+++ b/food_basic/depends.txt
@@ -3,10 +3,8 @@ animalmaterials?
bushes_classic?
default?
docfarming?
-diet?
farming?
farming_plus?
-hud?
intllib?
jkanimals?
jkfarming?
diff --git a/food_basic/ingredients.lua b/food_basic/ingredients.lua
index 5d30ff1..cd33fb3 100644
--- a/food_basic/ingredients.lua
+++ b/food_basic/ingredients.lua
@@ -6,6 +6,15 @@
-- Fallback ingredients
-- =====================================
+-- Boilerplate to support localized strings if intllib mod is installed.
+local S = 0
+if (intllib) then
+ dofile(minetest.get_modpath("intllib").."/intllib.lua")
+ S = intllib.Getter(minetest.get_current_modname())
+else
+ S = function ( s ) return s end
+end
+
food.module("wheat", function()
minetest.register_craftitem(":food:wheat", {
description = S("Wheat"),
diff --git a/food_basic/init.lua b/food_basic/init.lua
index 8e1aa8e..5e84fd4 100644
--- a/food_basic/init.lua
+++ b/food_basic/init.lua
@@ -11,6 +11,14 @@ print("Food Mod - Version 2.3")
dofile(minetest.get_modpath("food_basic").."/support.lua")
dofile(minetest.get_modpath("food_basic").."/ingredients.lua")
+-- Boilerplate to support localized strings if intllib mod is installed.
+local S = 0
+if (intllib) then
+ dofile(minetest.get_modpath("intllib").."/intllib.lua")
+ S = intllib.Getter(minetest.get_current_modname())
+else
+ S = function ( s ) return s end
+end
-- Register dark chocolate
food.module("dark_chocolate", function()