Skip to content

Commit

Permalink
Fixed shaders for KSP 1.8
Browse files Browse the repository at this point in the history
 Added additional check for EvaFuel
  • Loading branch information
linuxgurugamer committed Jan 31, 2020
1 parent 03090d3 commit 09f7e20
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 4 deletions.
Binary file modified .vs/EvaFollower/v15/.suo
Binary file not shown.
Binary file modified .vs/EvaFollower/v15/sqlite3/storage.ide
Binary file not shown.
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
Changelog

1.1.1.5
Fixed shaders for KSP 1.8
Added additional check for EvaFuel

1.1.1.4
Moved initializations into Start() method

Expand Down
2 changes: 1 addition & 1 deletion EvaFollower.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 1,
"MINOR": 1,
"PATCH": 1,
"BUILD": 4
"BUILD": 5
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion GameData/EvaFollower/EvaFollower.version
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"MAJOR": 1,
"MINOR": 1,
"PATCH": 1,
"BUILD": 3
"BUILD": 5
},
"KSP_VERSION_MIN": {
"MAJOR": 1,
Expand Down
2 changes: 1 addition & 1 deletion Source/AssemblyVersion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@

using System.Reflection;

[assembly: AssemblyVersion("1.1.1.3")]
[assembly: AssemblyVersion("1.1.1.5")]
33 changes: 32 additions & 1 deletion Source/StockSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,30 @@ public class EVAFuelGlobals : MonoBehaviour
void Start()
{
changeEVAPropellent = false;
if (!modsFound)
{
buildModList();
modsFound = true;
}
}

bool modsFound = false;
static List<String> installedMods = new List<String>();
void buildModList()
{
//https://github.com/Xaiier/Kreeper/blob/master/Kreeper/Kreeper.cs#L92-L94 <- Thanks Xaiier!
foreach (AssemblyLoader.LoadedAssembly a in AssemblyLoader.loadedAssemblies)
{
string name = a.name;
//Log.Info(string.Format("Loading assembly: {0}", name));
installedMods.Add(name);
}
}
static public bool hasMod(string modIdent)
{
return installedMods.Contains(modIdent);
}

}

[KSPAddon(KSPAddon.Startup.EveryScene, false)]
Expand Down Expand Up @@ -66,12 +89,20 @@ void Start()
smallScrollBar = new GUIStyle(HighLogic.Skin.verticalScrollbar);
smallScrollBar.fixedWidth = 8f;

MOD = Assembly.GetAssembly(typeof(EvaFuelManager)).GetName().Name;
// The follopwing
if (EVAFuelGlobals.hasMod("EvaFuel"))
MOD = GetEvaFuel();
else
MOD = null;
settingsRect = new Rect(200, 200, 275, 400);
ROOT_PATH = KSPUtil.ApplicationRootPath;

}

string GetEvaFuel()
{
return Assembly.GetAssembly(typeof(EvaFuelManager)).GetName().Name;
}
void OnGUI()
{
if (answer == Answer.inActive)
Expand Down

0 comments on commit 09f7e20

Please sign in to comment.