From 78734c70ce9b452ae221f0cb3926ef4746279f68 Mon Sep 17 00:00:00 2001 From: LeMagnesium Date: Mon, 22 Jun 2015 18:58:50 +0200 Subject: [PATCH] Re-coded HUD's legacy into hudbars - Solves part of #94 --- mods/hudbars/depends.txt | 1 + mods/hudbars/hud_legacy.lua | 9 +++++++++ mods/hudbars/init.lua | 3 +++ mods/hudbars/textures/crosshair.png | Bin 0 -> 663 bytes mods/hudbars/textures/hudbars_hotbar.png | Bin 0 -> 174 bytes mods/hudbars/textures/hudbars_hotbar_selected.png | Bin 0 -> 310 bytes mods/hudbars/textures/wieldhand.png | Bin 0 -> 153 bytes 7 files changed, 13 insertions(+) create mode 100755 mods/hudbars/hud_legacy.lua create mode 100755 mods/hudbars/textures/crosshair.png create mode 100755 mods/hudbars/textures/hudbars_hotbar.png create mode 100755 mods/hudbars/textures/hudbars_hotbar_selected.png create mode 100755 mods/hudbars/textures/wieldhand.png diff --git a/mods/hudbars/depends.txt b/mods/hudbars/depends.txt index e69de29b..4ad96d51 100755 --- a/mods/hudbars/depends.txt +++ b/mods/hudbars/depends.txt @@ -0,0 +1 @@ +default diff --git a/mods/hudbars/hud_legacy.lua b/mods/hudbars/hud_legacy.lua new file mode 100755 index 00000000..bbdb9231 --- /dev/null +++ b/mods/hudbars/hud_legacy.lua @@ -0,0 +1,9 @@ +-- Miscellaneous legacies from our old mod, HUD by BlockMen +-- + +minetest.register_on_joinplayer(function(player) + player:hud_set_flags({crosshair = true, hotbar = true, healthbar = false, wielditem = true, breathbar = false}) + + player:hud_set_hotbar_image("hudbars_hotbar.png") + player:hud_set_hotbar_selected_image("hudbars_hotbar_selected.png") +end) diff --git a/mods/hudbars/init.lua b/mods/hudbars/init.lua index f64d20f2..618b1f66 100755 --- a/mods/hudbars/init.lua +++ b/mods/hudbars/init.lua @@ -357,3 +357,6 @@ minetest.register_globalstep(function(dtime) end if timer > 4 then timer = 0 end end) + +-- Our legacy +dofile(minetest.get_modpath("hudbars").."/hud_legacy.lua") diff --git a/mods/hudbars/textures/crosshair.png b/mods/hudbars/textures/crosshair.png new file mode 100755 index 0000000000000000000000000000000000000000..5822e713910b2692183093cf7c97b5ec4afca350 GIT binary patch literal 663 zcmeAS@N?(olHy`uVBq!ia0vp^HXzKw1|+Ti+$;i8oCO|{#S9F3${@^GvDChdfq}`> z)5S5QV$Rze{vNjjWY`N7r*8~Ck=WkS-t2X>QGE86E~DfB?zG&w|nz z|E{R={^RS~YrzJb%Pab1+?p3rE zP5c@%<>eR4SZ2LvLOGk$MEPDxAFJEz6!vk;o(VDu&fIE04NGp>Wya2#Z#nOERds0h zio|Dnun5=fs$PBrOhrYHE$J^%U;xADk!i$<7KVSUmef;!uPtVJrdwARYY5L~LSETmKH8xH+7P`MCvi0&e&()Eexgw+=W*%10 zSKfECBDCmMeAL_Z$JgF{b$XJOsR!8j8)uHqOwv0z>5qigGodvz#a7xcSSfM*&fe1A zYJ(ctlbzBp9?q?MckwUB)?@446CTX7p2h%*A&CQtOox@^#6BuAA6D9TTkPZA83))I lpwTCBVDDro?}6VZcJ}MPU$_S>w+E&)22WQ%mvv4FO#su$E3*Iq literal 0 HcmV?d00001 diff --git a/mods/hudbars/textures/hudbars_hotbar.png b/mods/hudbars/textures/hudbars_hotbar.png new file mode 100755 index 0000000000000000000000000000000000000000..cec2ae09ef5fafc4314a48e8f60a2a80dbbd9e7e GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq7ncyX_`VDl4WN*U literal 0 HcmV?d00001 diff --git a/mods/hudbars/textures/hudbars_hotbar_selected.png b/mods/hudbars/textures/hudbars_hotbar_selected.png new file mode 100755 index 0000000000000000000000000000000000000000..d961f1ae9566275c862661897adc9e99cf1184e8 GIT binary patch literal 310 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPq7nhKg#EULDZlKU%PZ!4!i_>Q(t<5{)Ake&j=3I>+ zF?}vh{+FBQp88!-+Z0?Gr(jYMyXETEQ~iGKSy`vARpe~1o;b6R#dD6L%Ezz&o}J#5 z;V&a-<|~}$cK`bhYu$ohKh`jA$d!J*>)o=_*yV*Xog7(fmrRjLW#B6)b9#JN)^oqp znVyUk;XkfkopX!@H|Ez&tz&)ex+h0~!7_bn(2A|^_I@l-vS&MNU~vBP!;EuPUG5h* zw_c0-xO(Nk|N1{3ubbb(c;juHpZA24h;=Ia7=^tYb!0xi`3Uq5gQu&X%Q~loCIBXi Bdhq}N literal 0 HcmV?d00001 diff --git a/mods/hudbars/textures/wieldhand.png b/mods/hudbars/textures/wieldhand.png new file mode 100755 index 0000000000000000000000000000000000000000..2307ba4ee1a3e3857bd6f985ab3b05f451843948 GIT binary patch literal 153 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`37#&FAr*|t5^EAfY;M?o|Nl33 z^Z)zzEnokis~i09{%yO*_8vWTY&Lcqe*9njxBI}4bJte>f1fv-&8X!Zn}cD%=Mn+7 zs?=8wk{fE-Zb)x8^OI3ve)o39&;NQi8aTHYGBEs}cEDa;d-)5XT@0SCelF{r5}E+e Ckv;DK literal 0 HcmV?d00001