From 78e4ba828ebe19dc80977ce53ce301d63230b8b8 Mon Sep 17 00:00:00 2001 From: sfan5 Date: Tue, 3 Jan 2017 17:11:38 +0100 Subject: Show light level with //inspect --- worldedit_commands/init.lua | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/worldedit_commands/init.lua b/worldedit_commands/init.lua index 7fcdb18..d47c6e2 100644 --- a/worldedit_commands/init.lua +++ b/worldedit_commands/init.lua @@ -165,13 +165,9 @@ minetest.register_chatcommand("/inspect", { minetest.register_on_punchnode(function(pos, node, puncher) local name = puncher:get_player_name() if worldedit.inspect[name] then - if minetest.check_player_privs(name, {worldedit=true}) then - local axis, sign = worldedit.player_axis(name) - message = string.format("inspector: %s at %s (param1=%d, param2=%d) punched by %s facing the %s axis", - node.name, minetest.pos_to_string(pos), node.param1, node.param2, name, axis .. (sign > 0 and "+" or "-")) - else - message = "inspector: worldedit privileges required" - end + local axis, sign = worldedit.player_axis(name) + message = string.format("inspector: %s at %s (param1=%d, param2=%d, light=%d) punched facing the %s axis", + node.name, minetest.pos_to_string(pos), node.param1, node.param2, minetest.get_node_light(pos), axis .. (sign > 0 and "+" or "-")) worldedit.player_notify(name, message) end end) -- cgit v1.2.3