mirror of
https://github.com/minetest-mods/i3.git
synced 2025-07-03 17:10:23 +02:00
Add legacy_inventory setting (disabled by default)
This commit is contained in:
@ -539,7 +539,7 @@ local function sort_inventory(player, data)
|
||||
local inv = player:get_inventory()
|
||||
local list = inv:get_list"main"
|
||||
local size = inv:get_size"main"
|
||||
local start_i = data.ignore_hotbar and 10 or 1
|
||||
local start_i = data.ignore_hotbar and (i3.HOTBAR_LEN + 1) or 1
|
||||
|
||||
if true_table(data.drop_items) then
|
||||
list = drop_items(player, inv, list, start_i, data.drop_items)
|
||||
|
@ -122,7 +122,9 @@ local function get_stack_max(inv, data, is_recipe, rcp)
|
||||
end
|
||||
|
||||
local function get_inv_slots(fs)
|
||||
local inv_x, inv_y, size, spacing = 0.22, 6.9, 1, 0.1
|
||||
local inv_x = i3.legacy_inventory and 0.75 or 0.22
|
||||
local inv_y = 6.9
|
||||
local size, spacing = 1, 0.1
|
||||
|
||||
fs"style_type[box;colors=#77777710,#77777710,#777,#777]"
|
||||
|
||||
|
10
src/hud.lua
10
src/hud.lua
@ -34,10 +34,12 @@ local function init_hud(player)
|
||||
},
|
||||
}
|
||||
|
||||
core.after(0, function()
|
||||
player:hud_set_hotbar_itemcount(i3.HOTBAR_LEN)
|
||||
player:hud_set_hotbar_image"i3_hotbar.png"
|
||||
end)
|
||||
if not i3.legacy_inventory then
|
||||
core.after(0, function()
|
||||
player:hud_set_hotbar_itemcount(i3.HOTBAR_LEN)
|
||||
player:hud_set_hotbar_image"i3_hotbar.png"
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local function show_hud(player, data)
|
||||
|
Reference in New Issue
Block a user