Fix some more small bugs
This commit is contained in:
@@ -48,7 +48,7 @@ public class CmdFactionsJoin extends FCommand
|
||||
|
||||
if (faction == uplayerFaction)
|
||||
{
|
||||
msg("<b>%s %s already a member of %s", uplayer.describeTo(usender, true), (samePlayer ? "are" : "is"), faction.getName(usender));
|
||||
msg("<i>%s <i>%s already a member of %s<i>.", uplayer.describeTo(usender, true), (samePlayer ? "are" : "is"), faction.getName(usender));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -88,10 +88,10 @@ public class CmdFactionsJoin extends FCommand
|
||||
// Inform
|
||||
if (!samePlayer)
|
||||
{
|
||||
uplayer.msg("<i>%s moved you into the faction %s.", usender.describeTo(uplayer, true), faction.getName(uplayer));
|
||||
uplayer.msg("<i>%s <i>moved you into the faction %s<i>.", usender.describeTo(uplayer, true), faction.getName(uplayer));
|
||||
}
|
||||
faction.msg("<i>%s joined your faction.", uplayer.describeTo(faction, true));
|
||||
usender.msg("<i>%s successfully joined %s.", uplayer.describeTo(usender, true), faction.getName(usender));
|
||||
faction.msg("<i>%s <i>joined <lime>your faction<i>.", uplayer.describeTo(faction, true));
|
||||
usender.msg("<i>%s <i>successfully joined %s<i>.", uplayer.describeTo(usender, true), faction.getName(usender));
|
||||
|
||||
// Apply
|
||||
uplayer.resetFactionData();
|
||||
|
@@ -17,7 +17,7 @@ public class CmdFactionsList extends FCommand
|
||||
{
|
||||
public CmdFactionsList()
|
||||
{
|
||||
this.addAliases("ls", "list");
|
||||
this.addAliases("l", "list");
|
||||
|
||||
this.addOptionalArg("page", "1");
|
||||
|
||||
|
@@ -27,7 +27,7 @@ public class CmdFactionsShow extends FCommand
|
||||
{
|
||||
public CmdFactionsShow()
|
||||
{
|
||||
this.addAliases("show", "who");
|
||||
this.addAliases("s", "show", "who");
|
||||
|
||||
this.addOptionalArg("faction", "you");
|
||||
|
||||
@@ -42,15 +42,12 @@ public class CmdFactionsShow extends FCommand
|
||||
if (faction == null) return;
|
||||
|
||||
UConf uconf = UConf.get(faction);
|
||||
|
||||
Collection<UPlayer> leaders = faction.getUPlayersWhereRole(Rel.LEADER);
|
||||
Collection<UPlayer> officers = faction.getUPlayersWhereRole(Rel.OFFICER);
|
||||
Collection<UPlayer> normals = faction.getUPlayersWhereRole(Rel.MEMBER);
|
||||
Collection<UPlayer> recruits = faction.getUPlayersWhereRole(Rel.RECRUIT);
|
||||
|
||||
// INFO: Description
|
||||
msg(Txt.titleize(faction.getName(usender)));
|
||||
msg("<a>Description: <i>%s", faction.getDescription());
|
||||
|
||||
// INFO: Age
|
||||
long ageMillis = faction.getCreatedAtMillis() - System.currentTimeMillis();
|
||||
LinkedHashMap<TimeUnit, Long> ageUnitcounts = TimeDiffUtil.limit(TimeDiffUtil.unitcounts(ageMillis, TimeUnit.getAllButMillis()), 3);
|
||||
String ageString = TimeDiffUtil.formatedVerboose(ageUnitcounts, "<i>");
|
||||
@@ -68,8 +65,10 @@ public class CmdFactionsShow extends FCommand
|
||||
msg("<a>This faction is peaceful - in truce with everyone.");
|
||||
}
|
||||
|
||||
msg("<a>Joining: <i>"+(faction.isOpen() ? "no invitation is needed" : "invitation is required"));
|
||||
// INFO: Open
|
||||
msg("<a>Open: <i>"+(faction.isOpen() ? "<lime>Yes <i>- anyone can join" : "<rose>No <i>- only invited people can join"));
|
||||
|
||||
// INFO: Power
|
||||
double powerBoost = faction.getPowerBoost();
|
||||
String boost = (powerBoost == 0.0) ? "" : (powerBoost > 0.0 ? " (bonus: " : " (penalty: ") + powerBoost + ")";
|
||||
msg("<a>Land / Power / Maxpower: <i> %d/%d/%d %s", faction.getLandCount(), faction.getPowerRounded(), faction.getPowerMaxRounded(), boost);
|
||||
@@ -124,6 +123,12 @@ public class CmdFactionsShow extends FCommand
|
||||
sendMessage(Txt.parse("<a>Enemies: ") + Txt.implode(relationNames.get(Rel.ENEMY), sepparator));
|
||||
|
||||
// List the members...
|
||||
|
||||
Collection<UPlayer> leaders = faction.getUPlayersWhereRole(Rel.LEADER);
|
||||
Collection<UPlayer> officers = faction.getUPlayersWhereRole(Rel.OFFICER);
|
||||
Collection<UPlayer> normals = faction.getUPlayersWhereRole(Rel.MEMBER);
|
||||
Collection<UPlayer> recruits = faction.getUPlayersWhereRole(Rel.RECRUIT);
|
||||
|
||||
List<String> memberOnlineNames = new ArrayList<String>();
|
||||
List<String> memberOfflineNames = new ArrayList<String>();
|
||||
|
||||
|
Reference in New Issue
Block a user