From 338e8eb338712bd441470f13732bc646cbac0bfb Mon Sep 17 00:00:00 2001 From: TimWolla Date: Sun, 22 May 2011 22:45:14 +0200 Subject: [PATCH] Implemented https://github.com/taoneill/war/issues/197 --- war/src/main/java/com/tommytony/war/Team.java | 9 +++++++-- war/src/main/java/com/tommytony/war/ZoneLobby.java | 6 +++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/war/src/main/java/com/tommytony/war/Team.java b/war/src/main/java/com/tommytony/war/Team.java index a90a8b0..923f489 100644 --- a/war/src/main/java/com/tommytony/war/Team.java +++ b/war/src/main/java/com/tommytony/war/Team.java @@ -276,9 +276,14 @@ public class Team { String[] lines = new String[4]; lines[0] = "Team " + name; - lines[1] = remainingLives + "/" + warzone.getLifePool() + " lives left"; + lines[1] = players.size() + "/" + warzone.getTeamCap() + " players"; lines[2] = points + "/" + warzone.getScoreCap() + " pts"; - lines[3] = players.size() + "/" + warzone.getTeamCap() + " players"; + if(warzone.getLifePool() == -1) { + lines[3] = "unlimited lives"; + } else { + lines[3] = remainingLives + "/" + warzone.getLifePool() + " lives left"; + } + SignHelper.setToSign(war, signBlock, (byte)signData, lines); } } diff --git a/war/src/main/java/com/tommytony/war/ZoneLobby.java b/war/src/main/java/com/tommytony/war/ZoneLobby.java index 088c46f..69497cf 100644 --- a/war/src/main/java/com/tommytony/war/ZoneLobby.java +++ b/war/src/main/java/com/tommytony/war/ZoneLobby.java @@ -660,7 +660,11 @@ public class ZoneLobby { lines[0] = "Team " + team.getName(); lines[1] = team.getPlayers().size() + "/" + warzone.getTeamCap() + " players"; lines[2] = team.getPoints() + "/" + warzone.getScoreCap() + " pts"; - lines[3] = team.getRemainingLifes() + "/" + warzone.getLifePool() + " lives left"; + if(warzone.getLifePool() == -1) { + lines[3] = "unlimited lives"; + } else { + lines[3] = team.getRemainingLifes() + "/" + warzone.getLifePool() + " lives left"; + } resetGateSign(gate, lines, true); } }