summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2014-03-30 13:53:56 -0400
committerShadowNinja <shadowninja@minetest.net>2014-03-30 13:53:56 -0400
commit6f31a5659469b22a60ab8fef5fe4b21aced0312d (patch)
tree0593e6509d9fc049074d1255a6e45ecbd19001aa
parentce8891a325d57894c53628165d1c0825576fa5bc (diff)
Tweak HUD area list display
-rw-r--r--hud.lua9
1 files changed, 3 insertions, 6 deletions
diff --git a/hud.lua b/hud.lua
index 19a3f35..ee93b06 100644
--- a/hud.lua
+++ b/hud.lua
@@ -6,7 +6,6 @@ minetest.register_globalstep(function(dtime)
for _, player in pairs(minetest.get_connected_players()) do
local name = player:get_player_name()
local pos = vector.round(player:getpos())
- local a = areas:getAreasAtPos(pos)
local areaString = ""
local first = true
for id, area in pairs(areas:getAreasAtPos(pos)) do
@@ -15,11 +14,9 @@ minetest.register_globalstep(function(dtime)
else
first = false
end
- local ownertxt = area.owner
- if area.open then
- ownertxt = ownertxt.."/open"
- end
- areaString = areaString..id.." ("..ownertxt..")"
+ areaString = areaString .. ("%s [%u] (%s%s)")
+ :format(area.name, id, area.owner,
+ area.open and ":open" or "")
end
if not areas.hud[name] then
areas.hud[name] = {}