Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Town leaderboard PAPI Placeholders #6757

Merged
merged 1 commit into from
Jun 14, 2023
Merged

Conversation

LlmDl
Copy link
Member

@LlmDl LlmDl commented Jun 14, 2023

Description:

  - New Placeholders:
    - %townyadvanced_top_town_balance_n% - (Replace n with a number) Displays the nth Town by money in the town bank.
    - %townyadvanced_top_town_residents_n% - (Replace n with a number) Displays the nth Town by number of residents.
    - %townyadvanced_top_town_land_n% - (Replace n with a number) Displays the nth Town by number of townblocks claimed.
  - New Config Option: filters_colour_chat.papi_leaderboard_formatting.format"
    - Default: "%s - %s",
    - How the %townyadvanced_top_....% placeholders will appear, first %s being the town name, with the second being the balance, resident count or town size.

PlaceholderExpansion class gets a private getMoney() method to reduce code.


New Nodes/Commands/ConfigOptions:


Relevant Towny Issue ticket:

Closes #5073.


  • I have tested this pull request for defects on a server.

By making this pull request, I represent that I have the right to waive copyright and related rights to my contribution, and agree that all copyright and related rights in my contributions are waived, and I acknowledge that the TownyAdvanced organization has the copyright to use and modify my contribution under the Towny License for perpetuity.

New Placeholders:
 - %townyadvanced_top_town_balance_n%
 - %townyadvanced_top_town_residents_n%
 - %townyadvanced_top_town_land_n%

Replace n with number you want: 1, 2, 3.

Returns the nth-placed town's name and their corresponding balance,
number of residents, amount of townblocks claimed.

New Config Option:
filters_colour_chat.papi_leaderboard_formatting.format"
  - Default: "%s - %s",
  - How the %townyadvanced_top_....% placeholders will appear, first %s
being the town name, with the second being the balance, resident count
or town size.

PlaceholderExpansion class gets a private getMoney() method to reduce
code.
@LlmDl LlmDl added this to the 0.99.2.0 milestone Jun 14, 2023
@LlmDl LlmDl merged commit 9190702 into master Jun 14, 2023
@LlmDl LlmDl deleted the feat/leaderboard_placeholders branch June 14, 2023 23:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Suggestion: Top placeholders
1 participant