From c10258cf35a39a1f911e6092b88ad53d615d6fb7 Mon Sep 17 00:00:00 2001 From: Dorian Wouters Date: Wed, 22 Jun 2016 23:51:38 +0200 Subject: [PATCH] [areas] improve HUD text further --- mods/areas/hud.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mods/areas/hud.lua b/mods/areas/hud.lua index 4a9ed54c..75d31887 100755 --- a/mods/areas/hud.lua +++ b/mods/areas/hud.lua @@ -34,7 +34,11 @@ local function tick() local icon = "areas_not_area.png" if nb_areas > 0 then - area_text = ("Nb area(s): %u\nOwner: %s\nName: %s"):format(nb_areas, area_owner_name, area_name) + local plural = "" + if nb_areas > 1 then + plural = "s" + end + area_text = ("%s\nOwner: %s\n%u area" .. plural):format(area_name, area_owner_name, nb_areas) icon = ("areas_%u_%u_%u.png"):format(mod_owner, mod_open, mod_farming) end if not areas.hud[name] then