forked from VoxeLibre/VoxeLibre
Add setting for temporary message display duration
This commit is contained in:
parent
18e299d923
commit
e7070c034c
|
@ -1,4 +1,8 @@
|
||||||
mcl_tmp_message = {}
|
mcl_tmp_message = {
|
||||||
|
hud_hide_timeout = tonumber(
|
||||||
|
minetest.settings:get("mcl_tmp_message_hud_hide_timeout")
|
||||||
|
) or 3
|
||||||
|
}
|
||||||
|
|
||||||
local huds = {}
|
local huds = {}
|
||||||
local hud_hide_timeouts = {}
|
local hud_hide_timeouts = {}
|
||||||
|
@ -6,7 +10,7 @@ local hud_hide_timeouts = {}
|
||||||
function mcl_tmp_message.message(player, message)
|
function mcl_tmp_message.message(player, message)
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
player:hud_change(huds[name], "text", message)
|
player:hud_change(huds[name], "text", message)
|
||||||
hud_hide_timeouts[name] = 3
|
hud_hide_timeouts[name] = mcl_tmp_message.hud_hide_timeout
|
||||||
end
|
end
|
||||||
|
|
||||||
minetest.register_on_joinplayer(function(player)
|
minetest.register_on_joinplayer(function(player)
|
||||||
|
|
|
@ -102,6 +102,9 @@ animated_chests (Animated chests) bool true
|
||||||
# Whether to preview the player in inventory in 3D (requires Minetest 5.4)
|
# Whether to preview the player in inventory in 3D (requires Minetest 5.4)
|
||||||
3d_player_preview (3D Player preview) bool true
|
3d_player_preview (3D Player preview) bool true
|
||||||
|
|
||||||
|
# How long a temporary message will be shown in the HUD
|
||||||
|
mcl_tmp_message_hud_hide_timeout (Temporary message display duration) int 3 0 60
|
||||||
|
|
||||||
[Experimental]
|
[Experimental]
|
||||||
# Whether ice is translucent. If disabled, ice is fully opaque.
|
# Whether ice is translucent. If disabled, ice is fully opaque.
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue