ekolis / AutoPBW

AutoPBW is a desktop client for PBW used to upload and download game files for Space Empires and other turn-based strategy games supported by the website.
http://edkolis.com/autopbw
4 stars 2 forks source link

Implemented a file watcher that will automatically upload player turn… #15

Closed TheThief closed 4 years ago

TheThief commented 4 years ago

… files when a turn is taken.

TheThief commented 4 years ago

This looks really cool! I wanted to do something like this but I wasn't sure how to detect that a new turn file was actually created (as opposed to just loading up the turn and then quitting, which would lead to uploading the previous turn file). Am I correct in reading that you were able to solve this issue?

Yes, it uses a filesystem watcher to look for actual changes to .plr files. It won't try to upload anything until a plr file is changed.

As you mentioned in your review though, it will try and upload old plr files for games other than the one that had a changed file currently, so I'll fix that. I was only testing with a single game so any plr file changes meant it needed to upload.

TheThief commented 4 years ago

I have added a check against the turn start time