Skip to content

Commit bed4e03

Browse files
committed
Revert "cleanup"
This reverts commit 50815c1.
1 parent 70bb3e5 commit bed4e03

File tree

4 files changed

+94
-9
lines changed

4 files changed

+94
-9
lines changed

Mod.cs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using HarmonyLib;
2+
using System;
3+
using System.Collections;
4+
using UnityEngine;
5+
6+
namespace ExampleModNS
7+
{
8+
public class ExampleMod : Mod
9+
{
10+
public override void Ready()
11+
{
12+
Logger.Log("Ready!");
13+
}
14+
}
15+
}

Mod.csproj

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
3+
<PropertyGroup>
4+
<AssemblyName>ExampleMod</AssemblyName>
5+
<TargetFramework>netstandard2.1</TargetFramework>
6+
<ImplicitUsings>enable</ImplicitUsings>
7+
<Nullable>enable</Nullable>
8+
<LangVersion>latest</LangVersion>
9+
</PropertyGroup>
10+
11+
<ItemGroup>
12+
<Reference Include="0Harmony">
13+
<HintPath>$(stacklands)/Stacklands_Data/Managed/0Harmony.dll</HintPath>
14+
<Private>False</Private>
15+
</Reference>
16+
<Reference Include="GameScripts">
17+
<HintPath>$(stacklands)/Stacklands_Data/Managed/GameScripts.dll</HintPath>
18+
<Private>False</Private>
19+
</Reference>
20+
<Reference Include="Mono.Cecil">
21+
<HintPath>$(stacklands)/Stacklands_Data/Managed/Mono.Cecil.dll</HintPath>
22+
<Private>False</Private>
23+
</Reference>
24+
<Reference Include="MonoMod.RuntimeDetour">
25+
<HintPath>$(stacklands)/Stacklands_Data/Managed/MonoMod.RuntimeDetour.dll</HintPath>
26+
<Private>False</Private>
27+
</Reference>
28+
<Reference Include="MonoMod.Utils">
29+
<HintPath>$(stacklands)/Stacklands_Data/Managed/MonoMod.Utils.dll</HintPath>
30+
<Private>False</Private>
31+
</Reference>
32+
<Reference Include="Newtonsoft.Json">
33+
<HintPath>$(stacklands)/Stacklands_Data/Managed/Newtonsoft.Json.dll</HintPath>
34+
<Private>False</Private>
35+
</Reference>
36+
<Reference Include="ShapesRuntime">
37+
<HintPath>$(stacklands)/Stacklands_Data/Managed/ShapesRuntime.dll</HintPath>
38+
<Private>False</Private>
39+
</Reference>
40+
<Reference Include="SokLoc">
41+
<HintPath>$(stacklands)/Stacklands_Data/Managed/SokLoc.dll</HintPath>
42+
<Private>False</Private>
43+
</Reference>
44+
<Reference Include="SokSheet">
45+
<HintPath>$(stacklands)/Stacklands_Data/Managed/SokSheet.dll</HintPath>
46+
<Private>False</Private>
47+
</Reference>
48+
<Reference Include="Unity.InputSystem">
49+
<HintPath>$(stacklands)/Stacklands_Data/Managed/Unity.InputSystem.dll</HintPath>
50+
<Private>False</Private>
51+
</Reference>
52+
<Reference Include="Unity.TextMeshPro">
53+
<HintPath>$(stacklands)/Stacklands_Data/Managed/Unity.TextMeshPro.dll</HintPath>
54+
<Private>False</Private>
55+
</Reference>
56+
<Reference Include="UnityEngine.AudioModule">
57+
<HintPath>$(stacklands)/Stacklands_Data/Managed/UnityEngine.AudioModule.dll</HintPath>
58+
<Private>False</Private>
59+
</Reference>
60+
<Reference Include="UnityEngine.CoreModule">
61+
<HintPath>$(stacklands)/Stacklands_Data/Managed/UnityEngine.CoreModule.dll</HintPath>
62+
<Private>False</Private>
63+
</Reference>
64+
<Reference Include="UnityEngine">
65+
<HintPath>$(stacklands)/Stacklands_Data/Managed/UnityEngine.dll</HintPath>
66+
<Private>False</Private>
67+
</Reference>
68+
<Reference Include="UnityEngine.UI">
69+
<HintPath>$(stacklands)/Stacklands_Data/Managed/UnityEngine.UI.dll</HintPath>
70+
<Private>False</Private>
71+
</Reference>
72+
</ItemGroup>
73+
</Project>

Mod.csproj.user

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<Project>
2+
<PropertyGroup>
3+
<stacklands>C:/Program Files (x86)/Steam/steamapps/common/Stacklands</stacklands>
4+
</PropertyGroup>
5+
</Project>

PortalFrequencyPatch.cs

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,8 @@ void ApplyFrequencies()
2323
FrequencyStates.ALWAYS => 1f,
2424
_ => 0.1f
2525
};
26-
SpecialEvents_Patch.MoonIs19 = configCart.Value == FrequencyStates.NEVER ? -1 : 19;
2726

28-
Log($"Portal Divisor {SpecialEvents_Patch.PortalDivisor}, Rare Divisor {SpecialEvents_Patch.RarePortalDivisor},"
29-
+ $"Pirate Divisor {SpecialEvents_Patch.PirateDivisor}, Travelling Cart {SpecialEvents_Patch.FrequencyOfTravellingCart:0.00}, MoonIs19 {SpecialEvents_Patch.MoonIs19}");
27+
Log($"Portal Divisor {SpecialEvents_Patch.PortalDivisor}, Rare Divisor {SpecialEvents_Patch.RarePortalDivisor}, Pirate Divisor {SpecialEvents_Patch.PirateDivisor}, Travelling Cart {SpecialEvents_Patch.FrequencyOfTravellingCart:0.00}");
3028
}
3129
}
3230

@@ -40,7 +38,6 @@ public class SpecialEvents_Patch
4038
public static int PirateDivisor = 4;
4139
public static int SadEventMinMonth = 4;
4240
public static int SadEventDivisor = 4;
43-
public static int MoonIs19 = 19;
4441

4542
private static Type innerClass;
4643
public static MethodBase TargetMethod()
@@ -74,11 +71,6 @@ static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> inst
7471
)
7572
.ThrowIfNotMatch("Can't find portal divisor")
7673
.Set(OpCodes.Ldsfld, AccessTools.Field(myClass, "FrequencyOfTravellingCart"))
77-
.MatchStartForward(
78-
new CodeMatch(OpCodes.Ldc_I4, 19)
79-
)
80-
.ThrowIfNotMatch("Can't find travelling cart month = 19")
81-
.Set(OpCodes.Ldsfld, AccessTools.Field(myClass, "MoonIs19"))
8274
.MatchStartForward(
8375
new CodeMatch(OpCodes.Ldc_I4_7)
8476
)

0 commit comments

Comments
 (0)