Remove uses of default.gui_bg/bg_img/slots
authorParamat <paramat@users.noreply.github.com>
Thu, 3 Jan 2019 01:57:13 +0000 (01:57 +0000)
committerGitHub <noreply@github.com>
Thu, 3 Jan 2019 01:57:13 +0000 (01:57 +0000)
Keep their definitions, to not break mods, but move them to legacy.lua.

mods/bones/init.lua
mods/creative/inventory.lua
mods/default/chests.lua
mods/default/craftitems.lua
mods/default/furnace.lua
mods/default/init.lua
mods/default/legacy.lua
mods/default/nodes.lua
mods/vessels/init.lua

index 0043118d205f35041343611262616053088b86b0..5fcae41127e838b7089bab739fa5b20bdc47b1fd 100644 (file)
@@ -13,9 +13,6 @@ end
 
 local bones_formspec =
        "size[8,9]" ..
-       default.gui_bg ..
-       default.gui_bg_img ..
-       default.gui_slots ..
        "list[current_name;main;0,0.3;8,4;]" ..
        "list[current_player;main;0,4.85;8,1;]" ..
        "list[current_player;main;0,6.08;8,3;8]" ..
index 79a85293655b2edae4ccbf3ca8fe49f5821ea03e..6f485d529c8ce0f6eacebd5fdb0389366872bc51 100644 (file)
@@ -126,9 +126,7 @@ function creative.register_tab(name, title, items)
                                "field[0.3,3.5;2.2,1;creative_filter;;" .. minetest.formspec_escape(inv.filter) .. "]" ..
                                "listring[detached:creative_" .. player_name .. ";main]" ..
                                "list[detached:creative_" .. player_name .. ";main;0,0;8,3;" .. tostring(start_i) .. "]" ..
-                               default.get_hotbar_bg(0,4.7) ..
-                               default.gui_bg .. default.gui_bg_img .. default.gui_slots
-                               .. creative.formspec_add, false)
+                               default.get_hotbar_bg(0,4.7) .. creative.formspec_add, false)
                end,
                on_enter = function(self, player, context)
                        local player_name = player:get_player_name()
index 333890564ea77a6bafacdc145e0641290018155c..b70e5ad26192bf93c2a6d3ee4ff43e2cd58dca3f 100644 (file)
@@ -4,9 +4,6 @@ function default.chest.get_chest_formspec(pos)
        local spos = pos.x .. "," .. pos.y .. "," .. pos.z
        local formspec =
                "size[8,9]" ..
-               default.gui_bg ..
-               default.gui_bg_img ..
-               default.gui_slots ..
                "list[nodemeta:" .. spos .. ";main;0,0.3;8,4;]" ..
                "list[current_player;main;0,4.85;8,1;]" ..
                "list[current_player;main;0,6.08;8,3;8]" ..
index 3e3852ce2b0f96c5a7cf55f62d959b3aca093a1e..6a1b57064c4113d20ed392169a096ca1c8063ad6 100644 (file)
@@ -50,16 +50,14 @@ local function book_on_use(itemstack, user)
 
        local formspec
        if owner == player_name then
-               formspec = "size[8,8]" .. default.gui_bg ..
-                       default.gui_bg_img ..
+               formspec = "size[8,8]" ..
                        "field[0.5,1;7.5,0;title;Title:;" ..
                                minetest.formspec_escape(title) .. "]" ..
                        "textarea[0.5,1.5;7.5,7;text;Contents:;" ..
                                minetest.formspec_escape(text) .. "]" ..
                        "button_exit[2.5,7.5;3,1;save;Save]"
        else
-               formspec = "size[8,8]" .. default.gui_bg ..
-                       default.gui_bg_img ..
+               formspec = "size[8,8]" ..
                        "label[0.5,0.5;by " .. owner .. "]" ..
                        "tablecolumns[color;text]" ..
                        "tableoptions[background=#00000000;highlight=#00000000;border=false]" ..
index 09966a6b6b4cc3dbe42dffdc32ba15bf9ad6b7bc..a06f3b23d82bef47b928a223bb5b85b5cddbbd18 100644 (file)
@@ -5,9 +5,6 @@
 
 function default.get_furnace_active_formspec(fuel_percent, item_percent)
        return "size[8,8.5]"..
-               default.gui_bg..
-               default.gui_bg_img..
-               default.gui_slots..
                "list[context;src;2.75,0.5;1,1;]"..
                "list[context;fuel;2.75,2.5;1,1;]"..
                "image[2.75,1.5;1,1;default_furnace_fire_bg.png^[lowpart:"..
@@ -28,9 +25,6 @@ end
 
 function default.get_furnace_inactive_formspec()
        return "size[8,8.5]"..
-               default.gui_bg..
-               default.gui_bg_img..
-               default.gui_slots..
                "list[context;src;2.75,0.5;1,1;]"..
                "list[context;fuel;2.75,2.5;1,1;]"..
                "image[2.75,1.5;1,1;default_furnace_fire_bg.png]"..
index b0609ffa00dcf58065bbe3a051b097cd8f10fa4f..b89fd0ebc79912fbe73e4eca2f0cef6656eca81c 100644 (file)
@@ -9,10 +9,6 @@ default = {}
 default.LIGHT_MAX = 14
 
 -- GUI related stuff
-default.gui_bg     = ""
-default.gui_bg_img = ""
-default.gui_slots  = ""
-
 minetest.register_on_joinplayer(function(player)
        player:set_formspec_prepend([[
                        bgcolor[#080808BB;true]
@@ -29,9 +25,6 @@ function default.get_hotbar_bg(x,y)
 end
 
 default.gui_survival_form = "size[8,8.5]"..
-                       default.gui_bg..
-                       default.gui_bg_img..
-                       default.gui_slots..
                        "list[current_player;main;0,4.25;8,1;]"..
                        "list[current_player;main;0,5.5;8,3;8]"..
                        "list[current_player;craft;1.75,0.5;3,3;]"..
index 123fcd5e83b60443e3cfd6b4685a5e37304b954a..935d857ad49acedf89ab45fd19cf6266acc9d163 100644 (file)
@@ -23,6 +23,9 @@ LIGHT_MAX = default.LIGHT_MAX
 
 -- Formspecs
 default.gui_suvival_form = default.gui_survival_form
+default.gui_bg     = ""
+default.gui_bg_img = ""
+default.gui_slots  = ""
 
 -- Players
 if minetest.get_modpath("player_api") then
index a2f1a3e58dd5a74b7ca808fc12436265e0a1ce11..4d363516fd65dfeb4949eae1c2c3b34649f70c72 100644 (file)
@@ -2449,9 +2449,6 @@ minetest.register_node("default:lava_flowing", {
 
 local bookshelf_formspec =
        "size[8,7;]" ..
-       default.gui_bg ..
-       default.gui_bg_img ..
-       default.gui_slots ..
        "list[context;books;0,0.3;8,2;]" ..
        "list[current_player;main;0,2.85;8,1;]" ..
        "list[current_player;main;0,4.08;8,3;8]" ..
index 43d80922d49613972bfc842d05393c7514e52f32..e5c68a74b10db94ccb672ae8a8e17d00de4f83f9 100644 (file)
@@ -3,9 +3,6 @@
 
 local vessels_shelf_formspec =
        "size[8,7;]" ..
-       default.gui_bg ..
-       default.gui_bg_img ..
-       default.gui_slots ..
        "list[context;vessels;0,0.3;8,2;]" ..
        "list[current_player;main;0,2.85;8,1;]" ..
        "list[current_player;main;0,4.08;8,3;8]" ..