Palats / mapshot

Factorio mod to export maps as zoomable html
Apache License 2.0
77 stars 12 forks source link

Rich-text tags not rendered in station names #40

Open yuriks opened 6 months ago

yuriks commented 6 months ago

Station names using richtext icons are displayed with the raw [item=nullius-iron-ingot] etc. text, which makes them quite hard to read if those are heavily used.

image

I'm guessing this is a limitation of the mod API that doesn't let you directly save sprites to the output directory, but I wonder if it could be worked around somehow by rendering a spritesheet GUI of used icons and then screenshotting that? Or perhaps as a post-process command on the command-line tool that can copy the appropriate icons from the game mod files.

Palats commented 6 months ago

There is mainly 2 things needed:

Overall, that would be doable, though the extraction of the image might indeed not be completely trivial as you point out. Haven't looked at the mod API in a while, there might be some trick there to get things out I imagine. And the parsing is simple, at least for basic cases.

[I have no plans for now to work on it]