fix(core): Fixes flow for saves, adds logging and configurations (#513)

- [X] Adds better diagnostics for world saves.
- [X] Adds world save stats.
- [X] World now saves to a temporary folder.
- [X] Backups are now stored by timestamp.
- [X] Backup is now made after the world save.
- [X] "Saves" folder is now configurable.
- [X] Temporary folder is now configurable.
- [X] Backups folder is now configurable.
This commit is contained in:
Kamron Batman 2021-02-20 19:32:08 -08:00 committed by GitHub
parent 6f5312cb89
commit da01f5b8a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
19 changed files with 325 additions and 210 deletions

View file

@ -1432,5 +1432,13 @@ namespace Server
result = a - div * b;
return div;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static string GetTimeStamp()
{
var now = DateTime.UtcNow;
return $"{now.Year}-{now.Month}-{now.Day} {now.Hour}-{now.Minute:D2}-{now.Second:D2}";
}
}
}