mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-12 16:15:20 +02:00
Rename hud_elem_type
to type
(#14065)
This commit is contained in:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user