mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Luanti rename: builtin (#15324)
This commit is contained in:
parent
409e75b94d
commit
ad4b13a0e9
69 changed files with 77 additions and 112 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/auth.lua
|
||||
|
||||
--
|
||||
-- Builtin authentication handler
|
||||
--
|
||||
|
@ -95,11 +93,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
|
||||
|
@ -196,7 +194,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)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/game/chat.lua
|
||||
|
||||
local S = core.get_translator("__builtin")
|
||||
|
||||
-- Helper function that implements search and replace without pattern matching
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/constants.lua
|
||||
|
||||
--
|
||||
-- Constants values for use with the Lua API
|
||||
--
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/deprecated.lua
|
||||
|
||||
--
|
||||
-- EnvRef
|
||||
--
|
||||
|
@ -35,9 +33,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
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/detached_inventory.lua
|
||||
|
||||
core.detached_inventories = {}
|
||||
|
||||
local create_detached_inventory_raw = core.create_detached_inventory_raw
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/item.lua
|
||||
|
||||
local builtin_shared = ...
|
||||
local SCALE = 0.667
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/features.lua
|
||||
|
||||
core.features = {
|
||||
glasslike_framed = true,
|
||||
nodebox_as_selectionbox = true,
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/item.lua
|
||||
|
||||
local builtin_shared = ...
|
||||
|
||||
local function copy_pointed_thing(pointed_thing)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/item_entity.lua
|
||||
|
||||
function core.spawn_item(pos, item)
|
||||
-- Take item in any format
|
||||
local stack = ItemStack(item)
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/misc.lua
|
||||
|
||||
local S = core.get_translator("__builtin")
|
||||
|
||||
--
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
-- Minetest: 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.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/privileges.lua
|
||||
|
||||
local S = core.get_translator("__builtin")
|
||||
|
||||
--
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/register.lua
|
||||
|
||||
local builtin_shared = ...
|
||||
local S = core.get_translator("__builtin")
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
-- Minetest: builtin/static_spawn.lua
|
||||
|
||||
local static_spawnpoint_string = core.settings:get("static_spawnpoint")
|
||||
if static_spawnpoint_string and
|
||||
static_spawnpoint_string ~= "" and
|
||||
|
|
|
@ -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
|
||||
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue