Skip to content

Commit

Permalink
Luanti rename: builtin
Browse files Browse the repository at this point in the history
  • Loading branch information
Wuzzy2 committed Oct 27, 2024
1 parent 0d85e82 commit fa31d4c
Show file tree
Hide file tree
Showing 68 changed files with 95 additions and 95 deletions.
2 changes: 1 addition & 1 deletion builtin/client/chatcommands.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/client/chatcommands.lua
-- Luanti: builtin/client/chatcommands.lua

core.register_on_sending_chat_message(function(message)
if message:sub(1,2) == ".." then
Expand Down
2 changes: 1 addition & 1 deletion builtin/client/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/client/init.lua
-- Luanti: builtin/client/init.lua
local scriptpath = core.get_builtin_path()
local clientpath = scriptpath.."client"..DIR_DELIM
local commonpath = scriptpath.."common"..DIR_DELIM
Expand Down
2 changes: 1 addition & 1 deletion builtin/common/after.lua
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ end

function core.after(after, func, ...)
assert(tonumber(after) and not core.is_nan(after) and type(func) == "function",
"Invalid minetest.after invocation")
"Invalid core.after invocation")

local new_job = {
mod_origin = core.get_last_run_mod(),
Expand Down
2 changes: 1 addition & 1 deletion builtin/common/chatcommands.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/common/chatcommands.lua
-- Luanti: builtin/common/chatcommands.lua

-- For server-side translations (if INIT == "game")
-- Otherwise, use core.gettext
Expand Down
2 changes: 1 addition & 1 deletion builtin/common/filterlist.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2013 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/common/item_s.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/item_s.lua
-- Luanti: builtin/item_s.lua
-- The distinction of what goes here is a bit tricky, basically it's everything
-- that does not (directly or indirectly) need access to ServerEnvironment,
-- Server or writable access to IGameDef on the engine side.
Expand Down
4 changes: 2 additions & 2 deletions builtin/common/metatable.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ end
core.known_metatables = known_metatables

function core.register_async_metatable(...)
core.log("deprecated", "minetest.register_async_metatable is deprecated. " ..
"Use minetest.register_portable_metatable instead.")
core.log("deprecated", "core.register_async_metatable is deprecated. " ..
"Use core.register_portable_metatable instead.")
return core.register_portable_metatable(...)
end

Expand Down
2 changes: 1 addition & 1 deletion builtin/common/misc_helpers.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/misc_helpers.lua
-- Luanti: builtin/misc_helpers.lua

--------------------------------------------------------------------------------
-- Localize functions to avoid table lookups (better performance).
Expand Down
6 changes: 3 additions & 3 deletions builtin/common/serialize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -204,18 +204,18 @@ local function dummy_func() end
function core.deserialize(str, safe)
-- Backwards compatibility
if str == nil then
core.log("deprecated", "minetest.deserialize called with nil (expected string).")
core.log("deprecated", "core.deserialize called with nil (expected string).")
return nil, "Invalid type: Expected a string, got nil"
end
local t = type(str)
if t ~= "string" then
error(("minetest.deserialize called with %s (expected string)."):format(t))
error(("core.deserialize called with %s (expected string)."):format(t))
end

local func, err = loadstring(str)
if not func then return nil, err end

-- math.huge was serialized to inf and NaNs to nan by Lua in Minetest 5.6, so we have to support this here
-- math.huge was serialized to inf and NaNs to nan by Lua in version 5.6, so we have to support this here
local env = {inf = math_huge, nan = 0/0}
if safe then
env.loadstring = dummy_func
Expand Down
2 changes: 1 addition & 1 deletion builtin/fstk/buttonbar.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--Copyright (C) 2023 Gregor Parzefall
--
Expand Down
2 changes: 1 addition & 1 deletion builtin/fstk/dialog.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/fstk/tabview.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/fstk/ui.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/async.lua
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ end

function core.handle_async(func, callback, ...)
assert(type(func) == "function" and type(callback) == "function",
"Invalid minetest.handle_async invocation")
"Invalid core.handle_async invocation")
local args = {n = select("#", ...), ...}
local mod_origin = core.get_last_run_mod()

Expand Down
8 changes: 4 additions & 4 deletions builtin/game/auth.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/auth.lua
-- Luanti: builtin/auth.lua

