Add ability to display if Faction is raidable. Resolves #167.

This commit is contained in:
drtshock 2015-01-27 09:06:18 -06:00
parent 3c0c835160
commit 092d4b352c
2 changed files with 8 additions and 2 deletions

View File

@ -58,7 +58,8 @@ public class CmdShow extends FCommand {
double powerBoost = faction.getPowerBoost(); double powerBoost = faction.getPowerBoost();
String boost = (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_SHOW_BONUS.toString():TL.COMMAND_SHOW_PENALTY.toString() + powerBoost + ")"); String boost = (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? TL.COMMAND_SHOW_BONUS.toString():TL.COMMAND_SHOW_PENALTY.toString() + powerBoost + ")");
msg(TL.COMMAND_SHOW_POWER, faction.getLandRounded(), faction.getPowerRounded(), faction.getPowerMaxRounded(), boost); String raidable = faction.getLandRounded() > faction.getPowerRounded() ? TL.RAIDABLE_TRUE.toString() : TL.RAIDABLE_FALSE.toString();
msg(TL.COMMAND_SHOW_POWER, faction.getLandRounded(), faction.getPowerRounded(), faction.getPowerMaxRounded(), boost, raidable);
if (faction.isPermanent()) { if (faction.isPermanent()) {
msg(TL.COMMAND_SHOW_PERMANENT); msg(TL.COMMAND_SHOW_PERMANENT);

View File

@ -420,7 +420,7 @@ public enum TL {
COMMAND_SHOW_JOINING("<a>Joining: <i>%1$s "), COMMAND_SHOW_JOINING("<a>Joining: <i>%1$s "),
COMMAND_SHOW_INVITATION("invitation is required"), COMMAND_SHOW_INVITATION("invitation is required"),
COMMAND_SHOW_UNINVITED("no invitation is needed"), COMMAND_SHOW_UNINVITED("no invitation is needed"),
COMMAND_SHOW_POWER("<a>Land / Power / Maxpower: <i> %1$d/%2$d/%3$d %4$s"), COMMAND_SHOW_POWER("<a>Land / Power / Maxpower: <i> %1$d/%2$d/%3$d %4$s. <a>Raidable: <i>%5$s"),
COMMAND_SHOW_BONUS(" (bonus: "), COMMAND_SHOW_BONUS(" (bonus: "),
COMMAND_SHOW_PENALTY(" (penalty: "), COMMAND_SHOW_PENALTY(" (penalty: "),
COMMAND_SHOW_DEPRECIATED("(%1$s depreciated)"), //This is spelled correctly. COMMAND_SHOW_DEPRECIATED("(%1$s depreciated)"), //This is spelled correctly.
@ -649,6 +649,11 @@ public enum TL {
FACTION_LOGIN("faction-login", "&e%1$s &9logged in."), FACTION_LOGIN("faction-login", "&e%1$s &9logged in."),
FACTION_LOGOUT("faction-logout", "&e%1$s &9logged out.."), FACTION_LOGOUT("faction-logout", "&e%1$s &9logged out.."),
/**
* Raidable is used in multiple places. Allow more than just true/false.
*/
RAIDABLE_TRUE("raidable-true", "true"),
RAIDABLE_FALSE("raidable-false", "false"),
/** /**
* Warmups * Warmups
*/ */