Skip to content

Fix locale injection race condition#5

Merged
hazre merged 5 commits intomasterfrom
fix/locale-injection-race-condition
Feb 7, 2026
Merged

Fix locale injection race condition#5
hazre merged 5 commits intomasterfrom
fix/locale-injection-race-condition

Conversation

@hazre
Copy link
Member

@hazre hazre commented Jan 21, 2026

Hooks into FrooxEngine.LocaleResource.LoadTargetVariant to inject mod locales immediately after Resonite loads base locales, fixing race conditions between mod loaders. Also skips RML refresh triggers.

hazre added 3 commits January 20, 2026 22:30
Upgrade from .NET 9 to .NET 10 and update package references including
Microsoft.SourceLink.GitHub to 10.0.102 and BepInExResoniteShim to 0.9.x.
Switch to BepInEx.AutoPlugin 2.1.0 for automatic plugin metadata generation.
Make Plugin class partial and use [BepInAutoPlugin] attribute instead of
manually specifying [ResonitePlugin] with PluginMetadata constants.
Hook directly into FrooxEngine.LocaleResource.LoadTargetVariant to inject
mod locales immediately after Resonite loads base locale files. This
eliminates race conditions between multiple mod loaders.
@hazre hazre requested a review from NepuShiro January 21, 2026 01:16
hazre added 2 commits January 25, 2026 13:45
- Fixed fallback bug where all locale files were injected instead of
  filtering by target locale first
- Added deduplication to prevent wasteful reinjection from duplicate
  LoadTargetVariant calls
- Fixed race condition causing incorrect message counts
- Refactored injection logic into focused helper methods
Copy link
Contributor

@NepuShiro NepuShiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@hazre hazre merged commit a1f65d1 into master Feb 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants