diff options
author | sfan5 <sfan5@live.de> | 2017-01-03 17:11:38 +0100 |
---|---|---|
committer | sfan5 <sfan5@live.de> | 2017-01-03 17:11:38 +0100 |
commit | 78e4ba828ebe19dc80977ce53ce301d63230b8b8 (patch) | |
tree | 5fddafceae3c79ed154ba6355ada254f82831b34 | |
parent | 92fe95fab78de668f6732648644be0b9a768d298 (diff) |
Show light level with //inspect
-rw-r--r-- | worldedit_commands/init.lua | 10 |
1 files 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)
|