Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Year/Day/Hour/Minute are hadcoded to Kerbin time in the ClockFormatter #169

Closed
magico13 opened this issue May 3, 2017 · 5 comments
Closed

Comments

@magico13
Copy link

magico13 commented May 3, 2017

See the source code here: https://github.com/Kopernicus/Kopernicus/blob/master/Kopernicus/Kopernicus/RuntimeUtility/ClockFixer.cs#L451

These properties are hard coded to use Kerbin time no matter what the Formatter is actually set to. Any mod that uses these values for their own time formatting will show invalid times when using the formatter (see MagiCore and subsequently Kerbal Construction Time). Although MagiCore should probably just call some of the existing methods for time formatting (which appear to be defined correctly), those properties should be corrected.

@Sigma88
Copy link
Contributor

Sigma88 commented May 3, 2017

If I didn't mess up my PR the properties should now return the custom values calculated by kopernicus
Or the standard ksp values in case kopernicus doesn't change them

It's worth noting how kopernicus can not only change day and year, but also all the other time units (second included)

And can change the names of those units in addition to the "lenght"

@magico13
Copy link
Author

magico13 commented May 3, 2017

Does anyone ever change the value of a second? That could really mess with things since a lot of things are stored internally as seconds and just formatted later (outside of my mods as well). I don't know that it would fully break KCT, but it would certainly mess with the UI.

@Sigma88
Copy link
Contributor

Sigma88 commented May 3, 2017

Time is still stored in real life seconds, and laws of physics still apply as usual. The only difference is that the clock can be changed to display custom units of time, so if you wanted a system where the unit of time is (for example) a blorg which lasts 0.5 real life seconds, when the game time reaches 10 seconds the clock would display
Year 1, Day 1, 00:00:20

Sorry, something went wrong.

@magico13
Copy link
Author

magico13 commented May 3, 2017

Alright. I'll have to keep that in mind for the future. My code's all old and ultimately goes back to 0.23. I'll have to investigate whether my clocks will line up correctly or not, but with those properties corrected my stuff should at least be a lot closer to lining up. Thanks!

Sorry, something went wrong.

@Sigma88
Copy link
Contributor

Sigma88 commented May 3, 2017

For what it's worth nobody currently changes the names or values of seconds/minutes/hours (as far as I know)

The only two changes are day and year which can be changed by kopernicus to fit the rotation/revolution of the home planet

Sorry, something went wrong.

@StollD StollD closed this as completed May 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants