mirror of
https://github.com/minetest-mods/areas.git
synced 2024-11-14 14:40:19 +01:00
Tweak HUD area list display
This commit is contained in:
parent
ce8891a325
commit
6f31a56594
9
hud.lua
9
hud.lua
|
@ -6,7 +6,6 @@ minetest.register_globalstep(function(dtime)
|
||||||
for _, player in pairs(minetest.get_connected_players()) do
|
for _, player in pairs(minetest.get_connected_players()) do
|
||||||
local name = player:get_player_name()
|
local name = player:get_player_name()
|
||||||
local pos = vector.round(player:getpos())
|
local pos = vector.round(player:getpos())
|
||||||
local a = areas:getAreasAtPos(pos)
|
|
||||||
local areaString = ""
|
local areaString = ""
|
||||||
local first = true
|
local first = true
|
||||||
for id, area in pairs(areas:getAreasAtPos(pos)) do
|
for id, area in pairs(areas:getAreasAtPos(pos)) do
|
||||||
|
@ -15,11 +14,9 @@ minetest.register_globalstep(function(dtime)
|
||||||
else
|
else
|
||||||
first = false
|
first = false
|
||||||
end
|
end
|
||||||
local ownertxt = area.owner
|
areaString = areaString .. ("%s [%u] (%s%s)")
|
||||||
if area.open then
|
:format(area.name, id, area.owner,
|
||||||
ownertxt = ownertxt.."/open"
|
area.open and ":open" or "")
|
||||||
end
|
|
||||||
areaString = areaString..id.." ("..ownertxt..")"
|
|
||||||
end
|
end
|
||||||
if not areas.hud[name] then
|
if not areas.hud[name] then
|
||||||
areas.hud[name] = {}
|
areas.hud[name] = {}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user