Merged cybutek changes outside VesselSimulator
Merged cybutek changes outside VesselSimulator

file:a/LogMsg.cs -> file:b/LogMsg.cs
--- a/LogMsg.cs
+++ b/LogMsg.cs
@@ -15,7 +15,7 @@
         {
             if (this.buf.Length > 0)
             {
-                Logger.Log(this.buf);
+                MyLogger.Log(this.buf);
             }
             this.buf.Length = 0;
         }

--- a/PartExtensions.cs
+++ b/PartExtensions.cs
@@ -42,9 +42,9 @@
         /// </summary>
         public static bool ContainsResources(this Part part)
         {
-            for (int i = 0; i < part.Resources.list.Count; ++i)
-            {
-                if (part.Resources.list[i].amount > 0.0)
+            for (int i = 0; i < part.Resources.dict.Count; ++i)
+            {
+                if (part.Resources.dict.At(i).amount > 0.0)
                 {
                     return true;
                 }
@@ -311,9 +311,9 @@
         public static double GetResourceCost(this Part part)
         {
             double cost = 0.0;
-            for (int i = 0; i < part.Resources.list.Count; ++i)
-            {
-                PartResource cachePartResource = part.Resources.list[i];
+            for (int i = 0; i < part.Resources.dict.Count; ++i)
+            {
+                PartResource cachePartResource = part.Resources.dict.At(i);
                 cost = cost + (cachePartResource.amount * cachePartResource.info.unitCost);
             }
             return cost;
@@ -325,9 +325,9 @@
         public static double GetResourceCostInverted(this Part part)
         {
             double sum = 0;
-            for (int i = 0; i < part.Resources.list.Count; i++)
-            {
-                PartResource r = part.Resources.list[i];
+            for (int i = 0; i < part.Resources.dict.Count; i++)
+            {
+                PartResource r = part.Resources.dict.At(i);
                 sum += (r.maxAmount - r.amount) * r.info.unitCost;
             }
             return sum;
@@ -339,9 +339,9 @@
         public static double GetResourceCostMax(this Part part)
         {
             double cost = 0.0;
-            for (int i = 0; i < part.Resources.list.Count; ++i)
-            {
-                PartResource cachePartResource = part.Resources.list[i];
+            for (int i = 0; i < part.Resources.dict.Count; ++i)
+            {
+                PartResource cachePartResource = part.Resources.dict.At(i);
                 cost = cost + (cachePartResource.maxAmount * cachePartResource.info.unitCost);
             }
             return cost;

--- a/VesselSimulator.csproj
+++ b/VesselSimulator.csproj
@@ -95,10 +95,10 @@
     <Compile Include="LogMsg.cs" />

     <Compile Include="ForceAccumulator.cs" />

     <Compile Include="Averager.cs" />

-    <Compile Include="Logger.cs" />

     <Compile Include="Stubs.cs" />

     <Compile Include="Units.cs" />

     <Compile Include="Pool.cs" />

+    <Compile Include="MyLogger.cs" />

   </ItemGroup>

   <ItemGroup>

     <ProjectReference Include="..\ToadicusTools\ToadicusTools.csproj">

@@ -117,9 +117,6 @@
     <Reference Include="UnityEngine.UI">

       <HintPath>..\_KSPAssemblies\UnityEngine.UI.dll</HintPath>

     </Reference>

-    <Reference Include="KSPUtil">

-      <HintPath>..\_KSPAssemblies\KSPUtil.dll</HintPath>

-    </Reference>

   </ItemGroup>

   <ProjectExtensions>

     <MonoDevelop>