mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 00:55:20 +02:00
Rename minetest.*
to core.*
in devtest
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user