From 43b09253d9f25d9a82ad50608d9893e6425d34bd Mon Sep 17 00:00:00 2001 From: BlockMen Date: Mon, 14 Apr 2014 11:01:47 +0200 Subject: [PATCH] Die by starving, push to 1.3 --- README.txt | 4 ++-- changelog.txt | 12 ++++++++++-- init.lua | 6 +++--- textures/wieldhand.png | Bin 369 -> 331 bytes 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/README.txt b/README.txt index c8d02da..dac5e89 100644 --- a/README.txt +++ b/README.txt @@ -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: diff --git a/changelog.txt b/changelog.txt index c34f0e2..b823dd1 100644 --- a/changelog.txt +++ b/changelog.txt @@ -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 \ No newline at end of file +- 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 diff --git a/init.lua b/init.lua index 4c856a7..309f583 100644 --- a/init.lua +++ b/init.lua @@ -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 diff --git a/textures/wieldhand.png b/textures/wieldhand.png index 5f7f4909cfd2d7837ebbd59abec914db333b2d16..31f08aa1c8b864fae10b3311714a6d287b6ab91d 100644 GIT binary patch delta 284 zcmV+%0ptGh0?PuBIDY{BNkl8%&w?N3?E-pIGZ3Op42!E1-_@%iuwAgi>}_#gNKP@#o-wo#FT z3R|eq%6hs&3wVn={G=im6@*<;1vsK^W}=K;?{=%0000&soGGj{ zx>%#5=x8$)K?bHmDK%ce7S$r8O<2(NMNSKo77-)3ZE=?86F>%Op!py811RYV#l%nL zq{?|p#ZD_+XG1sw_k}pUZcbv<%?Q=Z3U)@JkzR5JKAVU1>VH%WZu2qf<{C9a#ZCpC zf%nD%Z*_}T+vKTg@K8!}m*1gfhPl!g`vhuT;Q2Dg<3*ZwL8E1@Qqcna0UzJJ*e0Ed zLHjIDGq*x&cM`>;I{<-zTnFWK0}zy2oot` zJR#1&m?ezrf;)FZ@J0l0R2Yd0p0MCi`T#tZ;MN8ArZBuN421>Pvfv5{uHbLr3#yFU U2H8ITZ2$lO07*qoM6N<$f;Od>S^xk5