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:
drtshock 2015-01-27 11:07:55 -06:00
parent f92d59e5c6
commit d888b320db
3 changed files with 9 additions and 1 deletions

View File

@ -61,6 +61,10 @@ public class CmdShow extends FCommand {
String raidable = faction.getLandRounded() > faction.getPowerRounded() ? TL.RAIDABLE_TRUE.toString() : TL.RAIDABLE_FALSE.toString(); 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); 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()) { if (faction.isPermanent()) {
msg(TL.COMMAND_SHOW_PERMANENT); msg(TL.COMMAND_SHOW_PERMANENT);
} }

View File

@ -446,6 +446,7 @@ public enum TL {
COMMAND_SHOW_MEMBERSONLINE("Members online: "), COMMAND_SHOW_MEMBERSONLINE("Members online: "),
COMMAND_SHOW_MEMBERSOFFLINE("Members offline: "), COMMAND_SHOW_MEMBERSOFFLINE("Members offline: "),
COMMAND_SHOW_COMMANDDESCRIPTION("Show faction information"), COMMAND_SHOW_COMMANDDESCRIPTION("Show faction information"),
COMMAND_SHOW_DEATHS_TIL_RAIDABLE("<i>DTR: %1$d"),
COMMAND_SHOWINVITES_PENDING("Players with pending invites: "), COMMAND_SHOWINVITES_PENDING("Players with pending invites: "),
COMMAND_SHOWINVITES_CLICKTOREVOKE("Click to revoke invite for %1$s"), COMMAND_SHOWINVITES_CLICKTOREVOKE("Click to revoke invite for %1$s"),

View File

@ -177,6 +177,9 @@ max-relations:
hcf: hcf:
raidable: false raidable: false
# DTR (death til raidable) will be in /f show if enabled. Configure the message in the lang.yml
dtr: false
# Should we allow Factions to over claim if they are raidable (above has no effect on this)? # Should we allow Factions to over claim if they are raidable (above has no effect on this)?
# This has always been true, allowing factions to over claim others. # This has always been true, allowing factions to over claim others.
overclaim: true overclaim: true