Skip to content

Commit

Permalink
FP contracts should call OnDayPassed
Browse files Browse the repository at this point in the history
  • Loading branch information
ajkroeg committed Aug 12, 2023
1 parent a8018bd commit 60e0f7f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
4 changes: 2 additions & 2 deletions MapRandomizer/MapRandomizer/MapRandomizer.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
<PropertyGroup>
<!-- avoids IgnoresAccessChecksToAttribute warnings -->
<PublicizerRuntimeStrategies>Unsafe</PublicizerRuntimeStrategies>
<AssemblyVersion>1.2.0.2</AssemblyVersion>
<FileVersion>1.2.0.2</FileVersion>
<AssemblyVersion>1.2.0.3</AssemblyVersion>
<FileVersion>1.2.0.3</FileVersion>
</PropertyGroup>
<ItemGroup>
<Compile Remove="source\Logger.cs" />
Expand Down
14 changes: 14 additions & 0 deletions MapRandomizer/MapRandomizer/source/Patches/ContractExpiration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,20 @@ public static void Postfix(SimGameState __instance, int timeLapse)
}
}

[HarmonyPatch(typeof(Flashpoint), "OnDayPassed", new Type[] { })]
public static class Flashpoint_OnDayPassed
{
static bool Prepare() => true;

public static void Postfix(Flashpoint __instance)
{
if (__instance.ActiveContract != null)
{
__instance.ActiveContract.OnDayPassed();
}
}
}

[HarmonyPatch(typeof(Contract), "OnDayPassed", new Type[] { })]
public static class Contract_OnDayPassed
{
Expand Down

0 comments on commit 60e0f7f

Please sign in to comment.