Fix minetest.setting_getbool() deprecation warning

This commit is contained in:
Hugo Locurcio 2019-04-02 20:24:58 +02:00
parent 9e91c7e561
commit c0c410755b
No known key found for this signature in database
GPG Key ID: 39E8F8BE30B0A49C

View File

@ -55,8 +55,8 @@ local function add_HP_gauge(name)
end
if
minetest.setting_getbool("health_bars") ~= false and
minetest.setting_getbool("enable_damage")
minetest.settings:get_bool("enable_damage") and
minetest.settings:get_bool("health_bars") ~= false
then
minetest.register_on_joinplayer(function(player)
minetest.after(1, add_HP_gauge, player:get_player_name())