aboutsummaryrefslogtreecommitdiff
path: root/builtin/mainmenu/tab_multiplayer.lua
diff options
context:
space:
mode:
Diffstat (limited to 'builtin/mainmenu/tab_multiplayer.lua')
-rw-r--r--builtin/mainmenu/tab_multiplayer.lua32
1 files changed, 16 insertions, 16 deletions
diff --git a/builtin/mainmenu/tab_multiplayer.lua b/builtin/mainmenu/tab_multiplayer.lua
index 0f4921b03..a9b2b35fe 100644
--- a/builtin/mainmenu/tab_multiplayer.lua
+++ b/builtin/mainmenu/tab_multiplayer.lua
@@ -39,14 +39,14 @@ local function get_formspec(tabview, name, tabdata)
-- Address / Port
"label[7.75,-0.25;" .. fgettext("Address / Port") .. "]" ..
"field[8,0.65;3.25,0.5;te_address;;" ..
- core.formspec_escape(core.setting_get("address")) .. "]" ..
+ core.formspec_escape(core.settings:get("address")) .. "]" ..
"field[11.1,0.65;1.4,0.5;te_port;;" ..
- core.formspec_escape(core.setting_get("remote_port")) .. "]" ..
+ core.formspec_escape(core.settings:get("remote_port")) .. "]" ..
-- Name / Password
"label[7.75,0.95;" .. fgettext("Name / Password") .. "]" ..
"field[8,1.85;2.9,0.5;te_name;;" ..
- core.formspec_escape(core.setting_get("name")) .. "]" ..
+ core.formspec_escape(core.settings:get("name")) .. "]" ..
"pwdfield[10.73,1.85;1.77,0.5;te_pwd;]" ..
-- Description Background
@@ -135,7 +135,7 @@ local function main_button_handler(tabview, fields, name, tabdata)
if fields.te_name then
gamedata.playername = fields.te_name
- core.setting_set("name", fields.te_name)
+ core.settings:set("name", fields.te_name)
end
if fields.favourites then
@@ -163,8 +163,8 @@ local function main_button_handler(tabview, fields, name, tabdata)
gamedata.serverdescription = fav.description
if gamedata.address and gamedata.port then
- core.setting_set("address", gamedata.address)
- core.setting_set("remote_port", gamedata.port)
+ core.settings:set("address", gamedata.address)
+ core.settings:set("remote_port", gamedata.port)
core.start()
end
end
@@ -187,8 +187,8 @@ local function main_button_handler(tabview, fields, name, tabdata)
end
if address and port then
- core.setting_set("address", address)
- core.setting_set("remote_port", port)
+ core.settings:set("address", address)
+ core.settings:set("remote_port", port)
end
tabdata.fav_selected = event.row
end
@@ -219,8 +219,8 @@ local function main_button_handler(tabview, fields, name, tabdata)
local port = fav.port
gamedata.serverdescription = fav.description
if address and port then
- core.setting_set("address", address)
- core.setting_set("remote_port", port)
+ core.settings:set("address", address)
+ core.settings:set("remote_port", port)
end
tabdata.fav_selected = fav_idx
@@ -235,8 +235,8 @@ local function main_button_handler(tabview, fields, name, tabdata)
asyncOnlineFavourites()
tabdata.fav_selected = nil
- core.setting_set("address", "")
- core.setting_set("remote_port", "30000")
+ core.settings:set("address", "")
+ core.settings:set("remote_port", "30000")
return true
end
@@ -293,8 +293,8 @@ local function main_button_handler(tabview, fields, name, tabdata)
end)
menudata.search_result = search_result
local first_server = search_result[1]
- core.setting_set("address", first_server.address)
- core.setting_set("remote_port", first_server.port)
+ core.settings:set("address", first_server.address)
+ core.settings:set("remote_port", first_server.port)
end
return true
end
@@ -325,8 +325,8 @@ local function main_button_handler(tabview, fields, name, tabdata)
gamedata.serverdescription = ""
end
- core.setting_set("address", fields.te_address)
- core.setting_set("remote_port", fields.te_port)
+ core.settings:set("address", fields.te_address)
+ core.settings:set("remote_port", fields.te_port)
core.start()
return true