Timelapse: Automatically take screenshots every month, if enabled #647
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.
Timelapses are fun, especially in citybuilders.
It's a feature that exists in various games in various ways. Some examples are Rimworld with a timelapse mod that does something similar to this, Europa Universalis IV that uses the game history in the savefile to simulate an in game timelapse and Frostpunk that records screenshots of your city as you play and then plays you a nice "at what cost" video when you win.
I've added a rudimentary but working timelapse feature to Julius. I apologize in advance for any violence I've caused to your code, which is otherwise very pretty.
The changes were that I removed the message popup and the unnecessary IS_CITY check, since time can only progress in city view. I also threw in some rotation code so that it would always take screenshots facing north even if the user uses another view momentarily.
I assume graphics code is not meant to be called from the core logic like this, because the tests fail to build with this setup.
I guess I'd need to add some sort of signaling or maybe an inbetween function that is a noop on test builds to fix this issue.
Due to my unfamiliarity with your code I will have to rely on your judgment.
I don't know how to add a new translation line like this without breaking the game for all other languages. Again, I will rely on you.
timelapse %Y-%m-%d %H.%M.%S.png
.If it would be possible to access the map name from the screenshot code that could be an improvement.
It might need its own category or something, right now it's snuggled up to the gameplay changes.
For example, if your camera is smoothing to a position it gets stopped in its tracks. There might be other issues that me, as someone who has never played C3 before, might not now about. I'm not sure what can be done about it.
I'm very open to feedback so let me know what I'll need to improve to put this in the game.