Fixed exploit in the foreign city religion info table (#8967)

This commit is contained in:
Gualdimar
2023-03-19 22:41:06 +02:00
committed by GitHub
parent 4f901d2bf2
commit 7cd6a68639

View File

@ -3,6 +3,7 @@ package com.unciv.ui.screens.cityscreen
import com.badlogic.gdx.graphics.Color
import com.badlogic.gdx.scenes.scene2d.ui.Table
import com.unciv.Constants
import com.unciv.GUI
import com.unciv.UncivGame
import com.unciv.logic.city.managers.CityReligionManager
import com.unciv.models.Religion
@ -84,7 +85,7 @@ class CityReligionInfoTable(
if (religion == null) return icon
icon.onClick {
val newScreen = if (religion == iconName) {
EmpireOverviewScreen(civInfo, EmpireOverviewCategories.Religion, religion)
EmpireOverviewScreen(GUI.getViewingPlayer(), EmpireOverviewCategories.Religion, religion)
} else {
CivilopediaScreen(gameInfo.ruleset, CivilopediaCategories.Belief, religion)
}