mirror of
https://repo.or.cz/minetest_hudbars.git
synced 2025-06-28 22:46:06 +02:00
Compare commits
12 Commits
Author | SHA1 | Date | |
---|---|---|---|
6e2173c6e3 | |||
dd2a9a008d | |||
a7d0774ad0 | |||
812b2538ff | |||
906f7876f7 | |||
a44de6230b | |||
26a36dde55 | |||
28dcf8af65 | |||
c4ddef312e | |||
7f6ed309b3 | |||
7cd5940c68 | |||
67ca481f7c |
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>
|
@ -11,7 +11,7 @@ this mod will place them accordingly.
|
|||||||
position should be displayed correctly on every screen size.
|
position should be displayed correctly on every screen size.
|
||||||
|
|
||||||
## Current version
|
## Current version
|
||||||
The current version is 2.3.1.
|
The current version is 2.3.3.
|
||||||
It works for Minetest 5.3.0.
|
It works for Minetest 5.3.0.
|
||||||
|
|
||||||
This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer
|
This software uses [semantic versioning](http://semver.org), as defined by version 2.0.0 of the SemVer
|
||||||
|
4
init.lua
4
init.lua
@ -404,6 +404,7 @@ function hb.hide_hudbar(player, identifier)
|
|||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local hudtable = hb.get_hudtable(identifier)
|
local hudtable = hb.get_hudtable(identifier)
|
||||||
if hudtable == nil then return false end
|
if hudtable == nil then return false end
|
||||||
|
if hudtable.hudstate[name].hidden == true then return true end
|
||||||
if hb.settings.bar_type == "progress_bar" then
|
if hb.settings.bar_type == "progress_bar" then
|
||||||
if hudtable.hudids[name].icon ~= nil then
|
if hudtable.hudids[name].icon ~= nil then
|
||||||
player:hud_change(hudtable.hudids[name].icon, "scale", {x=0,y=0})
|
player:hud_change(hudtable.hudids[name].icon, "scale", {x=0,y=0})
|
||||||
@ -422,6 +423,7 @@ function hb.unhide_hudbar(player, identifier)
|
|||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local hudtable = hb.get_hudtable(identifier)
|
local hudtable = hb.get_hudtable(identifier)
|
||||||
if hudtable == nil then return false end
|
if hudtable == nil then return false end
|
||||||
|
if hudtable.hudstate[name].hidden == false then return true end
|
||||||
local value = hudtable.hudstate[name].value
|
local value = hudtable.hudstate[name].value
|
||||||
local max = hudtable.hudstate[name].max
|
local max = hudtable.hudstate[name].max
|
||||||
if hb.settings.bar_type == "progress_bar" then
|
if hb.settings.bar_type == "progress_bar" then
|
||||||
@ -564,3 +566,5 @@ minetest.register_globalstep(function(dtime)
|
|||||||
end
|
end
|
||||||
if timer > 4 then timer = 0 end
|
if timer > 4 then timer = 0 end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
minetest.log("action", "[hudbars] loaded.")
|
||||||
|
Reference in New Issue
Block a user