Skip to content

Commit 5c8ffad

Browse files
committed
v1.0.3.0
1 parent a0271c1 commit 5c8ffad

File tree

13 files changed

+15
-8
lines changed

13 files changed

+15
-8
lines changed

1.1/Assemblies/TinyTweaks.dll

-1 KB
Binary file not shown.

About/About.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<packageId>XeoNovaDan.TinyTweaks</packageId>
55
<author>XeoNovaDan</author>
66
<url>https://steamcommunity.com/sharedfiles/filedetails/?id=2017485672</url>
7-
<description>Current version: v1.0.2.1 (11th March 2020)\n\nA fully configurable collection of minor QoL improvements, tweaks and other refinements for RimWorld.</description>
7+
<description>Current version: v1.0.3.0 (18th March 2020)\n\nA fully configurable collection of minor QoL improvements, tweaks and other refinements for RimWorld.</description>
88
<supportedVersions>
99
<li>1.1</li>
1010
</supportedVersions>
5 KB
Binary file not shown.
0 Bytes
Binary file not shown.
Binary file not shown.
Binary file not shown.

Source/TinyTweaks/HarmonyPatches/Patch_ThingDef.cs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,15 @@ public static class Patch_ThingDef
1919
public static class AllRecipes_Getter
2020
{
2121

22-
public static void Postfix(ref List<RecipeDef> __result)
22+
public static void Postfix(ThingDef __instance, ref List<RecipeDef> __result)
2323
{
2424
// Sort the resulting list alphabetically
2525
if (TinyTweaksSettings.alphabeticalBillList)
26-
__result = __result.OrderBy(r => r.label).ToList();
26+
{
27+
if (!TinyTweaksUtility.cachedThingRecipesAlphabetical.ContainsKey(__instance))
28+
TinyTweaksUtility.cachedThingRecipesAlphabetical.Add(__instance, __result.OrderBy(r => r.label).ToList());
29+
__result = TinyTweaksUtility.cachedThingRecipesAlphabetical[__instance];
30+
}
2731
}
2832

2933
}

Source/TinyTweaks/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,5 +32,5 @@
3232
// You can specify all the values or you can default the Build and Revision Numbers
3333
// by using the '*' as shown below:
3434
// [assembly: AssemblyVersion("1.0.*")]
35-
[assembly: AssemblyVersion("1.0.2.1")]
36-
[assembly: AssemblyFileVersion("1.0.2.1")]
35+
[assembly: AssemblyVersion("1.0.3.0")]
36+
[assembly: AssemblyFileVersion("1.0.3.0")]

Source/TinyTweaks/TinyTweaks.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@
8282
<Compile Include="HarmonyPatches\Patch_Pawn_PlayerSettings.cs" />
8383
<Compile Include="HarmonyPatches\Patch_PawnGenerator.cs" />
8484
<Compile Include="HarmonyPatches\Patch_SkillRecord.cs" />
85-
<Compile Include="HarmonyPatches\Patch_OverlayDrawHandler.cs" />
86-
<Compile Include="HarmonyPatches\Patch_PlaySettings.cs" />
85+
<None Include="HarmonyPatches\Patch_OverlayDrawHandler.cs" />
86+
<None Include="HarmonyPatches\Patch_PlaySettings.cs" />
8787
<Compile Include="HarmonyPatches\Patch_HediffSet.cs" />
8888
<None Include="HarmonyPatches\Patch_ThingFilter.cs" />
8989
<Compile Include="HarmonyPatches\Patch_VerbProperties.cs" />
@@ -93,7 +93,7 @@
9393
<Compile Include="HarmonyPatches\Patch_QualityUtility.cs" />
9494
<Compile Include="HarmonyPatches\HarmonyPatches.cs" />
9595
<Compile Include="PatchOperationCheckModSetting.cs" />
96-
<Compile Include="PlaySettings\ExtraPlaySettings.cs" />
96+
<None Include="PlaySettings\ExtraPlaySettings.cs" />
9797
<Compile Include="ModCompatibilityCheck.cs" />
9898
<None Include="Reflection\NonPublicFields.cs" />
9999
<Compile Include="Reflection\NonPublicMethods.cs" />

Source/TinyTweaks/TinyTweaksUtility.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
namespace TinyTweaks
1212
{
1313

14+
[StaticConstructorOnStartup]
1415
public static class TinyTweaksUtility
1516
{
1617

@@ -53,6 +54,8 @@ public static IEnumerable<T> Split<T>(this IEnumerable<T> sequence, Predicate<T>
5354
}
5455
}
5556

57+
public static Dictionary<ThingDef, List<RecipeDef>> cachedThingRecipesAlphabetical = new Dictionary<ThingDef, List<RecipeDef>>();
58+
5659
}
5760

5861
}

0 commit comments

Comments
 (0)