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

@ -203,14 +203,14 @@ function place_chests(minp, maxp, seed, number_chests)
chest_pos.z = -1
end
local nn = minetest.get_node(chest_pos).name -- chest node name (before it becomes a chest)
-- chest node name (before it becomes a chest)
local nn = minetest.get_node(chest_pos).name
if nn == "air" or nn == "default:water_source" then
placeChest(pos, chest_pos, ground, nn)
chests_placed = chests_placed + 1
end
end
end
minetest.log("warning", "Spawned " .. chests_placed .. "/" .. number_chests .. " chests after " .. attempts .. " attempts!")
minetest.log("info", "Spawned " .. chests_placed .. "/" .. number_chests .. " chests after " .. attempts .. " attempts!")
end