mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-28 22:37:02 -04: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" +
|
"Game version: %s\n" +
|
||||||
"OS version: %s\n" +
|
"OS version: %s\n" +
|
||||||
"Device model: %s\n" +
|
"Device model: %s\n" +
|
||||||
|
"Mods: %s\n" +
|
||||||
"Game data: %s\n"
|
"Game data: %s\n"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,5 +42,5 @@ class CrashReportSenderAndroid(private val activity: Activity) : CrashReportSend
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun buildEmailBody(report: CrashReport): String =
|
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(
|
data class CrashReport(
|
||||||
val gameInfo: String,
|
val gameInfo: String,
|
||||||
|
val mods: LinkedHashSet<String>,
|
||||||
val version: String
|
val version: String
|
||||||
)
|
)
|
@ -60,7 +60,7 @@ interface CrashController {
|
|||||||
private fun buildReport(): CrashReport {
|
private fun buildReport(): CrashReport {
|
||||||
return UncivGame.Current.run {
|
return UncivGame.Current.run {
|
||||||
val zippedGameInfo = Json().toJson(gameInfo).let { Gzip.zip(it) }
|
val zippedGameInfo = Json().toJson(gameInfo).let { Gzip.zip(it) }
|
||||||
CrashReport(zippedGameInfo, version)
|
CrashReport(zippedGameInfo, gameInfo.gameParameters.mods, version)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user