Config value for disabling the cache load progress bar (#101)

This commit is contained in:
R3R3R3 2020-04-04 17:41:50 -04:00 committed by Jean-Patrick Guerrero
parent df21df2bce
commit 2d6951cd0c
2 changed files with 12 additions and 2 deletions

View File

@ -12,6 +12,11 @@ local toolrepair
local progressive_mode = core.settings:get_bool("craftguide_progressive_mode")
local sfinv_only = core.settings:get_bool("craftguide_sfinv_only") and rawget(_G, "sfinv")
local enable_cache_progress_bar = core.settings:get_bool("craftguide_enable_cache_progress_bar")
if enable_cache_progress_bar == nil then
enable_cache_progress_bar = true
end
local http = core.request_http_api()
@ -1494,7 +1499,9 @@ local function get_init_items()
bar = bar .. (i <= percent / (100 / len) and full_char or empty_char)
end
iop(fmt("[craftguide] Caching data %s %u%%\r", bar .. "]", percent))
if enable_cache_progress_bar then
iop(fmt("[craftguide] Caching data %s %u%%\r", bar .. "]", percent))
end
if show_item(def) then
if not fuel_cache[name] then

View File

@ -2,4 +2,7 @@
craftguide_progressive_mode (Progressive Mode) bool false
# Integration in the default Minetest Game inventory.
craftguide_sfinv_only (Sfinv only) bool false
craftguide_sfinv_only (Sfinv only) bool false
# Display the cache-building progress bar in the server console.
craftguide_enable_cache_progress_bar (Enable console cache progress bar) bool true