MoritzLoewenstein/RoundRestore

Would like to contact you

Opened this issue · 5 comments

Hi Moritzloewenstien

I would like to chat to you with getting this plugin to work with Warmod as warmod adds an ID before the file name for the match

Warmod changes mp_backup_round_file_pattern to include the matchid for backup,
easiest would be to change this back to default and it will work (mp_backup_round_file_pattern %prefix%_round%round%.txt) but I dont know how this will affect warmod.
Otherwise we need to somehow get the matchid or we just take the newest backup file.

yeah i see this and it prepends the ID to the start of the string, only war i can think of doing it is to recode warmod to not tamper with the backup file, and will just have to let players know a round restore can only happen if they in an active game as obv the next game will overwrite the backup file

I will try to just take the latest backup file for this round and ignore the matchid, will probably be finished by next weekend or so.

Hi Moritzloewenstien

Any Progress, you welcome to suggest how to do it and i can try my best to submit a pullrequest for the fix

Sorry, didnt have the time to do it. The plan is to use OpenDirectory, get all backup files (iterate overDirectoryListing with GetNext & verify type = FileType_File & name with some regex). Then use GetFileTime with mode FileTime_LastChange to get the latest backup. There is probably an easier way to do this, but it should work at least.