RemoteTechnologiesGroup / RemoteTech

Community developed continuation of Kerbal Space Program's RemoteTech mod.
http://remotetechnologiesgroup.github.io/RemoteTech
GNU General Public License v2.0
230 stars 103 forks source link

API - GetControlPath return List<Guid> #767

Closed HaullyGames closed 5 years ago

HaullyGames commented 5 years ago

Hi Folks,

Please add this new method to your API. Reason: In Kerbalism, we would like to have a list of all vessel in the controlPath, then when we are transferring data through relays (then we need to know all relays), we can calculate the max bandwidth for all Path, also it will possibility to calculate a vessel that is relay for more than 1 vessel and then splinting the bandwidth.

NOTE: Sorry for the tabs in this request, it wasn't in my differences when I pushed it. I just need the new method "GetControlPath"

KSP-TaxiService commented 5 years ago

Hi,

Your new method looks good but are you willing with Guid[] instead of Link return? I would like this output to be primitive for performance reasons.

It seems you accidentally replaced space chars with tab chars when editing the file. I will close this PR without merging and manually add your codes (slight amended) on your behalf.

KSP-TaxiService commented 5 years ago

Thanks, HaullyGames

Gordon-Dry commented 5 years ago

I tested it with my fully modded install - now on KSP 1.5.1 - with compiles provided by @HaullyGames and I can confirm that it works.