"Abundant resources" with mods with loads of resources no longer crash

This commit is contained in:
yairm210 2025-02-16 18:45:24 +02:00
parent db6bfa8bfe
commit 86522371b9

View File

@ -28,6 +28,7 @@ object MapRegionResources {
baseImpact: Int = 0, randomImpact: Int = 0, majorDeposit: Boolean = false
): Map<TileResource, Int> {
if (tileList.none() || resourceOptions.isEmpty()) return mapOf()
if (frequency == 0) return mapOf()
val impactType = when (resourceOptions.first().resourceType) {
ResourceType.Strategic -> ImpactType.Strategic
ResourceType.Bonus -> ImpactType.Bonus