-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c827704
commit 3610f06
Showing
4 changed files
with
49 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,7 +11,7 @@ | |
"VERSION": | ||
{ | ||
"MAJOR":1, | ||
"MINOR":0, | ||
"MINOR":1, | ||
"PATCH":0, | ||
"BUILD":0 | ||
}, | ||
|
Binary file not shown.
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,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using UnityEngine; | ||
|
||
namespace SmartDockingAid.Extensions | ||
{ | ||
[KSPAddon(KSPAddon.Startup.MainMenu, true)] | ||
public class OverwriteModuleText : MonoBehaviour | ||
{ | ||
public void Start() | ||
{ | ||
List<AvailablePart> parts = PartLoader.LoadedPartsList.Where(p => p.partPrefab.Modules.GetModule<ModuleSAS>()).ToList(); | ||
|
||
foreach (AvailablePart part in parts) | ||
{ | ||
ModuleSAS SASmodule = part.partPrefab.FindModuleImplementing<ModuleSAS>(); | ||
AvailablePart.ModuleInfo moduleInfo = part.moduleInfos.Where(m => m.moduleName == "SAS").First(); | ||
int serviceLevel = (SASmodule.SASServiceLevel + 1); | ||
string moduleText = string.Empty; | ||
for (int i = 0; i < serviceLevel; i++) | ||
moduleText += $"{SASLevels[i]} \n"; | ||
|
||
if (part.partPrefab.HasModuleImplementing<ModuleDockingAid>()) | ||
moduleText += $"{SASLevels[4]} \n"; | ||
|
||
moduleInfo.info = moduleText; | ||
} | ||
} | ||
|
||
private string[] SASLevels = new string[5] | ||
{ | ||
$"S0: Stability Assist", | ||
$"S1: Prograde / Retrograde", | ||
$"S2: Radial / Normal", | ||
$"S3: Maneuver / Target", | ||
$"S{AssetLoader.minPilotLevel}: Parallel+ / Parallel-" | ||
}; | ||
} | ||
} |
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 |
---|---|---|
@@ -1,15 +1,13 @@ | ||
using UnityEngine; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using UnityEngine; | ||
|
||
// Modifies DockingAidAutopilot to be active if this PartModule is presence on the current vessel | ||
|
||
namespace SmartDockingAid | ||
{ | ||
class ModuleDockingAid : PartModule | ||
public class ModuleDockingAid : PartModule | ||
{ | ||
public override string GetInfo() | ||
{ | ||
string info = $"This Probe Core has the abillity to set following additonal SAS Modes: \n Parallel - \n Parallel +"; | ||
return info; | ||
} | ||
} | ||
|
||
} | ||
} |