File tree Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Expand file tree Collapse file tree 3 files changed +19
-7
lines changed Original file line number Diff line number Diff line change 1
1
# Place Foundry dependencies here
2
2
3
+ * ` 0Harmony.dll ` (unstripped)
3
4
* ` Main.dll ` (publicized)
4
5
* ` UnityEngine.CoreModule.dll `
Original file line number Diff line number Diff line change 1
- using System . Reflection ;
1
+ using HarmonyLib ;
2
2
3
3
namespace ScienceUnlock
4
4
{
5
- internal static class Main
5
+ [ HarmonyPatch ( typeof ( ItemTemplate ) , nameof ( ItemTemplate . onLoad ) ) ]
6
+ internal static class ItemTemplate_OnLoad
6
7
{
7
- [ OnGameAssemblyLoad ]
8
- public static void OnGameAssemblyLoad ( Assembly assembly )
8
+ static void Postfix ( ItemTemplate __instance , bool isCalledFromEditor )
9
9
{
10
- if ( ! BuildInfo . isDemo )
11
- return ;
10
+ __instance . includeInBuild = true ;
11
+ __instance . includeInDemo = true ;
12
+ }
13
+ }
12
14
13
- BuildInfo . isDemo = false ;
15
+ [ HarmonyPatch ( typeof ( ResearchTemplate ) , nameof ( ResearchTemplate . onLoad ) ) ]
16
+ internal static class ResearchTemplate_OnLoad
17
+ {
18
+ static void Postfix ( ResearchTemplate __instance )
19
+ {
20
+ __instance . includeInBuild = true ;
21
+ __instance . includeInDemo = true ;
14
22
}
15
23
}
16
24
}
Original file line number Diff line number Diff line change 6
6
</PropertyGroup >
7
7
8
8
<ItemGroup >
9
+ <Reference Include =" 0Harmony" >
10
+ <HintPath >../Dependencies/Foundry/0Harmony.dll</HintPath >
11
+ </Reference >
9
12
<Reference Include =" Main" >
10
13
<HintPath >../Dependencies/Foundry/Main.dll</HintPath >
11
14
</Reference >
You can’t perform that action at this time.
0 commit comments