diff options
author | MT-Modder <MT-Modder@users.noreply.github.com> | 2015-10-02 14:01:07 -0400 |
---|---|---|
committer | Diego Martinez <kaeza@users.sf.net> | 2016-02-13 21:16:35 -0300 |
commit | bdf9b61779b454e687b81e2dc3df7edc8a52e68b (patch) | |
tree | aeea5889755c7c0cb9a76aca69765d39ef3d8bbb /item_names.lua | |
parent | 758b643c4d5a21661beecc697e604c7e6b2b591c (diff) |
Add item_name support for hudbars mod
Does the same thing as https://github.com/MT-Modder/unified_inventory/commit/8bb1c8288b45182ed8e1496d1ecc322ed84854a9
Diffstat (limited to 'item_names.lua')
-rw-r--r-- | item_names.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/item_names.lua b/item_names.lua index 2c92d65..243b938 100644 --- a/item_names.lua +++ b/item_names.lua @@ -6,12 +6,15 @@ local dtimes = {} local dlimit = 3 -- HUD element will be hidden after this many seconds local air_hud_mod = minetest.get_modpath("4air") local hud_mod = minetest.get_modpath("hud") +local hudbars_mod = minetest.get_modpath("hudbars") local function set_hud(player) local player_name = player:get_player_name() local off = {x=0, y=-70} if air_hud_mod or hud_mod then off.y = off.y - 20 + elseif hudbars_mod then + off.y = off.y + 13 end huds[player_name] = player:hud_add({ hud_elem_type = "text", |