]> git.lizzy.rs Git - worldedit.git/commitdiff
Re-adapt WorldEdit's GUI button position to creative inventory
authorJean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
Mon, 22 Feb 2016 09:29:53 +0000 (10:29 +0100)
committerJean-Patrick Guerrero <jeanpatrick.guerrero@gmail.com>
Mon, 22 Feb 2016 09:29:53 +0000 (10:29 +0100)
worldedit_gui/init.lua

index c0a1d8fd220b0f94f1afef94cbfce3f0a1b76c23..9d1f45a989e15754ad2d6f8b91fc99d7d15226a9 100644 (file)
@@ -145,9 +145,9 @@ else --fallback button
                end
                if (minetest.check_player_privs(name, {creative=true}) or
                                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 tab_id = tonumber(creative_formspec:match("tabheader%[.*;(%d)%;.*%]"))
+                       local tab_id = tonumber(creative_formspec:match("tabheader%[.-;(%d+)%;"))
 
                        if tab_id == 1 then
                                formspec = creative_formspec ..