1
0
mirror of https://github.com/rubenwardy/food.git synced 2024-12-22 16:00:19 +01:00

Fix intllib boilerplate code

This commit is contained in:
sys4-fr 2017-04-03 01:50:59 +02:00 committed by rubenwardy
parent 54e7fa3b81
commit 93de17fdc3
4 changed files with 11 additions and 8 deletions

View File

@ -12,6 +12,7 @@ jkanimals?
jkfarming?
my_mobs?
mobs?
mobs_animal?
mobfcooking?
mtfoods?
plantlib?

View File

@ -8,9 +8,8 @@
-- Boilerplate to support localized strings if intllib mod is installed.
local S = 0
if rawget(_G, "intllib") then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function ( s ) return s end
end

View File

@ -13,9 +13,8 @@ dofile(minetest.get_modpath("food_basic").."/ingredients.lua")
-- Boilerplate to support localized strings if intllib mod is installed.
local S = 0
if rawget(_G, "intllib") then
dofile(minetest.get_modpath("intllib").."/intllib.lua")
S = intllib.Getter(minetest.get_current_modname())
if minetest.get_modpath("intllib") then
S = intllib.Getter()
else
S = function ( s ) return s end
end

View File

@ -18,7 +18,7 @@ food.support("cactus", "default:cactus")
food.support("apple", "default:apple")
food.support("orange", {
"farming_plus:orange_item",
"ethereal:orange"
"ethereal:orange",
})
food.disable_if("ethereal", "orange")
@ -82,5 +82,9 @@ else
end
if minetest.get_modpath("mobs") and mobs.mod == "redo" then
food.support("chicken", "mobs:chicken_cooked")
if minetest.get_modpath("mobs_animal") then
food.support("chicken", "mobs:chicken_cooked")
else
food.support("chicken", "mobs:meat")
end
end