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

Include coin.png as a plugin resource #108

Merged

Conversation

lexiccn
Copy link
Contributor

@lexiccn lexiccn commented Mar 30, 2024

Does not have an associated issue

  • Includes coin.png from FlatIcon as a resource file in the plugin
  • Changes town_costs_icon.url to town_costs_icon.path which now supports URLs and filepaths
  • Forces reset of this config option due to the change
    • This is intentional due to a debatable rights issue with the original icon
  • Falls back to default resource png if URL is invalid or filepath is invalid
  • Uses default resource png without message if config is empty (this is the default)

The original icon has rules against hotlinking, which this plugin technically does not do as the icon is only downloaded on reload of the plugin - However it's clearly against the spirit of the rules and does download excessively, so I've changed this to an included resource coin.png to avoid this issue. Similarly, this is why I decided resetting the config option was the best solution.

On the upside this allows users to include custom files, not just URLs, and adds a fallback if it is invalid rather than failing to display.

@LlmDl LlmDl added this to the 2.1.0 milestone Apr 4, 2024
@LlmDl LlmDl merged commit f4856a9 into TownyAdvanced:master Apr 4, 2024
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.

None yet

2 participants