Change contract text color for disconnected contracts and connections#60
Merged
eggrobin merged 2 commits intomockingbirdnest:masterfrom Feb 9, 2026
Merged
Conversation
DRVeyl
suggested changes
Feb 8, 2026
Telecom/main_window.cs
Outdated
Comment on lines
+69
to
+70
| var disconnected_style = principia.ksp_plugin_adapter.Style.Warning( | ||
| UnityEngine.GUI.skin.label); |
Contributor
There was a problem hiding this comment.
Awkward line-break: make single-line.
Contributor
Author
There was a problem hiding this comment.
Fixed, also changed it to be based off of ok_style so there's no awkward duplication of UnityEngine.GUI.skin.label.
Comment on lines
+75
to
+81
| bool all_available = connections.All(connection => { | ||
| if (connection is PointToMultipointConnection point_to_multipoint) { | ||
| return point_to_multipoint.channel_services.All(service => service.basic.available); | ||
| } else if (connection is DuplexConnection duplex) { | ||
| return duplex.basic_service.available; | ||
| } else { return false; } | ||
| }); |
Contributor
There was a problem hiding this comment.
While I'm not a huge fan of this single-use in-line method definition, I suppose it works here. And is easily lift-able to another scope if this is needed in more places.
| bool available = services.basic.available; | ||
| var style = available ? ok_style : disconnected_style; | ||
| string status = available ? "OK" : "Disconnected"; | ||
| var style = available ? ok_style : disconnected_style; |
Contributor
There was a problem hiding this comment.
Duplicate of line R120, delete
Contributor
Author
There was a problem hiding this comment.
Removed line 120 to keep line 122. Trying to keep the ordering consistent across dupes
eggrobin
approved these changes
Feb 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
If any connection in a contract is disconnected, changes the text colour for that contract to orange. Likewise, for connections in a contract, when expanded the text colour of disconnected connections will be orange (similar to #33, though this changes the entire line rather than just the status).
This allows checking the status of all contracts at a glance in the Skopos window, to ensure that taking a new contract didn't break maintenance for a different contract without having to open and check all connections over all contracts.
Does not attempt to resolve #6. Also, the current implementation can result in rapidly flashing text if the availability for a connection changes rapidly (e.g. during timewarp). Performance impact appears to be minimal, as far as I can tell.
I am not particularly attached to the colour, I just want disconnected contracts to be visually distinguishable at a glance.
Example image:
