15
15
-- with this program; if not, write to the Free Software Foundation, Inc.,
16
16
-- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17
17
18
- if not minetest .get_http_api then
18
+ if not core .get_http_api then
19
19
function create_store_dlg ()
20
20
return messagebox (" store" ,
21
21
fgettext (" ContentDB is not available when Minetest was compiled without cURL" ))
27
27
-- before the package list is ordered based on installed state.
28
28
local store = { packages = {}, packages_full = {}, packages_full_unordered = {} }
29
29
30
- local http = minetest .get_http_api ()
30
+ local http = core .get_http_api ()
31
31
32
32
-- Screenshot
33
33
local screenshot_dir = core .get_cache_path () .. DIR_DELIM .. " cdb"
@@ -152,7 +152,7 @@ local function start_install(package)
152
152
end
153
153
154
154
local function queue_download (package )
155
- local max_concurrent_downloads = tonumber (minetest .settings :get (" contentdb_max_concurrent_downloads" ))
155
+ local max_concurrent_downloads = tonumber (core .settings :get (" contentdb_max_concurrent_downloads" ))
156
156
if number_downloading < max_concurrent_downloads then
157
157
start_install (package )
158
158
else
@@ -320,7 +320,7 @@ function install_dialog.get_formspec()
320
320
selected_game_idx = i
321
321
end
322
322
323
- games [i ] = minetest .formspec_escape (games [i ].name )
323
+ games [i ] = core .formspec_escape (games [i ].name )
324
324
end
325
325
326
326
local selected_game = pkgmgr .games [selected_game_idx ]
@@ -331,7 +331,7 @@ function install_dialog.get_formspec()
331
331
local formatted_deps = {}
332
332
for _ , dep in pairs (install_dialog .dependencies ) do
333
333
formatted_deps [# formatted_deps + 1 ] = " #fff"
334
- formatted_deps [# formatted_deps + 1 ] = minetest .formspec_escape (dep .name )
334
+ formatted_deps [# formatted_deps + 1 ] = core .formspec_escape (dep .name )
335
335
if dep .installed then
336
336
formatted_deps [# formatted_deps + 1 ] = " #ccf"
337
337
formatted_deps [# formatted_deps + 1 ] = fgettext (" Already installed" )
@@ -402,7 +402,7 @@ function install_dialog.handle_submit(this, fields)
402
402
end
403
403
404
404
if fields .will_install_deps ~= nil then
405
- install_dialog .will_install_deps = minetest .is_yes (fields .will_install_deps )
405
+ install_dialog .will_install_deps = core .is_yes (fields .will_install_deps )
406
406
return true
407
407
end
408
408
@@ -553,7 +553,7 @@ function store.load()
553
553
end
554
554
end
555
555
556
- local timeout = tonumber (minetest .settings :get (" curl_file_download_timeout" ))
556
+ local timeout = tonumber (core .settings :get (" curl_file_download_timeout" ))
557
557
local response = http .fetch_sync ({ url = url , timeout = timeout })
558
558
if not response .succeeded then
559
559
return
@@ -793,8 +793,8 @@ function store.get_formspec(dlgdata)
793
793
-- title
794
794
formspec [# formspec + 1 ] = " label[1.875,0.1;"
795
795
formspec [# formspec + 1 ] = core .formspec_escape (
796
- minetest .colorize (mt_color_green , package .title ) ..
797
- minetest .colorize (" #BFBFBF" , " by " .. package .author ))
796
+ core .colorize (mt_color_green , package .title ) ..
797
+ core .colorize (" #BFBFBF" , " by " .. package .author ))
798
798
formspec [# formspec + 1 ] = " ]"
799
799
800
800
-- buttons
0 commit comments