Created
June 16, 2015 16:38
-
-
Save mjn33/43d9f7bf048be8746533 to your computer and use it in GitHub Desktop.
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
diff --git a/FerramAerospaceResearch/FARAeroComponents/VehicleAerodynamics.cs b/FerramAerospaceResearch/FARAeroComponents/VehicleAerodynamics.cs | |
index 6207a08..ff7b033 100644 | |
--- a/FerramAerospaceResearch/FARAeroComponents/VehicleAerodynamics.cs | |
+++ b/FerramAerospaceResearch/FARAeroComponents/VehicleAerodynamics.cs | |
@@ -219,6 +219,12 @@ namespace FerramAerospaceResearch.FARAeroComponents | |
ferram4.FARWingAerodynamicModel w = _legacyWingModels[i]; | |
w.NUFAR_SetExposedAreaFactor(); | |
} | |
+ | |
+ for (int i = 0; i < _legacyWingModels.Count; i++) | |
+ { | |
+ ferram4.FARWingAerodynamicModel w = _legacyWingModels[i]; | |
+ w.NUFAR_UpdateShieldedStatus(); | |
+ } | |
return _legacyWingModels; | |
} | |
#endregion | |
diff --git a/FerramAerospaceResearch/LEGACYferram4/FARBaseAerodynamics.cs b/FerramAerospaceResearch/LEGACYferram4/FARBaseAerodynamics.cs | |
index 2875659..869b3d1 100644 | |
--- a/FerramAerospaceResearch/LEGACYferram4/FARBaseAerodynamics.cs | |
+++ b/FerramAerospaceResearch/LEGACYferram4/FARBaseAerodynamics.cs | |
@@ -69,14 +69,14 @@ namespace ferram4 | |
//Reset tinting for this part and its children | |
// private bool resetTinting; | |
- [KSPField(isPersistant = false, guiActive = false)] | |
+ [KSPField(isPersistant = false, guiActive = true)] | |
public double S; | |
//[KSPField(isPersistant = false, guiActive = false, guiName = "S")] | |
//public float displayS; | |
- [KSPField(isPersistant = false, guiActive = false, guiActiveEditor = true)] | |
+ [KSPField(isPersistant = false, guiActive = true, guiActiveEditor = true)] | |
public bool isShielded = true; | |
public double rho; | |
diff --git a/FerramAerospaceResearch/LEGACYferram4/FARWingAerodynamicModel.cs b/FerramAerospaceResearch/LEGACYferram4/FARWingAerodynamicModel.cs | |
index f44aa42..49446af 100644 | |
--- a/FerramAerospaceResearch/LEGACYferram4/FARWingAerodynamicModel.cs | |
+++ b/FerramAerospaceResearch/LEGACYferram4/FARWingAerodynamicModel.cs | |
@@ -58,6 +58,7 @@ namespace ferram4 | |
{ | |
public class FARWingAerodynamicModel : FARBaseAerodynamics, TweakScale.IRescalable<FARWingAerodynamicModel>, ILiftProvider | |
{ | |
+ [KSPField(isPersistant = false, guiActive = true)] | |
public double AoAmax = 15; | |
[KSPField(isPersistant = false, guiActive = false, guiActiveEditor = true)] | |
@@ -154,7 +155,9 @@ namespace ferram4 | |
public Vector3 worldSpaceForce; | |
+ [KSPField(isPersistant = false, guiActive = true, guiName = "AEF")] | |
protected double NUFAR_areaExposedFactor = 0; | |
+ [KSPField(isPersistant = false, guiActive = true, guiName = "totalEAF")] | |
protected double NUFAR_totalExposedAreaFactor = 0; | |
public void NUFAR_ClearExposedAreaFactor() | |
@@ -206,7 +209,10 @@ namespace ferram4 | |
model.NUFAR_areaExposedFactor = sum; | |
model.NUFAR_totalExposedAreaFactor = totalExposedSum; | |
} | |
+ } | |
+ public void NUFAR_UpdateShieldedStatus() | |
+ { | |
if (NUFAR_areaExposedFactor < 0.1 * S) | |
isShielded = true; | |
else | |
@@ -1379,4 +1385,4 @@ namespace ferram4 | |
} | |
} | |
-} | |
\ No newline at end of file | |
+} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment