performance: Don't calc checksum for non-multiplayer games, no one cares if you hack your own game

This commit is contained in:
Yair Morgenstern
2023-09-05 18:52:42 +03:00
parent a2fa4cebf4
commit 5cc57f9293
2 changed files with 6 additions and 8 deletions

View File

@ -372,7 +372,7 @@ class UncivFiles(
}
/** Returns gzipped serialization of [game], optionally gzipped ([forceZip] overrides [saveZipped]) */
fun gameInfoToString(game: GameInfo, forceZip: Boolean? = null, updateChecksum:Boolean=true): String {
fun gameInfoToString(game: GameInfo, forceZip: Boolean? = null, updateChecksum:Boolean=false): String {
game.version = GameInfo.CURRENT_COMPATIBILITY_VERSION
if (updateChecksum) game.checksum = game.calculateChecksum()