--
-- Builtin authentication handler
Expand Down Expand Up @@ -95,11 +95,11 @@ core.builtin_auth_handler = {
for priv, value in pairs(privileges) do
-- Warnings for improper API usage
if value == false then
core.log('deprecated', "`false` value given to `minetest.set_player_privs`, "..
core.log('deprecated', "`false` value given to `core.set_player_privs`, "..
"this is almost certainly a bug, "..
"granting a privilege rather than revoking it")
elseif value ~= true then
core.log('deprecated', "non-`true` value given to `minetest.set_player_privs`")
core.log('deprecated', "non-`true` value given to `core.set_player_privs`")
end
-- Run grant callbacks
if prev_privs[priv] == nil then
Expand Down Expand Up @@ -196,7 +196,7 @@ function core.change_player_privs(name, changes)
elseif change == false then
privs[priv] = nil
else
error("non-bool value given to `minetest.change_player_privs`")
error("non-bool value given to `core.change_player_privs`")
end
end
core.set_player_privs(name, privs)
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/chat.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/game/chat.lua
-- Luanti: builtin/game/chat.lua

local S = core.get_translator("__builtin")

Expand Down
2 changes: 1 addition & 1 deletion builtin/game/constants.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/constants.lua
-- Luanti: builtin/constants.lua

--
-- Constants values for use with the Lua API
Expand Down
6 changes: 3 additions & 3 deletions builtin/game/deprecated.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/deprecated.lua
-- Luanti: builtin/deprecated.lua

--
-- EnvRef
Expand Down Expand Up @@ -35,9 +35,9 @@ local settings = core.settings

local function setting_proxy(name)
return function(...)
core.log("deprecated", "WARNING: minetest.setting_* "..
core.log("deprecated", "WARNING: core.setting_* "..
"functions are deprecated. "..
"Use methods on the minetest.settings object.")
"Use methods on the core.settings object.")
return settings[name](settings, ...)
end
end
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/detached_inventory.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/detached_inventory.lua
-- Luanti: builtin/detached_inventory.lua

core.detached_inventories = {}

Expand Down
2 changes: 1 addition & 1 deletion builtin/game/falling.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/item.lua
-- Luanti: builtin/item.lua

local builtin_shared = ...
local SCALE = 0.667
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/features.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/features.lua
-- Luanti: builtin/features.lua

core.features = {
glasslike_framed = true,
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/item.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/item.lua
-- Luanti: builtin/item.lua

local builtin_shared = ...

Expand Down
2 changes: 1 addition & 1 deletion builtin/game/item_entity.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/item_entity.lua
-- Luanti: builtin/item_entity.lua

function core.spawn_item(pos, item)
-- Take item in any format
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/misc.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/misc.lua
-- Luanti: builtin/misc.lua

local S = core.get_translator("__builtin")

Expand Down
2 changes: 1 addition & 1 deletion builtin/game/misc_s.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/misc_s.lua
-- Luanti: builtin/misc_s.lua
-- The distinction of what goes here is a bit tricky, basically it's everything
-- that does not (directly or indirectly) need access to ServerEnvironment,
-- Server or writable access to IGameDef on the engine side.
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/privileges.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/privileges.lua
-- Luanti: builtin/privileges.lua

local S = core.get_translator("__builtin")

Expand Down
2 changes: 1 addition & 1 deletion builtin/game/register.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/register.lua
-- Luanti: builtin/register.lua

local builtin_shared = ...
local S = core.get_translator("__builtin")
Expand Down
2 changes: 1 addition & 1 deletion builtin/game/static_spawn.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- Minetest: builtin/static_spawn.lua
-- Luanti: builtin/static_spawn.lua

local static_spawnpoint_string = core.settings:get("static_spawnpoint")
if static_spawnpoint_string and
Expand Down
4 changes: 2 additions & 2 deletions builtin/game/tests/test_moveaction.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ end
local log = function(...) end
--local log = print

minetest.register_allow_player_inventory_action(function(_, action, inv, info)
core.register_allow_player_inventory_action(function(_, action, inv, info)
log("\tallow " .. action, info.count or info.stack:to_string())

if action == "move" then
Expand Down Expand Up @@ -69,7 +69,7 @@ minetest.register_allow_player_inventory_action(function(_, action, inv, info)
return -- Unlimited
end)

minetest.register_on_player_inventory_action(function(_, action, inv, info)
core.register_on_player_inventory_action(function(_, action, inv, info)
log("\ton " .. action, info.count or info.stack:to_string())

if action == "take" or action == "put" then
Expand Down
2 changes: 1 addition & 1 deletion builtin/init.lua
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--
-- This file contains built-in stuff in Minetest implemented in Lua.
-- This file contains built-in stuff in Luanti implemented in Lua.
--
-- It is always loaded and executed after registration of the C API,
-- before loading and running any mods.
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/common.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/content/contentdb.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2018-24 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions builtin/mainmenu/content/dlg_contentdb.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2018-20 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -487,7 +487,7 @@ end

local function handle_events(event)
if event == "DialogShow" then
-- Don't show the "MINETEST" header behind the dialog.
-- Don't show the header image behind the dialog.
mm_game_theme.set_engine(true)

-- If ContentDB is already loaded, auto-install packages here.
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/content/dlg_install.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2018-24 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/content/dlg_overwrite.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2018-24 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/content/dlg_package.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2018-24 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/content/init.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2023 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
4 changes: 2 additions & 2 deletions builtin/mainmenu/content/pkgmgr.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2013 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -840,7 +840,7 @@ function pkgmgr.get_contentdb_id(content)
return content.author:lower() .. "/" .. content.name
end

-- Until Minetest 5.8.0, Minetest Game was bundled with Minetest.
-- Until version 5.8.0, Minetest Game was bundled with the engine.
-- Unfortunately, the bundled MTG was not versioned (missing "release"
-- field in game.conf).
-- Therefore, we consider any installation of MTG that is not versioned,
Expand Down
4 changes: 2 additions & 2 deletions builtin/mainmenu/content/screenshots.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2023-24 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down Expand Up @@ -40,7 +40,7 @@ function get_screenshot(package, screenshot_url, level)
return defaulttexturedir .. "no_screenshot.png"
end

-- Minetest only supports png and jpg
-- Luanti only supports png and jpg
local ext = get_file_extension(screenshot_url)
if ext ~= "png" and ext ~= "jpg" then
screenshot_url = screenshot_url:sub(0, -#ext - 1) .. "png"
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/content/tests/pkgmgr_spec.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2022 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/content/update_detector.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2023 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/dlg_config_world.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2013 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/dlg_create_world.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/dlg_delete_content.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/dlg_delete_world.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2014 sapier
--
--This program is free software; you can redistribute it and/or modify
Expand Down
2 changes: 1 addition & 1 deletion builtin/mainmenu/dlg_register.lua
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
--Minetest
--Luanti
--Copyright (C) 2022 rubenwardy
--
--This program is free software; you can redistribute it and/or modify
Expand Down
Loading

0 comments on commit fa31d4c

Please sign in to comment.