Skip to content

Commit

Permalink
Supports RimWorld 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pardeike committed Feb 23, 2020
1 parent 00fc1ac commit f322c0b
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 103 deletions.
2 changes: 1 addition & 1 deletion About/Manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Manifest>
<identifier>net.pardeike.rimworld.mod.cameraplus</identifier>
<version>2.0.1.1</version>
<version>2.0.1.3</version>
<targetVersions>
<li>1.0.0</li>
<li>1.1.0</li>
Expand Down
2 changes: 1 addition & 1 deletion About/ModSync.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<ModSyncNinjaData>
<ID>d47b5c8c-3f08-4ab6-8d0a-bc67e509d15c</ID>
<ModName>Camera+</ModName>
<Version>2.0.1.1</Version>
<Version>2.0.1.3</Version>
<SaveBreaking>False</SaveBreaking>
<Host name="Github">
<Owner>pardeike</Owner>
Expand Down
7 changes: 3 additions & 4 deletions Source/CameraPlus.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,15 @@
<Compile Include="GlobalSuppressions.cs" />
<Compile Include="ModCounter.cs" />
<Compile Include="Main.cs" />
<None Include="MultiVersionModFix.cs" />
<Compile Include="ProminentColor.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Refs.cs" />
<Compile Include="Settings.cs" />
<Compile Include="Tools.cs" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Reference Include="0Harmony, Version=2.0.0.3, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.0.0.3\lib\net472\0Harmony.dll</HintPath>
<Reference Include="0Harmony, Version=2.0.0.5, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Lib.Harmony.2.0.0.5\lib\net472\0Harmony.dll</HintPath>
</Reference>
<Reference Include="Assembly-CSharp">
<HintPath>..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin64_Data\Managed\Assembly-CSharp.dll</HintPath>
Expand Down Expand Up @@ -90,6 +88,7 @@
</ItemGroup>
<ItemGroup>
<None Include="Install.bat" />
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
Expand Down
8 changes: 4 additions & 4 deletions Source/CrossPromotion.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ static CrossPromotion()
var instance = new Harmony(_crosspromotion);

_ = instance.Patch(
SymbolExtensions.GetMethodInfo(() => MainMenuDrawer.Init()),
postfix: new HarmonyMethod(SymbolExtensions.GetMethodInfo(() => MainMenuDrawer_Init_Postfix()))
SymbolExtensions.GetMethodInfo(() => ModLister.RebuildModList()),
postfix: new HarmonyMethod(SymbolExtensions.GetMethodInfo(() => ModLister_RebuildModList_Postfix()))
);

_ = instance.Patch(
Expand All @@ -54,7 +54,7 @@ static CrossPromotion()
);
}

