mirror of
https://github.com/yairm210/Unciv.git
synced 2025-01-10 23:37:31 +07:00
Added mods to crash report, many crashes are caused by incorrectly defined mods
This commit is contained in:
parent
2facd9e71a
commit
3713923caf
@ -19,6 +19,7 @@ class CrashReportSenderAndroid(private val activity: Activity) : CrashReportSend
|
||||
"Game version: %s\n" +
|
||||
"OS version: %s\n" +
|
||||
"Device model: %s\n" +
|
||||
"Mods: %s\n" +
|
||||
"Game data: %s\n"
|
||||
}
|
||||
|
||||
@ -41,5 +42,5 @@ class CrashReportSenderAndroid(private val activity: Activity) : CrashReportSend
|
||||
}
|
||||
|
||||
private fun buildEmailBody(report: CrashReport): String =
|
||||
EMAIL_BODY.format(report.version, Build.VERSION.SDK_INT, Build.MODEL, report.gameInfo)
|
||||
EMAIL_BODY.format(report.version, Build.VERSION.SDK_INT, Build.MODEL, report.mods.joinToString(), report.gameInfo)
|
||||
}
|
@ -2,5 +2,6 @@ package com.unciv.models
|
||||
|
||||
data class CrashReport(
|
||||
val gameInfo: String,
|
||||
val mods: LinkedHashSet<String>,
|
||||
val version: String
|
||||
)
|
@ -60,7 +60,7 @@ interface CrashController {
|
||||
private fun buildReport(): CrashReport {
|
||||
return UncivGame.Current.run {
|
||||
val zippedGameInfo = Json().toJson(gameInfo).let { Gzip.zip(it) }
|
||||
CrashReport(zippedGameInfo, version)
|
||||
CrashReport(zippedGameInfo, gameInfo.gameParameters.mods, version)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user