mirror of
https://github.com/sys4-fr/server-nalc.git
synced 2024-12-25 18:20:36 +01:00
Hide quests HUD by default when player join the game
This commit is contained in:
parent
80d0e9a6a1
commit
b7ae403763
@ -15,3 +15,4 @@ moreores?
|
||||
moreblocks?
|
||||
carts?
|
||||
toolranks?
|
||||
mff_quests?
|
||||
|
@ -27,3 +27,20 @@ for _,mod in ipairs(mods) do
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
-- Hide quests HUD by default
|
||||
if minetest.get_modpath("quests") and quests then
|
||||
minetest.register_on_joinplayer(
|
||||
function(player)
|
||||
if not player then return end
|
||||
|
||||
local playern = player:get_player_name()
|
||||
minetest.after(
|
||||
2,
|
||||
function(playername)
|
||||
quests.hud[playername].autohide = false
|
||||
quests.hide_hud(playername)
|
||||
minetest.log("action", "Quest HUD hidden for player "..playername)
|
||||
end, player:get_player_name())
|
||||
end)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user