MoaiTracker class
The tracker maintains two counters:Unlike other trackers, Moai tracking only needs spawn and interaction counts since Moai shrines don’t disappear or have completion states.
Tracking Moai spawns
Moai shrines are spawned through theSpawnInteractables.SpawnShrines method:
Implementation notes
Manual method targeting
Manual method targeting
The patch uses
TargetMethod() to dynamically locate SpawnInteractables.SpawnShrines at runtime, providing flexibility for different game versions.Shrine spawn timing
Shrine spawn timing
SpawnShrines is called during level generation, so the counter increments as soon as Moai shrines are placed in the level.Tracking Moai interactions
When a player interacts with a Moai shrine, the interaction counter increments:The patch checks
__result to ensure only successful interactions are counted, filtering out failed attempts or invalid interaction states.Return value validation
Why check __result?
Why check __result?
The
Interact() method returns bool indicating whether the interaction succeeded. By checking !__result, the patch skips false positives from interactions that didn’t actually trigger the Moai shrine effect.Round state verification
Round state verification
Like all tracking patches, this verifies
Plugin.disableTracker and ChargeShrineTracker.IsRoundActive to prevent counting interactions outside of active rounds.Usage example
During a typical level:- Level generates with 2 Moai shrines
total= 2,interacted= 0- Player interacts with first Moai shrine
total= 2,interacted= 1- Player interacts with second Moai shrine
total= 2,interacted= 2
Moai: 2/2