jcwild / ADRIFT-5

ADRIFT: Adventure Development & Runner - Interactive Fiction Toolkit
BSD 3-Clause "New" or "Revised" License
17 stars 9 forks source link

Bug in Time System #4

Open kpeamon opened 4 years ago

kpeamon commented 4 years ago

Lately I have been using the Time System Library which comes with ADRIFT 5. Besides %Minute% and %Hour% it also has a variable called %Day% which I think is intended to keep track of which day it is. You could use this to print the date, e.g. if we are somewhere between day 4 and day 30 in the game, you could output "Date: %Day%th of July".

Unfortunately, it turns out, that the variable %Day% is not correctly updated when time passes midnight. For instance, it may take on negative values. And it is not updated when you sleep.

I have now modified the time system so that the variable %Day% is now correctly updated, both at midnight and when you sleep. Thus you can now use the Improved Time System Library to keep track of the date in the game.

Unfortunately, I don't know how to make Pull Requests, but the improved Time System can be found here: https://github.com/kpeamon/ADRIFT-5