mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Improve waypoints and add image variant (#9480)
This commit is contained in:
parent
f780bae05c
commit
af2e6a6a10
7 changed files with 118 additions and 47 deletions
|
@ -1850,7 +1850,11 @@ void read_hud_element(lua_State *L, HudElement *elem)
|
|||
elem->name = getstringfield_default(L, 2, "name", "");
|
||||
elem->text = getstringfield_default(L, 2, "text", "");
|
||||
elem->number = getintfield_default(L, 2, "number", 0);
|
||||
elem->item = getintfield_default(L, 2, "item", 0);
|
||||
if (elem->type == HUD_ELEM_WAYPOINT)
|
||||
// waypoints reuse the item field to store precision, item = precision + 1
|
||||
elem->item = getintfield_default(L, 2, "precision", -1) + 1;
|
||||
else
|
||||
elem->item = getintfield_default(L, 2, "item", 0);
|
||||
elem->dir = getintfield_default(L, 2, "direction", 0);
|
||||
elem->z_index = MYMAX(S16_MIN, MYMIN(S16_MAX,
|
||||
getintfield_default(L, 2, "z_index", 0)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue