forked from ferram4/Ferram-Aerospace-Research
-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #101 from dkavolis/dev
0.16.0.0 Update
- Loading branch information
Showing
221 changed files
with
7,961 additions
and
2,147 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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
<Project> | ||
<PropertyGroup> | ||
<KSP_DIR_BUILD>C:\Zaidimai\KSP 1.9.0\</KSP_DIR_BUILD> | ||
<PostBuildCommand> | ||
<PropertyGroup> | ||
<KSP_DIR_BUILD>C:\Zaidimai\KSP 1.10\</KSP_DIR_BUILD> | ||
<PostBuildCommand> | ||
cd "$(SolutionDir)"" | ||
python -m buildtools postbuild -f "$(SolutionDir)config.json" -c "$(Configuration)" -t</PostBuildCommand> | ||
</PropertyGroup> | ||
</PropertyGroup> | ||
</Project> |
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,19 @@ | ||
using FerramAerospaceResearch.Reflection; | ||
|
||
namespace FerramAerospaceResearch.Config | ||
{ | ||
[ConfigNode("Debug")] | ||
public class DebugConfig | ||
{ | ||
[ConfigValue("logLevel")] | ||
public static LogLevel Level | ||
{ | ||
get { return FARLogger.Level; } | ||
set { FARLogger.Level = value; } | ||
} | ||
|
||
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global - reflection | ||
[ConfigValue("dumpOnLoad")] | ||
public bool DumpOnLoad { get; set; } = false; | ||
} | ||
} |
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,29 @@ | ||
using FerramAerospaceResearch.Reflection; | ||
|
||
namespace FerramAerospaceResearch.Config | ||
{ | ||
[ConfigNode("FlightLog")] | ||
public class FlightLogConfig | ||
{ | ||
private string directory = PathUtil.Combine(PathUtil.PParentDir, "Logs", PathUtil.ModDirectoryName); | ||
|
||
[ConfigValue("directory")] | ||
public string Directory | ||
{ | ||
get { return directory; } | ||
set { directory = PathUtil.Combine(PathUtil.PParentDir, value); } | ||
} | ||
|
||
[ConfigValue("nameFormat")] | ||
public StringFormatter NameFormat { get; } = new StringFormatter("<<<VESSEL_NAME>>>_<<<DATETIME>>>.csv"); | ||
|
||
[ConfigValue("datetimeFormat")] | ||
public string DatetimeFormat { get; set; } = "yyyy_MM_dd_HH_mm_ss"; | ||
|
||
[ConfigValue("period")] | ||
public Observable<int> LogPeriod { get; } = new Observable<int>(50); | ||
|
||
[ConfigValue("flushPeriod")] | ||
public Observable<int> FlushPeriod { get; } = new Observable<int>(10); | ||
} | ||
} |
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,44 @@ | ||
using FerramAerospaceResearch.Reflection; | ||
using UnityEngine; | ||
|
||
namespace FerramAerospaceResearch.Config | ||
{ | ||
[ConfigNode("GuiColors")] | ||
public class GUIColors | ||
{ | ||
private readonly Color[] colors = {Color.cyan, Color.red, Color.yellow, Color.green}; | ||
|
||
[ConfigValue] | ||
public Color ClColor | ||
{ | ||
get { return colors[0]; } | ||
set { colors[0] = value; } | ||
} | ||
|
||
[ConfigValue] | ||
public Color CdColor | ||
{ | ||
get { return colors[1]; } | ||
set { colors[1] = value; } | ||
} | ||
|
||
[ConfigValue] | ||
public Color CmColor | ||
{ | ||
get { return colors[2]; } | ||
set { colors[2] = value; } | ||
} | ||
|
||
[ConfigValue("L_DColor")] | ||
public Color LdColor | ||
{ | ||
get { return colors[3]; } | ||
set { colors[3] = value; } | ||
} | ||
|
||
public Color GetColor(int index) | ||
{ | ||
return colors[index]; | ||
} | ||
} | ||
} |
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,52 @@ | ||
using FerramAerospaceResearch.Reflection; | ||
|
||
namespace FerramAerospaceResearch.Config | ||
{ | ||
public class ResourceNode | ||
{ | ||
public ResourceNode(string url = "", string loader = "default") | ||
{ | ||
Url.Value = url; | ||
Loader.Value = loader; | ||
} | ||
|
||
[ConfigValue("url")] | ||
public Observable<string> Url { get; } = new Observable<string>(); | ||
|
||
[ConfigValue("loader")] | ||
public Observable<string> Loader { get; } = new Observable<string>("default"); | ||
|
||
public static implicit operator string(ResourceNode node) | ||
{ | ||
return node.Url; | ||
} | ||
} | ||
|
||
[ConfigNode("TEXTURE")] | ||
public class TextureNode : ResourceNode | ||
{ | ||
public TextureNode(string url = "", string loader = "default") : base(url, loader) | ||
{ | ||
} | ||
} | ||
|
||
[ConfigNode("SHADER")] | ||
public class ShaderNode : ResourceNode | ||
{ | ||
public ShaderNode(string url = "", string loader = "default") : base(url, loader) | ||
{ | ||
} | ||
} | ||
|
||
[ConfigNode("SHADER")] | ||
public class DebugVoxelNode : ShaderNode | ||
{ | ||
public DebugVoxelNode(string url = "", string loader = "default") : base(url, loader) | ||
{ | ||
} | ||
|
||
[ConfigValue("_Cutoff")] | ||
// ReSharper disable once AutoPropertyCanBeMadeGetOnly.Global - reflection | ||
public float Cutoff { get; set; } = 0.45f; | ||
} | ||
} |
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,32 @@ | ||
using FerramAerospaceResearch.Reflection; | ||
|
||
namespace FerramAerospaceResearch.Config | ||
{ | ||
[ConfigNode("Shaders")] | ||
public class ShaderConfig | ||
{ | ||
[ConfigValue("bundleLinux")] | ||
public Observable<string> BundleLinux { get; } = | ||
new Observable<string>("FerramAerospaceResearch/Assets/farshaders_linux.far", | ||
PathUtil.CombineDelegate(PathUtil.ParentDir)); | ||
|
||
[ConfigValue("bundleWindows")] | ||
public Observable<string> BundleWindows { get; } = | ||
new Observable<string>("FerramAerospaceResearch/Assets/farshaders_windows.far", | ||
PathUtil.CombineDelegate(PathUtil.ParentDir)); | ||
|
||
[ConfigValue("bundleMac")] | ||
public Observable<string> BundleMac { get; } = | ||
new Observable<string>("FerramAerospaceResearch/Assets/farshaders_macosx.far", | ||
PathUtil.CombineDelegate(PathUtil.ParentDir)); | ||
|
||
[ConfigValue("debugVoxel")] | ||
public DebugVoxelNode DebugVoxel { get; } = new DebugVoxelNode("FerramAerospaceResearch/Debug Voxel Mesh"); | ||
|
||
[ConfigValue("lineRenderer")] | ||
public ShaderNode LineRenderer { get; } = new ShaderNode("Hidden/Internal-Colored"); | ||
|
||
[ConfigValue("debugVoxelFallback")] | ||
public ShaderNode DebugVoxelFallback { get; } = new ShaderNode("Sprites/Default"); | ||
} | ||
} |
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,20 @@ | ||
using FerramAerospaceResearch.Reflection; | ||
|
||
namespace FerramAerospaceResearch.Config | ||
{ | ||
[ConfigNode("Textures")] | ||
public class TextureConfig | ||
{ | ||
[ConfigValue("iconButtonBlizzy")] | ||
public TextureNode IconButtonBlizzy { get; } = | ||
new TextureNode("FerramAerospaceResearch/Textures/icon_button_blizzy"); | ||
|
||
[ConfigValue("iconButtonStock")] | ||
public TextureNode IconButtonStock { get; } = | ||
new TextureNode("FerramAerospaceResearch/Textures/icon_button_stock"); | ||
|
||
[ConfigValue("spriteDebugVoxel")] | ||
public TextureNode SpriteDebugVoxel { get; } = | ||
new TextureNode("FerramAerospaceResearch/Textures/sprite_debug_voxel"); | ||
} | ||
} |
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,24 @@ | ||
using System; | ||
|
||
namespace FerramAerospaceResearch | ||
{ | ||
[AttributeUsage(AttributeTargets.Class, Inherited = false)] | ||
public class FARAddonAttribute : Attribute | ||
{ | ||
/// <summary> | ||
/// Whether this addon should have its reference kept after instantiation | ||
/// </summary> | ||
public readonly bool Persistant; | ||
|
||
/// <summary> | ||
/// Priority of instantiation, higher values get instantiated earlier | ||
/// </summary> | ||
public readonly int Priority; | ||
|
||
public FARAddonAttribute(int priority = 0, bool persistant = false) | ||
{ | ||
Priority = priority; | ||
Persistant = persistant; | ||
} | ||
} | ||
} |
Oops, something went wrong.