L0laapk3 / FactorioMaps

L0laapk3's FactorioMaps mod
https://mods.factorio.com/mod/L0laapk3_FactorioMaps
Other
118 stars 22 forks source link

Naming of times with minutes #131

Open dperelman opened 2 weeks ago

dperelman commented 2 weeks ago

I'm making a timelapse from a directory where I have an autosave every 5 minutes, and the labels are weird (2-1h, 2-2h, 2-3h, ..., 13-1h, 13-2h, ... 13-12h). Reading some other comments, it sounds like the format "H:num h" where H is the number of hours the save has been played and num is just an incrementing number.

I manually hacked in a change to instead display H:m:s (hours, minutes, and seconds the save has been played) which makes more sense for the data I have (although the seconds should be omitted).

I also would like to display the realtime day (maybe once when the day changes to be less noisy), but it looks like the system currently doesn't keep track of that (i.e. the mtime of the save file).

As I said, I did hack in something sorta like what I want, so I will look into making a PR of a cleaner version, maybe with an option for different formatting of how to label the saves in the display.

dperelman commented 1 week ago

I have a version doing everything I want including this in my fork: https://github.com/dperelman/FactorioMaps. The commit that implements this specific change is b6f53c8. As it decouples the display name from the path, it could be pretty easily modified to show anything as the name, including reverting to the current behavior (possibly reading a setting from mapInfo.json given on the command-line to auto.py?). For example, 9037992 uses the data I added to mapInfo.json in 8d65be1 to display the date of the save as well.

I can make a PR (or you can just cherry-pick my commits), but I wasn't sure how this would interact with the dev branch I saw you had. (I tried using it, but it was much slower (maybe because it was including the entire explored map, which I think is a bug) and I have a lot of saves.)