Skip to content

Bug fixes

Choose a tag to compare

@TheCodingDad-TisonK TheCodingDad-TisonK released this 27 Feb 08:52
· 47 commits to main since this release
b1ac0f4

BUGS FIXED

  1. HUD toggle desync — SettingsGUI.lua:consoleCommandToggleHUD
    The persistent flag (settings.showHUD) and the runtime I-key flag (incomeHUD.visible) are both checked before drawing. The console command only set the persistent flag, leaving the runtime flag
    untouched. If a player pressed I to hide the HUD, then called IncomeToggleHUD true, nothing would visually change. Now both flags are synced together when the console command fires.

  2. Missing showHUD in settings dump — SettingsGUI.lua:consoleCommandShowSettings
    IncomeShowSettings printed all 9 settings except showHUD. Added it. Console troubleshooting dumps are now complete.

CODE NOT HOOKED UP

  1. IncomeReportDialog:onOpen — IncomeReportDialog.lua
    The XML declares onOpen="onOpen" which FS25 fires on every open. The class had no override, so the base ScreenElement.onOpen ran silently. Added an explicit override that calls updateDisplay() — now
    the dialog refreshes its data on every open, not just through the show() path.

DANGLING REFERENCE

  1. IncomeManager:delete() — IncomeManager.lua
    The action event IDs were properly nilled, the HUD was properly deleted, but incomeReportDialog was left holding a live reference after shutdown. Added self.incomeReportDialog = nil alongside the
    other cleanup.

POLISH

  1. Double blank lines — UIHelper.lua
    Stray double blank lines left after opt.onClickCallback = "handleChange" in both createBinaryOption and createMultiOption. Removed.

  2. Ring buffer clarification — IncomeReportDialog.lua:updateStats
    Added a doc comment noting that totalEarnedText and avgPaymentText reflect only the last 10 payments from the ring buffer, not all-time earnings.