Improve log messages (#422)

- Add log messages wherever required/useful
- Remove unnecessary log messages and print statements
- Convert print statements to minetest.log
- Fix incorrect log level for some messages
- Trivial code-style fixes
This commit is contained in:
ANAND 2019-10-18 11:22:18 +05:30 committed by GitHub
parent 21e7daa183
commit 5eb5d3311a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
18 changed files with 71 additions and 49 deletions

View file

@ -6,7 +6,7 @@ local function drop(pos, itemstack)
for _, item in pairs(blacklist_drop) do
if sname == item then
minetest.log("info", "Not dropping " .. item)
minetest.log("info", "[dropondie] Not dropping " .. sname)
return
end
end
@ -14,13 +14,12 @@ local function drop(pos, itemstack)
local obj = minetest.add_item(pos, it)
if obj then
obj:set_velocity({x=math.random(-1,1), y=5, z=math.random(-1,1)})
obj:set_velocity({ x = math.random(-1, 1), y = 5, z = math.random(-1, 1) })
local remi = minetest.settings:get("remove_items")
if minetest.is_yes(remi) then
obj:remove()
end
end
return itemstack
end