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: f2add7c4bc7b
Choose a base ref
...
head repository: mockingbirdnest/Principia
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 493ff14bc042
Choose a head ref
  • 3 commits
  • 1 file changed
  • 1 contributor

Commits on May 11, 2019

  1. Copy the full SHA
    4fd8d8f View commit details
  2. Copy the full SHA
    d1c8b9a View commit details
  3. Merge pull request #2162 from eggrobin/a-node-has-no-name

    A node has no name
    eggrobin authored May 11, 2019
    Copy the full SHA
    493ff14 View commit details
Showing with 7 additions and 5 deletions.
  1. +7 −5 ksp_plugin_adapter/map_node_pool.cs
12 changes: 7 additions & 5 deletions ksp_plugin_adapter/map_node_pool.cs
Original file line number Diff line number Diff line change
@@ -68,13 +68,13 @@ public void RenderMarkers(DisposableIterator apsis_iterator,
if (pool_index_ == nodes_.Count) {
nodes_.Add(MakePoolNode());
} else if (properties_[nodes_[pool_index_]].object_type != type ||
properties_[nodes_[pool_index_]].source != source) {
properties_[nodes_[pool_index_]].celestial != celestial) {
// KSP attaches labels to its map nodes, but never detaches them.
// If the node changes type, we end up with an arbitrary combination of
// labels Ap, Pe, AN, DN.
// If the node changes source, the colour of the icon label is not
// updated to match the icon (making it unreadable in some cases).
// Recreating the node entirely takes a long time (approximately
// Similarly, if the node changes celestial, the colour of the icon
// label is not updated to match the icon (making it unreadable in some
// cases). Recreating the node entirely takes a long time (approximately
// 𝑁 * 70 μs, where 𝑁 is the total number of map nodes in existence),
// instead we manually get rid of the labels.
foreach (var component in
@@ -87,7 +87,9 @@ public void RenderMarkers(DisposableIterator apsis_iterator,
// Ensure that KSP thinks the type changed, and reattaches icon
// labels next time around, otherwise we might end up with no labels.
// Null nodes do not have a label, so inducing a type change through
// Null does not result in spurious labels.
// Null does not result in spurious labels. Note that the type is
// updated only if the node is visible.
properties_[nodes_[pool_index_]].visible = true;
properties_[nodes_[pool_index_]].object_type =
MapObject.ObjectType.Null;
nodes_[pool_index_].NodeUpdate();