mirror of
https://github.com/Uberi/Minetest-WorldEdit.git
synced 2024-12-25 18:20:38 +01:00
Show light level with //inspect
This commit is contained in:
parent
92fe95fab7
commit
78e4ba828e
@ -165,13 +165,9 @@ minetest.register_chatcommand("/inspect", {
|
|||||||
minetest.register_on_punchnode(function(pos, node, puncher)
|
minetest.register_on_punchnode(function(pos, node, puncher)
|
||||||
local name = puncher:get_player_name()
|
local name = puncher:get_player_name()
|
||||||
if worldedit.inspect[name] then
|
if worldedit.inspect[name] then
|
||||||
if minetest.check_player_privs(name, {worldedit=true}) then
|
local axis, sign = worldedit.player_axis(name)
|
||||||
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",
|
||||||
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, minetest.get_node_light(pos), axis .. (sign > 0 and "+" or "-"))
|
||||||
node.name, minetest.pos_to_string(pos), node.param1, node.param2, name, axis .. (sign > 0 and "+" or "-"))
|
|
||||||
else
|
|
||||||
message = "inspector: worldedit privileges required"
|
|
||||||
end
|
|
||||||
worldedit.player_notify(name, message)
|
worldedit.player_notify(name, message)
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
Loading…
Reference in New Issue
Block a user