1
0
mirror of https://github.com/Uberi/Minetest-WorldEdit.git synced 2024-12-27 03:00:40 +01:00

Merge pull request #107 from kilbith/master

Re-adapt WorldEdit's GUI button position to new creative inventory
This commit is contained in:
sfan5 2016-02-22 10:33:04 +01:00
commit b99a51f468

View File

@ -145,9 +145,9 @@ else --fallback button
end end
if (minetest.check_player_privs(name, {creative=true}) or if (minetest.check_player_privs(name, {creative=true}) or
minetest.setting_getbool("creative_mode")) and minetest.setting_getbool("creative_mode")) and
creative_inventory then --creative_inventory is active, add button to modified formspec creative then --creative is active, add button to modified formspec
local creative_formspec = player:get_inventory_formspec() local creative_formspec = player:get_inventory_formspec()
local tab_id = tonumber(creative_formspec:match("tabheader%[.*;(%d)%;.*%]")) local tab_id = tonumber(creative_formspec:match("tabheader%[.-;(%d+)%;"))
if tab_id == 1 then if tab_id == 1 then
formspec = creative_formspec .. formspec = creative_formspec ..