mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-23 03:23:17 -04:00
Warn of rendering performance problems for split atlases
This commit is contained in:
parent
f0bd3cbb4e
commit
a11c3c4216
@ -129,6 +129,7 @@ class RulesetValidator(val ruleset: Ruleset) {
|
|||||||
checkMisspelledFolders(folder, lines)
|
checkMisspelledFolders(folder, lines)
|
||||||
checkImagesFolders(folder, lines)
|
checkImagesFolders(folder, lines)
|
||||||
checkUnknownJsonFilenames(folder, lines)
|
checkUnknownJsonFilenames(folder, lines)
|
||||||
|
warnSplitAtlasesPerformanceDegradation(folder, lines)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun checkMisspelledFolders(
|
private fun checkMisspelledFolders(
|
||||||
@ -205,6 +206,19 @@ class RulesetValidator(val ruleset: Ruleset) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun warnSplitAtlasesPerformanceDegradation(
|
||||||
|
folder: FileHandle,
|
||||||
|
lines: RulesetErrorList
|
||||||
|
) {
|
||||||
|
if (folder.child("game2.png").exists()){
|
||||||
|
lines.add(
|
||||||
|
"Your images are being generated into multiple atlas files - this can cause lag for players. " +
|
||||||
|
"Please consult https://yairm210.github.io/Unciv/Modders/Images-and-Audio/#rendering-performance on how to improve rendering performance.",
|
||||||
|
RulesetErrorSeverity.WarningOptionsOnly, sourceObject = null
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun addModOptionsErrors(lines: RulesetErrorList, tryFixUnknownUniques: Boolean) {
|
private fun addModOptionsErrors(lines: RulesetErrorList, tryFixUnknownUniques: Boolean) {
|
||||||
// Basic Unique validation (type, target, parameters) should always run.
|
// Basic Unique validation (type, target, parameters) should always run.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user