Bug - Fixed Preference _glitchMonsterFights getting changed to boolean somehow

Tokoeka

Member
Running r26255. Noticed today whilst running Garbo. Garbo got into a Maximise loop whilst trying to prep to fight the Glitch Monster. Telling garbo not to fight it stopped said loop. We assumed it was a garbo issue, but on looking deeper think it might be a mafia issue as r26255 has added %monster% to the Daily Deeds panel. On further investigation, we discovered `_glitchMonsterFights` had been set to false, despite default being 0, and it getting set to 1 on fighting the monster.

Checking my Session Log, the following were the only logged changes to the preference over my entire aftercore, CS loop and casual loop, which means it is getting changed from 1 to false somewhere that isnt logged:
Code:
_glitchMonsterFights changed from 1 to 0
_glitchMonsterFights changed from 0 to 1
_glitchMonsterFights changed from false to 0
_glitchMonsterFights changed from 0 to 1
_glitchMonsterFights changed from false to 0
_glitchMonsterFights changed from 0 to 1


Phredd had a look at the mafia code and thinks it might have something to do with the following section of DailyDeedsPanel.java:
Code:
&& !Preferences.getBoolean("_glitchMonsterFights");
 

Attachments

  • glitch prefs.png
    glitch prefs.png
    17.4 KB · Views: 2
Thanks for the detailed report.

It seems, as you expected, that the getX methods set the value of the preference if it appears to be the wrong type. I think it might have originally been intended for string parsing, but the code dates back to 2008 so I can't be sure.
 
Back
Top