Skip to content

Commit

Permalink
added API for comm range test
Browse files Browse the repository at this point in the history
  • Loading branch information
SirMortimer committed Jun 17, 2019
1 parent 5292c40 commit 48bdcd3
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/Kerbalism/System/API.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,29 @@ public static double Comfort(Vessel v)
}


// --- VESSEL --------------------------------------------------------------

public static double VesselConnectionRate(Vessel v)
{
var vi = Cache.VesselInfo(v);
if (!vi.is_valid) return 0.0;
return vi.connection.rate;
}

public static bool VesselConnectionLinked(Vessel v)
{
var vi = Cache.VesselInfo(v);
if (!vi.is_valid) return false;
return vi.connection.linked;
}

public static String VesselConnectionTransmitting(Vessel v)
{
var vi = Cache.VesselInfo(v);
if (!vi.is_valid) return string.Empty;
return vi.transmitting;
}

// --- SCIENCE --------------------------------------------------------------

// return size of a file in a vessel drive
Expand Down

0 comments on commit 48bdcd3

Please sign in to comment.