Skip to content

Conversation

@ItsJuls
Copy link
Contributor

@ItsJuls ItsJuls commented Jul 14, 2024

With Tab Autocomplete, You can now set your own town marker within your town by the command /t set marker!
Having the option to either use a set of images from a folder or freely use a image link from the web as your marker

added a new config value for this: use-links-as-image-source
also adds a new class for the command

Preset images
image
image
image

Option to use a link
image
image
image

Might need more testing by somebody here. if anyone wants to test this before it gets merged feel free to try and ping me in BlueMap discord

@ItsJuls ItsJuls requested a review from Chicken as a code owner July 14, 2024 10:08
lie-about-holes: false
# If you want to have towns have the option to use their own image markers (By default it's only a locked to 1 default image for every town)
# 0 for default, 1 as customizable within a preset of images inside a folder created by the plugin, 2 as letting the town/players choose their own town marker via a link (BE WARNED THAT YOU HAVE TO TRUST THE GOODWILL OF YOUR PLAYERS FOR THIS)
use-links-as-image-source: 0
Copy link
Owner

Choose a reason for hiding this comment

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

I would much prefer for this option to be removed and the home-icon-enabled option to be renamed as home-icon-style with string options "disabled", "only-default", "preset" and "link"
Should also probably have a warning that changing between the preset and link types will break existing markers.
Also update the config in the README file.

}

TownyMessaging.sendPrefixedTownMessage(resident.getTownOrNull(), "Town Marker has been set to: " + String.join(" ", args));
resident.getTownOrNull().addMetaData(new StringDataField("mapMarker", String.join(" ", args)));
Copy link
Owner

Choose a reason for hiding this comment

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

The command should check that the marker is actually one of the markers in the presets if the preset mode is selected. Currently one can set anything and even do path traversal (../) to set unrelated files.

@Chicken
Copy link
Owner

Chicken commented Jul 20, 2024

Oh yeah and if we have town markers wouldn't it make sense to also have nation markers?

@ItsJuls
Copy link
Contributor Author

ItsJuls commented Aug 3, 2024

If i could fix everything rn and get it to work, I'll get on nation markers too

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.

2 participants