mifriis / edge-of-kuiper

Textbased space rpg somewhat based on real science
Other
7 stars 3 forks source link

A better time system #25

Closed mifriis closed 3 years ago

mifriis commented 3 years ago

The Time Dilation system was pretty cumbersome, so i tried to make it better.

@larsbaunwall this is based on the work we did in your branch, but i ultimately decided to use DateTime to store the results in, and use GameTime as a static class to generate it.

It requires you to instance GameTime on Load or CreateCaptain() which does make testing a bit difficult.

Not ideal, but the tests are executed in sequence to test the exception handling.

With this PR, you should be able to do GameTime().Now() from anywhere to know or use the current gametime.

@kristianholmsejersen i couldn't get Cover Gutters to work, it doesn't find any coverlet files. Perhaps we are missing Coverlet package or Rider generates them but VSCode not? "Could not find a Coverage File!"

mifriis commented 3 years ago

freaky, vscode just merged this?! how is that possible

I enabled branch protection just now, so commits into main anymore