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

Dynamic Nation Colours #4

Merged
merged 14 commits into from
Apr 25, 2020
Merged

Conversation

Goosius1
Copy link

@Goosius1 Goosius1 commented Feb 5, 2020

SUMMARY

  • This is a feature for dynamic nation colours
  • The feature works in combination with new code in the Towny plugin.
    Tha towny code can be reviewed in the "Dynamic nation colours" PR in the Towny repo.

DESCRIPTION

  • This feature immediately gives colors to all nations on the dynmap when the Towny jar is deployed
  • After it does this, it allows the colors to be changed easily, without restarting the dynmap or towny plugins
  • An allowed list of colors is found in the Towny plugin config.yml
  • Existing nations automatically get a random allowed color when the server is first restarted
  • New nations automatically get a random allowed color
  • The command to change color is '/n set mapcolor '
  • By default kings can change their nation color, but this can be restricted by permission
  • Admins can change nation colors using 'ta nation set mapcolor '

@KarlOfDuty
Copy link

I can try this out in a few days as we will be testing some other towny related things then anyway.

@KarlOfDuty
Copy link

Actually, does this work in 1.13.2 as all our servers including test servers are running that?

@Goosius1
Copy link
Author

Goosius1 commented Feb 5, 2020

Hi Karl.
Yes it is comfirmed as working on 1.13.2

The required compatibility branch for that is: Goosius1:dynamic_nation_colours_1.13_compatibility

goosius added 2 commits February 12, 2020 09:49
- With this feature, a nation can choose IN-GAME what their dynmap
colours will be
- This is done by placing one or both of the following tags on the
nation board:
map_border_style=45345,435.0,45235  # this sets....colour, opacity, weight
map_fill_style=234234,3242.0     # this sets....colour, opacity

TESTING
- It would be great if somebody interested in this feature could test it.
- I don't currently have the experience with dynmap to quickly set it up locally
@Goosius1 Goosius1 force-pushed the dynamic_nation_colours branch 2 times, most recently from 5a3f904 to f74d73f Compare February 12, 2020 10:22
@Goosius1 Goosius1 changed the title Dynamic nation colours Dynamic nation colours - FOR 1.13 COMPATIBILITY Feb 12, 2020
@Goosius1 Goosius1 changed the title Dynamic nation colours - FOR 1.13 COMPATIBILITY Dynamic nation colours Feb 12, 2020
@Goosius1 Goosius1 changed the title Dynamic nation colours Dynamic nation colours Feb 12, 2020
- Updated the towny jar to the 1.13 compatibility one
- Updated some other versioning in pom file  (to suit 1.13 compatibility)
- Also fixed a pre-existing compile type error for 'lossy conversion'
- Updated pom - set towny to latest version
goosius1 and others added 7 commits February 12, 2020 12:23
- Added code to deal with users putting in upper/lowercase for the
keyword
- plugin.yml: Update api-version to 1.14
- README Update:
  - Redone 'Supported Versions' and 'Building from Source'
- POM Update:
  - "Fixed" POM model from using tabs to using 4 spaces (IDE automated,
I'm too lazy to revert this...
  - Fixed GitHub Packages repository, github-Towny
  - Updated Dependencies
    - Towny to 0.95.2.10
    - TownyChat to 0.65
    - Bukkit API to 1.14.4-R0.1-SNAPSHOT
    - DynmapAPI to 2.5 (from 2.2) (Should technically be 3.0-SNAPSHOT,
but the maven for it is out of date)
  - Added Repository to dynamically grab the Bukkit API instead of
manually downloading.
- Fix for [home] showing beside town names.
- Fix for /dynmap reload breaking dynmap-towny.
@illumeleet
Copy link

illumeleet commented Mar 18, 2020

it'll be more player-friendly if commands were used (like /nationcolor + hex) to change appearance on dynmap, insted of nation board.

@Goosius1
Copy link
Author

Yes, I totally agree

  • That will be a future improvement for this feature
  • Since the lo-fi board-link solution has significantly improved the dynmap experience on trial servers, I am hoping to get that merged first. (but its not critical, a wait just means that fewer servers will be aware of it)
  • In the short term I plan to address a recent player experience complaint, where nations forget to set the colour and it looks default on the map.
  • After this, I plan to improve the feature it using that commands based approach.
  • Although if anyone else feels like picking that improvement up before I get to it, fire away!

* Added a dynmap config for this feature - on/off
* If feature is on, nation colors are read from the nation object as indicated
  If feature is off, nation colors are read using the existing pattern
* Also updated pom for continued usability
  - set townychat 68 to be in pom
    because that is the version which is currently offered in the github
    package along with the latest towny release 0.96.1.0.
  - set towny jar to be system in pom like the other deps,
    because otherwise towny jar updates were not getting picked up.
@Goosius1 Goosius1 changed the title Dynamic nation colours Dynamic Nation Colours Apr 3, 2020
ghost
ghost previously approved these changes Apr 4, 2020
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job!

pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
- updated towny version to the earliest one which supports the colours
feature
pom.xml Show resolved Hide resolved
@LlmDl LlmDl merged commit 8829094 into TownyAdvanced:master Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants