Use dynamic recoloring for balloons, targets, cars, payloads, parachutes #327
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.
This accomplishes the topic discussed in #326 . Now, rather than pulling in a choice of a PNG based on a color (such as parachute-red.png, parachute-blue.png, or parachute-green.png, etc), I've created a set of SVG files which are dynamically recolored at runtime in order to populate the map.
The primary goal for this is to make it easy to add new colors of objects to the map, as well as to change the design of any of the icons easily without needing to modify lots of files at once.
All of these SVGs were created by hand in a text editor. As such, they are very human-readable and very easy to modify (as opposed to if they were created in Inkscape or similar, where all the coordinates would be ugly float values).
The goal in creating the SVGs was to replicate the general look and feel of the existing icons, but not to be a pixel-perfect duplication. There is nothing to say that the existing icons were perfect, and therefore matching their exact proportions was not considered a crucial goal. Given that these are, again, easily modifiable SVG files, anyone who wishes to tweak the look of these icons should be able to do so. I'm also happy to make any tweaks if anyone puts comments on this PR.
Probably the icon that could use the most work is the car. It gets the idea across, but is lacking in detail. However, for the sake of an initial attempt at this dynamic recoloring feature, I think this PR is ready for others to consider.
Note that this feature has some small conflicts with the one in #325 , but those should be trivial to resolve if we decide to move forward with this.
I will stress that this PR is likely not in a "prime-time-ready" state, but it is a proof of concept, and all of the relevant objects are successfully being recolored dynamically, which is a great step to be able to make. I encourage anyone to clone my branch and give this a try locally, and let me know any tweaks you'd like me to make to the aesthetics.