Skip to content

Commit

Permalink
Fix crash in CheckTipsAchievements() due to null Achievements.achieve…
Browse files Browse the repository at this point in the history
…ments

- This fixes the longstanding Ch.8 bug "Extras menu locking itself after completion" bug
- See 07th-mod/matsuribayashi#26 for more details
- This fix can be applied to other applicable chapters as well (probably ch.7 onwards) in case it causes same problem there too
  • Loading branch information
drojf committed Jan 11, 2025
1 parent 0e608a1 commit 3d4a531
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion Assets.Scripts.Core.SteamWorks/Achievements.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,24 @@ namespace Assets.Scripts.Core.SteamWorks
{
public static class Achievements
{
public static Achievement_t[] achievements;
private static Achievement_t[] _achievements;

public static Achievement_t[] achievements
{
get
{
if(_achievements == null)
{
Load();
}

return _achievements;
}
set
{
_achievements = value;
}
}

public static void Load()
{
Expand Down

0 comments on commit 3d4a531

Please sign in to comment.