aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2021-02-10 11:02:34 +0000
committerrubenwardy <rw@rubenwardy.com>2021-02-11 10:18:22 +0000
commit4db7fb4a3be9de29460919ff2dc042e0812f31bd (patch)
tree6d0d828064e3816fc3d049d81ff30cf9e1a1e8f7
parent9736b9cea5f841bb0e9bb2c9c05c3b2560327064 (diff)
downloadminetest-4db7fb4a3be9de29460919ff2dc042e0812f31bd.tar.gz
minetest-4db7fb4a3be9de29460919ff2dc042e0812f31bd.tar.bz2
minetest-4db7fb4a3be9de29460919ff2dc042e0812f31bd.zip
Replace 'minetest.' with 'core.' in builtin
-rw-r--r--builtin/common/information_formspecs.lua2
-rw-r--r--builtin/game/item.lua2
-rw-r--r--builtin/game/statbars.lua4
-rw-r--r--builtin/mainmenu/dlg_config_world.lua2
-rw-r--r--builtin/mainmenu/dlg_contentstore.lua18
-rw-r--r--builtin/mainmenu/dlg_create_world.lua2
-rw-r--r--builtin/mainmenu/pkgmgr.lua6
7 files changed, 18 insertions, 18 deletions
diff --git a/builtin/common/information_formspecs.lua b/builtin/common/information_formspecs.lua
index 8afa5bc87..3e2f1f079 100644
--- a/builtin/common/information_formspecs.lua
+++ b/builtin/common/information_formspecs.lua
@@ -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",
diff --git a/builtin/game/item.lua b/builtin/game/item.lua
index 881aff52e..b68177c22 100644
--- a/builtin/game/item.lua
+++ b/builtin/game/item.lua
@@ -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
diff --git a/builtin/game/statbars.lua b/builtin/game/statbars.lua
index d192029c5..db5087a16 100644
--- a/builtin/game/statbars.lua
+++ b/builtin/game/statbars.lua
@@ -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
diff --git a/builtin/mainmenu/dlg_config_world.lua b/builtin/mainmenu/dlg_config_world.lua
index 2cf70c9c9..9bdf92a74 100644
--- a/builtin/mainmenu/dlg_config_world.lua
+++ b/builtin/mainmenu/dlg_config_world.lua
@@ -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
diff --git a/builtin/mainmenu/dlg_contentstore.lua b/builtin/mainmenu/dlg_contentstore.lua
index 7328f3358..b0736a4fd 100644
--- a/builtin/mainmenu/dlg_contentstore.lua
+++ b/builtin/mainmenu/dlg_contentstore.lua
@@ -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
diff --git a/builtin/mainmenu/dlg_create_world.lua b/builtin/mainmenu/dlg_create_world.lua
index 5931496c1..1938747fe 100644
--- a/builtin/mainmenu/dlg_create_world.lua
+++ b/builtin/mainmenu/dlg_create_world.lua
@@ -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")
diff --git a/builtin/mainmenu/pkgmgr.lua b/builtin/mainmenu/pkgmgr.lua
index bfb5d269a..19127d8d3 100644
--- a/builtin/mainmenu/pkgmgr.lua
+++ b/builtin/mainmenu/pkgmgr.lua
@@ -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