Updated the gradefile script to save the criteria that were used to calculate the grade in the grade file as well. Due to a recent update these criteria are needed to calculate the actual grade a player got.
UPDATE: I was being dumb, the resulting grade is obviously already stored in the grade file so when you load it in there is absolutely no need to calculate it again. So now when a grade file is loaded a boolean that indicates whether the grade has already been calculated will be set to true. If it is it will skip the calculation that caused the error in the first place.
The extra bonus with this solution is the fact the absolutely nothing has to be changed about the structure of the grade file so old save files will still work
Also applied the changes to the Scare Cam to the prefabs which is something i forgot to do before
Setting up testing environment
Clear your PlayerPrefs and remove "Assignment" and "FinalExam" files from C:\Users\"YOUR USERNAME HERE"\AppData\LocalLow\Apericot Studio\Manor Madness (if they exist)
In the project window navigate to Project/Assets/Scenes/UI and open the "Level Select" scene.
Press Play.
Feat Review
Level Select Grades
Criteria:
[x] The level grading still works the same
[x] The level grading doesn't break on old save files
[x] The amount of phobias are now also saved in the save file
Checklist
These checks should always be true for your pull request
[x] My pull request is for one story/feature.
[x] Every individual commit in this pull request is logical.
[x] All code, documentation, commits and player seen texts are in English.
[x] I have deleted unused / unnecessary code.
[x] If my edits need a change in documentation, then I have updated the documentation.
[x] All code is in correspondence with the code conventions.
Description
Updated the gradefile script to save the criteria that were used to calculate the grade in the grade file as well. Due to a recent update these criteria are needed to calculate the actual grade a player got.
UPDATE: I was being dumb, the resulting grade is obviously already stored in the grade file so when you load it in there is absolutely no need to calculate it again. So now when a grade file is loaded a boolean that indicates whether the grade has already been calculated will be set to true. If it is it will skip the calculation that caused the error in the first place.
The extra bonus with this solution is the fact the absolutely nothing has to be changed about the structure of the grade file so old save files will still work
Also applied the changes to the Scare Cam to the prefabs which is something i forgot to do before
Setting up testing environment
Feat Review
Level Select Grades
Criteria:
Checklist
These checks should always be true for your pull request