Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: c43e8f2a4e3a
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: f2d5a6ee380c
Choose a head ref
  • 5 commits
  • 2 files changed
  • 1 contributor

Commits on May 12, 2021

  1. Replaying.

    # Conflicts:
    #	journal/player_test.cpp
    pleroy committed May 12, 2021
    Copy the full SHA
    aad94fc View commit details
  2. More verbose logging.

    pleroy committed May 12, 2021
    Copy the full SHA
    c786899 View commit details
  3. A vessel which only has unfaithful parts is not manageable.

    # Conflicts:
    #	journal/player.cpp
    pleroy committed May 12, 2021
    Copy the full SHA
    25b8d16 View commit details
  4. Cleanup.

    pleroy committed May 12, 2021
    Copy the full SHA
    335164f View commit details

Commits on May 13, 2021

  1. Merge pull request #2983 from pleroy/2922b

    If a vessel only contains unfaithful parts, make it unmanageable
    pleroy authored May 13, 2021
    Copy the full SHA
    f2d5a6e View commit details
Showing with 12 additions and 6 deletions.
  1. +9 −6 journal/player_test.cpp
  2. +3 −0 ksp_plugin_adapter/ksp_plugin_adapter.cs
15 changes: 9 additions & 6 deletions journal/player_test.cpp
Original file line number Diff line number Diff line change
@@ -85,15 +85,17 @@ TEST_F(PlayerTest, DISABLED_SECULAR_Benchmarks) {
}

TEST_F(PlayerTest, DISABLED_SECULAR_Debug) {
google::LogToStderr();
// An example of how journaling may be used for debugging. You must set
// |path| and fill the |method_in| and |method_out_return| protocol buffers.
std::string path =
R"(P:\Public Mockingbird\Principia\Crashes\2931\JOURNAL.20210330-124441)"; // NOLINT
R"(P:\Public Mockingbird\Principia\Crashes\2922\JOURNAL.20210312-215639)"; // NOLINT
Player player(path);
int count = 0;
while (player.Play(count)) {
++count;
// Reset logging after each method so as to output all messages irrespective
// of what the game did.
google::LogToStderr();
LOG_IF(ERROR, (count % 100'000) == 0) << count
<< " journal entries replayed";
}
@@ -107,17 +109,18 @@ TEST_F(PlayerTest, DISABLED_SECULAR_Debug) {
serialization::Method method_in;
{
auto* extension = method_in.MutableExtension(
serialization::CatchUpLaggingVessels::extension);
serialization::FreeVesselsAndPartsAndCollectPileUps::extension);
auto* in = extension->mutable_in();
in->set_plugin(2109308527968);
in->set_plugin(2718550096736);
in->set_delta_t(0.02);
}
serialization::Method method_out_return;
{
auto* extension = method_out_return.MutableExtension(
serialization::CatchUpLaggingVessels::extension);
serialization::FreeVesselsAndPartsAndCollectPileUps::extension);
}
LOG(ERROR) << "Running unpaired method:\n" << method_in.DebugString();
CHECK(RunIfAppropriate<CatchUpLaggingVessels>(
CHECK(RunIfAppropriate<FreeVesselsAndPartsAndCollectPileUps>(
method_in, method_out_return, player));
#endif
}
3 changes: 3 additions & 0 deletions ksp_plugin_adapter/ksp_plugin_adapter.cs
Original file line number Diff line number Diff line change
@@ -574,6 +574,9 @@ private string UnmanageabilityReasons(Vessel vessel) {
if (vessel.loaded && hack_gravity?.toggle.isOn == true) {
reasons.Add("vessel is loaded and gravity is being hacked");
}
if (vessel.parts.All(part => !PartIsFaithful(part))) {
reasons.Add("vessel is completely unfaithful");
}
if (reasons.Count == 0) {
return null;
} else {