diff --git a/FOR_RELEASE/GameData/000_USITools/Agency/USIAgency.cfg b/FOR_RELEASE/GameData/000_USITools/Agency/USIAgency.cfg new file mode 100644 index 0000000..ec6401a --- /dev/null +++ b/FOR_RELEASE/GameData/000_USITools/Agency/USIAgency.cfg @@ -0,0 +1,13 @@ +AGENT +{ + name = Umbra Space Industries + + description = A world leader in corrugated paper products, Umbra Space Industries is now applying their formidable boxing and packaging skills into a a series of products for colonization, exploration, and resource exploitation! + + logoURL = 000_USITools/Agency/USILogo + logoScaledURL = 000_USITools/Agency/USILogo_SM + + mentality = Commercial + mentality = Economic 0.3 + mentality = EasyGoing 0.25 +} \ No newline at end of file diff --git a/FOR_RELEASE/GameData/000_USITools/Agency/USILogo.png b/FOR_RELEASE/GameData/000_USITools/Agency/USILogo.png new file mode 100644 index 0000000..9aaf44a Binary files /dev/null and b/FOR_RELEASE/GameData/000_USITools/Agency/USILogo.png differ diff --git a/FOR_RELEASE/GameData/000_USITools/Agency/USILogo_SM.png b/FOR_RELEASE/GameData/000_USITools/Agency/USILogo_SM.png new file mode 100644 index 0000000..f954e52 Binary files /dev/null and b/FOR_RELEASE/GameData/000_USITools/Agency/USILogo_SM.png differ diff --git a/FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt b/FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt new file mode 100644 index 0000000..25ee712 --- /dev/null +++ b/FOR_RELEASE/GameData/000_USITools/CHANGELOG.txt @@ -0,0 +1,29 @@ +0.5.5 - 2016.01.18 +------------------ +Inflatable fuel tank module +Tweaks to the pulse engine module +Bundled USI FX as part of USITools, as it is the best common denominator + +0.5.4 - 2015.12.08 +------------------ +New modules for aquatic stuff (Ballast, RCS, SAS, engines, and Intake) + +0.5.3 - 2015.11.09 +------------------ +KSP 1.0.5 Compatibility +New categories for rovers and MKS-Lite + +0.5.2 - 2015.10.16 +------------------ +Moved out reactors and tanks to the USI_Core repo + +0.5.1 - 2015.10.06 +------------------- +Consolidated tanks and added alternate textures + +0.5.0 - 2015.10.06 +------------------ +Merged nuke reactors and kontainers into the core USI mod +Increased LH2 amnount in all containers +Added containers for Karborundum, Xenon, and Argon +Increased nuke output and mass \ No newline at end of file diff --git a/FOR_RELEASE/GameData/000_USITools/DynamicTanks.dll b/FOR_RELEASE/GameData/000_USITools/DynamicTanks.dll new file mode 100644 index 0000000..9add676 Binary files /dev/null and b/FOR_RELEASE/GameData/000_USITools/DynamicTanks.dll differ diff --git a/FOR_RELEASE/GameData/000_USITools/Flags/USI-LD.png b/FOR_RELEASE/GameData/000_USITools/Flags/USI-LD.png new file mode 100644 index 0000000..e865363 Binary files /dev/null and b/FOR_RELEASE/GameData/000_USITools/Flags/USI-LD.png differ diff --git a/FOR_RELEASE/GameData/000_USITools/Logistics.cfg b/FOR_RELEASE/GameData/000_USITools/Logistics.cfg new file mode 100644 index 0000000..b985f58 --- /dev/null +++ b/FOR_RELEASE/GameData/000_USITools/Logistics.cfg @@ -0,0 +1,7 @@ +LOGISTICS_SETTINGS +{ + ScavangeRange = 150 + LogisticsTime = 5 + WarehouseTime = 10 + MaintenanceRange = 150 +} \ No newline at end of file diff --git a/FOR_RELEASE/GameData/000_USITools/USITools.dll b/FOR_RELEASE/GameData/000_USITools/USITools.dll new file mode 100644 index 0000000..6a91646 Binary files /dev/null and b/FOR_RELEASE/GameData/000_USITools/USITools.dll differ diff --git a/FOR_RELEASE/GameData/000_USITools/USITools.version b/FOR_RELEASE/GameData/000_USITools/USITools.version new file mode 100644 index 0000000..1ef1c7f --- /dev/null +++ b/FOR_RELEASE/GameData/000_USITools/USITools.version @@ -0,0 +1,31 @@ +{ + "NAME":"USI Tools", + "URL":"https://raw.githubusercontent.com/BobPalmer/UmbraSpaceIndustries/master/FOR_RELEASE/GameData/UmbraSpaceIndustries/USICore.version", + "DOWNLOAD":"https://github.com/BobPalmer/UmbraSpaceIndustries/releases", + "GITHUB":{ + "USERNAME":"BobPalmer", + "REPOSITORY":"UmbraSpaceIndustries", + "ALLOW_PRE_RELEASE":false + }, + "VERSION":{ + "MAJOR":0, + "MINOR":5, + "PATCH":5, + "BUILD":0 + }, + "KSP_VERSION":{ + "MAJOR":1, + "MINOR":0, + "PATCH":5 + }, + "KSP_VERSION_MIN":{ + "MAJOR":1, + "MINOR":0, + "PATCH":0 + }, + "KSP_VERSION_MAX":{ + "MAJOR":1, + "MINOR":0, + "PATCH":5 + } + } \ No newline at end of file diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt index 669ea9a..3d2ade5 100644 --- a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt +++ b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/ChangeLog.txt @@ -1,3 +1,13 @@ +0.3.2 - 2016.01.20 +------------------ +Fixed an issue where crew were being doubled when showing the supplies left in the UI +Updated a few issues where the Kerbal's supply counter was not updating properly +Wear is off by default, and when not enabled, will not show in the GUI + +0.3.1 - 2016.01.19 +------------------ +Bundled USITools + 0.3.0 - 2016.01.18 ------------------ EVA timer is now based on how long the kerbal has been EVA. diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USI-LS.version b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USI-LS.version index faaee0a..c1f5fbb 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":3, - "PATCH":0, + "PATCH":2, "BUILD":0 }, "KSP_VERSION":{ diff --git a/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.dll index 010b4a4..d65ad01 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.pdb b/FOR_RELEASE/GameData/UmbraSpaceIndustries/LifeSupport/USILifeSupport.pdb index b80dc64..beb4e15 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/LifeSupportManager.cs b/Source/USILifeSupport/LifeSupportManager.cs index 0f1afaa..59feeae 100644 --- a/Source/USILifeSupport/LifeSupportManager.cs +++ b/Source/USILifeSupport/LifeSupportManager.cs @@ -199,6 +199,17 @@ internal void UpdateVesselStats() } } + private static int GetColonyCrewCount(Vessel vsl) + { + var crewCount = vsl.GetCrewCount(); + var vList = LogisticsTools.GetNearbyVessels((float)LifeSupportSetup.Instance.LSConfig.HabRange, false, vsl, true); + foreach (var v in vList) + { + crewCount += v.GetCrewCount(); + } + return crewCount; + } + internal static double GetRecyclerMultiplier(Vessel vessel) { if (!LifeSupportSetup.Instance.LSConfig.EnableRecyclers) @@ -206,7 +217,8 @@ internal static double GetRecyclerMultiplier(Vessel vessel) var recyclerCap = 0f; var recyclerVal = 1f; - var crewCount = vessel.GetCrewCount(); + var crewCount = GetColonyCrewCount(vessel); + foreach (var r in vessel.FindPartModulesImplementing()) { if (r.IsActivated) @@ -310,6 +322,10 @@ internal static double GetRecyclerMultiplierForParts(List pList, int crewC return Math.Max(recyclerVal, (1f - recyclerCap)); } + public static bool IsOnKerbin(Vessel v) + { + return (v.mainBody == FlightGlobals.GetHomeBody() && v.altitude < LifeSupportSetup.Instance.LSConfig.HomeWorldAltitude); + } } } diff --git a/Source/USILifeSupport/LifeSupportMonitor.cs b/Source/USILifeSupport/LifeSupportMonitor.cs index df5e7aa..8b252f1 100644 --- a/Source/USILifeSupport/LifeSupportMonitor.cs +++ b/Source/USILifeSupport/LifeSupportMonitor.cs @@ -500,9 +500,11 @@ private void GenerateWindow() var cls = LifeSupportManager.Instance.FetchKerbal(c); cStat.CrewName = String.Format("{0}", c.name); - //var foodEaten = Planetarium.GetUniversalTime() - cls.LastMeal; - //var snacksLeft = vsl.SuppliesLeft - foodEaten; - var snacksLeft = supAmount/vsl.NumCrew/supPerDay*60*60*6; + var snacksLeft = supAmount / supPerDay * 60 * 60 * 6; + if (supAmount <= ResourceUtilities.FLOAT_TOLERANCE && !LifeSupportManager.IsOnKerbin(thisVessel)) + { + snacksLeft = cls.LastMeal - Planetarium.GetUniversalTime(); + } var lblSup = "6FFF00"; if (snacksLeft < 60 * 60 * 6 * 15) //15 days diff --git a/Source/USILifeSupport/LifeSupportSetup.cs b/Source/USILifeSupport/LifeSupportSetup.cs index 592f067..68687c5 100644 --- a/Source/USILifeSupport/LifeSupportSetup.cs +++ b/Source/USILifeSupport/LifeSupportSetup.cs @@ -42,7 +42,7 @@ private LifeSupportConfig LoadLifeSupportConfig() SupplyTime=324000, SupplyAmount = 0.00005f, WasteAmount = 0.00005f, - ReplacementPartAmount = 0.00001f, + ReplacementPartAmount = 0f, EnableRecyclers = false, HabRange = 2000 }; diff --git a/Source/USILifeSupport/ModuleLifeSupport.cs b/Source/USILifeSupport/ModuleLifeSupport.cs index 48ce850..2ab0137 100644 --- a/Source/USILifeSupport/ModuleLifeSupport.cs +++ b/Source/USILifeSupport/ModuleLifeSupport.cs @@ -1,5 +1,6 @@ using System; using System.Linq; +using System.Resources; using Random = System.Random; namespace LifeSupport @@ -18,6 +19,10 @@ public override void OnStart(StartState state) LifeSupportManager.Instance.TrackVessel(v); Fields["status"].guiActive = false; IsActivated = true; + if (LifeSupportSetup.Instance.LSConfig.ReplacementPartAmount < ResourceUtilities.FLOAT_TOLERANCE) + { + Fields["wearPercent"].guiActive = false; + } } } @@ -80,6 +85,8 @@ private void CheckForDeadKerbals() } } + + protected override void PostProcess(ConverterResults result, double deltaTime) { var v = LifeSupportManager.Instance.FetchVessel(part.vessel.id.ToString()); @@ -140,10 +147,9 @@ protected override void PostProcess(ConverterResults result, double deltaTime) //Fetch them from the queue var k = LifeSupportManager.Instance.FetchKerbal(c); //Update our stuff - var onKerbin = (part.vessel.mainBody == FlightGlobals.GetHomeBody() && part.vessel.altitude < LifeSupportSetup.Instance.LSConfig.HomeWorldAltitude); //First - Hab effects. - if (onKerbin) + if (LifeSupportManager.IsOnKerbin(part.vessel)) { k.LastOnKerbin = Planetarium.GetUniversalTime(); k.MaxOffKerbinTime = Planetarium.GetUniversalTime() + 972000000; @@ -160,7 +166,7 @@ protected override void PostProcess(ConverterResults result, double deltaTime) isGrouchyHab = CheckHabSideEffects(k, c, v); //Second - Supply - if (!onKerbin && (deltaTime - result.TimeFactor > tolerance)) + if (!LifeSupportManager.IsOnKerbin(part.vessel) && (deltaTime - result.TimeFactor > tolerance)) { isGrouchySupplies = CheckSupplySideEffects(k, c); }