From e41ba0da914c9b6c6119225fa9faeb7fdd7cdde4 Mon Sep 17 00:00:00 2001 From: SomeTroglodyte <63000004+SomeTroglodyte@users.noreply.github.com> Date: Thu, 22 Jul 2021 23:10:47 +0200 Subject: [PATCH] A Civilopedia category for Religion (#4609) * A Civilopedia category for Religion * Civilopedia for Religion - rename cat, template and EOF linting * Civilopedia for Religion - oversight --- android/Images/ReligionIcons/Follower.png | Bin 0 -> 2889 bytes android/Images/ReligionIcons/Religion.png | Bin 0 -> 3917 bytes .../jsons/translations/template.properties | 1 + .../logic/civilization/ReligionManager.kt | 5 ++- core/src/com/unciv/models/Religion.kt | 12 +++--- core/src/com/unciv/models/ruleset/Belief.kt | 26 +++++++++++- .../ui/civilopedia/CivilopediaCategories.kt | 8 ++++ .../unciv/ui/civilopedia/CivilopediaScreen.kt | 40 ++++++++++++++++-- .../unciv/ui/civilopedia/CivilopediaText.kt | 1 + .../FoundReligionPickerScreen.kt | 11 ++--- docs/Credits.md | 2 + 11 files changed, 89 insertions(+), 17 deletions(-) create mode 100644 android/Images/ReligionIcons/Follower.png create mode 100644 android/Images/ReligionIcons/Religion.png diff --git a/android/Images/ReligionIcons/Follower.png b/android/Images/ReligionIcons/Follower.png new file mode 100644 index 0000000000000000000000000000000000000000..77d3380a1d37b870440efd2449c3e0e148e10a9a GIT binary patch literal 2889 zcmZuzc{J3I7M~eQp%F^`vW#s;l6_B1*38$4Ool8&F-DfiI=0D-=#?yE>`A4jWRFqS z$&_D~A44V)rI{>0Z|v1XD4yP5@0{N|_uPBW`JDU5J$L=wJnQTL6_*nSfk03IWrx}I z_}{u$bk|;)DsbC%qW)+HJJ8N=xzDV~1A)Z10Xu8A_=%-E2~;1fYBl!#cVmJApyO?}-$e(=OvyLtq&52a%N`4z@L*cAb>xq0Zm|5H6pxAIgi8)+-6 z)Qd+|N&wV(gFH`~z-e8ObT37~uY6qg$nb3$KWz&;`IpQAD$LtekLjDBqL~u@K^pZ3KRrj<A+x@zo9aTf#5?xipVUxq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}BY1+YD{}*18 z`7y;MOUUawkvVkZyQA>{=kMKxC6NN}JSjNtVL)8|h~bxr59AqfPoDLSvl-2aQOR!> zh*oamNZ;T6;>vxwJDR`lm-QOu*!YU*Qq}5`++V1TXN*s^meTFYy;}WWXEbmtUIf2Y zf1n}9s8_4OwHI!DoBQT#g+(F{=tZUNFBbVf)bTg;PwMy^`d@~*IPybDQe7+=RL*bN Q<;Ebu-r26s=0fU!0I4ll^Z)<= literal 0 HcmV?d00001 diff --git a/android/Images/ReligionIcons/Religion.png b/android/Images/ReligionIcons/Religion.png new file mode 100644 index 0000000000000000000000000000000000000000..7cde1f5791ae6cfa693ed2e50c4c15d002e12583 GIT binary patch literal 3917 zcmV-T53=xyP)ues`QWw&S>N(j;xNtuZZI8z`ZhvPMG; zi50|)rj=?!h)D1U5G17WS2ghul@LWBgpi6@1Y-m?1e&(B+hAc^Gv1<wpGDURWg}O9@qzL2g<dI=>~oc*i-Y> zb>L6!oqofB^2-d+2J{6vIKZ%h@`#B1HgGU$+G`3??-?aMWn4bk?3kW+`DxMaN z(!4gw80b4Qnan02L1GOv>eCK@w}JmK3VX)rX9b?XyQ(@^qXqZ;1fXc2wU&HDRo}l! zSpiZk77-Cq)kDB8Ut_)wOsVQ~W(R_#1Y7}z0^I#7un+)9hlq@ch;#b%=}katrLC>a zYoMPp7q*tJz6rF8$a4X`{~o5mw1^BF9leLLOoRM@WGrCJkByCO0utcrjsX6ac^CMB zY0dlUT;eV;Yqm#1Y)r*IYh@H@&*$@-fV`(Q@7~3NJU=C!0VY*-%p&$MnKDmmD9l6! zXb3>BY33#%_sG9gqPMrVVD4;3?N_RL8bCyT+=9L^xow)UH6#Yfh5*v-yXPh#Mi+e+ zf7Eu>SrK{D8tnriROHDuvoGCs0I3F0R-4aeZ31F+F$z5F`)a~si(yt~aQ$xW6$=Qv zR;eMm+PGzQc9yxhxd#`J<>h5Ba(mozR<&{gn6{|8ug+zvs(MXT`>e+YwL?C{sAoM5 zQB}ITyQQnEi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LTz%# zJgtod$o%}gHx_ajcgE9NK@ZF3q}Zf0f4x&UH6{8n2@u6K=>xoEVtkK`tK zP6NwUHM21QnVFgKhHjtY{uUIgj+j;Tto?p4Aup?nyJ}r!L%F>@Jv}&%(}SC>-MYrh z6m2!@ZW`}X7#kp}dJE8ImiiE^X zkJ=Xs1w_Ov@7coIry88a9b{w*xW#h| zro~_6{th=)3mCnfoy)#sVc&Uw*Z!`)a~7;4teeC>VtDf8NuGcHc^t=~QdwJx)wy%$ zIB?(qj^lV^C>d+K+Mh<6vZiCI%H-rE{r&wL1CTi7op;`0cz77caZpvt { return mapToExistingBeliefs(followerBeliefs) - .filter { it.type == "Pantheon" } + .filter { it.type == BeliefType.Pantheon } .asSequence() } fun getFollowerBeliefs(): Sequence { return mapToExistingBeliefs(followerBeliefs) - .filter { it.type == "Follower" } + .filter { it.type == BeliefType.Follower } .asSequence() } @@ -80,15 +81,16 @@ class Religion() : INamed { fun isMajorReligion(): Boolean { if ("" in followerBeliefs) return true // Temporary as a result of follower beliefs not yet being implemented - return founderBeliefs.isNotEmpty() && followerBeliefs.any { gameInfo.ruleSet.beliefs[it]!!.type == "Follower"} + return founderBeliefs.isNotEmpty() && followerBeliefs + .any { gameInfo.ruleSet.beliefs[it]!!.type == BeliefType.Follower} } fun hasPantheon(): Boolean { // Currently unused // Temporary as a result of follower beliefs not yet being implemented - return followerBeliefs.any { it != "" && gameInfo.ruleSet.beliefs[it]!!.type == "Pantheon" } + return followerBeliefs.any { it != "" && gameInfo.ruleSet.beliefs[it]!!.type == BeliefType.Pantheon } } fun hasBelief(belief: String): Boolean { return followerBeliefs.contains(belief) || founderBeliefs.contains(belief) } -} \ No newline at end of file +} diff --git a/core/src/com/unciv/models/ruleset/Belief.kt b/core/src/com/unciv/models/ruleset/Belief.kt index f6cfe4a98e..b668a18d21 100644 --- a/core/src/com/unciv/models/ruleset/Belief.kt +++ b/core/src/com/unciv/models/ruleset/Belief.kt @@ -1,11 +1,33 @@ package com.unciv.models.ruleset import com.unciv.models.stats.INamed +import com.unciv.ui.civilopedia.CivilopediaText +import com.unciv.ui.civilopedia.FormattedLine +import java.awt.Color import java.util.ArrayList -class Belief: INamed { +class Belief: INamed, CivilopediaText() { override var name: String = "" - var type: String = "" + var type: BeliefType = BeliefType.None var uniques = ArrayList() val uniqueObjects: List by lazy { uniques.map { Unique(it) } } + + override fun getCivilopediaTextHeader() = FormattedLine(name, icon="Belief/$name", header=2) + override fun replacesCivilopediaDescription() = true + override fun hasCivilopediaTextLines() = true + override fun getCivilopediaTextLines(ruleset: Ruleset): List { + val textList = ArrayList() + textList += FormattedLine("{Type}: $type", color=type.color ) + uniqueObjects.forEach { + textList += FormattedLine(it) + } + return textList + } +} + +enum class BeliefType(val color: String) { + None(""), + Pantheon("#44c6cc"), + Follower("#ccaa44"), + Founder("#c00000") } diff --git a/core/src/com/unciv/ui/civilopedia/CivilopediaCategories.kt b/core/src/com/unciv/ui/civilopedia/CivilopediaCategories.kt index 9babae818a..96c6152320 100644 --- a/core/src/com/unciv/ui/civilopedia/CivilopediaCategories.kt +++ b/core/src/com/unciv/ui/civilopedia/CivilopediaCategories.kt @@ -75,6 +75,13 @@ object CivilopediaImageGetters { if (terrain == null) null else terrainImage(terrain, ImageGetter.ruleset, size) } + val belief = { name: String, size: Float -> + // Kludge until we decide how exactly to show Religions + if (ImageGetter.imageExists("ReligionIcons/$name")) { + ImageGetter.getReligionIcon(name).surroundWithCircle(size, color = Color.BLACK) + } + else null + } } /** Enum used as keys for Civilopedia "pages" (categories). @@ -100,6 +107,7 @@ enum class CivilopediaCategories ( Policy ("Policies", true, CivilopediaImageGetters.policy ), Tutorial ("Tutorials", false, null ), Difficulty ("Difficulty levels", false, null ), + Belief("Religions and Beliefs", false, CivilopediaImageGetters.belief) ; companion object { diff --git a/core/src/com/unciv/ui/civilopedia/CivilopediaScreen.kt b/core/src/com/unciv/ui/civilopedia/CivilopediaScreen.kt index 199616cdba..b6087d25ee 100644 --- a/core/src/com/unciv/ui/civilopedia/CivilopediaScreen.kt +++ b/core/src/com/unciv/ui/civilopedia/CivilopediaScreen.kt @@ -40,9 +40,10 @@ class CivilopediaScreen( val image: Actor? = null, val flavour: ICivilopediaText? = null, val y: Float = 0f, // coordinates of button cell used to scroll to entry - val height: Float = 0f + val height: Float = 0f, + val sortBy: Int = 0 // optional, enabling overriding alphabetical order ) { - fun withCoordinates(y: Float, height: Float) = CivilopediaEntry(name, description, image, flavour, y, height) + fun withCoordinates(y: Float, height: Float) = CivilopediaEntry(name, description, image, flavour, y, height, sortBy) } private val categoryToEntries = LinkedHashMap>() @@ -99,7 +100,10 @@ class CivilopediaScreen( var entries = categoryToEntries[category]!! if (category != CivilopediaCategories.Difficulty) // this is the only case where we need them in order // Alphabetical order of localized names, using system default locale - entries = entries.sortedWith(compareBy(Collator.getInstance(), { it.name.tr() })) + entries = entries.sortedWith( + compareBy{ it.sortBy } + .thenBy (Collator.getInstance(), { it.name.tr() }) + ) var currentY = -1f @@ -283,6 +287,26 @@ class CivilopediaScreen( ) } + if (!hideReligionItems) + categoryToEntries[CivilopediaCategories.Belief] = ( + ruleset.beliefs.values.asSequence() + .map { + CivilopediaEntry( + it.name, + "", + CivilopediaCategories.Belief.getImage?.invoke(it.type.name, imageSize), + (it as? ICivilopediaText).takeUnless { ct -> ct==null || ct.isCivilopediaTextEmpty() }, + sortBy = it.type.ordinal + ) + } + CivilopediaEntry( + "Religions", + "", + CivilopediaCategories.Belief.getImage?.invoke("Religion", imageSize), + getReligionText(), + sortBy = -1 + ) + ).toList() + val buttonTable = Table() buttonTable.pad(15f) buttonTable.defaults().pad(10f) @@ -341,6 +365,16 @@ class CivilopediaScreen( selectEntry(link, noScrollAnimation = true) } + private fun getReligionText(): ICivilopediaText { + val lines = ArrayList() + lines += FormattedLine("Religions", header=2, color="#e34a2b") + lines += FormattedLine(separator=true) + ruleset.religions.sortedWith(compareBy(Collator.getInstance(), { it.tr() })).forEach { + lines += FormattedLine(it, icon="Belief/$it") + } + return SimpleCivilopediaText(lines, true) + } + override fun resize(width: Int, height: Int) { if (stage.viewport.screenWidth != width || stage.viewport.screenHeight != height) { game.setScreen(CivilopediaScreen(game.worldScreen.gameInfo.ruleSet, currentCategory, currentEntry)) diff --git a/core/src/com/unciv/ui/civilopedia/CivilopediaText.kt b/core/src/com/unciv/ui/civilopedia/CivilopediaText.kt index 2539ddc52a..7128074af7 100644 --- a/core/src/com/unciv/ui/civilopedia/CivilopediaText.kt +++ b/core/src/com/unciv/ui/civilopedia/CivilopediaText.kt @@ -153,6 +153,7 @@ class FormattedLine ( val ruleSet = UncivGame.Current.gameInfo.ruleSet // order these with the categories that should take precedence in case of name conflicts (e.g. Railroad) _last_ val allObjectMapsSequence = sequence { + yield(CivilopediaCategories.Belief to ruleSet.beliefs) yield(CivilopediaCategories.Difficulty to ruleSet.difficulties) yield(CivilopediaCategories.Promotion to ruleSet.unitPromotions) yield(CivilopediaCategories.Policy to ruleSet.policies) diff --git a/core/src/com/unciv/ui/pickerscreens/FoundReligionPickerScreen.kt b/core/src/com/unciv/ui/pickerscreens/FoundReligionPickerScreen.kt index 4329ffc980..ef0987be20 100644 --- a/core/src/com/unciv/ui/pickerscreens/FoundReligionPickerScreen.kt +++ b/core/src/com/unciv/ui/pickerscreens/FoundReligionPickerScreen.kt @@ -9,6 +9,7 @@ import com.unciv.logic.civilization.CivilizationInfo import com.unciv.models.Religion import com.unciv.models.UncivSound import com.unciv.models.ruleset.Belief +import com.unciv.models.ruleset.BeliefType import com.unciv.models.translations.tr import com.unciv.ui.utils.* @@ -126,7 +127,7 @@ class FoundReligionPickerScreen ( rightBeliefsToChoose.clear() val availableBeliefs = gameInfo.ruleSet.beliefs.values .filter { - it.type == beliefType + it.type.name == beliefType && gameInfo.religions.values.none { religion -> religion.hasBelief(it.name) } @@ -135,8 +136,8 @@ class FoundReligionPickerScreen ( for (belief in availableBeliefs) { val beliefButton = convertBeliefToButton(belief) beliefButton.onClick { - if (beliefType == "Follower") chosenFollowerBeliefs[leftButtonIndex] = belief - else if (beliefType == "Founder") chosenFounderBeliefs[leftButtonIndex] = belief + if (beliefType == BeliefType.Follower.name) chosenFollowerBeliefs[leftButtonIndex] = belief + else if (beliefType == BeliefType.Founder.name) chosenFounderBeliefs[leftButtonIndex] = belief updateLeftTable() checkAndEnableRightSideButton() } @@ -146,7 +147,7 @@ class FoundReligionPickerScreen ( private fun convertBeliefToButton(belief: Belief): Button { val contentsTable = Table() - contentsTable.add(belief.type.toLabel()).row() + contentsTable.add(belief.type.name.toLabel()).row() contentsTable.add(belief.name.toLabel(fontSize = 24)).row() contentsTable.add(belief.uniques.joinToString().toLabel()) return Button(contentsTable, skin) @@ -157,4 +158,4 @@ class FoundReligionPickerScreen ( contentsTable.add("Choose a [$beliefType] belief!".toLabel()) return Button(contentsTable, skin) } -} \ No newline at end of file +} diff --git a/docs/Credits.md b/docs/Credits.md index ae4ee1c937..bd7c9aa1b1 100644 --- a/docs/Credits.md +++ b/docs/Credits.md @@ -562,6 +562,8 @@ Unless otherwise specified, all the following are from [the Noun Project](https: * [taoism](https://thenounproject.com/search/?q=Taoism&i=740812) by parkjisun for Taosim * [Buddhism](https://thenounproject.com/search/?q=buddhism&i=38764) by Julio Yanes for Buddhism * [Hinduism](https://thenounproject.com/search/?q=hinduism&i=20383) by Mugda Damle for Hinduism +* [praying](https://thenounproject.com/term/praying/740809/) by parkjisun for Religion (Civilopedia concept entry) +* [praying](https://thenounproject.com/term/praying/886367/) by Gan Khoon Lay for Follower ## Others