Be sure to reset the size as it changes.

This commit is contained in:
Mike Stump 2024-01-05 15:26:27 -08:00
parent 9e07d19b22
commit 3c91acd158

@ -745,6 +745,7 @@ me.register_node("cterminal", {
tab[#tab + 1] = ItemStack(name) tab[#tab + 1] = ItemStack(name)
end end
end end
own_inv:set_size(inv_name, #tab)
own_inv:set_list(inv_name, tab) own_inv:set_list(inv_name, tab)
meta:set_string("inv_name", inv_name) meta:set_string("inv_name", inv_name)
page_max = math.floor(own_inv:get_size(inv_name) / 32) + 1 page_max = math.floor(own_inv:get_size(inv_name) / 32) + 1
@ -772,6 +773,7 @@ me.register_node("cterminal", {
end end
end end
inv_name = "search" inv_name = "search"
own_inv:set_size(inv_name, #tab)
own_inv:set_list(inv_name, tab) own_inv:set_list(inv_name, tab)
meta:set_string("inv_name", inv_name) meta:set_string("inv_name", inv_name)
page_max = math.floor(own_inv:get_size(inv_name) / 32) + 1 page_max = math.floor(own_inv:get_size(inv_name) / 32) + 1