Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Changes from ~2 days ago: - Began working on structuring the API for achievements. * Changes from ~2 days ago: - Began working on structuring the API for achievements. * - Added socket route - Created sealed class for Agent params - Updated other methods and classes * Changes: - ID of an Achievement is now generated by the API rather than passed via the payload. - The socket route has been reimplemented in SocketRouter.kt rather than AchievementRoutes.kt. - I believe the reimplemented socket route no longer sends a reply to the socket handler (intended), and Redis should be updated properly. * Changes: - Created @SerialNames for AgentParam classes and successfully tested the POST and GET methods. - Changed the achievements variable in Player.kt from a HashSet to a MutableList, because that just felt like the right decision. - Began creating a deleteAchievement route to allow for deleting achievements; this is currently still a WIP. * Changes: - Fixed the deleteAchievement route by changing the "id" field in the Achievement data class to "_id" (mongo-supported variable name) - Changed "params" in Agent data class to a nullable type, since some achievements will not require parameters (example: GlovesOff- kill a player with your fist while wearing no armor) - Changed the AgentParams structure to a 1:1 mapping of AgentParams to an AgentType; this will allow for more descriptive variable names. - Added an AgentParam called CompositeAgentParams. This is intended to combine agents, requiring emissions from multiple Agents in order for the achievement to be marked complete. * Minor Update: - Added a route for getting an individual achievement by id. - Added corresponding AchievementMissingException for when an individual achievement is not found by id. * Latest Version: - Posting my latest code for reference. * More Achievements: - Added a couple of achievements. * Reply to server on player profile update * Menu Refactor - Refactored the achievement menu. * Achievements First Release - This is the first release of the achievements system. Everything functionality-wise has been tested and implemented. - 20+ achievement parents. - ~80+ achievements are being added in this release. * Minor Patch - Removed an unnecessary "test" variable from PlayerStats and other relevant classes. * Another Minor Patch - Fixed a copy-paste issue. * Validation Patch - Fixed missing validations for achievement routes. * Validation Patch (v2) - Fixed missing validations for achievement routes. * Remove comment * PR Fixes: - Changed the API to store the date/time each achievement was reached (as requested) - Combined the routes into one function (as requested) - Refactored the AchievementParent class into AchievementCategory - Changed achievements variable in PlayerStats to be of type MutableMap<String, AchievementStatistic>, where the String key is the id of the achievement, and AchievementStatistic is an object containing additional data such as completionTime. * Fix - Removed redundant data classes. * Fix #3 - Reduced LoC in PlayerContext file - Removed Misc.kt file - Removed unused PlayerLevelUpData class * PR Fix - Changed "achievement" field in PlayerAchievementData to "achievementId" for clarity sake. * PR Fix - Moved "reply" method from PlayerUpdateListener to PlayerContext and renamed it "update". * Optimize Imports - Ran IntelliJ's "optimize imports" function on the entire codebase. --------- Co-authored-by: chatt <[email protected]> Co-authored-by: Daniel <[email protected]>
- Loading branch information