Minor cleanup

This commit is contained in:
Jean-Patrick Guerrero 2021-01-24 04:45:24 +01:00
parent 2e05628048
commit fc851eade2

View File

@ -2175,30 +2175,24 @@ local function get_inv_slots(data, fs)
fs(fmt("image", i + inv_x + (i * 0.15), inv_y, 1, 1, "i3_hb_bg.png"))
end
fs("style_type[list;size=1;spacing=0.15]")
fs(fmt("list[current_player;main;%f,%f;8,1;]", inv_x, inv_y))
fs("style_type[list;size=1;spacing=0.15]", fmt("list[current_player;main;%f,%f;8,1;]", inv_x, inv_y))
local width, size, spacing_x, spacing_y, extra = 9, 0.96, 0.15, 0.15, 0
local width, size, spacing, extra = 9, 0.96, 0.15, 0
if bag then
if bag == "small" then
width, size, spacing_x, spacing_y = 10, 0.89, 0.1, 0.1
extra = 0.01
width, size, spacing, extra = 10, 0.89, 0.1, 0.01
elseif bag == "medium" then
width, size, spacing_x, spacing_y = 12, 0.72, 0.1, 0.1
extra = 0.032
width, size, spacing, extra = 12, 0.72, 0.1, 0.032
elseif bag == "large" then
width, size, spacing_x, spacing_y = 12, 0.72, 0.1, 0.1
extra = 0.032
width, size, spacing, extra = 12, 0.72, 0.1, 0.032
end
end
fs(fmt("style_type[list;size=%f,%f;spacing=%f,%f]", size, size, spacing_x, spacing_y))
fs(fmt("list[current_player;main;%f,%f;%u,%u;8]", 0.234 + extra, inv_y + 1.25,
width, (bag and BAG_SIZES[data.bag_size] or INV_SIZE) / width))
fs("style_type[list;size=1;spacing=0.15]")
fs(fmt("style_type[list;size=%f;spacing=%f]", size, spacing),
fmt("list[current_player;main;%f,%f;%u,%u;8]", 0.234 + extra, inv_y + 1.25,
width, (bag and BAG_SIZES[data.bag_size] or INV_SIZE) / width),
"style_type[list;size=1;spacing=0.15]")
end
local function get_inventory_fs(player, data, fs)