1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-26 20:54:12 +02:00

FACTO-136: Correct hive generation probabilities on initial scan with

resource patches
This commit is contained in:
Aaron Veden 2022-05-08 01:49:42 -07:00
parent ed0886f744
commit 1d9497f9b4
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 6 additions and 6 deletions

View File

@ -9,6 +9,7 @@ Version: 3.1.0
- Fixed the period of the xor number generator being cut in half
- Fixed desync when hives would generate buildings using the landmine event (workaround before created_effect existed)
- Fixed acid damage causing hit effects for enemies which caused UPS loss
- Fixed initial scan generation of hives on resources patches not having resources set before determining upgrades
---------------------------------------------------------------------------------------------------
Version: 3.0.3

View File

@ -236,7 +236,12 @@ function chunkUtils.initialScan(chunk, map, tick)
end
if (pass ~= CHUNK_IMPASSABLE) then
setPassable(map, chunk, pass)
setPathRating(map, chunk, waterTiles + neutralObjects)
setPlayerBaseGenerator(map, chunk, playerObjects)
local resources = surface.count_entities_filtered(universe.isCountResourcesQuery) * RESOURCE_NORMALIZER
setResourceGenerator(map, chunk, resources)
local vanillaEntityTypeLookup = universe.vanillaEntityTypeLookup
local buildingHiveTypeLookup = universe.buildingHiveTypeLookup
@ -277,12 +282,6 @@ function chunkUtils.initialScan(chunk, map, tick)
end
end
setPlayerBaseGenerator(map, chunk, playerObjects)
setResourceGenerator(map, chunk, resources)
setPassable(map, chunk, pass)
setPathRating(map, chunk, waterTiles + neutralObjects)
return chunk
end
end