Colorize perlin getter message
This commit is contained in:
parent
5f5bd3f8b5
commit
e982242000
7
init.lua
7
init.lua
@ -313,10 +313,13 @@ local print_value = function(pos, user, precision, ptype)
|
||||
minetest.chat_send_player(user:get_player_name(), S("Unknown/invalid number of Perlin noise dimensions. Use /generate_perlin first!"))
|
||||
end
|
||||
local msg
|
||||
local color_node = minetest.get_color_escape_sequence("#FFD47CFF")
|
||||
local color_player = minetest.get_color_escape_sequence("#87FF87FF")
|
||||
local color_end = minetest.get_color_escape_sequence("#FFFFFFFF")
|
||||
if ptype == "node" then
|
||||
msg = S("node pos=@1, value=@2", minetest.pos_to_string(pos, precision), val)
|
||||
msg = S("Value at @1node@2 pos @3: @4", color_node, color_end, minetest.pos_to_string(pos, precision), val)
|
||||
elseif ptype == "player" then
|
||||
msg = S("player pos=@1, value=@2", minetest.pos_to_string(pos, precision), val)
|
||||
msg = S("Value at @1player@2 pos @3: @4", color_player, color_end, minetest.pos_to_string(pos, precision), val)
|
||||
else
|
||||
error("[perlin_explorer] Invalid ptype in print_value()!")
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user