diff options
author | BlockMen <nmuelll@web.de> | 2015-04-02 16:08:02 +0200 |
---|---|---|
committer | BlockMen <nmuelll@web.de> | 2015-04-03 12:33:53 +0200 |
commit | 1071c7f13e491b2f3bc09bbbcb1bd6aaed6071c5 (patch) | |
tree | fbc4937b87c213cea5822d8b86eff2cafee36965 /armor.lua | |
parent | 69a993861ef19f17626c72f6b0f9c03e137c5051 (diff) |
Rewrite mod, push to 2.0
- Seperated hunger -> https://github.com/BlockMen/hunger
- Added API
Diffstat (limited to 'armor.lua')
-rw-r--r-- | armor.lua | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/armor.lua b/armor.lua deleted file mode 100644 index 7f0d0cf..0000000 --- a/armor.lua +++ /dev/null @@ -1,34 +0,0 @@ -minetest.after(0, function() - if not armor.def then - minetest.after(2,minetest.chat_send_all,"#Better HUD: Please update your version of 3darmor") - HUD_SHOW_ARMOR = false - end -end) - -function hud.get_armor(player) - if not player or not armor.def then - return - end - local name = player:get_player_name() - local def = armor.def[name] or nil - if def and def.state and def.count then - hud.set_armor(name, def.state, def.count) - end -end - -function hud.set_armor(player_name, ges_state, items) - local max_items = 4 - if items == 5 then - max_items = items - end - local max = max_items * 65535 - local lvl = max - ges_state - lvl = lvl/max - if ges_state == 0 and items == 0 then - lvl = 0 - end - - hud.armor[player_name] = lvl* (items * (20 / max_items)) - - -end
\ No newline at end of file |