Skip to content
This repository has been archived by the owner on Oct 26, 2020. It is now read-only.

Commit

Permalink
Update versions. Change DatedQuickSaves and SensibleScreenshot to use…
Browse files Browse the repository at this point in the history
… PluginData directory for config file.
  • Loading branch information
magico13 committed Jul 30, 2016
1 parent ef4f6bb commit 1be721d
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 20 deletions.
11 changes: 7 additions & 4 deletions Dated_QuickSaves/DatedQuickSaves.cs
Original file line number Diff line number Diff line change
Expand Up @@ -184,9 +184,12 @@ public class Configuration
public int maxQSFiles = 20, maxASFiles = 20;
public int autoSaveFreq = 15;

private string filename = KSPUtil.ApplicationRootPath + "/GameData/DatedQuickSaves/settings.cfg";
private string directory = KSPUtil.ApplicationRootPath + "/GameData/DatedQuickSaves/PluginData/";
private string filename = "settings.cfg";
public void Save()
{
if (!System.IO.Directory.Exists(directory))
System.IO.Directory.CreateDirectory(directory);
ConfigNode cfg = new ConfigNode();
cfg.AddValue("DateString", dateFormat);
cfg.AddValue("FileNameTemplate", fileTemplate);
Expand All @@ -199,14 +202,14 @@ public void Save()
cfg.AddValue("FillSpaces", fillSpaces);
cfg.AddValue("ReplaceChar", spaceFiller);

cfg.Save(filename);
cfg.Save(directory + filename);
}

public void Load()
{
if (System.IO.File.Exists(filename))
if (System.IO.File.Exists(directory + filename))
{
ConfigNode cfg = ConfigNode.Load(filename);
ConfigNode cfg = ConfigNode.Load(directory + filename);
dateFormat = cfg.GetValue("DateString");
fileTemplate = cfg.GetValue("FileNameTemplate");
int.TryParse(cfg.GetValue("MaxQuickSaveCount"), out maxQSFiles);
Expand Down
4 changes: 2 additions & 2 deletions Dated_QuickSaves/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
[assembly: AssemblyVersion("1.1.2.0")]
[assembly: AssemblyFileVersion("1.1.2.0")]
4 changes: 2 additions & 2 deletions EditorTime/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2.1")]
[assembly: AssemblyFileVersion("1.0.2.1")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
4 changes: 2 additions & 2 deletions FieldExperience/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.3.0")]
[assembly: AssemblyFileVersion("1.0.3.0")]
[assembly: AssemblyVersion("1.0.4.0")]
[assembly: AssemblyFileVersion("1.0.4.0")]
4 changes: 2 additions & 2 deletions Sensible_Screenshot/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.2.1.0")]
[assembly: AssemblyFileVersion("1.2.1.0")]
[assembly: AssemblyVersion("1.2.2.0")]
[assembly: AssemblyFileVersion("1.2.2.0")]
11 changes: 7 additions & 4 deletions Sensible_Screenshot/SensibleScreenshot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,12 @@ public class Configuration
public string spaceFiller = "_";
public bool keepOrginalPNG = false;

private string filename = KSPUtil.ApplicationRootPath + "/GameData/SensibleScreenshot/settings.cfg";
private string directory = KSPUtil.ApplicationRootPath + "/GameData/SensibleScreenshot/PluginData/";
private string filename = "settings.cfg";
public void Save()
{
if (!System.IO.Directory.Exists(directory))
System.IO.Directory.CreateDirectory(directory);
ConfigNode cfg = new ConfigNode();
cfg.AddValue("DateString", dateFormat);
cfg.AddValue("FileNameTemplate", fileTemplate);
Expand All @@ -147,14 +150,14 @@ public void Save()
cfg.AddValue("FillSpaces", fillSpaces);
cfg.AddValue("ReplaceChar", spaceFiller);

cfg.Save(filename);
cfg.Save(directory + filename);
}

public void Load()
{
if (System.IO.File.Exists(filename))
if (System.IO.File.Exists(directory + filename))
{
ConfigNode cfg = ConfigNode.Load(filename);
ConfigNode cfg = ConfigNode.Load(directory + filename);
dateFormat = cfg.GetValue("DateString");
fileTemplate = cfg.GetValue("FileNameTemplate");
bool.TryParse(cfg.GetValue("ConvertToJPG"), out convertToJPG);
Expand Down
4 changes: 2 additions & 2 deletions ShipSaveSplicer/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.1.1.0")]
[assembly: AssemblyFileVersion("1.1.1.0")]
4 changes: 2 additions & 2 deletions TreeToppler/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.1.0")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]

0 comments on commit 1be721d

Please sign in to comment.