Commit Graph

16 Commits

Author SHA1 Message Date
Lars Mueller
1e4d6672be Fix builtin statbar backgrounds
see #12000
2022-01-31 16:35:30 -05:00
rubenwardy
4db7fb4a3b Replace 'minetest.' with 'core.' in builtin 2021-02-11 10:18:22 +00:00
Wuzzy
6e1372bd89
Add support for statbar “off state” icons (#9462)
This adds support for optional “off state” icons for statbars. “off state icons” can be used to denote the lack of something, like missing hearts or bubbles.

Add "off state" textures to the builtin statbars.

Co-authored-by: SmallJoker <mk939@ymail.com>
2020-05-11 21:40:45 +02:00
ANAND
a36c9c3e93
Fix breath_bar scaling; delay breath_bar hiding by one second (#8271)
PLAYER_MAX_BREATH_DEFAULT was earlier set to 11, so that 10 bubbles are shown before the breath bar disappears.

Now, PLAYER_MAX_BREATH_DEFAULT is set to 10, and the breath_bar scaling code in builtin has been tweaked to show all 10 bubbles before hiding the breath_bar
2020-04-28 19:30:57 +02:00
rubenwardy
8e757859d6
Add luacheck to check builtin (#7895) 2019-08-06 19:30:18 +01:00
Wuzzy
ec3142af99 Group "immortal" also protects players from damage
Document new meaning of immortal=1 for players

Disable breathing if player is immortal

Hide builtin statbars if player immortal (delayed)

Co-authored-by: ClobberXD <ClobberXD@gmail.com>
2019-08-01 14:45:23 +02:00
SmallJoker
eea1fdaf25 Statbars: Reduce initial update interval
Centralize HUD updating in update_builtin_statbars.
Fixes race condition in 'on joinplayer' that causes stat bar bugs.
Correctly scales stat bars to custom max values set by mods.
2019-02-12 20:45:38 +00:00
SmallJoker
edbc533414 Customizeable max breath for players (#6411)
* Customizeable maximal breath for players
2017-09-15 12:18:47 +02:00
SmallJoker
f7d50a8078 Respect object property hp_max field for players (#6287)
* Respect object property hp_max field for players
This allows modders to configure the maximal HP per player

* Statbars: Downscale bar to full 20 HP when exceeding this value
Add default max HP for players and breath constants to builtin
Document the constants

* Rename PLAYER_MAX_HP -> PLAYER_MAX_HP_DEFAULT
2017-08-23 22:32:10 +02:00
ShadowNinja
43d1f375d1 Use a settings object for the main settings
This unifies the settings APIs.

This also unifies the sync and async registration APIs, since the async
registration API did not support adding non-functions to the API table.
2017-05-06 15:33:19 -04:00
tenplus1
e9cd7187e8 Statbars.lua: Cache enable_damage setting 2017-02-18 22:46:06 +00:00
kwolekr
15c037614f Hud: Modify Y-positioning of health/breath starbars to prevent overlapping with Hotbar 2015-02-08 12:47:45 -05:00
sapier
6c37e89f08 Fix old client showing duplicated health bar on new server
Fix client not showing hearts and bubbles on connecting to old server
Fix server not remembering hud flags correctly
2014-05-11 22:34:44 +02:00
sapier
c8aed03ace Fix healthbar not beeing hidden on disabled damage 2014-05-10 23:32:25 +02:00
ShadowNinja
c4359ff65c Use "core" namespace internally 2014-05-08 13:02:04 -04:00
ShadowNinja
1cd512913e Organize builtin into subdirectories 2014-05-07 17:14:23 -04:00