mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-04 15:27:50 +07:00
Documentation for Personality json (#11138)
* Documentation for Personality json * whoops, bad link * Fix inaccurate "double focus" comment * Fix accidental copy-paste error * Edit priority text to maybe be clearer
This commit is contained in:
@ -46,7 +46,7 @@ class PolicyManager : IsPartOfGameInfoSerialization {
|
||||
val value = HashMap<PolicyBranch, Int>()
|
||||
for (branch in branches) {
|
||||
val victoryPriority = branch.priorities[civInfo.nation.preferredVictoryType] ?: 0
|
||||
val personalityPriority = civInfo.getPersonality().policy[branch.name] ?: 0
|
||||
val personalityPriority = civInfo.getPersonality().priorities[branch.name] ?: 0
|
||||
value[branch] = victoryPriority + personalityPriority
|
||||
}
|
||||
return value
|
||||
|
@ -5,6 +5,9 @@ import com.unciv.models.ruleset.RulesetObject
|
||||
import com.unciv.models.ruleset.unique.UniqueTarget
|
||||
import kotlin.reflect.KMutableProperty0
|
||||
|
||||
/**
|
||||
* Type of Personality focus. Typically ranges from 0 (no focus) to 10 (double focus)
|
||||
*/
|
||||
enum class PersonalityValue {
|
||||
Production,
|
||||
Food,
|
||||
@ -27,7 +30,7 @@ class Personality: RulesetObject() {
|
||||
var faith: Float = 5f
|
||||
var military: Float = 5f
|
||||
var warMongering: Float = 5f // Todo: Look into where this should be inserted
|
||||
var policy = LinkedHashMap<String, Int>()
|
||||
var priorities = LinkedHashMap<String, Int>()
|
||||
var preferredVictoryType: String = Constants.neutralVictoryType
|
||||
var isNeutralPersonality: Boolean = false
|
||||
|
||||
|
Reference in New Issue
Block a user