1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-01 17:38:41 +00:00

Rename minetest.* to core.* in devtest

This commit is contained in:
Lars Müller 2024-10-28 15:57:54 +01:00 committed by GitHub
parent d849d51c2d
commit 88c7a54e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
78 changed files with 914 additions and 914 deletions

View file

@ -12,21 +12,21 @@ local give_initial_stuff = function(player)
give_if_not_gotten_already(inv, "main", "bucket:bucket")
give_if_not_gotten_already(inv, "main", "testnodes:light14")
give_if_not_gotten_already(inv, "main", "chest_of_everything:bag")
minetest.log("action", "[give_initial_stuff] Giving initial stuff to "..player:get_player_name())
core.log("action", "[give_initial_stuff] Giving initial stuff to "..player:get_player_name())
end
minetest.register_on_newplayer(function(player)
if minetest.settings:get_bool("give_initial_stuff", true) then
core.register_on_newplayer(function(player)
if core.settings:get_bool("give_initial_stuff", true) then
give_initial_stuff(player)
end
end)
minetest.register_chatcommand("stuff", {
core.register_chatcommand("stuff", {
params = "",
privs = { give = true },
description = "Give yourself initial items",
func = function(name, param)
local player = minetest.get_player_by_name(name)
local player = core.get_player_by_name(name)
if not player or not player:is_player() then
return false, "No player."
end