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

Three new API functions #2566

Merged
merged 5 commits into from
May 16, 2020
Merged

Three new API functions #2566

merged 5 commits into from
May 16, 2020

Conversation

eggrobin
Copy link
Member

Fix #2542.

Tested in-game; if we want to add the test utility (a separate DLL which just calls those endpoints by reflection and dumps the output or exceptions to a window) we should do it in a separate pull request.

Note that despite the work on the UTF-8 marshalers we still lack the capability to produce strings as struct fields, so Status still lacks a message. This may be a lower-hanging fruit than it was when that TODO was written though.

return m.Return(
MakeStatus(Error::INVALID_ARGUMENT, "|plugin| must not be null"));
}
Instant const t = FromGameTime(*plugin, time);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move down, closer to the place where you need it.

return m.Return(
MakeStatus(Error::INVALID_ARGUMENT, "|plugin| must not be null"));
}
Instant const t = FromGameTime(*plugin, time);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move down, closer to the place where you need it.

return m.Return(
MakeStatus(Error::INVALID_ARGUMENT, "|plugin| must not be null"));
}
Instant const t = FromGameTime(*plugin, time);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move down, closer to the place where you need it.

.str()));
}
using Surface = Frame<enum class SurfaceTag>;
auto const to_world_axes =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use a real type instead of auto.

@pleroy
Copy link
Member

pleroy commented May 12, 2020

retest this please

@pleroy pleroy added the LGTM label May 16, 2020
@eggrobin eggrobin merged commit f56457c into mockingbirdnest:master May 16, 2020
SirMortimer added a commit to Kerbalism/Skopos that referenced this pull request May 18, 2020
Using the API requested with mockingbirdnest/Principia#2542 and added with mockingbirdnest/Principia#2566

Extracted the body, waypoint and vessel calculation shenanigans into a delegate
Added a delegate with principia implementation and using that in case principia is detected
SirMortimer added a commit to Kerbalism/Skopos that referenced this pull request May 20, 2020
Principia doesn't guarantee that the values in the object passed from within
the realms of it's inconceivable depths are, or will remain to be, fields or
properties. So use the reflection method from their wiki, and care about
possible performance considerations later.

See also mockingbirdnest/Principia#2566
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

API Request: query the history
2 participants