Fix deprecated hud_elem_type field warning (#78)

Co-authored-by: cx384 <cx384@proton.me>
This commit is contained in:
1F616EMO~nya 2024-07-18 00:18:21 +08:00 committed by GitHub
parent 2deb6770f4
commit 9024be24eb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -66,7 +66,7 @@ minetest.register_globalstep(function(dtime)
hud = {}
areas.hud[name] = hud
hud.areasId = player:hud_add({
hud_elem_type = "text",
[minetest.features.hud_def_type_field and "type" or "hud_elem_type"] = "text", -- compatible with older versions
name = "Areas",
number = 0xFFFFFF,
position = {x=0, y=1},