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:
parent
f92d59e5c6
commit
d888b320db
@ -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()));
|
msg(TL.COMMAND_SHOW_JOINING.toString() + peaceStatus, (faction.getOpen() ? TL.COMMAND_SHOW_UNINVITED.toString() : TL.COMMAND_SHOW_INVITATION.toString()));
|
||||||
|
|
||||||
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 + ")");
|
||||||
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);
|
||||||
}
|
}
|
||||||
|
@ -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"),
|
||||||
|
@ -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
|
Loading…
Reference in New Issue
Block a user