- X (close) button in the formspecs
- attempt to fix BG in the mainmenu - fixed textures path on Windows
This commit is contained in:
parent
141059295b
commit
a75f06cd80
@ -43,8 +43,6 @@ end
|
|||||||
|
|
||||||
local function add_server_buttonhandler(this, fields)
|
local function add_server_buttonhandler(this, fields)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["server_add_cancel"] then
|
if fields["server_add_cancel"] then
|
||||||
this:delete()
|
this:delete()
|
||||||
|
@ -120,9 +120,6 @@ end
|
|||||||
|
|
||||||
local function handle_buttons(this, fields)
|
local function handle_buttons(this, fields)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["world_config_modlist"] ~= nil then
|
if fields["world_config_modlist"] ~= nil then
|
||||||
local event = multicraft.explode_textlist_event(fields["world_config_modlist"])
|
local event = multicraft.explode_textlist_event(fields["world_config_modlist"])
|
||||||
this.data.selected_mod = event.index
|
this.data.selected_mod = event.index
|
||||||
|
@ -84,8 +84,6 @@ end
|
|||||||
|
|
||||||
local function create_world_buttonhandler(this, fields)
|
local function create_world_buttonhandler(this, fields)
|
||||||
core.set_clouds(false)
|
core.set_clouds(false)
|
||||||
core.set_background("background",core.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
core.set_background("header",core.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["world_create_cancel"] then
|
if fields["world_create_cancel"] then
|
||||||
this:delete()
|
this:delete()
|
||||||
|
@ -36,8 +36,6 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function delete_mod_buttonhandler(this, fields)
|
local function delete_mod_buttonhandler(this, fields)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["dlg_delete_mod_confirm"] ~= nil then
|
if fields["dlg_delete_mod_confirm"] ~= nil then
|
||||||
|
|
||||||
|
@ -32,8 +32,6 @@ end
|
|||||||
|
|
||||||
local function delete_world_buttonhandler(this, fields)
|
local function delete_world_buttonhandler(this, fields)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
if fields["world_delete_confirm"] then
|
if fields["world_delete_confirm"] then
|
||||||
if this.data.delete_index > 0 and
|
if this.data.delete_index > 0 and
|
||||||
this.data.delete_index <= #menudata.worldlist:get_raw_list() then
|
this.data.delete_index <= #menudata.worldlist:get_raw_list() then
|
||||||
|
@ -38,8 +38,6 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function rename_modpack_buttonhandler(this, fields)
|
local function rename_modpack_buttonhandler(this, fields)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["dlg_rename_modpack_confirm"] ~= nil then
|
if fields["dlg_rename_modpack_confirm"] ~= nil then
|
||||||
local oldpath = multicraft.get_modpath() .. DIR_DELIM .. this.data.mod.name
|
local oldpath = multicraft.get_modpath() .. DIR_DELIM .. this.data.mod.name
|
||||||
|
@ -79,10 +79,6 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
local function main_button_handler2(tabview, fields, name, tabdata)
|
local function main_button_handler2(tabview, fields, name, tabdata)
|
||||||
multicraft.set_clouds(false)
|
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
local index = ''
|
local index = ''
|
||||||
if fields["btn_show_singleplayer"] then index = "singleplayer" end
|
if fields["btn_show_singleplayer"] then index = "singleplayer" end
|
||||||
if fields["btn_show_multiplayer"] then index = "multiplayer" end
|
if fields["btn_show_multiplayer"] then index = "multiplayer" end
|
||||||
@ -121,10 +117,8 @@ local function on_activate2(type,old_tab,new_tab)
|
|||||||
mm_texture.clear("header")
|
mm_texture.clear("header")
|
||||||
mm_texture.clear("footer")
|
mm_texture.clear("footer")
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.jpeg')
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
||||||
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
|
@ -166,9 +166,6 @@ end
|
|||||||
-- @function [parent=#modstore] handle_buttons
|
-- @function [parent=#modstore] handle_buttons
|
||||||
function modstore.handle_buttons(current_tab,fields)
|
function modstore.handle_buttons(current_tab,fields)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
|
|
||||||
if fields["modstore_tab"] then
|
if fields["modstore_tab"] then
|
||||||
local index = tonumber(fields["modstore_tab"])
|
local index = tonumber(fields["modstore_tab"])
|
||||||
|
@ -188,9 +188,6 @@ end
|
|||||||
-- @function [parent=#modstore] handle_buttons
|
-- @function [parent=#modstore] handle_buttons
|
||||||
function modstore.handle_buttons(parent, fields, name, data)
|
function modstore.handle_buttons(parent, fields, name, data)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
|
|
||||||
if fields["btn_modstore_page_up"] then
|
if fields["btn_modstore_page_up"] then
|
||||||
if modstore.current_list ~= nil and modstore.current_list.page > 0 then
|
if modstore.current_list ~= nil and modstore.current_list.page > 0 then
|
||||||
|
@ -85,9 +85,6 @@ tab_credits = {
|
|||||||
end,
|
end,
|
||||||
cbf_button_handler = function(tabview, fields, name, tabdata)
|
cbf_button_handler = function(tabview, fields, name, tabdata)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["btn_cancel"] ~= nil then
|
if fields["btn_cancel"] ~= nil then
|
||||||
tabview:hide()
|
tabview:hide()
|
||||||
tabview.parent:show()
|
tabview.parent:show()
|
||||||
|
@ -112,8 +112,6 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function handle_buttons(tabview, fields, tabname, tabdata)
|
local function handle_buttons(tabview, fields, tabname, tabdata)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["modlist"] ~= nil then
|
if fields["modlist"] ~= nil then
|
||||||
local event = multicraft.explode_textlist_event(fields["modlist"])
|
local event = multicraft.explode_textlist_event(fields["modlist"])
|
||||||
|
@ -119,8 +119,6 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function main_button_handler(tabview, fields, name, tabdata)
|
local function main_button_handler(tabview, fields, name, tabdata)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if not tabdata then tabdata = {} end
|
if not tabdata then tabdata = {} end
|
||||||
|
|
||||||
|
@ -78,8 +78,6 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function main_button_handler(this, fields, name, tabdata)
|
local function main_button_handler(this, fields, name, tabdata)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
local world_doubleclick = false
|
local world_doubleclick = false
|
||||||
|
|
||||||
|
@ -82,8 +82,6 @@ end
|
|||||||
|
|
||||||
local function dlg_confirm_reset_btnhandler(this, fields, dialogdata)
|
local function dlg_confirm_reset_btnhandler(this, fields, dialogdata)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["dlg_reset_singleplayer_confirm"] ~= nil then
|
if fields["dlg_reset_singleplayer_confirm"] ~= nil then
|
||||||
local worldlist = multicraft.get_worlds()
|
local worldlist = multicraft.get_worlds()
|
||||||
|
@ -124,9 +124,6 @@ end
|
|||||||
|
|
||||||
local function main_button_handler(this, fields, name, tabdata)
|
local function main_button_handler(this, fields, name, tabdata)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
--assert(name == "singleplayer")
|
--assert(name == "singleplayer")
|
||||||
|
|
||||||
if fields["btn_server"]~=nil then
|
if fields["btn_server"]~=nil then
|
||||||
|
@ -88,8 +88,6 @@ end
|
|||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function main_button_handler(tabview, fields, name, tabdata)
|
local function main_button_handler(tabview, fields, name, tabdata)
|
||||||
multicraft.set_clouds(false)
|
multicraft.set_clouds(false)
|
||||||
multicraft.set_background("background",multicraft.formspec_escape(mm_texture.basetexturedir)..'background.png')
|
|
||||||
multicraft.set_background("header",multicraft.formspec_escape(mm_texture.basetexturedir)..'header.png')
|
|
||||||
|
|
||||||
if fields["TPs"] ~= nil then
|
if fields["TPs"] ~= nil then
|
||||||
local event = multicraft.explode_textlist_event(fields["TPs"])
|
local event = multicraft.explode_textlist_event(fields["TPs"])
|
||||||
|
@ -33,6 +33,7 @@ newbook.on_use = function ( itemstack, user, pointed_thing )
|
|||||||
local text = itemstack:get_metadata();
|
local text = itemstack:get_metadata();
|
||||||
|
|
||||||
local formspec = "size[8,9]"..
|
local formspec = "size[8,9]"..
|
||||||
|
"image_button_exit[8,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.5,-0.5;9,10;book_bg.png]"..
|
"background[-0.5,-0.5;9,10;book_bg.png]"..
|
||||||
"textarea[0.5,0.25;7.5,9.25;text;;"..multicraft.formspec_escape(text).."]"..
|
"textarea[0.5,0.25;7.5,9.25;text;;"..multicraft.formspec_escape(text).."]"..
|
||||||
"button_exit[3,8.25;2,1;ok;Exit]";
|
"button_exit[3,8.25;2,1;ok;Exit]";
|
||||||
|
@ -223,6 +223,7 @@ crafting.set_creative_formspec = function(player, start_i, pagenum, show, page,
|
|||||||
"list[detached:"..player_name.."_armor;armor;1,2.55;1,1;3]"
|
"list[detached:"..player_name.."_armor;armor;1,2.55;1,1;3]"
|
||||||
end
|
end
|
||||||
formspec = "size[10,9.3]"..
|
formspec = "size[10,9.3]"..
|
||||||
|
"image_button_exit[10,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.19,-0.25;10.5,9.87;crafting_inventory_creative.png]"..
|
"background[-0.19,-0.25;10.5,9.87;crafting_inventory_creative.png]"..
|
||||||
"bgcolor[#080808BB;true]"..
|
"bgcolor[#080808BB;true]"..
|
||||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
default.furnace_inactive_formspec =
|
default.furnace_inactive_formspec =
|
||||||
"size[9,8.75]"..
|
"size[9,8.75]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_furnace.png]"..
|
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_furnace.png]"..
|
||||||
"bgcolor[#080808BB;true]"..
|
"bgcolor[#080808BB;true]"..
|
||||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||||
@ -13,6 +14,7 @@ default.furnace_inactive_formspec =
|
|||||||
function default.get_furnace_active_formspec(pos, percent)
|
function default.get_furnace_active_formspec(pos, percent)
|
||||||
local formspec =
|
local formspec =
|
||||||
"size[9,8.75]"..
|
"size[9,8.75]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_furnace.png]"..
|
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_furnace.png]"..
|
||||||
"bgcolor[#080808BB;true]"..
|
"bgcolor[#080808BB;true]"..
|
||||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||||
@ -33,6 +35,7 @@ end
|
|||||||
|
|
||||||
default.chest_formspec =
|
default.chest_formspec =
|
||||||
"size[9,9.75]"..
|
"size[9,9.75]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
||||||
"bgcolor[#080808BB;true]"..
|
"bgcolor[#080808BB;true]"..
|
||||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||||
@ -54,6 +57,7 @@ function default.get_locked_chest_formspec(pos)
|
|||||||
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
|
local spos = pos.x .. "," .. pos.y .. "," ..pos.z
|
||||||
local formspec =
|
local formspec =
|
||||||
"size[9,9.75]"..
|
"size[9,9.75]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
"background[-0.19,-0.25;9.41,10.48;crafting_inventory_chest.png]"..
|
||||||
"bgcolor[#080808BB;true]"..
|
"bgcolor[#080808BB;true]"..
|
||||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||||
|
@ -88,6 +88,7 @@ local function set_inventory(player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local form = "size[9,8.75]"..
|
local form = "size[9,8.75]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory.png"..armor_img.."]"..
|
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory.png"..armor_img.."]"..
|
||||||
"bgcolor[#080808BB;true]"..
|
"bgcolor[#080808BB;true]"..
|
||||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||||
@ -125,6 +126,7 @@ local function set_workbench(player)
|
|||||||
player:get_inventory():set_size("main", 9*4)
|
player:get_inventory():set_size("main", 9*4)
|
||||||
|
|
||||||
local form = "size[9,8.75]"..
|
local form = "size[9,8.75]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_workbench.png]"..
|
"background[-0.19,-0.25;9.41,9.49;crafting_formspec_bg.png^crafting_inventory_workbench.png]"..
|
||||||
"bgcolor[#080808BB;true]"..
|
"bgcolor[#080808BB;true]"..
|
||||||
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
"listcolors[#9990;#FFF7;#FFF0;#160816;#D4D2FF]"..
|
||||||
|
@ -1184,6 +1184,7 @@ multicraft.register_node("default:chest", {
|
|||||||
local p = get_chest_neighborpos(pos, param2, "right")
|
local p = get_chest_neighborpos(pos, param2, "right")
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[9,11.5]"..
|
"size[9,11.5]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0,0;9,3;]"..
|
"list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0,0;9,3;]"..
|
||||||
"list[current_name;main;0,3;9,3;]"..
|
"list[current_name;main;0,3;9,3;]"..
|
||||||
"list[current_player;main;0,7;9,3;9]"..
|
"list[current_player;main;0,7;9,3;9]"..
|
||||||
@ -1193,6 +1194,7 @@ multicraft.register_node("default:chest", {
|
|||||||
local m = multicraft.env:get_meta(p)
|
local m = multicraft.env:get_meta(p)
|
||||||
m:set_string("formspec",
|
m:set_string("formspec",
|
||||||
"size[9,11.5]"..
|
"size[9,11.5]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"list[current_name;main;0,0;9,3;]"..
|
"list[current_name;main;0,0;9,3;]"..
|
||||||
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,3;9,3;]"..
|
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,3;9,3;]"..
|
||||||
"list[current_player;main;0,7;9,3;9]"..
|
"list[current_player;main;0,7;9,3;9]"..
|
||||||
@ -1203,6 +1205,7 @@ multicraft.register_node("default:chest", {
|
|||||||
local p = get_chest_neighborpos(pos, param2, "left")
|
local p = get_chest_neighborpos(pos, param2, "left")
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[9,11.5]"..
|
"size[9,11.5]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"list[current_name;main;0,0;9,3;]"..
|
"list[current_name;main;0,0;9,3;]"..
|
||||||
"list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0,3;9,3;]"..
|
"list[nodemeta:"..p.x..","..p.y..","..p.z..";main;0,3;9,3;]"..
|
||||||
"list[current_player;main;0,7;9,3;9]"..
|
"list[current_player;main;0,7;9,3;9]"..
|
||||||
@ -1212,6 +1215,7 @@ multicraft.register_node("default:chest", {
|
|||||||
local m = multicraft.env:get_meta(p)
|
local m = multicraft.env:get_meta(p)
|
||||||
m:set_string("formspec",
|
m:set_string("formspec",
|
||||||
"size[9,11.5]"..
|
"size[9,11.5]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0;9,3;]"..
|
"list[nodemeta:"..pos.x..","..pos.y..","..pos.z..";main;0,0;9,3;]"..
|
||||||
"list[current_name;main;0,3;9,3;]"..
|
"list[current_name;main;0,3;9,3;]"..
|
||||||
"list[current_player;main;0,7;9,3;9]"..
|
"list[current_player;main;0,7;9,3;9]"..
|
||||||
@ -1220,6 +1224,7 @@ multicraft.register_node("default:chest", {
|
|||||||
else
|
else
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[9,8.5]"..
|
"size[9,8.5]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"list[current_name;main;0,0;9,3;]"..
|
"list[current_name;main;0,0;9,3;]"..
|
||||||
"list[current_player;main;0,4;9,3;9]"..
|
"list[current_player;main;0,4;9,3;9]"..
|
||||||
"list[current_player;main;0,7.5.5;9,1;]")
|
"list[current_player;main;0,7.5.5;9,1;]")
|
||||||
@ -1254,6 +1259,13 @@ multicraft.register_node("default:chest", {
|
|||||||
multicraft.log("action", player:get_player_name()..
|
multicraft.log("action", player:get_player_name()..
|
||||||
" takes stuff from chest at "..multicraft.pos_to_string(pos))
|
" takes stuff from chest at "..multicraft.pos_to_string(pos))
|
||||||
end,
|
end,
|
||||||
|
on_receive_fields = function(pos, formname, fields, sender)
|
||||||
|
if fields.exit then
|
||||||
|
print('test')
|
||||||
|
fields.quit = true
|
||||||
|
-- minetest.show_formspec(sender:get_player_name(), 'quit', "")
|
||||||
|
end
|
||||||
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
multicraft.register_node("default:chest_left", {
|
multicraft.register_node("default:chest_left", {
|
||||||
@ -1276,6 +1288,7 @@ multicraft.register_node("default:chest_left", {
|
|||||||
local meta = multicraft.env:get_meta(p)
|
local meta = multicraft.env:get_meta(p)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[9,8.5]"..
|
"size[9,8.5]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"list[current_name;main;0,0;9,3;]"..
|
"list[current_name;main;0,0;9,3;]"..
|
||||||
"list[current_player;main;0,4;9,3;9]"..
|
"list[current_player;main;0,4;9,3;9]"..
|
||||||
"list[current_player;main;0,7.5.5;9,1;]")
|
"list[current_player;main;0,7.5.5;9,1;]")
|
||||||
@ -1330,6 +1343,7 @@ multicraft.register_node("default:chest_right", {
|
|||||||
local meta = multicraft.env:get_meta(p)
|
local meta = multicraft.env:get_meta(p)
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[9,8.5]"..
|
"size[9,8.5]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"list[current_name;main;0,0;9,3;]"..
|
"list[current_name;main;0,0;9,3;]"..
|
||||||
"list[current_player;main;0,4;9,3;9]"..
|
"list[current_player;main;0,4;9,3;9]"..
|
||||||
"list[current_player;main;0,7.5.5;9,1;]")
|
"list[current_player;main;0,7.5.5;9,1;]")
|
||||||
@ -1366,6 +1380,7 @@ multicraft.register_node("default:chest_right", {
|
|||||||
|
|
||||||
default.furnace_inactive_formspec =
|
default.furnace_inactive_formspec =
|
||||||
"size[9,9]"..
|
"size[9,9]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"image[2,2;1,1;default_furnace_fire_bg.png]"..
|
"image[2,2;1,1;default_furnace_fire_bg.png]"..
|
||||||
"list[current_name;fuel;2,3;1,1;]"..
|
"list[current_name;fuel;2,3;1,1;]"..
|
||||||
"list[current_name;src;2,1;1,1;]"..
|
"list[current_name;src;2,1;1,1;]"..
|
||||||
@ -1579,6 +1594,7 @@ multicraft.register_abm({
|
|||||||
hacky_swap_node(pos,"default:furnace_active")
|
hacky_swap_node(pos,"default:furnace_active")
|
||||||
meta:set_string("formspec",
|
meta:set_string("formspec",
|
||||||
"size[9,9]"..
|
"size[9,9]"..
|
||||||
|
"image_button_exit[9,0;1,1;;exit;X;true;true;]"..
|
||||||
"image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:"..
|
"image[2,2;1,1;default_furnace_fire_bg.png^[lowpart:"..
|
||||||
(100-percent)..":default_furnace_fire_fg.png]"..
|
(100-percent)..":default_furnace_fire_fg.png]"..
|
||||||
"list[current_name;fuel;2,3;1,1;]"..
|
"list[current_name;fuel;2,3;1,1;]"..
|
||||||
|
@ -93,7 +93,8 @@ function map_handler (itemstack, user, pointed_thing)
|
|||||||
|
|
||||||
pp = pp + 1
|
pp = pp + 1
|
||||||
p[pp] = "size[8.2,8]"..
|
p[pp] = "size[8.2,8]"..
|
||||||
"background[-1,-1;9.8,9.8;map_block_bg.png]"
|
"image_button_exit[8,0;1,1;;exit;X;true;true;]"..
|
||||||
|
"background[-1,-1;9.8,9.8;map_block_bg.png]"
|
||||||
|
|
||||||
for i=1,50,1 do
|
for i=1,50,1 do
|
||||||
for j=1,50,1 do
|
for j=1,50,1 do
|
||||||
|
@ -468,6 +468,7 @@ signs_lib.construct_sign = function(pos, locked)
|
|||||||
meta:set_string(
|
meta:set_string(
|
||||||
"formspec",
|
"formspec",
|
||||||
"size[6,4]"..
|
"size[6,4]"..
|
||||||
|
"image_button_exit[6,0;1,1;;exit;X;true;true;]"..
|
||||||
"textarea[0,-0.3;6.5,3;text;;${text}]"..
|
"textarea[0,-0.3;6.5,3;text;;${text}]"..
|
||||||
"button_exit[2,3.4;2,1;ok;Write]"..
|
"button_exit[2,3.4;2,1;ok;Write]"..
|
||||||
"background[-0.5,-0.5;7,5;bg_signs_lib.jpg]")
|
"background[-0.5,-0.5;7,5;bg_signs_lib.jpg]")
|
||||||
|
@ -47,6 +47,7 @@ end
|
|||||||
protector.generate_formspec = function(meta)
|
protector.generate_formspec = function(meta)
|
||||||
if meta:get_int("page") == nil then meta:set_int("page",0) end
|
if meta:get_int("page") == nil then meta:set_int("page",0) end
|
||||||
local formspec = "size[8,7]"
|
local formspec = "size[8,7]"
|
||||||
|
.."image_button_exit[8,0;1,1;;exit;X;true;true;]"
|
||||||
.."label[0,0;-- Protector interface --]"
|
.."label[0,0;-- Protector interface --]"
|
||||||
.."label[0,1;Punch node to show protected area]"
|
.."label[0,1;Punch node to show protected area]"
|
||||||
.."label[0,2;Members: (type nick, press Enter to add)]"
|
.."label[0,2;Members: (type nick, press Enter to add)]"
|
||||||
@ -325,4 +326,4 @@ multicraft.register_node("protector:display_node", {
|
|||||||
paramtype = "light",
|
paramtype = "light",
|
||||||
groups = {dig_immediate=3,not_in_creative_inventory=1},
|
groups = {dig_immediate=3,not_in_creative_inventory=1},
|
||||||
drop = "",
|
drop = "",
|
||||||
})
|
})
|
||||||
|
Before Width: | Height: | Size: 835 KiB After Width: | Height: | Size: 835 KiB |
Loading…
x
Reference in New Issue
Block a user