diff --git a/core/src/com/unciv/models/ruleset/Nation.kt b/core/src/com/unciv/models/ruleset/Nation.kt index 86cc518eee..fdc33b95b6 100644 --- a/core/src/com/unciv/models/ruleset/Nation.kt +++ b/core/src/com/unciv/models/ruleset/Nation.kt @@ -248,7 +248,7 @@ class Nation : RulesetObject() { // This does not use the auto-linking FormattedLine(Unique) for two reasons: // would look a little chaotic as unit uniques unlike most uniques are a HashSet and thus do not preserve order // No .copy() factory on FormattedLine and no FormattedLine(Unique, all other val's) constructor either - if (unit.replacementTextForUniques.isNotEmpty()){ + if (unit.replacementTextForUniques.isNotEmpty()) { yield(FormattedLine(unit.replacementTextForUniques)) } else for (unique in unit.uniqueObjects.filterNot { it.text in originalUnit.uniques || it.hasFlag(UniqueFlag.HiddenToUsers) }) { diff --git a/desktop/src/com/unciv/app/desktop/UncivServer.kt b/desktop/src/com/unciv/app/desktop/UncivServer.kt index 0e17f8dd8a..aeac6f85b3 100644 --- a/desktop/src/com/unciv/app/desktop/UncivServer.kt +++ b/desktop/src/com/unciv/app/desktop/UncivServer.kt @@ -48,10 +48,10 @@ private class UncivServerRunner : CliktCommand() { put("/files/{fileName}") { val fileName = call.parameters["fileName"] ?: throw Exception("No fileName!") withContext(Dispatchers.IO) { - val recievedBytes = - call.request.receiveChannel().toInputStream().readAllBytes() - val textString = String(recievedBytes) - println("Recieved text: $textString") + val receivedBytes = + call.request.receiveChannel().toInputStream().readBytes() + val textString = String(receivedBytes) + println("Received text: $textString") File(fileFolderName, fileName).writeText(textString) } }