mirror of
https://github.com/yairm210/Unciv.git
synced 2025-09-27 13:55:54 -04:00
Fix for barbarian quest (#3271)
* Coordinates equality is checked between integers, instead of floats
This commit is contained in:
parent
6d422d6674
commit
8c5e0d1889
@ -358,7 +358,7 @@ class QuestManager {
|
||||
fun barbarianCampCleared(civInfo: CivilizationInfo, location: Vector2) {
|
||||
val matchingQuests = assignedQuests.asSequence()
|
||||
.filter { it.questName == QuestName.ClearBarbarianCamp.value }
|
||||
.filter { it.data1.toFloat() == location.x && it.data2.toFloat() == location.y }
|
||||
.filter { it.data1.toInt() == location.x.toInt() && it.data2.toInt() == location.y.toInt() }
|
||||
|
||||
val winningQuest = matchingQuests.filter { it.assignee == civInfo.civName }.firstOrNull()
|
||||
if (winningQuest != null)
|
||||
|
Loading…
x
Reference in New Issue
Block a user