diff --git a/init.lua b/init.lua index 0c85a06..e97cdb1 100644 --- a/init.lua +++ b/init.lua @@ -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 diff --git a/settingtypes.txt b/settingtypes.txt index 14198ae..c087ecf 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -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 \ No newline at end of file +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