Skip to content

Fix menu loading with robust hook registration#20

Open
SwattyModding wants to merge 1 commit intoyumi-modding:mainfrom
SwattyModding:fix-menu
Open

Fix menu loading with robust hook registration#20
SwattyModding wants to merge 1 commit intoyumi-modding:mainfrom
SwattyModding:fix-menu

Conversation

@SwattyModding
Copy link
Copy Markdown

@SwattyModding SwattyModding commented Mar 26, 2026

TL;DR

The latest version of FS25 made this menu diseappear from the Game Settings tab. This fixes it.

Summary

  • Register the settings menu hook at source time instead of via a deferred init() call, preventing other mods from overwriting onFrameOpen during mission load
  • Add null guards for gameSettingsLayout, economicDifficulty, and checkTraffic GUI elements to prevent crashes
  • Use dynamic element indices (math.min) instead of hardcoded values to avoid out-of-bounds errors
  • Bump version to 1.0.2.0

Test plan

  • Load game with CombineXP and verify settings menu appears correctly
  • Load game with CombineXP alongside other mods that modify settings and verify no conflicts
  • Verify all three settings (Gameplay, Engine power limit, Daytime limit) are functional

🤖 Generated with Claude Code

Register the settings menu hook at source time instead of via a deferred
init() call, preventing other mods from overwriting onFrameOpen during
mission load. Add null checks for GUI elements and use dynamic element
indices to avoid out-of-bounds errors. Bump version to 1.0.2.0.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.

1 participant