TownyAdvanced / Towny

Towny Advanced Minecraft plugin for Bukkit/Spigot.
https://townyadvanced.github.io
Other
510 stars 350 forks source link

Dynmap: outpost markers overlay their towns' #7451

Open MilesBHuff opened 1 month ago

MilesBHuff commented 1 month ago

Description of the problem

Outposts are currently rendered above towns on Dynmap, which seems wrong: Towns should overlay their outposts, not the other way around.

Since these are all on the same layer, changing layerprio won't solve this; I'm guess what is instead needed, is to draw the outpost markers before you draw the town markers. Presumably, the order should be as follows, from first-to-be-drawn (the bottom) to last-to-be-drawn (the top):

  1. Ruin outposts (can't remember if these are a thing)
  2. Camps
  3. Town outposts
  4. Ruins
  5. Towns
  6. Nation capitals

Within each group, the newest entries should be rendered first (the bottom), so that the oldest, most-established towns overlay the newcomers.

(I was on the fence about whether to report this as a bug or as a feature request. It's kind of both?)

What steps will reproduce the problem?

  1. Have Towny, Towny-Dynmap, and Dynmap on a server
  2. Have a town with an outpost that is very close-by to it
  3. Open the map in a browser

image

What is the expected output?

image

Towny version

0.100.1.0

Server version

Paper version git-Paper-411 (MC: 1.17.1) (Implementing API version 1.17.1-R0.1-SNAPSHOT) (Git: 6625db3 on ver/1.17.1)

Please use Pastebin.com to link the following files

  1. Your full server startup from the logs\latest.log: Not relevant, so not going through the trouble of gisting it.
  2. Your Towny config.yml: https://github.com/SettleScape/server/blob/master/minecraft/plugins/Towny/settings/config.yml
  3. Your townyperms.yml: https://github.com/SettleScape/server/blob/master/minecraft/plugins/Towny/settings/townyperms.yml
  4. Your log's error: No error.
MilesBHuff commented 1 month ago

There was a discussion in Discord about this; I figured I'd put the gist of that here, so that onlookers have more context:

There doesn't seem to me to be a reliable way of setting render order of markers within the same layer in Dynmap, so this may not actually be doable without splitting the Towny layer into several different layers (which has advantages, but clutters the layer list). It was suggested by one person to look at how TownyProvinces does things, since it may have already solved this issue.