From bef99ac211cb74d8f22786a0f6e8bb1debb346a7 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 17 Feb 2020 20:24:26 +0100 Subject: [PATCH] =?UTF-8?q?Rename=20mod:=20hbarmor=20=E2=86=92=20mcl=5Fhba?= =?UTF-8?q?rmor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mods/HUD/hbarmor/README.md | 42 ------------ mods/HUD/hbarmor/screenshot.png | Bin 10821 -> 0 bytes mods/HUD/hbarmor/settingtypes.txt | 7 -- mods/HUD/mcl_hbarmor/README.md | 26 ++++++++ .../{hbarmor => mcl_hbarmor}/description.txt | 0 mods/HUD/{hbarmor => mcl_hbarmor}/init.lua | 62 ++++++++---------- .../locale/hbarmor.de.tr | 0 .../locale/hbarmor.es.tr | 0 .../locale/hbarmor.it.tr | 0 .../locale/template.txt | 0 mods/HUD/{hbarmor => mcl_hbarmor}/mod.conf | 2 +- mods/HUD/mcl_hbarmor/settingtypes.txt | 3 + .../textures/hbarmor_bar.png | Bin .../textures/hbarmor_bgicon.png | Bin .../textures/hbarmor_icon.png | Bin tools/Conversion_Table.csv | 4 +- 16 files changed, 60 insertions(+), 86 deletions(-) delete mode 100644 mods/HUD/hbarmor/README.md delete mode 100644 mods/HUD/hbarmor/screenshot.png delete mode 100644 mods/HUD/hbarmor/settingtypes.txt create mode 100644 mods/HUD/mcl_hbarmor/README.md rename mods/HUD/{hbarmor => mcl_hbarmor}/description.txt (100%) rename mods/HUD/{hbarmor => mcl_hbarmor}/init.lua (64%) rename mods/HUD/{hbarmor => mcl_hbarmor}/locale/hbarmor.de.tr (100%) rename mods/HUD/{hbarmor => mcl_hbarmor}/locale/hbarmor.es.tr (100%) rename mods/HUD/{hbarmor => mcl_hbarmor}/locale/hbarmor.it.tr (100%) rename mods/HUD/{hbarmor => mcl_hbarmor}/locale/template.txt (100%) rename mods/HUD/{hbarmor => mcl_hbarmor}/mod.conf (59%) create mode 100644 mods/HUD/mcl_hbarmor/settingtypes.txt rename mods/HUD/{hbarmor => mcl_hbarmor}/textures/hbarmor_bar.png (100%) rename mods/HUD/{hbarmor => mcl_hbarmor}/textures/hbarmor_bgicon.png (100%) rename mods/HUD/{hbarmor => mcl_hbarmor}/textures/hbarmor_icon.png (100%) diff --git a/mods/HUD/hbarmor/README.md b/mods/HUD/hbarmor/README.md deleted file mode 100644 index c410a9b6..00000000 --- a/mods/HUD/hbarmor/README.md +++ /dev/null @@ -1,42 +0,0 @@ -# HUD bar for `3d_armor` [`hbarmor`] - -* Version: 0.4.0 - -## Description -This mod adds a simple HUD bar which displays the current damage -of the player's armor (from the 3D Armor [`3d_armor`] mod) as a percentage (rounded). - -100% armor means the armor is in perfect shape. 0% means the armor is almost destroyed -or non-existant. Note that to reach 100%, the player must wear at least 4 different -pieces of armor in perfect shape. - -The armor bar also does not tell anything about the armor's strength, -only how worn out it already is. - -By default, the armor bar is hidden if the player wears no armor. - -## Dependencies -* HUD bars [`hudbars`], major version 1 -* 3D Armor [`3d_armor`] (tested with Minetest 0.4.14) - -## Licensing -This mod is entirly free softare. - -### Source code - -* License: MIT License (see below) -* Authors: Wuzzy, forked from the mod “Better HUD (and hunger)” [`hud`] by BlockMen (2013-2014) - -### Textures - -* `hbarmor_icon.png`—Stu ([CC BY-SA 3.0](https://creativecommons.org/licenses/by-sa/3.0/)), modified by BlockMen -* `hbarmor_bgicon.png`—Stu (CC BY-SA 3.0), modified by BlockMen -* `hbarmor_bar.png`—Wuzzy (MIT License) - -Everything else is under the MIT License: -© Copyright BlockMen (2013-2014) - -This program is free software. It comes without any warranty, to -the extent permitted by applicable law. You can redistribute it -and/or modify it under the terms of the MIT License. -See for more details. diff --git a/mods/HUD/hbarmor/screenshot.png b/mods/HUD/hbarmor/screenshot.png deleted file mode 100644 index 907cf900de5407f5fffc0b6e7cb4d6ac082972f8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10821 zcmV-LD!SE)P)Px#32;bRa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0)V) z7n^-ArRw!Np%vcx8M)5Mbl4Z%B?L5K&EoM z!7PP9hgQ+SCU(q!;C)%k38LQQoK#@nJyY_qXUW(jd=7kdo_<#U+jn1DOP7xVG01{0aCnx(;O z3G}1LQWSuE{qJ-nZ0|l+TRHOIf4(#$w(uEAVe%$q|8@7Oc!v;)%)NI!)FlGEFTdaK za=APn4}5F4+aU$*WQh7RAoH+c!;rTI|LyDRgKv#SqeTSdFDom9baWBq%fYvh4IS6l z*F(1WMHU?nhgDES8+}GYEaEA^!@HK;ogHgfz$W3zp5w`hOPAc0 z$=x$)zfz%j|BmFuLEmR6kjv@Fd)g9r**Vd3eCaP!zE2^I6f_^$#_?QLS*?5u37Ij_ zgj&6 zM%P5gG3zVR4}ngH%c9*&rMOYNT(@-|&5{!0O`Zk@HXq!Ukoe`HofSnj8JVLhI0B#V z+nP+vLF;F3_a_D7B&SrB*2*+TlOLO`G0tp>LGV=uOD>m)2Q+}Xj>gS^3_3)h{XPP=@EA7~lyW>kReERB(>ex{kKo&{LT2l0g zAY3*+s)=q5*Mw|{>WGR+>rhT9U7BwNxBlXbFTf1$=;&aw;$mmQKng7dW-^Oxs&p_zF)@Kh#l#Wc`5 z)cYq<4z2@yi)SGGHxvW9czb(0YBDU-bWklaltBvRNSITkutiVtFrnKG=mErt519ZV zCE`g=-6@x8U`M}{K{_SXiI4$Jq>>7d&_^<8e;`P-+wHbYJ3;FlMFRdGCf}ak(+hX{ P00000NkvXXu0mjftq_bx diff --git a/mods/HUD/hbarmor/settingtypes.txt b/mods/HUD/hbarmor/settingtypes.txt deleted file mode 100644 index 067d5045..00000000 --- a/mods/HUD/hbarmor/settingtypes.txt +++ /dev/null @@ -1,7 +0,0 @@ -#If true, automatically hides the armor HUD bar when the player wears no -#armor. Otherwise, the armor bar shows “0%”. -hbarmor_autohide (Automatically hide armor HUD bar) bool true - -#Time difference in seconds between updates to the armor HUD bar. -#Increase this number for slow servers. -hbarmor_tick (Armor HUD bar update frequency) float 0.1 0.0 4.0 diff --git a/mods/HUD/mcl_hbarmor/README.md b/mods/HUD/mcl_hbarmor/README.md new file mode 100644 index 00000000..0f4816e4 --- /dev/null +++ b/mods/HUD/mcl_hbarmor/README.md @@ -0,0 +1,26 @@ +# MineClone 2 HUD bar for `3d_armor` [`mcl_hbarmor`] + +## Description +This mod adds a simple HUD bar which displays the player's armor points. +The players has 0-20 armor points. + +The armor bar is hidden if the player wears no armor. + +## Licensing +This mod is entirly free softare. + +### Source code +License: MIT License (see below) + +### Textures + +See MineClone 2 license. + +### MIT License +Everything else is under the MIT License: +© Copyright BlockMen (2013-2014) + +This program is free software. It comes without any warranty, to +the extent permitted by applicable law. You can redistribute it +and/or modify it under the terms of the MIT License. +See for more details. diff --git a/mods/HUD/hbarmor/description.txt b/mods/HUD/mcl_hbarmor/description.txt similarity index 100% rename from mods/HUD/hbarmor/description.txt rename to mods/HUD/mcl_hbarmor/description.txt diff --git a/mods/HUD/hbarmor/init.lua b/mods/HUD/mcl_hbarmor/init.lua similarity index 64% rename from mods/HUD/hbarmor/init.lua rename to mods/HUD/mcl_hbarmor/init.lua index c2530b61..f05d5045 100644 --- a/mods/HUD/hbarmor/init.lua +++ b/mods/HUD/mcl_hbarmor/init.lua @@ -1,33 +1,27 @@ -local S = minetest.get_translator("hbarmor") +local S = minetest.get_translator("mcl_hbarmor") if (not armor) or (not armor.def) then - minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!") + minetest.log("error", "[mcl_hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!") end -local hbarmor = {} +local mcl_hbarmor = {} -- HUD statbar values -hbarmor.armor = {} +mcl_hbarmor.armor = {} -- Stores if player's HUD bar has been initialized so far. -hbarmor.player_active = {} +mcl_hbarmor.player_active = {} -- Time difference in seconds between updates to the HUD armor bar. -- Increase this number for slow servers. -hbarmor.tick = 0.1 +mcl_hbarmor.tick = 0.1 -- If true, the armor bar is hidden when the player does not wear any armor -hbarmor.autohide = true +mcl_hbarmor.autohide = true ---load custom settings -local set = minetest.settings:get_bool("hbarmor_autohide") -if set ~= nil then - hbarmor.autohide = set -end - -set = minetest.settings:get("hbarmor_tick") +set = minetest.settings:get("mcl_hbarmor_tick") if tonumber(set) ~= nil then - hbarmor.tick = tonumber(set) + mcl_hbarmor.tick = tonumber(set) end @@ -43,17 +37,17 @@ local function custom_hud(player) local name = player:get_player_name() if minetest.settings:get_bool("enable_damage") then - local ret = hbarmor.get_armor(player) + local ret = mcl_hbarmor.get_armor(player) if ret == false then - minetest.log("error", "[hbarmor] Call to hbarmor.get_armor in custom_hud returned with false!") + minetest.log("error", "[mcl_hbarmor] Call to mcl_hbarmor.get_armor in custom_hud returned with false!") return end - local arm = tonumber(hbarmor.armor[name]) + local arm = tonumber(mcl_hbarmor.armor[name]) if not arm then arm = 0 end local hide - if hbarmor.autohide then + if mcl_hbarmor.autohide then hide = must_hide(name, arm) else hide = false @@ -63,9 +57,9 @@ local function custom_hud(player) end --register and define armor HUD bar -hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 20, hbarmor.autohide) +hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 20, mcl_hbarmor.autohide) -function hbarmor.get_armor(player) +function mcl_hbarmor.get_armor(player) if not player or not armor.def then return false end @@ -74,25 +68,25 @@ function hbarmor.get_armor(player) if not pts then return false else - hbarmor.set_armor(name, pts) + mcl_hbarmor.set_armor(name, pts) end return true end -function hbarmor.set_armor(player_name, pts) - hbarmor.armor[player_name] = math.max(0, math.min(20, pts)) +function mcl_hbarmor.set_armor(player_name, pts) + mcl_hbarmor.armor[player_name] = math.max(0, math.min(20, pts)) end -- update hud elemtens if value has changed local function update_hud(player) local name = player:get_player_name() --armor - local arm = tonumber(hbarmor.armor[name]) + local arm = tonumber(mcl_hbarmor.armor[name]) if not arm then arm = 0 - hbarmor.armor[name] = 0 + mcl_hbarmor.armor[name] = 0 end - if hbarmor.autohide then + if mcl_hbarmor.autohide then -- hide armor bar completely when there is none if must_hide(name, arm) then hb.hide_hudbar(player, "armor") @@ -108,12 +102,12 @@ end minetest.register_on_joinplayer(function(player) local name = player:get_player_name() custom_hud(player) - hbarmor.player_active[name] = true + mcl_hbarmor.player_active[name] = true end) minetest.register_on_leaveplayer(function(player) local name = player:get_player_name() - hbarmor.player_active[name] = false + mcl_hbarmor.player_active[name] = false end) local main_timer = 0 @@ -121,15 +115,15 @@ local timer = 0 minetest.register_globalstep(function(dtime) main_timer = main_timer + dtime timer = timer + dtime - if main_timer > hbarmor.tick or timer > 4 then + if main_timer > mcl_hbarmor.tick or timer > 4 then if minetest.settings:get_bool("enable_damage") then - if main_timer > hbarmor.tick then main_timer = 0 end + if main_timer > mcl_hbarmor.tick then main_timer = 0 end for _,player in ipairs(minetest.get_connected_players()) do local name = player:get_player_name() - if hbarmor.player_active[name] == true then - local ret = hbarmor.get_armor(player) + if mcl_hbarmor.player_active[name] == true then + local ret = mcl_hbarmor.get_armor(player) if ret == false then - minetest.log("error", "[hbarmor] Call to hbarmor.get_armor in globalstep returned with false!") + minetest.log("error", "[mcl_hbarmor] Call to mcl_hbarmor.get_armor in globalstep returned with false!") end -- update all hud elements update_hud(player) diff --git a/mods/HUD/hbarmor/locale/hbarmor.de.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.de.tr similarity index 100% rename from mods/HUD/hbarmor/locale/hbarmor.de.tr rename to mods/HUD/mcl_hbarmor/locale/hbarmor.de.tr diff --git a/mods/HUD/hbarmor/locale/hbarmor.es.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.es.tr similarity index 100% rename from mods/HUD/hbarmor/locale/hbarmor.es.tr rename to mods/HUD/mcl_hbarmor/locale/hbarmor.es.tr diff --git a/mods/HUD/hbarmor/locale/hbarmor.it.tr b/mods/HUD/mcl_hbarmor/locale/hbarmor.it.tr similarity index 100% rename from mods/HUD/hbarmor/locale/hbarmor.it.tr rename to mods/HUD/mcl_hbarmor/locale/hbarmor.it.tr diff --git a/mods/HUD/hbarmor/locale/template.txt b/mods/HUD/mcl_hbarmor/locale/template.txt similarity index 100% rename from mods/HUD/hbarmor/locale/template.txt rename to mods/HUD/mcl_hbarmor/locale/template.txt diff --git a/mods/HUD/hbarmor/mod.conf b/mods/HUD/mcl_hbarmor/mod.conf similarity index 59% rename from mods/HUD/hbarmor/mod.conf rename to mods/HUD/mcl_hbarmor/mod.conf index 80d38910..4d595c8c 100644 --- a/mods/HUD/hbarmor/mod.conf +++ b/mods/HUD/mcl_hbarmor/mod.conf @@ -1,2 +1,2 @@ -name = hbarmor +name = mcl_hbarmor depends = hudbars, 3d_armor diff --git a/mods/HUD/mcl_hbarmor/settingtypes.txt b/mods/HUD/mcl_hbarmor/settingtypes.txt new file mode 100644 index 00000000..cfd875df --- /dev/null +++ b/mods/HUD/mcl_hbarmor/settingtypes.txt @@ -0,0 +1,3 @@ +#Time difference in seconds between updates to the armor HUD bar. +#Increase this number for slow servers. +hbarmor_tick (Armor HUD bar update frequency) float 0.1 0.0 4.0 diff --git a/mods/HUD/hbarmor/textures/hbarmor_bar.png b/mods/HUD/mcl_hbarmor/textures/hbarmor_bar.png similarity index 100% rename from mods/HUD/hbarmor/textures/hbarmor_bar.png rename to mods/HUD/mcl_hbarmor/textures/hbarmor_bar.png diff --git a/mods/HUD/hbarmor/textures/hbarmor_bgicon.png b/mods/HUD/mcl_hbarmor/textures/hbarmor_bgicon.png similarity index 100% rename from mods/HUD/hbarmor/textures/hbarmor_bgicon.png rename to mods/HUD/mcl_hbarmor/textures/hbarmor_bgicon.png diff --git a/mods/HUD/hbarmor/textures/hbarmor_icon.png b/mods/HUD/mcl_hbarmor/textures/hbarmor_icon.png similarity index 100% rename from mods/HUD/hbarmor/textures/hbarmor_icon.png rename to mods/HUD/mcl_hbarmor/textures/hbarmor_icon.png diff --git a/tools/Conversion_Table.csv b/tools/Conversion_Table.csv index 8444b022..ab4a9451 100644 --- a/tools/Conversion_Table.csv +++ b/tools/Conversion_Table.csv @@ -1,7 +1,7 @@ Source path,Source file,Target path,Target file,xs,ys,xl,yl,xt,yt,Blacklisted? /assets/minecraft/textures/particle,particles.png,/mods/CORE/mcl_particles/textures,mcl_particles_bubble.png,0,16,8,8,0,0,y -/assets/minecraft/textures/gui,icons.png,/mods/HUD/hbarmor/textures,hbarmor_icon.png,34,9,9,9,0,0,y -/assets/minecraft/textures/gui,icons.png,/mods/HUD/hbarmor/textures,hbarmor_bgicon.png,16,9,9,9,0,0,y +/assets/minecraft/textures/gui,icons.png,/mods/HUD/mcl_hbarmor/textures,hbarmor_icon.png,34,9,9,9,0,0,y +/assets/minecraft/textures/gui,icons.png,/mods/HUD/mcl_hbarmor/textures,hbarmor_bgicon.png,16,9,9,9,0,0,y /assets/minecraft/textures/gui,icons.png,/mods/HUD/hudbars/textures,hudbars_icon_health.png,52,0,9,9,0,0,y /assets/minecraft/textures/gui,icons.png,/mods/HUD/hudbars/textures,hudbars_bgicon_health.png,16,0,9,9,0,0,y /assets/minecraft/textures/gui,icons.png,/mods/HUD/hudbars/textures,hudbars_icon_breath.png,16,18,9,9,0,0,y