Fix deprecated field 'hud_elem_type' and limit line length

This commit is contained in:
SmallJoker
2025-06-15 15:28:18 +02:00
parent 240e6cc68a
commit dd17b6ce17
3 changed files with 12 additions and 7 deletions

View File

@ -164,7 +164,8 @@ ui.register_page("waypoints", {
},
{
"toggle_display_pos",
waypoint.display_pos and "ui_green_icon_background.png^ui_xyz_icon.png" or "ui_red_icon_background.png^ui_xyz_icon.png^(ui_no.png^[transformR90)",
waypoint.display_pos and "ui_green_icon_background.png^ui_xyz_icon.png" or
"ui_red_icon_background.png^ui_xyz_icon.png^(ui_no.png^[transformR90)",
waypoint.display_pos and S("Hide coordinates") or S("Show coordinates")
},
{
@ -254,7 +255,7 @@ local function update_hud(player, waypoints, temp, i)
end
if waypoint.active then
temp.hud = player:hud_add({
hud_elem_type = "waypoint",
[core.features.hud_def_type_field and "type" or "hud_elem_type"] = "waypoint",
number = hud_colors[waypoint.color or 1][2] ,
name = name,
text = "m",