-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support for KerbNet only installs and future reflection.
- Loading branch information
Showing
3 changed files
with
116 additions
and
33 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using SCANsat; | ||
using SCANsat.SCAN_Data; | ||
|
||
namespace kOS.AddOns.kOSSCANsat | ||
{ | ||
|
||
|
||
public class SCANWrapper | ||
{ | ||
public SCANWrapper instance; | ||
|
||
internal bool scansatinstalled; | ||
public SCANWrapper() | ||
{ | ||
instance = this; | ||
scansatinstalled = Addon.IsModInstalled("scansat"); | ||
} | ||
public void InitReflection() | ||
{ | ||
//for future use | ||
} | ||
|
||
public int GetSCANtype(string s_type) | ||
{ | ||
return SCANUtil.GetSCANtype(s_type); | ||
} | ||
|
||
public bool GetResourceBiomeLock() | ||
{ | ||
bool resourcelock = true; | ||
if (scansatinstalled) | ||
{ | ||
resourcelock = SCANUtil.resourceBiomeLockEnabled(); | ||
} | ||
return resourcelock; | ||
} | ||
|
||
public bool IsCovered(double lon, double lat, CelestialBody body, string scan_type) { | ||
bool iscovered = false; | ||
if (scansatinstalled) { | ||
iscovered = SCANUtil.isCovered(lon, lat, body, SCANUtil.GetSCANtype(scan_type)); | ||
} | ||
return iscovered; | ||
} | ||
|
||
public double GetCoverage(string scantype, CelestialBody body) | ||
{ | ||
double completed = 0d; | ||
if (scansatinstalled) | ||
{ | ||
completed = SCANUtil.GetCoverage(SCANUtil.GetSCANtype(scantype), body); | ||
} | ||
return completed; | ||
} | ||
|
||
public List<SCANresourceGlobal> GetLoadedResourceList() | ||
{ | ||
return SCANcontroller.setLoadedResourceList(); | ||
} | ||
|
||
|
||
} | ||
} |