Fix builtin
This commit is contained in:
parent
e6f54b1fce
commit
4d948c4b9c
|
@ -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)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
--Minetest
|
||||
--Minetest
|
||||
--Copyright (C) 2013 sapier
|
||||
--
|
||||
--This program is free software; you can redistribute it and/or modify
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue