freeCodeCamp / LearnToCodeRPG

A visual novel video game where you learn to code and get a dev job 🎯
https://www.freecodecamp.org/news/learn-to-code-rpg-1-5-update/
BSD 3-Clause "New" or "Revised" License
1.06k stars 110 forks source link

Bug Fix: Resolve an issue with month day 0 #21

Closed a2937 closed 2 years ago

a2937 commented 2 years ago

This fix should prevent any issues with the day of the month being zero or a negative number. This is handy for days such as October 25th.

Checklist:

My original issue #17 may have been prematurely closed. I have reason to suspect that the crash I received exists in this version of the game still. I have added a safety measure in order or prevent the issue from occurring again. If the day is less than or equal to 0; it gets rounded back up to 1. While unlikely the date will be a negative number defense programming is generally a good thing. I have tried to eyeball the spacing and used a regular Python spacing analyzer as I could not get the project to run in Renpy on my local machine because of a 'NonType' issue in the definitions.rpy file.