Skip to content

Develop merge #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 39 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
452894a
update gitignore
Conti Oct 25, 2013
1f15bf0
Update FNNozzleController.cs for MicrowaveThermalPowerReceiver and Mi…
Conti Oct 25, 2013
fff1b08
change coretemp/reactortemp to ThermalTemp. Add FNThermalHeatExchange…
Conti Oct 25, 2013
b72e5b4
Update part cfgs
Conti Oct 25, 2013
396a4d2
Fix thrust and minor typo
Conti Oct 26, 2013
81081d5
FIx again so reactors will still work properly...
Conti Oct 26, 2013
bd78512
another failed attempt at getting the animation to point smoothly to …
Conti Oct 27, 2013
f2c7c8b
Merge branch 'conti-refactor' into test
Conti Oct 27, 2013
715c278
merge changes to MW reciever and thermal heat exchanger
Conti Oct 28, 2013
c8992e1
Add exaust flame to thermal turbojet (looks very odd especially in sp…
Conti Oct 28, 2013
39789d4
Correct minor typo on powerRatio (power_ratio is unnused variable)
Conti Oct 28, 2013
b488820
Fix collector area calculations and facing factor for thermal power r…
Conti Oct 28, 2013
7b91bcb
Update thermal heat exchanger code to function with new FNThermalSour…
Conti Oct 28, 2013
40e6480
Switch between sats and relay if total power received is stronger fro…
Conti Oct 28, 2013
aab1fab
Bugfix non thermal microwave power receivers.
Conti Oct 28, 2013
31689c2
Cleanup debug output
Conti Oct 28, 2013
341b0c0
Cleanup debug output
Conti Oct 28, 2013
930c8ce
Merge branch 'develop' of https://github.com/FractalUK/KSPInterstella…
Conti Oct 29, 2013
f241c2f
Fix new MTER animation
Conti Oct 29, 2013
d3901b0
Merge branch 'develop' of https://github.com/FractalUK/KSPInterstella…
Conti Oct 30, 2013
cd71113
Fix auto receiver startup bug.
Conti Oct 30, 2013
a1fc831
Merge branch 'develop' of https://github.com/FractalUK/KSPInterstella…
Conti Oct 31, 2013
c46c727
Roll MicrowaveReceiver2 changes into MicrowavePowerReceiver.cs
Conti Oct 31, 2013
b189b03
Fix error in nozzle controller merge.
Conti Oct 31, 2013
7f5466a
...
Conti Oct 31, 2013
c9bc940
Fix NaN bug related to previous commit (Fix auto receiver startup bug).
Conti Oct 31, 2013
b12e4a4
Toggle flameFX based on engine mode (flameFX will engage when in hybr…
Conti Oct 31, 2013
479a209
Change to static thermal temp.
Conti Oct 31, 2013
1dee7fd
Fix animation speed.
Conti Oct 31, 2013
8d4319b
Equalize power between multiple receivers correctly.
Conti Oct 31, 2013
fc6035b
Equalize thermal/non thermal power separately, fix collector area cal…
Conti Oct 31, 2013
ae57581
This needs more cleaning up...
Conti Oct 31, 2013
074723e
Bugfix 0 input receivers causing all receivers to become 0 powerInput
Conti Nov 1, 2013
30f1221
Merge branch 'develop' of https://github.com/FractalUK/KSPInterstella…
Conti Nov 1, 2013
11b79f1
Merge branch 'develop' of https://github.com/FractalUK/KSPInterstella…
Conti Nov 8, 2013
6f3d77b
Fix spelling error and add MTER parts to version control.
Conti Nov 14, 2013
288d7b3
Merge branch 'develop' of https://github.com/FractalUK/KSPInterstella…
Conti Nov 15, 2013
38766c6
merge cfg changes
Conti Nov 16, 2013
5907a8f
Merge branch 'develop' of https://github.com/FractalUK/KSPInterstella…
Conti Nov 16, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ WarpPlugin.dll
*.mu
*.mbm
*.ogg
*.psd
*.psd
bin
2 changes: 1 addition & 1 deletion FNPlugin/FNGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ public float getMaxPowerOutput() {
}

public void updateGeneratorPower() {
hotBathTemp = myAttachedReactor.getCoreTemp();
hotBathTemp = myAttachedReactor.getThermalTemp();
maxThermalPower = myAttachedReactor.getThermalPower();
coldBathTemp = FNRadiator.getAverageRadiatorTemperatureForVessel (vessel);
}
Expand Down
12 changes: 5 additions & 7 deletions FNPlugin/FNNozzleController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ public void updateIspEngineParams() {
// recaculate ISP based on power and core temp available
FloatCurve newISP = new FloatCurve();
FloatCurve vCurve = new FloatCurve ();
maxISP = (float)(Math.Sqrt ((double)myAttachedReactor.getCoreTemp ()) * 17.0 * ispMultiplier);
maxISP = (float)(Math.Sqrt ((double)myAttachedReactor.getThermalTemp ()) * 17.0 * ispMultiplier);
if (!currentpropellant_is_jet) {
minISP = maxISP * 0.4f;
newISP.Add (0, maxISP, 0, 0);
Expand Down Expand Up @@ -369,12 +369,10 @@ public bool hasStarted() {

public override void OnFixedUpdate() {
//tell static helper methods we are currently updating things


if (!myAttachedReactor.isActive()) {
myAttachedReactor.enableIfPossible();
}
if (myAttachedEngine.isOperational && myAttachedEngine.currentThrottle > 0 && myAttachedReactor != null) {
if (!myAttachedReactor.isActive()) {
myAttachedReactor.enableIfPossible();
}
updateIspEngineParams ();
float curve_eval_point = (float)Math.Min (FlightGlobals.getStaticPressure (vessel.transform.position), 1.0);
float currentIsp = myAttachedEngine.atmosphereCurve.Evaluate (curve_eval_point);
Expand Down Expand Up @@ -453,7 +451,7 @@ public override void OnFixedUpdate() {

if (myAttachedReactor == null && myAttachedEngine.isOperational && myAttachedEngine.currentThrottle > 0) {
myAttachedEngine.Events ["Shutdown"].Invoke ();
ScreenMessages.PostScreenMessage ("Engine Shutdown: No reactor attached!", 5.0f, ScreenMessageStyle.UPPER_CENTER);
ScreenMessages.PostScreenMessage ("Engine Shutdown: No thermal power source attached!", 5.0f, ScreenMessageStyle.UPPER_CENTER);
}
}

Expand Down
18 changes: 9 additions & 9 deletions FNPlugin/FNReactor.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
Expand All @@ -22,11 +22,11 @@ class FNReactor : FNResourceSuppliableModule, FNThermalSource {

// Persistent False
[KSPField(isPersistant = false)]
public float ReactorTemp;
public float ThermalTemp;
[KSPField(isPersistant = false)]
public float ThermalPower;
[KSPField(isPersistant = false)]
public float upgradedReactorTemp;
public float upgradedThermalTemp;
[KSPField(isPersistant = false)]
public float upgradedThermalPower;
[KSPField(isPersistant = false)]
Expand Down Expand Up @@ -134,7 +134,7 @@ public void ToggleReactorAction(KSPActionParam param) {
public override void OnLoad(ConfigNode node) {
if (isupgraded) {
ThermalPower = upgradedThermalPower;
ReactorTemp = upgradedReactorTemp;
ThermalTemp = upgradedThermalTemp;
reactorType = upgradedName;
resourceRate = upgradedResourceRate;
}else {
Expand All @@ -146,7 +146,7 @@ public override void OnLoad(ConfigNode node) {
public void upgradePart() {
isupgraded = true;
ThermalPower = upgradedThermalPower;
ReactorTemp = upgradedReactorTemp;
ThermalTemp = upgradedThermalTemp;
reactorType = upgradedName;
resourceRate = upgradedResourceRate;
}
Expand Down Expand Up @@ -296,8 +296,8 @@ public override void OnUpdate() {
}
}

public float getCoreTemp() {
return ReactorTemp;
public float getThermalTemp() {
return ThermalTemp;
}

public float getThermalPower() {
Expand Down Expand Up @@ -425,8 +425,8 @@ public static double getTemperatureofHottestReactor(Vessel vess) {
double temp = 0;
foreach (FNReactor reactor in reactors) {
if (reactor != null) {
if (reactor.getCoreTemp () > temp) {
temp = reactor.getCoreTemp ();
if (reactor.getThermalTemp () > temp) {
temp = reactor.getThermalTemp ();
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions FNPlugin/FNThermalHeatExchanger.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ public override void OnFixedUpdate() {
setupThermalPower ();
}

public float getCoreTemp() {
return 1500;
public float getThermalTemp() {
return 1500f;
}

public float getThermalPower() {
Expand All @@ -102,6 +102,9 @@ public bool isActive() {
return IsEnabled;
}

public bool getIsThermalHeatExchanger() {
return true;
}
public void enableIfPossible() {
IsEnabled = true;
}
Expand Down
4 changes: 3 additions & 1 deletion FNPlugin/FNThermalSource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@
namespace FNPlugin{
public interface FNThermalSource{

float getCoreTemp();
float getThermalTemp();

float getThermalPower();

bool getIsNuclear();

bool getIsThermalHeatExchanger();

float getRadius();

bool isActive();
Expand Down
Loading