forked from Mirrorlandia_minetest/minetest
Replace print()s with minetest.log() in builtin
This commit is contained in:
parent
a92fc3563c
commit
367b5382a3
@ -471,10 +471,10 @@ minetest.register_chatcommand("spawnentity", {
|
|||||||
minetest.chat_send_player(name, "entityname required")
|
minetest.chat_send_player(name, "entityname required")
|
||||||
return
|
return
|
||||||
end
|
end
|
||||||
print('/spawnentity invoked, entityname="'..entityname..'"')
|
minetest.log("action", '/spawnentity invoked, entityname="'..entityname..'"')
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
if player == nil then
|
if player == nil then
|
||||||
print("Unable to spawn entity, player is nil")
|
minetest.log("error", "Unable to spawn entity, player is nil")
|
||||||
return true -- Handled chat message
|
return true -- Handled chat message
|
||||||
end
|
end
|
||||||
local p = player:getpos()
|
local p = player:getpos()
|
||||||
@ -491,7 +491,7 @@ minetest.register_chatcommand("pulverize", {
|
|||||||
func = function(name, param)
|
func = function(name, param)
|
||||||
local player = minetest.get_player_by_name(name)
|
local player = minetest.get_player_by_name(name)
|
||||||
if player == nil then
|
if player == nil then
|
||||||
print("Unable to pulverize, player is nil")
|
minetest.log("error", "Unable to pulverize, player is nil")
|
||||||
return true -- Handled chat message
|
return true -- Handled chat message
|
||||||
end
|
end
|
||||||
if player:get_wielded_item():is_empty() then
|
if player:get_wielded_item():is_empty() then
|
||||||
|
@ -778,7 +778,7 @@ function modmgr.handle_configure_world_buttons(fields)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if not worldfile:write() then
|
if not worldfile:write() then
|
||||||
print("failed to write world config file")
|
minetest.log("error", "Failed to write world config file")
|
||||||
end
|
end
|
||||||
|
|
||||||
modmgr.modlist = nil
|
modmgr.modlist = nil
|
||||||
@ -932,7 +932,7 @@ function modmgr.preparemodlist(data)
|
|||||||
if element ~= nil then
|
if element ~= nil then
|
||||||
element.enabled = engine.is_yes(value)
|
element.enabled = engine.is_yes(value)
|
||||||
else
|
else
|
||||||
print("Mod: " .. key .. " " .. dump(value) .. " but not found")
|
minetest.log("info", "Mod: " .. key .. " " .. dump(value) .. " but not found")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -178,7 +178,7 @@ function minetest.deserialize(sdata)
|
|||||||
if okay then
|
if okay then
|
||||||
return results
|
return results
|
||||||
end
|
end
|
||||||
print('error:'.. results)
|
minetest.log('error', 'minetest.deserialize(): '.. results)
|
||||||
return nil
|
return nil
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user