Refactor: xbg -> xdecor.xbg

This commit is contained in:
Wuzzy 2023-07-17 16:00:05 +02:00
parent ecf9af4f85
commit 6a68def01d
5 changed files with 6 additions and 6 deletions

View File

@ -1,6 +1,6 @@
local S = minetest.get_translator("xdecor")
xbg = default.gui_bg .. default.gui_bg_img .. default.gui_slots
xdecor.xbg = default.gui_bg .. default.gui_bg_img .. default.gui_slots
local default_inventory_size = 32
local default_inventory_formspecs = {

View File

@ -34,7 +34,7 @@ function hive.set_formspec(meta, status)
list[current_player;main;0,2.35;8,4;]
listring[current_player;main]
listring[context;honey] ]] ..
xbg .. default.get_hotbar_bg(0,2.35)
xdecor.xbg .. default.get_hotbar_bg(0,2.35)
meta:set_string("formspec", formspec)
end

View File

@ -80,7 +80,7 @@ function mailbox:formspec(pos, owner, is_owner)
"table[6,0.75;3.3,4;givers;" .. giver .. "]" ..
"list[nodemeta:" .. spos .. ";mailbox;0,0.75;6,4;]" ..
"listring[nodemeta:" .. spos .. ";mailbox]" ..
xbg .. default.get_hotbar_bg(0.75, 5.25)
xdecor.xbg .. default.get_hotbar_bg(0.75, 5.25)
end
return "size[8,5]" ..
@ -90,7 +90,7 @@ function mailbox:formspec(pos, owner, is_owner)
minetest.colorize("#FFFF00", owner) or owner)) .. "]" ..
"list[nodemeta:" .. spos .. ";drop;3.5,0;1,1;]" ..
"listring[]" ..
xbg .. default.get_hotbar_bg(0, 1.25)
xdecor.xbg .. default.get_hotbar_bg(0, 1.25)
end
function mailbox.dig(pos, player)

View File

@ -430,7 +430,7 @@ xdecor.register("enderchest", {
list[current_player;main;0,5;8,4;]
listring[current_player;enderchest]
listring[current_player;main] ]]
.. xbg .. default.get_hotbar_bg(0,5))
.. xdecor.xbg .. default.get_hotbar_bg(0,5))
meta:set_string("infotext", S("Ender Chest"))
end

View File

@ -123,7 +123,7 @@ local formspecs = {
function workbench:set_formspec(meta, id)
meta:set_string("formspec",
"size[8,7;]list[current_player;main;0,3.25;8,4;]" ..
formspecs[id] .. xbg .. default.get_hotbar_bg(0,3.25))
formspecs[id] .. xdecor.xbg .. default.get_hotbar_bg(0,3.25))
end
function workbench.construct(pos)