Small cleaning
This commit is contained in:
parent
b48c7862dc
commit
f0d1caa1b4
2
init.lua
2
init.lua
|
@ -20,7 +20,7 @@ end
|
||||||
|
|
||||||
i3 = {
|
i3 = {
|
||||||
settings = {
|
settings = {
|
||||||
debug_mode = false,
|
debug_mode = true,
|
||||||
max_favs = 6,
|
max_favs = 6,
|
||||||
min_fs_version = 4,
|
min_fs_version = 4,
|
||||||
item_btn_size = 1.1,
|
item_btn_size = 1.1,
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local damage_enabled = i3.settings.damage_enabled
|
local damage_enabled = i3.settings.damage_enabled
|
||||||
local hotbar_len = i3.settings.hotbar_len
|
local hotbar_len = i3.settings.hotbar_len
|
||||||
|
local debug_mode = i3.settings.debug_mode
|
||||||
|
|
||||||
local model_aliases = i3.files.model_alias()
|
local model_aliases = i3.files.model_alias()
|
||||||
local PNG, styles, fs_elements, colors = i3.files.styles()
|
local PNG, styles, fs_elements, colors = i3.files.styles()
|
||||||
|
@ -1460,7 +1461,7 @@ local function get_debug_grid(data, fs, full_height)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function make_fs(player, data)
|
local function make_fs(player, data)
|
||||||
local start = i3.settings.debug_mode and os.clock() or nil
|
local start = debug_mode and os.clock() or nil
|
||||||
|
|
||||||
local fs = setmetatable({}, {
|
local fs = setmetatable({}, {
|
||||||
__call = function(t, ...)
|
__call = function(t, ...)
|
||||||
|
@ -1499,7 +1500,7 @@ local function make_fs(player, data)
|
||||||
get_tabs_fs(fs, player, data, full_height)
|
get_tabs_fs(fs, player, data, full_height)
|
||||||
end
|
end
|
||||||
|
|
||||||
if i3.settings.debug_mode then
|
if debug_mode then
|
||||||
get_debug_grid(data, fs, full_height)
|
get_debug_grid(data, fs, full_height)
|
||||||
msg(data.player_name, fmt("make_fs(): %.2f ms", (os.clock() - start) * 1000))
|
msg(data.player_name, fmt("make_fs(): %.2f ms", (os.clock() - start) * 1000))
|
||||||
msg(data.player_name, fmt("#fs elements: %u", #fs))
|
msg(data.player_name, fmt("#fs elements: %u", #fs))
|
||||||
|
|
Ŝarĝante…
Reference in New Issue