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

Add daylength tweakable #2520

Closed
DarthPointer opened this issue Apr 6, 2020 · 5 comments · Fixed by #2539
Closed

Add daylength tweakable #2520

DarthPointer opened this issue Apr 6, 2020 · 5 comments · Fixed by #2539
Milestone

Comments

@DarthPointer
Copy link

DarthPointer commented Apr 6, 2020

I play with JNSQ, one of its minor effects is a 12 hour long day. The planner assumes day to be the "default" one - 6h per day. It brings some inconvenience in planning, I would like to have a 12 hours day in the planner too. It can be a number in a .cfg or a field in planner, does not really matter where we change this parameter. I guess it is a simple-to-do QoL and want to see it in the next release.

@pleroy
Copy link
Member

pleroy commented Apr 18, 2020

Adding a random piece of configuration to change random parameters is a recipe for endless confusion, both for us and for users.

It's more interesting to figure out if we could just "do the right thing" automatically. It's not only JNSQ that has that problem: there is probably a similar issue with RSS using RSSTimeFormatter.

It seems that JNSQ is embedding Kronometer. Kronometer seems to be installing its own date formatter which I guess we could use to format dates and times instead of doing our own thing.

Where it gets tricky is that, when editing the flight planner, we need to parse dates and times, and Kronometer doesn't seem to provide services to do that. We could parse the Kronometer ConfigNode but that's going to be horrendously brittle. Maybe the best we can do is to access the Kronometer.SettingsLoader object through reflection.

Pinging @Sigma88 and @StollD in case they have insights to share.

@Sigma88
Copy link

Sigma88 commented Apr 18, 2020

I don't know what "the planner" is

Kronometer changes the stock definition of year and day which are accessible to any mods.

if "the planner" is a mod, then just read the definitions of day and year instead of hardcoding the length

if "the planner" is a stock thing, then I guess they decided to hardcode the number instead of using their own variables... that wouldn't surprise me

@pleroy
Copy link
Member

pleroy commented Apr 18, 2020

Clarification: the flight planner is a UI in the Principia mod that has fields where you enter the durations of burns and the durations between burns. We parse the string given by the user, and at the moment we pick 6- or 24-hour days depending on GameSettings.KERBIN_TIME.

@pleroy
Copy link
Member

pleroy commented Apr 18, 2020

@Sigma88: Thanks for the info, I know what to do now.

@Sigma88
Copy link

Sigma88 commented Apr 18, 2020

nice!

feel free to ping me if you need anything else

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants