Skip to content

Commit bf36371

Browse files
committed
Unlock everything by changing dfemo mode
1 parent d452fc8 commit bf36371

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed

Dependencies/Foundry/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Place Foundry dependencies here
22

3-
* `0Harmony.dll` (unstripped)
43
* `Main.dll` (publicized)
54
* `UnityEngine.CoreModule.dll`

ScienceUnlock/Main.cs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
using HarmonyLib;
1+
using System.Reflection;
22

33
namespace ScienceUnlock
44
{
5-
[HarmonyPatch(typeof(ResearchTemplate), nameof(ResearchTemplate.onLoad))]
6-
internal class ResearchTemplate_onLoad
5+
internal static class Main
76
{
8-
static void Postfix(ResearchTemplate __instance)
7+
[OnGameAssemblyLoad]
8+
public static void OnGameAssemblyLoad(Assembly assembly)
99
{
10-
__instance.includeInDemo = true;
10+
if (!BuildInfo.isDemo)
11+
return;
12+
13+
BuildInfo.isDemo = false;
1114
}
1215
}
1316
}

ScienceUnlock/ScienceUnlock.csproj

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<Reference Include="0Harmony">
10-
<HintPath>../Dependencies/Foundry/0Harmony.dll</HintPath>
11-
</Reference>
129
<Reference Include="Main">
1310
<HintPath>../Dependencies/Foundry/Main.dll</HintPath>
1411
</Reference>

0 commit comments

Comments
 (0)