Die by starving, push to 1.3

This commit is contained in:
BlockMen 2014-04-14 11:01:47 +02:00
parent 2da67c5fa1
commit 43b09253d9
4 changed files with 15 additions and 7 deletions

@ -1,10 +1,10 @@
Minetest mod "Better HUD"
=========================
version: 1.2
Version: 1.3
License of source code: WTFPL
-----------------------------
(c) Copyright BlockMen (2013)
(c) Copyright BlockMen (2013-2014)
License of textures:

@ -1,6 +1,6 @@
0.2 Beta
--------
- added support of costum config files
- added support of custom config files
- you can eat max. 50% more than before (although it isnt shown in hunger bar)
- you get healed with 8 breads and more (in hunger bar) now
- a bread (from farming) == 2 breads in hunger bar
@ -54,4 +54,12 @@
- Support for bushes_classic foods (plantlife modpack) (by CiaranG)
- Add support for mushroom mod food/poison (by CiaranG)
- Add support for mods: fruit and mush45
- New images for hotbar, smaller armor icons
- New images for hotbar, smaller armor icons
1.3
---
- New way hunger is saved (all old files in world dirctory can get deleted [e.g. hud_BlockMen_hunger])
- Fixed healing (not while drowning, fix after death)
- Add support for mods: seaplants[sea] and mobfcooking (by Xanthin)
- Tweaked hand image
- Player can die caus of starving now

@ -58,7 +58,7 @@ end
local function custom_hud(player)
local name = player:get_player_name()
--fancy hotbar
-- fancy hotbar (only when no crafting mod present)
if minetest.get_modpath("crafting") == nil then
player:hud_set_hotbar_image("hud_hotbar.png")
player:hud_set_hotbar_selected_image("hud_hotbar_selected.png")
@ -272,9 +272,9 @@ minetest.after(2.5, function()
-- heal player by 1 hp if not dead and saturation is > 15 (of 30)
if h > 15 and hp > 0 and hud.air[name] > 0 then
player:set_hp(hp+1)
-- or damage player by 1 hp if saturation is < 2 (of 30) and player would not die
-- or damage player by 1 hp if saturation is < 2 (of 30)
elseif h <= 1 and minetest.setting_getbool("enable_damage") then
if hp-1 >= 1 then player:set_hp(hp-1) end
if hp-1 >= 0 then player:set_hp(hp-1) end
end
end
-- lower saturation by 1 point after xx seconds

Binary file not shown.

Before

Width:  |  Height:  |  Size: 369 B

After

Width:  |  Height:  |  Size: 331 B