mirror of
https://github.com/minetest-mods/i3.git
synced 2024-12-26 10:50:42 +01:00
Allow for group bag=4
This commit is contained in:
parent
ea8b216fa5
commit
09cb35e1fd
4
API.md
4
API.md
@ -308,10 +308,10 @@ Returns a table of recipes and usages of `item`.
|
|||||||
If set, the mod will export all the cached recipes and usages in a JSON format
|
If set, the mod will export all the cached recipes and usages in a JSON format
|
||||||
to the given URL (HTTP support is required¹).
|
to the given URL (HTTP support is required¹).
|
||||||
|
|
||||||
#### `groups = {bag = <1-3>}`
|
#### `groups = {bag = <1-4>}`
|
||||||
|
|
||||||
The `bag` group in the item definition allows to extend the player inventory size
|
The `bag` group in the item definition allows to extend the player inventory size
|
||||||
given a number between 1 and 3.
|
given a number between 1 and 4.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
1
init.lua
1
init.lua
@ -19,6 +19,7 @@ i3 = {
|
|||||||
4*9 + 3,
|
4*9 + 3,
|
||||||
4*9 + 6,
|
4*9 + 6,
|
||||||
4*9 + 9,
|
4*9 + 9,
|
||||||
|
4*9 + 25,
|
||||||
},
|
},
|
||||||
|
|
||||||
SUBCAT = {
|
SUBCAT = {
|
||||||
|
@ -17,7 +17,6 @@ local function init_backpack(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
msg(name, S"This is not a backpack")
|
msg(name, S"This is not a backpack")
|
||||||
|
|
||||||
return 0
|
return 0
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
@ -139,13 +139,8 @@ local function get_inv_slots(data, fs)
|
|||||||
fmt("list[current_player;main;%f,%f;%u,1;]", inv_x, inv_y, i3.HOTBAR_LEN))
|
fmt("list[current_player;main;%f,%f;%u,1;]", inv_x, inv_y, i3.HOTBAR_LEN))
|
||||||
|
|
||||||
if bag then
|
if bag then
|
||||||
if bag == 1 then
|
local params = {{10, 0.892}, {11, 0.8}, {12, 0.726}, {13, 0.663}}
|
||||||
width, size = 10, 0.892
|
width, size = unpack(params[bag])
|
||||||
elseif bag == 2 then
|
|
||||||
width, size = 11, 0.8
|
|
||||||
elseif bag == 3 then
|
|
||||||
width, size = 12, 0.726
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
fs(fmt("style_type[list;size=%f;spacing=%f]", size, spacing),
|
fs(fmt("style_type[list;size=%f;spacing=%f]", size, spacing),
|
||||||
|
Loading…
Reference in New Issue
Block a user