summaryrefslogtreecommitdiff
path: root/init.lua
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2017-07-02 18:44:24 +0200
committerWuzzy <almikes@aol.com>2017-07-02 18:44:24 +0200
commit5e06b35e79003e6ae1c3253ec292918ad443ca84 (patch)
tree252a12d4bdb659a1833eddd538252a852ac3da67 /init.lua
parente09eb8ab4f144c3f69de7734cf2f3f475c0e9a0d (diff)
Add hb.get_hudbar_identifiers()
Diffstat (limited to 'init.lua')
-rw-r--r--init.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 0ecbe35..885baea 100644
--- a/init.lua
+++ b/init.lua
@@ -463,6 +463,14 @@ function hb.get_hudbar_state(player, identifier)
return copy
end
+function hb.get_hudbar_identifiers()
+ local ids = {}
+ for id, _ in pairs(hb.hudtables) do
+ table.insert(ids, id)
+ end
+ return ids
+end
+
--register built-in HUD bars
if minetest.settings:get_bool("enable_damage") or hb.settings.forceload_default_hudbars then
hb.register_hudbar("health", 0xFFFFFF, S("Health"), { bar = "hudbars_bar_health.png", icon = "hudbars_icon_health.png", bgicon = "hudbars_bgicon_health.png" }, 20, 20, false)