mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-11 17:51:04 +00:00
Rename hud_elem_type
to type
(#14065)
This commit is contained in:
parent
bc336480e6
commit
467d3a8c62
8 changed files with 45 additions and 15 deletions
|
@ -29,6 +29,7 @@ core.features = {
|
|||
compress_zstd = true,
|
||||
sound_params_start_time = true,
|
||||
physics_overrides_v2 = true,
|
||||
hud_def_type_field = true,
|
||||
}
|
||||
|
||||
function core.has_feature(arg)
|
||||
|
|
|
@ -3,7 +3,7 @@ local enable_damage = core.settings:get_bool("enable_damage")
|
|||
|
||||
local bar_definitions = {
|
||||
hp = {
|
||||
hud_elem_type = "statbar",
|
||||
type = "statbar",
|
||||
position = {x = 0.5, y = 1},
|
||||
text = "heart.png",
|
||||
text2 = "heart_gone.png",
|
||||
|
@ -14,7 +14,7 @@ local bar_definitions = {
|
|||
offset = {x = (-10 * 24) - 25, y = -(48 + 24 + 16)},
|
||||
},
|
||||
breath = {
|
||||
hud_elem_type = "statbar",
|
||||
type = "statbar",
|
||||
position = {x = 0.5, y = 1},
|
||||
text = "bubble.png",
|
||||
text2 = "bubble_gone.png",
|
||||
|
@ -139,7 +139,7 @@ end
|
|||
|
||||
function core.hud_replace_builtin(hud_name, definition)
|
||||
if type(definition) ~= "table" or
|
||||
definition.hud_elem_type ~= "statbar" then
|
||||
(definition.type or definition.hud_elem_type) ~= "statbar" then
|
||||
return false
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue