mirror of
https://github.com/rubenwardy/food.git
synced 2024-12-23 08:20:19 +01:00
Cache disable_fallbacks etc settings
This commit is contained in:
parent
22be456ab7
commit
7c0a7b5a33
@ -10,7 +10,11 @@ food = {
|
|||||||
modules = {},
|
modules = {},
|
||||||
disabled_modules = {},
|
disabled_modules = {},
|
||||||
debug = false,
|
debug = false,
|
||||||
version = 2.3
|
version = 2.3,
|
||||||
|
disable_fallbacks =
|
||||||
|
minetest.setting_getbool("food.disable_fallbacks"),
|
||||||
|
suppress_no_fallback_error =
|
||||||
|
minetest.setting_getbool("food.suppress_no_fallback_error")
|
||||||
}
|
}
|
||||||
|
|
||||||
-- Checks for external content, and adds support
|
-- Checks for external content, and adds support
|
||||||
@ -90,8 +94,8 @@ function food.module(name, func, ingred)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if minetest.setting_getbool("food.disable_fallbacks") then
|
if food.disable_fallbacks then
|
||||||
if minetest.setting_getbool("food.suppress_no_fallback_error") then
|
if food.suppress_no_fallback_error then
|
||||||
print("Warning: Fallbacks are disabled, and no item for " .. name .. " registered!")
|
print("Warning: Fallbacks are disabled, and no item for " .. name .. " registered!")
|
||||||
else
|
else
|
||||||
error("Food: Fallbacks are disabled, and no item for " .. name .. " registered!")
|
error("Food: Fallbacks are disabled, and no item for " .. name .. " registered!")
|
||||||
|
Loading…
Reference in New Issue
Block a user