severedsolo

[1.7.x] FlightTracker - Library for tracking a Kerbals flight data - 1.0.0.1 (13/04/2019)

Recommended Posts

If you are not a modder, and this is not a dependency of a mod you use, this is probably not for you. This mod will do nothing unless another mod references it.

So basically, I wanted to make another mod that uses the same data Earn Your Stripes currently tracks. Rather than duplicating my code, or making this new mod a dependency of Earn Your Stripes I decided to split the tracker off into it's own mod.

What it does:

FlightTracker will track the following things for every kerbal in your roster:

  • How many flights a kerbal has completed
  • Total flight time accumulated by a kerbal
  • How many World Firsts a kerbal has accomplished (a Kerbal must achieve orbit before any world firsts will be counted)

Publically exposed methods:

  • Convert UTToString(double time) - will take a period of time in raw UT and convert it to the hours as a string (mainly designed to be used in UIs). If number of hours exceeds 1,000 it will truncate them, to avoid UI overflow (ie 1k instead of 1,000).
  • GetNumberOfFlights(string kerbalName) - returns the number of flights that a kerbal has successfully completed.
  • GetRecordedMissionTimeSeconds (string kerbalName) - returns the time a kerbal has logged in seconds (only updated on vessel recovery)
  • GetRecordedMissionTimeHours(string kerbalName) - as above, but returns it in hours instead.
  • GetLaunchTime(string kerbalName) - returns the time (in UT) that a kerbal last launched (updated when OnVesselRollout fires)
  • GetNumberOfWorldFirsts(string kerbalName) - returns the number of World Firsts a kerbal has accomplished after achieving orbit (updated in real time)

License: MIT

DOWNLOAD (GITHUB)

Source (Github)

Mods Currently Using FlightTracker:

 

Edited by severedsolo

Share this post


Link to post
Share on other sites

If this mod is installed by itself, and later another such as Earn Your Stripes is added, will the new mod be able to see the history?

Share this post


Link to post
Share on other sites
5 hours ago, linuxgurugamer said:

If this mod is installed by itself, and later another such as Earn Your Stripes is added, will the new mod be able to see the history?

Yup, Flight Tracker does it's thing completely independently.

Share this post


Link to post
Share on other sites

Flight Tracker 1.0.0.1 Released

  • Recompiled against KSP 1.7
  • Kerbal Changelog by Benjamin Kerman is now supported and bundled.
  • Fixed issues with .version file

 

Share this post


Link to post
Share on other sites
This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.