diff --git a/FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt b/FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt index 950b2b6..f6e1d55 100644 --- a/FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt +++ b/FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt @@ -1,3 +1,12 @@ +0.8.16 - 2017.02.11 +------------------- +Mechanics can now perform EVA maintenance +Fixed an issue where resources were being double-consumed when converters were swapped + +0.8.15 - 2017.02.08 +------------------ +Fixed more nullref spam + 0.8.13 - 2017.02.04 ------------------ Fixed some nullref spam in Animations related to logistics diff --git a/FOR_RELEASE/GameData/000_USITools/TraitsAndEffects.cfg b/FOR_RELEASE/GameData/000_USITools/TraitsAndEffects.cfg index c44cd37..7af3df3 100644 --- a/FOR_RELEASE/GameData/000_USITools/TraitsAndEffects.cfg +++ b/FOR_RELEASE/GameData/000_USITools/TraitsAndEffects.cfg @@ -19,6 +19,10 @@ EFFECT { name = GeologySkill } + EFFECT + { + name = ConstructionSkill + } } @EXPERIENCE_TRAIT[Scientist] { diff --git a/FOR_RELEASE/GameData/000_USITools/USITools.dll b/FOR_RELEASE/GameData/000_USITools/USITools.dll index 46ba337..fa978e9 100644 Binary files a/FOR_RELEASE/GameData/000_USITools/USITools.dll and b/FOR_RELEASE/GameData/000_USITools/USITools.dll differ diff --git a/FOR_RELEASE/GameData/000_USITools/USITools.dll.mdb b/FOR_RELEASE/GameData/000_USITools/USITools.dll.mdb index a6e3011..8b311ba 100644 Binary files a/FOR_RELEASE/GameData/000_USITools/USITools.dll.mdb and b/FOR_RELEASE/GameData/000_USITools/USITools.dll.mdb differ diff --git a/FOR_RELEASE/GameData/000_USITools/USITools.pdb b/FOR_RELEASE/GameData/000_USITools/USITools.pdb index 5fbe3dc..6939b9d 100644 Binary files a/FOR_RELEASE/GameData/000_USITools/USITools.pdb and b/FOR_RELEASE/GameData/000_USITools/USITools.pdb differ diff --git a/FOR_RELEASE/GameData/000_USITools/USITools.version b/FOR_RELEASE/GameData/000_USITools/USITools.version index a6e6c3c..ed29ad6 100644 --- a/FOR_RELEASE/GameData/000_USITools/USITools.version +++ b/FOR_RELEASE/GameData/000_USITools/USITools.version @@ -10,7 +10,7 @@ "VERSION":{ "MAJOR":0, "MINOR":8, - "PATCH":14, + "PATCH":16, "BUILD":0 }, "KSP_VERSION":{ diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt index 6cc7a6e..cbe0100 100644 --- a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt +++ b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt @@ -1,3 +1,7 @@ +0.5.23 - 2017.02.24 +------------------- +Fixed an issue where habitation was not being shared correctly + 0.5.22 - 2017.02.05 ------------------- Dependency Updates diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USI-LS.version b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USI-LS.version index f6a9829..488c35a 100644 --- a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USI-LS.version +++ b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USI-LS.version @@ -10,7 +10,7 @@ "VERSION":{ "MAJOR":0, "MINOR":5, - "PATCH":22, + "PATCH":23, "BUILD":0 }, "KSP_VERSION":{ diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll index 612fc4c..24e5fb4 100644 Binary files a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll and b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll differ diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll.mdb b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll.mdb index 387e8ca..102e375 100644 Binary files a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll.mdb and b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll.mdb differ diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.pdb b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.pdb index 7423b3c..da96571 100644 Binary files a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.pdb and b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.pdb differ diff --git a/Source/USILifeSupport/.vs/USILifeSupport/v14/.suo b/Source/USILifeSupport/.vs/USILifeSupport/v14/.suo index 6c12baa..4bf5871 100644 Binary files a/Source/USILifeSupport/.vs/USILifeSupport/v14/.suo and b/Source/USILifeSupport/.vs/USILifeSupport/v14/.suo differ diff --git a/Source/USILifeSupport/LifeSupportManager.cs b/Source/USILifeSupport/LifeSupportManager.cs index 52c3bc7..a1ea591 100644 --- a/Source/USILifeSupport/LifeSupportManager.cs +++ b/Source/USILifeSupport/LifeSupportManager.cs @@ -375,9 +375,6 @@ internal static double GetTotalHabTime(VesselSupplyStatus sourceVessel, Vessel v return sourceVessel.CachedHabTime; } - double totHabSpace = sourceVessel.ExtraHabSpace; - double totHabMult = sourceVessel.VesselHabMultiplier; - int totCurCrew = sourceVessel.NumCrew; int totMaxCrew = sourceVessel.CrewCap; @@ -402,6 +399,8 @@ internal static double GetTotalHabTime(VesselSupplyStatus sourceVessel, Vessel v hList.Add(v); } } + double totHabSpace = sourceVessel.ExtraHabSpace; + double totHabMult = CalculateVesselHabMultiplier(vsl,totCurCrew); totHabSpace += (LifeSupportScenario.Instance.settings.GetSettings().BaseHabTime * totMaxCrew); var hCount = hList.Count; @@ -410,7 +409,7 @@ internal static double GetTotalHabTime(VesselSupplyStatus sourceVessel, Vessel v var v = hList[i]; // Calculate HabSpace and HabMult after we know totCurCrew and totMaxCrew totHabSpace += CalculateVesselHabExtraTime(v); - totHabMult *= Math.Min(1,CalculateVesselHabMultiplier(v, totCurCrew)); + totHabMult += CalculateVesselHabMultiplier(v, totCurCrew); } totHabMult += USI_GlobalBonuses.Instance.GetHabBonus(vsl.mainBody.flightGlobalsIndex); diff --git a/Source/USILifeSupport/ModuleLifeSupportExtender.cs b/Source/USILifeSupport/ModuleLifeSupportExtender.cs index 5561b09..0734c99 100644 --- a/Source/USILifeSupport/ModuleLifeSupportExtender.cs +++ b/Source/USILifeSupport/ModuleLifeSupportExtender.cs @@ -21,6 +21,14 @@ public class ModuleLifeSupportExtender : ModuleResourceConverter_USI [KSPField] public bool habTimer = true; + [KSPField(guiName = "Kolony Growth", guiActive = true, guiActiveEditor = true, isPersistant = true), UI_Toggle(disabledText = "disabled", enabledText = "enabled")] + public bool KolonyGrowthEnabled = false; + + [KSPField(isPersistant = true)] + public double GrowthTime = 0d; + + public const double GestationTime = 9720000d; + protected override void PreProcessing() { if (!HighLogic.LoadedSceneIsFlight) @@ -49,11 +57,19 @@ protected override void PostProcess(ConverterResults result, double deltaTime) if (PartOnly) crew = part.protoModuleCrew; + var hasMale = false; + var hasFemale = false; + var count = crew.Count; for (int i = 0; i < count; ++i) { var c = crew[i]; - if(string.IsNullOrEmpty(restrictedClass) || c.experienceTrait.Title == restrictedClass) + if (c.gender == ProtoCrewMember.Gender.Male) + hasMale = true; + if (c.gender == ProtoCrewMember.Gender.Female) + hasFemale = true; + + if (string.IsNullOrEmpty(restrictedClass) || c.experienceTrait.Title == restrictedClass) kerbals.Add(c); } @@ -71,6 +87,26 @@ protected override void PostProcess(ConverterResults result, double deltaTime) LifeSupportManager.Instance.TrackKerbal(lsKerbal); } + + //Kolony Growth + if (KolonyGrowthEnabled && part.CrewCapacity > part.protoModuleCrew.Count) + { + GrowthTime += result.TimeFactor; + if (GrowthTime >= GestationTime) + { + GrowthTime = 0d; + SpawnKerbal(); + } + } + } + + private void SpawnKerbal() + { + ProtoCrewMember newKerb = HighLogic.CurrentGame.CrewRoster.GetNewKerbal(); + newKerb.rosterStatus = ProtoCrewMember.RosterStatus.Assigned; + part.AddCrewmember(newKerb); + var msg = String.Format("{0}, a new {1}, has joined your crew!", newKerb.name, newKerb.experienceTrait.TypeName); + ScreenMessages.PostScreenMessage(msg, 5f, ScreenMessageStyle.UPPER_CENTER); } } } \ No newline at end of file