Skip to content

Commit e4a8b8c

Browse files
authored
Fix VRE-Android compat for latest mod version (#554)
- Renamed cache class reference: InteractionUtility -> SocialInteractionUtility - Fix Harmony argument injection on CreateSurgeryBill postfix patch
1 parent 6d64040 commit e4a8b8c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Source/Mods/VanillaRacesAndroid.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private static void LatePatch()
203203
MpCompat.harmony.Patch(AccessTools.DeclaredMethod(typeof(GameComponentUtility), nameof(GameComponentUtility.FinalizeInit)),
204204
postfix: new HarmonyMethod(typeof(VanillaRacesAndroid), nameof(ClearCache)));
205205

206-
var field = AccessTools.DeclaredField("VREAndroids.InteractionUtility_CanInitiateRandomInteraction_Patch:cachedResults");
206+
var field = AccessTools.DeclaredField("VREAndroids.SocialInteractionUtility_CanInitiateRandomInteraction_Patch:cachedResults");
207207
canInitiateRandomInteractionCacheField = AccessTools.StaticFieldRefAccess<IDictionary>(field);
208208

209209
field = AccessTools.DeclaredField("MentalBreaker_CanDoRandomMentalBreaks_Patch:cachedResults");
@@ -460,7 +460,7 @@ private static void DefaultDialogSelection(ChoiceLetter letter)
460460
// HealthCardUtility:CreateSurgeryBill is a MP sync method. Because of this, when the method is called the execution
461461
// is cancelled and the result will be null. However, prefixes, postfixes, and finalizers will still run as normal.
462462
// We need to make sure this one doesn't run as it throws an error (even if harmless).
463-
private static bool CancelOperationModificationIfResultNull([HarmonyArgument("__result")] Bill_Medical result) => result != null;
463+
private static bool CancelOperationModificationIfResultNull(Bill_Medical __0) => __0 != null;
464464

465465
private static void ClearCache()
466466
{

0 commit comments

Comments
 (0)