narc0tiq / evoGUI

A Factorio mod to add a GUI with the biter evolution factor and the current play time. Purely informative.
https://mods.factorio.com/mods/Narc/EvoGUI
MIT License
37 stars 12 forks source link

Surface time "days since landing" inaccurate when day length modded #85

Open FuryoftheStars opened 2 years ago

FuryoftheStars commented 2 years ago

Pretty much, when you use a mod like Clockwork that can modify the length of a game day, the days since landing option of the time sensor is inaccurate. Would be good to use surface.ticks_per_day vs a hard coded constant.

What might be even better, is to store surface.daytime to a global var, then each time you update the time, use this to check to see if the current surface.daytime has rolled over (updating the global var with the new time after) and increment another counter that you keep in global if it has.