]> git.lizzy.rs Git - minetest.git/commitdiff
Replace 'minetest.' with 'core.' in builtin
authorrubenwardy <rw@rubenwardy.com>
Wed, 10 Feb 2021 11:02:34 +0000 (11:02 +0000)
committerrubenwardy <rw@rubenwardy.com>
Thu, 11 Feb 2021 10:18:22 +0000 (10:18 +0000)
builtin/common/information_formspecs.lua
builtin/game/item.lua
builtin/game/statbars.lua
builtin/mainmenu/dlg_config_world.lua
builtin/mainmenu/dlg_contentstore.lua
builtin/mainmenu/dlg_create_world.lua
builtin/mainmenu/pkgmgr.lua

index 8afa5bc87cbbb253e9836b2c0724fd6ee03ecea4..3e2f1f079671e53fc69003182798dd29c6f5c52a 100644 (file)
@@ -115,7 +115,7 @@ core.register_on_player_receive_fields(function(player, formname, fields)
                return
        end
 
-       local event = minetest.explode_table_event(fields.list)
+       local event = core.explode_table_event(fields.list)
        if event.type ~= "INV" then
                local name = player:get_player_name()
                core.show_formspec(name, "__builtin:help_cmds",
index 881aff52e49dff944f37a34d9d1b3c1cd3c3c10a..b68177c227b5e6fd190f5b99ab68ab65cc384bfa 100644 (file)
@@ -678,7 +678,7 @@ end
 -- Item definition defaults
 --
 
-local default_stack_max = tonumber(minetest.settings:get("default_stack_max")) or 99
+local default_stack_max = tonumber(core.settings:get("default_stack_max")) or 99
 
 core.nodedef_default = {
        -- Item properties
index d192029c586dda6bf57c6da1c4b47a7587fedff2..db5087a16eede511fc45dee999bfdac936c2c3fd 100644 (file)
@@ -84,8 +84,8 @@ local function update_builtin_statbars(player)
        end
 
        if hud.id_breathbar and (not show_breathbar or breath == breath_max) then
-               minetest.after(1, function(player_name, breath_bar)
-                       local player = minetest.get_player_by_name(player_name)
+               core.after(1, function(player_name, breath_bar)
+                       local player = core.get_player_by_name(player_name)
                        if player then
                                player:hud_remove(breath_bar)
                        end
index 2cf70c9c95201eabda8f8eb658cfc481e2fd991c..9bdf92a74fec2977e94067949d158816a6e4b459 100644 (file)
@@ -74,7 +74,7 @@ local function get_formspec(data)
                "label[1.75,0;" .. data.worldspec.name .. "]"
 
        if mod.is_modpack or mod.type == "game" then
-               local info = minetest.formspec_escape(
+               local info = core.formspec_escape(
                        core.get_content_info(mod.path).description)
                if info == "" then
                        if mod.is_modpack then
index 7328f33587eec49d615b6ddf7adc1a3d609dbcb2..b0736a4fda13dc89352ce30054dae9fa41e7d2c2 100644 (file)
@@ -15,7 +15,7 @@
 --with this program; if not, write to the Free Software Foundation, Inc.,
 --51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
-if not minetest.get_http_api then
+if not core.get_http_api then
        function create_store_dlg()
                return messagebox("store",
                                fgettext("ContentDB is not available when Minetest was compiled without cURL"))
@@ -27,7 +27,7 @@ end
 -- before the package list is ordered based on installed state.
 local store = { packages = {}, packages_full = {}, packages_full_unordered = {} }
 
-local http = minetest.get_http_api()
+local http = core.get_http_api()
 
 -- Screenshot
 local screenshot_dir = core.get_cache_path() .. DIR_DELIM .. "cdb"
@@ -152,7 +152,7 @@ local function start_install(package)
 end
 
 local function queue_download(package)
-       local max_concurrent_downloads = tonumber(minetest.settings:get("contentdb_max_concurrent_downloads"))
+       local max_concurrent_downloads = tonumber(core.settings:get("contentdb_max_concurrent_downloads"))
        if number_downloading < max_concurrent_downloads then
                start_install(package)
        else
@@ -320,7 +320,7 @@ function install_dialog.get_formspec()
                        selected_game_idx = i
                end
 
-               games[i] = minetest.formspec_escape(games[i].name)
+               games[i] = core.formspec_escape(games[i].name)
        end
 
        local selected_game = pkgmgr.games[selected_game_idx]
@@ -331,7 +331,7 @@ function install_dialog.get_formspec()
        local formatted_deps = {}
        for _, dep in pairs(install_dialog.dependencies) do
                formatted_deps[#formatted_deps + 1] = "#fff"
-               formatted_deps[#formatted_deps + 1] = minetest.formspec_escape(dep.name)
+               formatted_deps[#formatted_deps + 1] = core.formspec_escape(dep.name)
                if dep.installed then
                        formatted_deps[#formatted_deps + 1] = "#ccf"
                        formatted_deps[#formatted_deps + 1] = fgettext("Already installed")
@@ -402,7 +402,7 @@ function install_dialog.handle_submit(this, fields)
        end
 
        if fields.will_install_deps ~= nil then
-               install_dialog.will_install_deps = minetest.is_yes(fields.will_install_deps)
+               install_dialog.will_install_deps = core.is_yes(fields.will_install_deps)
                return true
        end
 
@@ -553,7 +553,7 @@ function store.load()
                end
        end
 
-       local timeout = tonumber(minetest.settings:get("curl_file_download_timeout"))
+       local timeout = tonumber(core.settings:get("curl_file_download_timeout"))
        local response = http.fetch_sync({ url = url, timeout = timeout })
        if not response.succeeded then
                return
@@ -793,8 +793,8 @@ function store.get_formspec(dlgdata)
                -- title
                formspec[#formspec + 1] = "label[1.875,0.1;"
                formspec[#formspec + 1] = core.formspec_escape(
-                               minetest.colorize(mt_color_green, package.title) ..
-                               minetest.colorize("#BFBFBF", " by " .. package.author))
+                               core.colorize(mt_color_green, package.title) ..
+                               core.colorize("#BFBFBF", " by " .. package.author))
                formspec[#formspec + 1] = "]"
 
                -- buttons
index 5931496c1ee78063ce12f9ce08aa004738985b66..1938747fe13f32db4ec5fd2cee4dd4dd6b89c9ac 100644 (file)
@@ -443,7 +443,7 @@ local function create_world_buttonhandler(this, fields)
        end
 
        if fields["mgv6_biomes"] then
-               local entry = minetest.formspec_escape(fields["mgv6_biomes"])
+               local entry = core.formspec_escape(fields["mgv6_biomes"])
                for b=1, #mgv6_biomes do
                        if entry == mgv6_biomes[b][1] then
                                local ftable = core.settings:get_flags("mgv6_spflags")
index bfb5d269ab909ed4e9daa102a5055b515a603398..19127d8d3461fc22ea33b3787e0983e6fb7d6717 100644 (file)
@@ -459,7 +459,7 @@ function pkgmgr.enable_mod(this, toset)
        if not toset then
                -- Mod(s) were disabled, so no dependencies need to be enabled
                table.sort(toggled_mods)
-               minetest.log("info", "Following mods were disabled: " ..
+               core.log("info", "Following mods were disabled: " ..
                        table.concat(toggled_mods, ", "))
                return
        end
@@ -496,7 +496,7 @@ function pkgmgr.enable_mod(this, toset)
                        enabled_mods[name] = true
                        local mod_to_enable = list[mod_ids[name]]
                        if not mod_to_enable then
-                               minetest.log("warning", "Mod dependency \"" .. name ..
+                               core.log("warning", "Mod dependency \"" .. name ..
                                        "\" not found!")
                        else
                                if mod_to_enable.enabled == false then
@@ -517,7 +517,7 @@ function pkgmgr.enable_mod(this, toset)
 
        -- Log the list of enabled mods
        table.sort(toggled_mods)
-       minetest.log("info", "Following mods were enabled: " ..
+       core.log("info", "Following mods were enabled: " ..
                table.concat(toggled_mods, ", "))
 end