Switchable gzipping of saved games (#6735)

* Switchable gzipping of saved games

* Switchable gzipping of saved games - consensus says default off
This commit is contained in:
SomeTroglodyte
2022-05-11 15:23:11 +02:00
committed by GitHub
parent 1bbf5514cf
commit eb5e8ae226
12 changed files with 98 additions and 57 deletions

View File

@ -581,6 +581,8 @@ Days = Tage
Current saves = Gespeicherte Spiele
Show autosaves = Zeige automatisch gespeicherte Spiele an
Saved game name = Name des gespeicherten Spiels
# This is the save game name the dialog will suggest
[player] - [turns] turns = [player] ([turns] Runden)
Copy to clipboard = In die Zwischenablage kopieren
Copy saved game to clipboard = Gespeichertes Spiel in die Zwischenablage kopieren
Could not load game = Spiel konnte nicht geladen werden

View File

@ -584,6 +584,8 @@ Days =
Current saves =
Show autosaves =
Saved game name =
# This is the save game name the dialog will suggest
[player] - [turns] turns =
Copy to clipboard =
Copy saved game to clipboard =
Could not load game =

View File

@ -6,7 +6,6 @@ import android.net.Uri
import android.os.Build
import androidx.annotation.GuardedBy
import androidx.annotation.RequiresApi
import com.unciv.json.json
import com.unciv.logic.CustomSaveLocationHelper
import com.unciv.logic.GameInfo
import com.unciv.logic.GameSaver
@ -74,7 +73,7 @@ class CustomSaveLocationHelperAndroid(private val activity: Activity) : CustomSa
activity.contentResolver.openOutputStream(uri, "rwt")
?.writer()
?.use {
it.write(json().toJson(gameInfo))
it.write(GameSaver.gameInfoToString(gameInfo))
}
}