mirror of
https://github.com/minetest-mods/unified_inventory.git
synced 2025-06-29 23:10:45 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
38
init.lua
38
init.lua
@ -1,5 +1,11 @@
|
||||
-- Unified Inventory
|
||||
|
||||
if not minetest.features.formspec_version_element then
|
||||
-- At least formspec_version[] is the minimal feature requirement
|
||||
error("Unified Inventory requires Minetest version 5.4.0 or newer.\n" ..
|
||||
" Please update Minetest or use an older version of Unified Inventory.")
|
||||
end
|
||||
|
||||
local modpath = minetest.get_modpath(minetest.get_current_modname())
|
||||
local worldpath = minetest.get_worldpath()
|
||||
|
||||
@ -46,7 +52,7 @@ unified_inventory = {
|
||||
list_img_offset = 0.13,
|
||||
standard_background = "background9[0,0;1,1;ui_formbg_9_sliced.png;true;16]",
|
||||
|
||||
version = 3
|
||||
version = 4
|
||||
}
|
||||
|
||||
local ui = unified_inventory
|
||||
@ -59,10 +65,16 @@ ui.style_full = {
|
||||
formspec_y = 1,
|
||||
formw = 17.75,
|
||||
formh = 12.25,
|
||||
-- Item browser size, pos
|
||||
pagecols = 8,
|
||||
pagerows = 9,
|
||||
page_x = 10.75,
|
||||
page_y = 2.30,
|
||||
-- Item browser controls
|
||||
page_buttons_x = 11.60,
|
||||
page_buttons_y = 10.15,
|
||||
searchwidth = 3.4,
|
||||
-- Crafting grid positions
|
||||
craft_x = 2.8,
|
||||
craft_y = 1.15,
|
||||
craftresult_x = 7.8,
|
||||
@ -74,13 +86,15 @@ ui.style_full = {
|
||||
craft_guide_resultstr_x = 0.3,
|
||||
craft_guide_resultstr_y = 0.6,
|
||||
give_btn_x = 0.25,
|
||||
-- Tab switching buttons
|
||||
main_button_x = 0.4,
|
||||
main_button_y = 11.0,
|
||||
page_buttons_x = 11.60,
|
||||
page_buttons_y = 10.15,
|
||||
searchwidth = 3.4,
|
||||
main_button_cols = 12,
|
||||
main_button_rows = 1,
|
||||
-- Tab title position
|
||||
form_header_x = 0.4,
|
||||
form_header_y = 0.4,
|
||||
-- Generic sizes
|
||||
btn_spc = 0.85,
|
||||
btn_size = 0.75,
|
||||
std_inv_x = 0.3,
|
||||
@ -92,10 +106,16 @@ ui.style_lite = {
|
||||
formspec_y = 0.6,
|
||||
formw = 14,
|
||||
formh = 9.75,
|
||||
-- Item browser size, pos
|
||||
pagecols = 4,
|
||||
pagerows = 5,
|
||||
page_x = 10.5,
|
||||
page_y = 2.15,
|
||||
-- Item browser controls
|
||||
page_buttons_x = 10.5,
|
||||
page_buttons_y = 6.15,
|
||||
searchwidth = 1.6,
|
||||
-- Crafting grid positions
|
||||
craft_x = 2.6,
|
||||
craft_y = 0.75,
|
||||
craftresult_x = 5.75,
|
||||
@ -107,13 +127,15 @@ ui.style_lite = {
|
||||
craft_guide_resultstr_x = 0.15,
|
||||
craft_guide_resultstr_y = 0.35,
|
||||
give_btn_x = 0.15,
|
||||
-- Tab switching buttons
|
||||
main_button_x = 10.5,
|
||||
main_button_y = 8.15,
|
||||
page_buttons_x = 10.5,
|
||||
page_buttons_y = 6.15,
|
||||
searchwidth = 1.6,
|
||||
main_button_cols = 4,
|
||||
main_button_rows = 2,
|
||||
-- Tab title position
|
||||
form_header_x = 0.2,
|
||||
form_header_y = 0.2,
|
||||
-- Generic sizes
|
||||
btn_spc = 0.8,
|
||||
btn_size = 0.7,
|
||||
std_inv_x = 0.1,
|
||||
@ -170,4 +192,6 @@ end
|
||||
|
||||
dofile(modpath.."/item_names.lua")
|
||||
dofile(modpath.."/waypoints.lua")
|
||||
dofile(modpath.."/legacy.lua") -- mod compatibility
|
||||
|
||||
minetest.log("action", "[unified_inventory] loaded.")
|
||||
|
Reference in New Issue
Block a user