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 11# Place Foundry dependencies here
22
3+ * ` 0Harmony.dll ` (unstripped)
34* ` Main.dll ` (publicized)
45* ` UnityEngine.CoreModule.dll `
Original file line number Diff line number Diff line change 1- using System . Reflection ;
1+ using HarmonyLib ;
22
33namespace ScienceUnlock
44{
5- internal static class Main
5+ [ HarmonyPatch ( typeof ( ItemTemplate ) , nameof ( ItemTemplate . onLoad ) ) ]
6+ internal static class ItemTemplate_OnLoad
67 {
7- [ OnGameAssemblyLoad ]
8- public static void OnGameAssemblyLoad ( Assembly assembly )
8+ static void Postfix ( ItemTemplate __instance , bool isCalledFromEditor )
99 {
10- if ( ! BuildInfo . isDemo )
11- return ;
10+ __instance . includeInBuild = true ;
11+ __instance . includeInDemo = true ;
12+ }
13+ }
1214
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 ;
1422 }
1523 }
1624}
Original file line number Diff line number Diff line change 66 </PropertyGroup >
77
88 <ItemGroup >
9+ <Reference Include =" 0Harmony" >
10+ <HintPath >../Dependencies/Foundry/0Harmony.dll</HintPath >
11+ </Reference >
912 <Reference Include =" Main" >
1013 <HintPath >../Dependencies/Foundry/Main.dll</HintPath >
1114 </Reference >
You can’t perform that action at this time.
0 commit comments