mirror of
https://git.minetest.land/VoxeLibre/VoxeLibre.git
synced 2024-12-22 16:09:33 +01:00
Fix invisible scrollbar on first creative inv open
This commit is contained in:
parent
7389ed0e25
commit
d5814195d8
2 changed files with 6 additions and 1 deletions
|
@ -509,6 +509,7 @@ if minetest.setting_getbool("creative_mode") then
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
-- Initialize variables and inventory
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
if not players[name] then
|
if not players[name] then
|
||||||
players[name] = {}
|
players[name] = {}
|
||||||
|
@ -517,4 +518,5 @@ minetest.register_on_joinplayer(function(player)
|
||||||
players[name].start_i = 0
|
players[name].start_i = 0
|
||||||
end
|
end
|
||||||
init(player)
|
init(player)
|
||||||
|
mcl_inventory.set_creative_formspec(player, 0, 1, nil, false, "nix", "")
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -168,7 +168,10 @@ minetest.register_on_joinplayer(function(player)
|
||||||
armor:update_inventory(player)
|
armor:update_inventory(player)
|
||||||
end
|
end
|
||||||
|
|
||||||
set_inventory(player)
|
-- In Creative Mode, the initial inventory setup is handled in creative.lua
|
||||||
|
if not minetest.setting_get("creative_mode") then
|
||||||
|
set_inventory(player)
|
||||||
|
end
|
||||||
|
|
||||||
--[[ Make sure the crafting grid is empty. Why? Because the player might have
|
--[[ Make sure the crafting grid is empty. Why? Because the player might have
|
||||||
items remaining in the crafting grid from the previous join; this is likely
|
items remaining in the crafting grid from the previous join; this is likely
|
||||||
|
|
Loading…
Reference in a new issue