Fix builtin and textures
@ -101,7 +101,7 @@ local function create_world_buttonhandler(this, fields)
|
|||||||
core.settings:set("fixed_map_seed", fields["te_seed"])
|
core.settings:set("fixed_map_seed", fields["te_seed"])
|
||||||
|
|
||||||
if not menudata.worldlist:uid_exists_raw(worldname) then
|
if not menudata.worldlist:uid_exists_raw(worldname) then
|
||||||
core.setting_set("mg_name","v6")
|
core.settings:set("mg_name","v6")
|
||||||
message = core.create_world(worldname,gameindex)
|
message = core.create_world(worldname,gameindex)
|
||||||
else
|
else
|
||||||
message = fgettext("A world named \"$1\" already exists", worldname)
|
message = fgettext("A world named \"$1\" already exists", worldname)
|
||||||
|
@ -88,7 +88,7 @@ local function init_globals()
|
|||||||
menudata.worldlist:add_sort_mechanism("alphabetic", sort_worlds_alphabetic)
|
menudata.worldlist:add_sort_mechanism("alphabetic", sort_worlds_alphabetic)
|
||||||
menudata.worldlist:set_sortmode("alphabetic")
|
menudata.worldlist:set_sortmode("alphabetic")
|
||||||
|
|
||||||
core.setting_set("menu_last_game", "default")
|
local default_game = "default"
|
||||||
|
|
||||||
mm_texture.init()
|
mm_texture.init()
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ local function get_formspec(tabview, name, tabdata)
|
|||||||
retval = retval ..
|
retval = retval ..
|
||||||
"button[8.7,4.5;3.30,0.5;play;".. fgettext("Play") .. "]" ..
|
"button[8.7,4.5;3.30,0.5;play;".. fgettext("Play") .. "]" ..
|
||||||
"checkbox[0.0,4.25;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
|
"checkbox[0.0,4.25;cb_creative_mode;".. fgettext("Creative Mode") .. ";" ..
|
||||||
dump(core.setting_getbool("creative_mode")) .. "]"..
|
dump(core.settings:get_bool("creative_mode")) .. "]"..
|
||||||
"textlist[0,0;11.75,3.7;sp_worlds;" ..
|
"textlist[0,0;11.75,3.7;sp_worlds;" ..
|
||||||
menu_render_worldlist() ..
|
menu_render_worldlist() ..
|
||||||
";" .. index .. ";true]"
|
";" .. index .. ";true]"
|
||||||
@ -73,15 +73,14 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if fields["cb_creative_mode"] then
|
if fields["cb_creative_mode"] then
|
||||||
core.setting_set("creative_mode", fields["cb_creative_mode"])
|
core.settings:set("creative_mode", fields["cb_creative_mode"])
|
||||||
local bool = fields["cb_creative_mode"]
|
local bool = fields["cb_creative_mode"]
|
||||||
if bool == 'true' then
|
if bool == 'true' then
|
||||||
bool = 'false'
|
bool = 'false'
|
||||||
else
|
else
|
||||||
bool = 'true'
|
bool = 'true'
|
||||||
end
|
end
|
||||||
core.setting_set("enable_damage", bool)
|
core.settings:set("enable_damage", bool)
|
||||||
core.setting_save()
|
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||||||
world_doubleclick = true
|
world_doubleclick = true
|
||||||
end
|
end
|
||||||
if event.type == "CHG" then
|
if event.type == "CHG" then
|
||||||
core.setting_set("mainmenu_last_selected_world",
|
core.settings:set("mainmenu_last_selected_world",
|
||||||
menudata.worldlist:get_raw_index(core.get_textlist_index("srv_worlds")))
|
menudata.worldlist:get_raw_index(core.get_textlist_index("srv_worlds")))
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -91,7 +91,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if fields["cb_creative_mode"] then
|
if fields["cb_creative_mode"] then
|
||||||
core.setting_set("creative_mode", fields["cb_creative_mode"])
|
core.settings:set("creative_mode", fields["cb_creative_mode"])
|
||||||
local selected = core.get_textlist_index("srv_worlds")
|
local selected = core.get_textlist_index("srv_worlds")
|
||||||
menu_worldmt(selected, "creative_mode", fields["cb_creative_mode"])
|
menu_worldmt(selected, "creative_mode", fields["cb_creative_mode"])
|
||||||
|
|
||||||
@ -99,7 +99,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if fields["cb_enable_damage"] then
|
if fields["cb_enable_damage"] then
|
||||||
core.setting_set("enable_damage", fields["cb_enable_damage"])
|
core.settings:set("enable_damage", fields["cb_enable_damage"])
|
||||||
local selected = core.get_textlist_index("srv_worlds")
|
local selected = core.get_textlist_index("srv_worlds")
|
||||||
menu_worldmt(selected, "enable_damage", fields["cb_enable_damage"])
|
menu_worldmt(selected, "enable_damage", fields["cb_enable_damage"])
|
||||||
|
|
||||||
@ -107,7 +107,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if fields["cb_server_announce"] then
|
if fields["cb_server_announce"] then
|
||||||
core.setting_set("server_announce", fields["cb_server_announce"])
|
core.settings:set("server_announce", fields["cb_server_announce"])
|
||||||
local selected = core.get_textlist_index("srv_worlds")
|
local selected = core.get_textlist_index("srv_worlds")
|
||||||
menu_worldmt(selected, "server_announce", fields["cb_server_announce"])
|
menu_worldmt(selected, "server_announce", fields["cb_server_announce"])
|
||||||
|
|
||||||
@ -125,16 +125,16 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||||||
gamedata.port = fields["te_serverport"]
|
gamedata.port = fields["te_serverport"]
|
||||||
gamedata.address = ""
|
gamedata.address = ""
|
||||||
|
|
||||||
core.setting_set("port",gamedata.port)
|
core.settings:set("port",gamedata.port)
|
||||||
if fields["te_serveraddr"] ~= nil then
|
if fields["te_serveraddr"] ~= nil then
|
||||||
core.setting_set("bind_address",fields["te_serveraddr"])
|
core.settings:set("bind_address",fields["te_serveraddr"])
|
||||||
end
|
end
|
||||||
|
|
||||||
--update last game
|
--update last game
|
||||||
local world = menudata.worldlist:get_raw_element(gamedata.selected_world)
|
local world = menudata.worldlist:get_raw_element(gamedata.selected_world)
|
||||||
if world then
|
if world then
|
||||||
local game, index = gamemgr.find_by_gameid(world.gameid)
|
local game, index = gamemgr.find_by_gameid(world.gameid)
|
||||||
core.setting_set("menu_last_game", game.id)
|
core.settings:set("menu_last_game", game.id)
|
||||||
end
|
end
|
||||||
|
|
||||||
core.start()
|
core.start()
|
||||||
|
BIN
textures/base/ignore.png
Normal file
After Width: | Height: | Size: 138 B |
Before Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 234 B |
Before Width: | Height: | Size: 413 B |
Before Width: | Height: | Size: 354 B |
Before Width: | Height: | Size: 251 B |
Before Width: | Height: | Size: 244 B |
Before Width: | Height: | Size: 245 B |
Before Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 176 B After Width: | Height: | Size: 174 B |
Before Width: | Height: | Size: 286 B After Width: | Height: | Size: 261 B |
BIN
textures/base/server_ping_1.png
Normal file
After Width: | Height: | Size: 151 B |
BIN
textures/base/server_ping_2.png
Normal file
After Width: | Height: | Size: 152 B |
BIN
textures/base/server_ping_3.png
Normal file
After Width: | Height: | Size: 149 B |
BIN
textures/base/server_ping_4.png
Normal file
After Width: | Height: | Size: 143 B |