Fix builtin and textures
|
@ -101,7 +101,7 @@ local function create_world_buttonhandler(this, fields)
|
|||
core.settings:set("fixed_map_seed", fields["te_seed"])
|
||||
|
||||
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)
|
||||
else
|
||||
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:set_sortmode("alphabetic")
|
||||
|
||||
core.setting_set("menu_last_game", "default")
|
||||
local default_game = "default"
|
||||
|
||||
mm_texture.init()
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ local function get_formspec(tabview, name, tabdata)
|
|||
retval = retval ..
|
||||
"button[8.7,4.5;3.30,0.5;play;".. fgettext("Play") .. "]" ..
|
||||
"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;" ..
|
||||
menu_render_worldlist() ..
|
||||
";" .. index .. ";true]"
|
||||
|
@ -73,15 +73,14 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||
end
|
||||
|
||||
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"]
|
||||
if bool == 'true' then
|
||||
bool = 'false'
|
||||
else
|
||||
bool = 'true'
|
||||
end
|
||||
core.setting_set("enable_damage", bool)
|
||||
core.setting_save()
|
||||
core.settings:set("enable_damage", bool)
|
||||
return true
|
||||
end
|
||||
|
||||
|
|
|
@ -80,7 +80,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||
world_doubleclick = true
|
||||
end
|
||||
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")))
|
||||
return true
|
||||
end
|
||||
|
@ -91,7 +91,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||
end
|
||||
|
||||
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")
|
||||
menu_worldmt(selected, "creative_mode", fields["cb_creative_mode"])
|
||||
|
||||
|
@ -99,7 +99,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||
end
|
||||
|
||||
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")
|
||||
menu_worldmt(selected, "enable_damage", fields["cb_enable_damage"])
|
||||
|
||||
|
@ -107,7 +107,7 @@ local function main_button_handler(this, fields, name, tabdata)
|
|||
end
|
||||
|
||||
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")
|
||||
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.address = ""
|
||||
|
||||
core.setting_set("port",gamedata.port)
|
||||
core.settings:set("port",gamedata.port)
|
||||
if fields["te_serveraddr"] ~= nil then
|
||||
core.setting_set("bind_address",fields["te_serveraddr"])
|
||||
core.settings:set("bind_address",fields["te_serveraddr"])
|
||||
end
|
||||
|
||||
--update last game
|
||||
local world = menudata.worldlist:get_raw_element(gamedata.selected_world)
|
||||
if world then
|
||||
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
|
||||
|
||||
core.start()
|
||||
|
|
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 |
After Width: | Height: | Size: 151 B |
After Width: | Height: | Size: 152 B |
After Width: | Height: | Size: 149 B |
After Width: | Height: | Size: 143 B |