static void MainMenuDrawer_Init_Postfix()
static void ModLister_RebuildModList_Postfix()
{
_ = ModPreviewPath(0);
new Thread(() => { FetchPromotionMods(); }).Start();
Expand Down Expand Up @@ -167,7 +167,7 @@ static void AsyncDownloadQuery(UGCHandle_t content, string path, Action<RemoteSt
resultHandle.Set(call, null);
}

internal static void FetchPromotionMods()
public static void FetchPromotionMods()
{
if (SteamManager.Initialized == false)
return;
Expand Down
81 changes: 0 additions & 81 deletions Source/MultiVersionModFix.cs

This file was deleted.

4 changes: 2 additions & 2 deletions Source/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.1.1")]
[assembly: AssemblyFileVersion("2.0.1.1")]
[assembly: AssemblyVersion("2.0.1.3")]
[assembly: AssemblyFileVersion("2.0.1.3")]
16 changes: 8 additions & 8 deletions Source/Settings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public class CameraPlusSettings : ModSettings

public KeyCode[] cameraSettingsMod = new[] { KeyCode.LeftShift, KeyCode.None };
public KeyCode cameraSettingsKey = KeyCode.Tab;
public KeyCode[] cameraSettingsSave = new [] { KeyCode.LeftAlt, KeyCode.None };
public KeyCode[] cameraSettingsSave = new[] { KeyCode.LeftAlt, KeyCode.None };
public KeyCode[] cameraSettingsLoad = new[] { KeyCode.LeftShift, KeyCode.None };

public static float minRootResult = 2;
Expand Down Expand Up @@ -108,7 +108,7 @@ public void DoWindowContents(Rect inRect)

list.Gap(16f);

list.Label("Zoom".Translate());
_ = list.Label("Zoom".Translate());

previous = zoomedInPercent;
list.Slider(ref zoomedInPercent, 0.1f, 20f, () => "Near".Translate() + ": " + Math.Round(zoomedInPercent, 1) + "%");
Expand All @@ -121,7 +121,7 @@ public void DoWindowContents(Rect inRect)
}

previous = zoomedOutPercent;
list.Slider(ref zoomedOutPercent, 50f, 100f, () => "Far".Translate() + ": " + Math.Round(zoomedOutPercent, 1) + "%");
list.Slider(ref zoomedOutPercent, 25f, 100f, () => "Far".Translate() + ": " + Math.Round(zoomedOutPercent, 1) + "%");
maxRootResult = zoomedOutPercent * 2;
if (previous != zoomedOutPercent && map != null)
{
Expand All @@ -132,14 +132,14 @@ public void DoWindowContents(Rect inRect)

list.Gap(12f);

list.Label("Exponentiality".Translate());
_ = list.Label("Exponentiality".Translate());
if (list.RadioButton("Off", exponentiality == 0, 8f)) exponentiality = 0;
for (var i = 1; i <= 3; i++)
if (list.RadioButton(i + "x", exponentiality == i, 8f)) exponentiality = i;

list.Gap(16f);

list.Label("SoundNearness".Translate() + ": " + Math.Round(soundNearness * 100, 1) + "%");
_ = list.Label("SoundNearness".Translate() + ": " + Math.Round(soundNearness * 100, 1) + "%");
list.Slider(ref soundNearness, 0f, 1f, null);

list.Gap(6f);
Expand All @@ -148,7 +148,7 @@ public void DoWindowContents(Rect inRect)

list.Gap(24f);

list.Label("HotKeys".Translate());
_ = list.Label("HotKeys".Translate());
list.Gap(6f);

rect = list.GetRect(28f);
Expand Down Expand Up @@ -200,13 +200,13 @@ public void DoWindowContents(Rect inRect)
list.NewColumn();
list.Gap(16f);

list.Label("DollyPercentLabel".Translate());
_ = list.Label("DollyPercentLabel".Translate());
list.Slider(ref zoomedInDollyPercent, 0f, 4f, () => "Near".Translate() + ": " + Math.Round(zoomedInDollyPercent * 100, 1) + "%");
list.Slider(ref zoomedOutDollyPercent, 0f, 4f, () => "Far".Translate() + ": " + Math.Round(zoomedOutDollyPercent * 100, 1) + " % ");

list.Gap(12f);

list.Label("DollyFrictionLabel".Translate());
_ = list.Label("DollyFrictionLabel".Translate());
list.Slider(ref zoomedInDollyFrictionPercent, 0f, 1f, () => "Near".Translate() + ": " + Math.Round(zoomedInDollyFrictionPercent * 100, 1) + "%");
list.Slider(ref zoomedOutDollyFrictionPercent, 0f, 1f, () => "Far".Translate() + ": " + Math.Round(zoomedOutDollyFrictionPercent * 100, 1) + "%");
list.Gap(-2);
Expand Down
2 changes: 1 addition & 1 deletion Source/packages.config
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Lib.Harmony" version="2.0.0.3" targetFramework="net472" />
<package id="Lib.Harmony" version="2.0.0.5" targetFramework="net472" />
</packages>
Binary file modified v1.1/Assemblies/0Harmony.dll
Binary file not shown.
2 changes: 1 addition & 1 deletion v1.1/Assemblies/0Harmony.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified v1.1/Assemblies/CameraPlus.dll
Binary file not shown.

0 comments on commit f322c0b

Please # to comment.