Add DTR (deaths til raidable) option for f show.
Will show 0 if they are raidable to prevent a negative number from showing.
This commit is contained in:
@@ -57,10 +57,14 @@ public class CmdShow extends FCommand {
|
||||
msg(TL.COMMAND_SHOW_JOINING.toString() + peaceStatus, (faction.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString()));
|
||||
|
||||
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 + ")");
|
||||
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 (P.p.getConfig().getBoolean("hcf.raidable", false)) {
|
||||
int dtr = Math.max(faction.getPowerRounded() - faction.getLandRounded(), 0);
|
||||
msg(TL.COMMAND_SHOW_DEATHS_TIL_RAIDABLE, dtr);
|
||||
}
|
||||
if (faction.isPermanent()) {
|
||||
msg(TL.COMMAND_SHOW_PERMANENT);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user