mirror of
https://github.com/minetest-mods/craftguide.git
synced 2024-11-22 19:03:43 +01:00
Config value for disabling the cache load progress bar (#101)
This commit is contained in:
parent
df21df2bce
commit
2d6951cd0c
9
init.lua
9
init.lua
@ -12,6 +12,11 @@ local toolrepair
|
|||||||
|
|
||||||
local progressive_mode = core.settings:get_bool("craftguide_progressive_mode")
|
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 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()
|
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)
|
bar = bar .. (i <= percent / (100 / len) and full_char or empty_char)
|
||||||
end
|
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 show_item(def) then
|
||||||
if not fuel_cache[name] then
|
if not fuel_cache[name] then
|
||||||
|
@ -2,4 +2,7 @@
|
|||||||
craftguide_progressive_mode (Progressive Mode) bool false
|
craftguide_progressive_mode (Progressive Mode) bool false
|
||||||
|
|
||||||
# Integration in the default Minetest Game inventory.
|
# 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
|
||||||
|
Loading…
Reference in New Issue
Block a user