Move global core variables to mcl_init

This commit is contained in:
Wuzzy 2017-02-17 23:06:52 +01:00
parent f652d5ecb5
commit 91950ee026
19 changed files with 44 additions and 34 deletions

View file

@ -232,7 +232,7 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page,
"image[" .. boffset[check] .. ";1,1;crafting_creative_marker.png]"
end
formspec = "size[10,9.3]"..
mcl_core.inventory_header..
mcl_vars.inventory_header..
"background[-0.19,-0.25;10.5,9.87;"..inv_bg.."]"..
"label[-5,-5;"..name.."]"..
"item_image_button[-0.1,0;1,1;mcl_core:brick_block;blocks;]".. --build blocks

View file

@ -1,2 +1,3 @@
mcl_init
mcl_core
mcl_sounds

View file

@ -66,7 +66,7 @@ local function set_inventory(player)
local form = "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory.png"..armor_img.."]"..
mcl_core.inventory_header..
mcl_vars.inventory_header..
img_element..
--armor
"list[detached:"..player_name.."_armor;armor;0,0;1,1;1]"..
@ -98,7 +98,7 @@ local function set_workbench(player)
local form = "size[9,8.75]"..
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_workbench.png]"..
mcl_core.inventory_header..
mcl_vars.inventory_header..
"list[current_player;main;0,4.5;9,3;9]"..
"list[current_player;main;0,7.74;9,1;]"..
"list[current_player;craft;1.75,0.5;3,3;]"..

View file

@ -251,8 +251,8 @@ function craftguide:get_formspec(player_name, is_fuel)
data.pagemax = max(1, ceil(#data.items / ipp))
local formspec = "size["..data.iX..","..(iY+3)..".6;]"..
mcl_core.gui_slots ..
mcl_core.gui_bg ..
mcl_vars.gui_slots ..
mcl_vars.gui_bg ..
[[background[1,1;1,1;craftguide_bg.png;true]
button[2.4,0.21;0.8,0.5;search;?]
button[3.05,0.21;0.8,0.5;clear;X]