Skip to content

Commit

Permalink
Merge pull request #81 from KSP-RO/Develop
Browse files Browse the repository at this point in the history
v0.13.0
  • Loading branch information
JPLRepo authored Mar 25, 2017
2 parents f58ee1e + 704e6db commit af85aaa
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 16 deletions.
4 changes: 4 additions & 0 deletions GameData/ThunderAerospace/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.13.0
Fix Rescue kerbal for kerbals on the ground due to contracts system not being loaded in time.
Change Water purifier Water output rate to match water usage rates so as to avoid positive water scenario.
Fix issue with Low Electricity Warning at high warp rate.
v0.12.9
Fix Rescue kerbal checking where contract only contains kerbal's first name.
Fix when Rescue contracts cancelled. Untrack Kerbals on Rescue contracts if the contract is cancelled.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"URL": "http://ksp-avc.cybutek.net/version.php?id=9",
"DOWNLOAD": "https://github.com/KSP-RO/TacLifeSupport/releases",
"CHANGE_LOG_URL": "https://github.com/KSP-RO/TacLifeSupport/wiki/Changes",
"VERSION": "0.12.9.0",
"VERSION": "0.13.0.0",
"KSP_VERSION": {
"MAJOR": 1,
"MINOR": 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ PART
OUTPUT_RESOURCE
{
ResourceName = Water
Ratio = 0.000012822916667
Ratio = 0.000011188078704

This comment has been minimized.

Copy link
@jsolson

jsolson Mar 25, 2017

This change makes sense in that it makes the conversion rate consistent with how the other converters are setup. But the WasteWater and Waste input/outputs need to be adjusted by the same proportion as the Water output or you end up with an unexplained loss of mass in the conversion (approx 35kg per day on this converter). The EC input should probably be scaled the same as well to maintain the original balance.

DumpExcess = false
}
OUTPUT_RESOURCE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ PART
OUTPUT_RESOURCE
{
ResourceName = Water
Ratio = 0.000012822916667
Ratio = 0.000011188078704
DumpExcess = false
}
OUTPUT_RESOURCE
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ PART
OUTPUT_RESOURCE
{
ResourceName = Water
Ratio = 0.000012822916667
Ratio = 0.000011188078704
DumpExcess = false
}
OUTPUT_RESOURCE
Expand Down
3 changes: 0 additions & 3 deletions GameData/ThunderAerospace/TacLifeSupport_v0.12.9.0.txt

This file was deleted.

3 changes: 3 additions & 0 deletions GameData/ThunderAerospace/TacLifeSupport_v0.13.0.0.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
You have installed the TAC Life Support, version 0.13.0.0 ('0a6f4e5'+'0a6f4e5' with modifications).

See the Readme.txt and LICENSE.txt files for more information.
20 changes: 15 additions & 5 deletions Source/LifeSupportController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
*/

using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Contracts.Templates;
Expand Down Expand Up @@ -246,7 +247,7 @@ void FixedUpdate()
int crewCapacity = UpdateVesselInfo(entry.Value, loadedvessel);
if (crewCapacity == 0)
{
checkDictionaries();
StartCoroutine(checkDictionaries());
continue;
}
//If vessel is PRELAUNCH
Expand Down Expand Up @@ -801,6 +802,7 @@ private void ConsumeElectricity(double currentTime, Vessel vessel, VesselInfo ve
{
double deltaTime = Math.Min(currentTime - vesselInfo.lastElectricity, Math.Max(globalsettings.ElectricityMaxDeltaTime, TimeWarp.fixedDeltaTime));
double desiredElectricity = rate * deltaTime;
vesselInfo.estimatedElectricityConsumptionRate = desiredElectricity;
double electricityObtained, electricitySpace = 0;
RSTUtils.Utilities.requireResourceID(vessel, globalsettings.ElectricityId,
desiredElectricity, true, true, false, out electricityObtained, out electricitySpace);
Expand Down Expand Up @@ -1270,16 +1272,15 @@ private void onLevelWasLoaded(GameScenes scene)
{
if (scene == GameScenes.FLIGHT && !checkedDictionaries)
{
checkDictionaries();
checkedDictionaries = true;
StartCoroutine(checkDictionaries());
}
}

/// <summary>
/// check the knownVessels and knownCrew dictionaries for entries that should be removed and remove them.
/// Check all vessels in game that have crew and if we are not tracking them add them to vessel tracking.
/// </summary>
private void checkDictionaries()
private IEnumerator checkDictionaries()
{
var vesselsToDelete = new List<Guid>();
foreach (var vessel in gameSettings.knownVessels)
Expand Down Expand Up @@ -1355,8 +1356,16 @@ private void checkDictionaries()
VesselSortCountervslChgFlag = true;
}
}
//If Contracts system is active. Wait for it to finish loading contracts first.
if (Contracts.ContractSystem.Instance != null)
{
if (!Contracts.ContractSystem.loaded)
{
yield return null;
}
}
//Check All Vessels, if they have crew and we are not tracking the vessel add it to tracking.
if (FlightGlobals.fetch)
if (FlightGlobals.fetch)
{
var allVessels = FlightGlobals.Vessels;
for (int i = 0; i < allVessels.Count; ++i)
Expand All @@ -1367,6 +1376,7 @@ private void checkDictionaries()
}
}
}
checkedDictionaries = true;
}

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions Source/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("0.12.9")]
[assembly: AssemblyFileVersion("0.12.9")]
[assembly: AssemblyVersion("0.13.0")]
[assembly: AssemblyFileVersion("0.13.0")]
4 changes: 2 additions & 2 deletions Source/TacLifeSupport.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@
<Import Project="$(PROGRAMFILES)\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks" Condition="Exists('$(PROGRAMFILES)\MSBuild\ExtensionPack\4.0\MSBuild.ExtensionPack.tasks')" />
<PropertyGroup>
<AssemblyMajorVersion>0</AssemblyMajorVersion>
<AssemblyMinorVersion>12</AssemblyMinorVersion>
<AssemblyBuildNumber>9</AssemblyBuildNumber>
<AssemblyMinorVersion>13</AssemblyMinorVersion>
<AssemblyBuildNumber>0</AssemblyBuildNumber>
<AssemblyFileMajorVersion>$(AssemblyMajorVersion)</AssemblyFileMajorVersion>
<AssemblyFileMinorVersion>$(AssemblyMinorVersion)</AssemblyFileMinorVersion>
<AssemblyFileBuildNumber>$(AssemblyBuildNumber)</AssemblyFileBuildNumber>
Expand Down

0 comments on commit af85aaa

Please sign in to comment.