Skip to content

Commit

Permalink
Just making sure the field is set to false by default
Browse files Browse the repository at this point in the history
  • Loading branch information
cheese3660 committed Dec 22, 2023
1 parent 8b2d077 commit 10c1b6c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/SpaceWarp.Core/Patching/PartOwnerComponentConstructor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ public static class PartOwnerComponentConstructor
private static FieldInfo AddedField =
typeof(PartOwnerComponent).GetField("HasRegisteredPartComponentsForFixedUpdate");

[HarmonyPatch(MethodType.Constructor)]
public static void SetFalse(PartOwnerComponent __instance)
{

AddedField.SetValue(__instance, false);
}

[HarmonyPatch(nameof(PartOwnerComponent.Add)), HarmonyPrefix, UsedImplicitly]
public static void CheckForModule(PartOwnerComponent __instance, PartComponent part)
{
Expand Down

0 comments on commit 10c1b6c

Please sign in to comment.