Include coin.png as a plugin resource #108
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Does not have an associated issue
town_costs_icon.url
totown_costs_icon.path
which now supports URLs and filepathsThe 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.