Skip to content

Commit

Permalink
*Press a button by error*. Hum ok, you can replace all var uses
Browse files Browse the repository at this point in the history
  • Loading branch information
sarbian committed Aug 4, 2015
1 parent 94407c7 commit d9534c7
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions moduleManager.cs
Expand Up @@ -164,7 +164,7 @@ public void OnGUI()

if (IsABadIdea())
{
var centeredWarningStyle = new GUIStyle(GUI.skin.GetStyle("Label"))
GUIStyle centeredWarningStyle = new GUIStyle(GUI.skin.GetStyle("Label"))
{
alignment = TextAnchor.UpperCenter,
fontSize = 16,
Expand All @@ -177,7 +177,7 @@ public void OnGUI()
offsetY += sizeOfWarningLabel.y;
}

var centeredStyle = new GUIStyle(GUI.skin.GetStyle("Label"))
GUIStyle centeredStyle = new GUIStyle(GUI.skin.GetStyle("Label"))
{
alignment = TextAnchor.UpperCenter,
fontSize = 16
Expand All @@ -188,7 +188,7 @@ public void OnGUI()

if (MMPatchLoader.Instance.errorCount > 0)
{
var errorStyle = new GUIStyle(GUI.skin.GetStyle("Label"))
GUIStyle errorStyle = new GUIStyle(GUI.skin.GetStyle("Label"))
{
alignment = TextAnchor.UpperLeft,
fontSize = 16
Expand Down Expand Up @@ -335,7 +335,7 @@ private static void OutputAllConfigs()
+ Path.DirectorySeparatorChar;
Directory.CreateDirectory(path);

foreach (var d in GameDatabase.Instance.root.AllConfigs)
foreach (UrlDir.UrlConfig d in GameDatabase.Instance.root.AllConfigs)
File.WriteAllText(path + d.url.Replace('/', '.') + ".cfg", d.config.ToString());
}

Expand All @@ -348,15 +348,15 @@ public bool ElectionAndCheck()
// TODO : Move the old version check in a process that call Update.

// Check for old version and MMSarbianExt
var oldMM =
IEnumerable<AssemblyLoader.LoadedAssembly> oldMM =
AssemblyLoader.loadedAssemblies.Where(
a => a.assembly.GetName().Name == Assembly.GetExecutingAssembly().GetName().Name)
.Where(a => a.assembly.GetName().Version.CompareTo(new System.Version(1, 5, 0)) == -1);
var oldAssemblies =
IEnumerable<AssemblyLoader.LoadedAssembly> oldAssemblies =
oldMM.Concat(AssemblyLoader.loadedAssemblies.Where(a => a.assembly.GetName().Name == "MMSarbianExt"));
if (oldAssemblies.Any())
{
var badPaths =
IEnumerable<string> badPaths =
oldAssemblies.Select(a => a.path)
.Select(
p =>
Expand All @@ -373,7 +373,7 @@ public bool ElectionAndCheck()
}

Assembly currentAssembly = Assembly.GetExecutingAssembly();
var eligible = from a in AssemblyLoader.loadedAssemblies
IEnumerable<AssemblyLoader.LoadedAssembly> eligible = from a in AssemblyLoader.loadedAssemblies
let ass = a.assembly
where ass.GetName().Name == currentAssembly.GetName().Name
orderby ass.GetName().Version descending, a.path ascending
Expand Down Expand Up @@ -773,7 +773,7 @@ private IEnumerator ProcessPatch(bool blocking)
log("Reloading ressources definitions");
PartResourceLibrary.Instance.LoadDefinitions();

foreach (var callback in postPatchCallbacks)
foreach (ModuleManagerPostPatchCallback callback in postPatchCallbacks)
{
try
{
Expand Down Expand Up @@ -862,7 +862,7 @@ private void SaveModdedPhysics()
{
//UrlDir.UrlConfig[] configs = GameDatabase.Instance.GetConfigs("TechTree");

var configs = physicsUrlFile.configs;
List<UrlDir.UrlConfig> configs = physicsUrlFile.configs;

if (configs.Count == 0)
{
Expand Down Expand Up @@ -1033,7 +1033,7 @@ private void SaveModdedTechTree()
private void LoadCache()
{
// Clear the config DB
foreach (var files in GameDatabase.Instance.root.AllConfigFiles)
foreach (UrlDir.UrlFile files in GameDatabase.Instance.root.AllConfigFiles)
{
files.configs.Clear();
}
Expand Down

0 comments on commit d9534c7

Please sign in to comment.