Skip to content

Release Candidate 2

Compare
Choose a tag to compare
@gabs-simon gabs-simon released this 02 Mar 03:35
· 28 commits to master since this release

Changelog

Locked achievements

  • Two settings for implementing locked achievements: synced or unsynced.
    • Synced achievements automatically updates all Achievements in the Achiever list, adding a record on achievement_progress with 0 points for all Achievements the user still didn't progressed into.
      • This method overrides the previous behavior on the achievements() relationship, which previously only returned data for Achievements where the Achiever actually unlocked or made progress to.
      • This is the default method for new installations.
    • Unsynced achievements keep the previous behavior of the achievements() relationship and returns locked achievements via a DB query.
      • This method makes the achievements() relationship not return locked achievement data.

Event handler

  • Achievements now trigger events when an Achiever unlocks or progresses in it. These events can be listened to provide "Achievement Unlocked" notifications.
  • Previous handlers whenUnlocked and whenProgressed on the Achievement classes are now documented and can also be added in order to trigger events specific to these Achievements.

Documentation

  • Updated documentation with the newest additions.
  • Added a docs folder for further documentation on GitHub Pages.

Extras

  • addProgressToAchiever() now has a default value of 1 point. Previous behavior is unaltered.
  • Source is now PSR-4 compatible for better readability.