Skip to content

Conversation

@KARPED1EM
Copy link
Member

Add protection mechanism to prevent IoC container from being created multiple times in the same game session. This fixes an issue where other mods' prefix patches that return false and manually call the original method would cause the postfix to be executed twice, leading to duplicate scope creation.

  • Add _isGameScopeActive flag to track if a game scope is currently active
  • Check flag in CreateGameScope() to prevent duplicate creation
  • Reset flag in DisposeCurrentScope() when cleaning up

…ith GameStart patch

Add protection mechanism to prevent IoC container from being created multiple times in the same game session. This fixes an issue where other mods' prefix patches that return false and manually call the original method would cause the postfix to be executed twice, leading to duplicate scope creation.

- Add _isGameScopeActive flag to track if a game scope is currently active
- Check flag in CreateGameScope() to prevent duplicate creation
- Reset flag in DisposeCurrentScope() when cleaning up
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