mirror of
https://repo.or.cz/minetest_hbarmor.git
synced 2025-06-28 14:26:14 +02:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
53d826a2b1 | |||
a231a5fb82 | |||
d6fe732528 | |||
3d53b43696 | |||
fadedbd5ba | |||
93d994cbad | |||
e9568ccdae | |||
c126114237 | |||
5634463f01 | |||
79e9343331 | |||
fa0ed391c6 | |||
5fdc974ebd |
2
.mailmap
Normal file
2
.mailmap
Normal file
@ -0,0 +1,2 @@
|
||||
Wuzzy <Wuzzy@disroot.org> <Wuzzy2@mail.ru>
|
||||
Wuzzy <Wuzzy@disroot.org> <almikes@aol.com>
|
@ -1,6 +1,6 @@
|
||||
# HUD bar for `3d_armor` [`hbarmor`]
|
||||
|
||||
* Version: 0.4.0
|
||||
* Version: 1.0.1
|
||||
|
||||
## Description
|
||||
This mod adds a simple HUD bar which displays the current damage
|
||||
@ -16,8 +16,8 @@ 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)
|
||||
* HUD bars [`hudbars`], major version 2
|
||||
* 3D Armor [`3d_armor`] (tested with Minetest 5.0.0)
|
||||
|
||||
## Licensing
|
||||
This mod is entirly free softare.
|
||||
|
@ -1,3 +0,0 @@
|
||||
hudbars
|
||||
3d_armor
|
||||
intllib?
|
@ -1 +0,0 @@
|
||||
Adds a HUD bar displaying the current damage of the player's armor.
|
12
init.lua
12
init.lua
@ -1,9 +1,5 @@
|
||||
local S
|
||||
if (minetest.get_modpath("intllib")) then
|
||||
S = intllib.Getter()
|
||||
else
|
||||
S = function ( s ) return s end
|
||||
end
|
||||
local S = minetest.get_translator("hbarmor")
|
||||
local N = function(s) return s end
|
||||
|
||||
if (not armor) or (not armor.def) then
|
||||
minetest.log("error", "[hbarmor] Outdated 3d_armor version. Please update your version of 3d_armor!")
|
||||
@ -65,7 +61,7 @@ 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, 100, hbarmor.autohide, S("%s: %d%%"))
|
||||
hb.register_hudbar("armor", 0xFFFFFF, S("Armor"), { icon = "hbarmor_icon.png", bgicon = "hbarmor_bgicon.png", bar = "hbarmor_bar.png" }, 0, 100, hbarmor.autohide, N("@1: @2%"), { order = { "label", "value" }, textdomain = "hbarmor" } )
|
||||
|
||||
function hbarmor.get_armor(player)
|
||||
if not player or not armor.def then
|
||||
@ -152,3 +148,5 @@ minetest.register_globalstep(function(dtime)
|
||||
end
|
||||
if timer > 4 then timer = 0 end
|
||||
end)
|
||||
|
||||
minetest.log("action", "[hbarmor] loaded.")
|
||||
|
@ -1,2 +0,0 @@
|
||||
Armor = Panzerung
|
||||
%s: %d%% = %s: %d%%
|
3
locale/hbarmor.de.tr
Normal file
3
locale/hbarmor.de.tr
Normal file
@ -0,0 +1,3 @@
|
||||
# textdomain:hbarmor
|
||||
Armor=Panzerung
|
||||
@1: @2%=@1: @2%
|
2
locale/hbarmor.fr.tr
Normal file
2
locale/hbarmor.fr.tr
Normal file
@ -0,0 +1,2 @@
|
||||
# textdomain:hbarmor
|
||||
Armor=Armure
|
3
locale/hbarmor.it.tr
Normal file
3
locale/hbarmor.it.tr
Normal file
@ -0,0 +1,3 @@
|
||||
# textdomain:hbarmor
|
||||
Armor=Armatura
|
||||
@1: @2%=@1:@2%
|
@ -1,4 +0,0 @@
|
||||
Armor = Armatura
|
||||
|
||||
# Format string for displaying the armor. E.g. "Armor: 100%"
|
||||
%s: %d%% =
|
@ -1,4 +1,5 @@
|
||||
Armor =
|
||||
# textdomain:hbarmor
|
||||
Armor=
|
||||
|
||||
# Format string for displaying the armor. E.g. "Armor: 100%"
|
||||
%s: %d%% =
|
||||
@1: @2%=
|
||||
|
Reference in New Issue
Block a user