Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/Source/.vs
/Source/.vs
/Source/obj
/Source/obj
Binary file added 1.6/Assemblies/0PrepatcherAPI.dll
Binary file not shown.
Binary file added 1.6/Assemblies/1Fishery.dll
Binary file not shown.
Binary file added 1.6/Assemblies/1Fishery.pdb
Binary file not shown.
Binary file added 1.6/Assemblies/BetterLog.dll
Binary file not shown.
Binary file added 1.6/Assemblies/BetterLog.pdb
Binary file not shown.
Binary file added 1.6/Assemblies/FisheryLib.dll
Binary file not shown.
Binary file not shown.
1 change: 1 addition & 0 deletions About/About.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<li>1.3</li>
<li>1.4</li>
<li>1.5</li>
<li>1.6</li>
</supportedVersions>
<author>bradson</author>
<modIconPath IgnoreIfNoMatchingField="True">BetterLog/ModIcon</modIconPath>
Expand Down
1 change: 1 addition & 0 deletions DateStamp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
19 Dec, 2022 @ 10:43am
23 changes: 23 additions & 0 deletions Source/1.6.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutDir>..\1.6\Assemblies\</OutDir>
<Copyright>Copyright (c) 2024 Bradson</Copyright>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>DEBUG;V1_6</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>V1_6</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.6.*" />
<PackageReference Include="Lib.Harmony" Version="2.3.*" ExcludeAssets="runtime" />
<Publicize Include="0Harmony:Mono.Cecil.ModuleDefinition" />
</ItemGroup>
<ItemGroup>
<Reference Include="1Fishery">
<HintPath>D:\Games &amp; Programs\Steam\steamapps\common\RimWorld\Mods\Fishery\1.6\Assemblies\1Fishery.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
18 changes: 18 additions & 0 deletions Source/1.6.csproj.Backup.tmp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="utf-8"?>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutDir>..\1.6\Assemblies\</OutDir>
<Copyright>Copyright (c) 2024 Bradson</Copyright>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DefineConstants>DEBUG;V1_6</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DefineConstants>V1_6</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Krafs.Rimworld.Ref" Version="1.6.*" />
<PackageReference Include="Lib.Harmony" Version="2.3.*" ExcludeAssets="runtime" />
<Publicize Include="0Harmony:Mono.Cecil.ModuleDefinition" />
</ItemGroup>
</Project>
6 changes: 6 additions & 0 deletions Source/BetterLog.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29215.179
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "1.6", "1.6.csproj", "{400DA299-C4F8-4967-8119-8F74BF1C9784}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "1.5", "1.5.csproj", "{300DA299-C4F8-4967-8119-8F74BF1C9784}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "1.4", "1.4.csproj", "{13E3677F-ECFD-473A-A3F0-0734686609AF}"
Expand All @@ -15,6 +17,10 @@ Global
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{400DA299-C4F8-4967-8119-8F74BF1C9784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{400DA299-C4F8-4967-8119-8F74BF1C9784}.Debug|Any CPU.Build.0 = Debug|Any CPU
{400DA299-C4F8-4967-8119-8F74BF1C9784}.Release|Any CPU.ActiveCfg = Release|Any CPU
{400DA299-C4F8-4967-8119-8F74BF1C9784}.Release|Any CPU.Build.0 = Release|Any CPU
{300DA299-C4F8-4967-8119-8F74BF1C9784}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{300DA299-C4F8-4967-8119-8F74BF1C9784}.Debug|Any CPU.Build.0 = Debug|Any CPU
{300DA299-C4F8-4967-8119-8F74BF1C9784}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down
7 changes: 5 additions & 2 deletions Source/Patches.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
#if !V1_3 && !V1_4
#define V1_5_OR_LATER
#endif
#if V1_6
#define V1_6_OR_LATER
#endif

using System.Linq;
using System.Linq.Expressions;
Expand Down Expand Up @@ -253,13 +256,13 @@ public class Log_Notify_MessageReceivedThreadedInternal_Modify_Patch : FishPatch
public override string Name { get; } = "Modify Log Limit";

public override string Description { get; }
= "RimWorld normally stops logging after 1000 messages. This allows changing that number. Use the slider "
= "RimWorld normally stops logging after 10000 messages (1000 in older versions). This allows changing that number. Use the slider "
+ "below to set the new value.";

public override Delegate TargetMethodGroup { get; } = Log.Notify_MessageReceivedThreadedInternal;

public static CodeInstructions Transpiler(CodeInstructions codes)
=> codes.Replace(static code => code.operand is 1000, static code => FishTranspiler
=> codes.Replace(static code => code.operand is 10000, static code => FishTranspiler
.PropertyGetter(typeof(Settings), nameof(Settings.LoggingLimit))
.WithLabelsAndBlocks(code));
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public static List<Color> AllColors
=> _allColors
??= DefDatabase<ColorDef>.AllDefsListForReading.Select(static def => def.color)
.Union(typeof(ColorLibrary).GetFields(AccessTools.allDeclared)
.Select(static field => (Color)field.GetValue(null)))
.Select(static fieldInfo => (Color)fieldInfo.GetValue(null!)))
.Union(new[] { Color.red, Color.yellow, Color.white }).ToList();

public override void ExposeData()
Expand Down