Changes to Module, Core, and throughout to support module filtering by game mode. Also tweaks to CareerStatus.formatDelta.
[VOID.git] / Tools / VOID_Tools.cs
blob:a/Tools/VOID_Tools.cs -> blob:b/Tools/VOID_Tools.cs
--- a/Tools/VOID_Tools.cs
+++ b/Tools/VOID_Tools.cs
@@ -365,6 +365,19 @@
 			return functionCache[hashCode];
 		}
 
+		public static void UncacheWindow(Action<int> func)
+		{
+			if (functionCache != null)
+			{
+				int hashCode = func.GetHashCode();
+
+				if (functionCache.ContainsKey(hashCode))
+				{
+					functionCache.Remove(hashCode);
+				}
+			}
+		}
+
 		/// <summary>
 		/// Formats the interval given in seconds as a human-friendly
 		/// time period in [[[[years, ]days, ]hours, ]minutes, and ]seconds.
@@ -518,7 +531,7 @@
 			{
 				string format = "Y{0:#0}, D{1:#0} {2:00}:{3:00}:{4:00.0}s";
 
-				return string.Format(format, years + 1, days, hours, minutes, seconds);
+				return string.Format(format, years + 1, days + 1, hours, minutes, seconds);
 			}
 
 			public UnpackedTime(int years, int days, int hours, int minutes, double seconds)