mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
FACTO-219: Optimized neturalObject to only be scanned for on initialChunk scan
This commit is contained in:
parent
8f11163931
commit
f0e72ca389
@ -16,6 +16,7 @@ Version: 3.2.0
|
||||
- Moved most constants out of global
|
||||
- Removed new enemy variations setting
|
||||
- Dropped number of enemy levels see during the game from 10 to 6, new tiers will now appear at 0, 0.25, 0.5, 0.75, 0.85, 0.925
|
||||
- Moved neturalObject scan chunk to after a chunk is determined to be passable
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 3.1.2
|
||||
|
@ -226,9 +226,6 @@ function chunkUtils.initialScan(chunk, map, tick)
|
||||
local enemyBuildings = surface.find_entities_filtered(universe.isFilteredEntitiesEnemyStructureQuery)
|
||||
|
||||
if (waterTiles >= CHUNK_PASS_THRESHOLD) or (#enemyBuildings > 0) then
|
||||
local neutralObjects = mMax(0,
|
||||
mMin(1 - (surface.count_entities_filtered(universe.isFilteredEntitiesChunkNeutral) * 0.005),
|
||||
1) * 0.20)
|
||||
local pass = scanPaths(chunk, map)
|
||||
|
||||
local playerObjects = scorePlayerBuildings(map, chunk)
|
||||
@ -238,6 +235,10 @@ function chunkUtils.initialScan(chunk, map, tick)
|
||||
end
|
||||
|
||||
if (pass ~= CHUNK_IMPASSABLE) then
|
||||
local neutralObjects = mMax(0,
|
||||
mMin(1 - (surface.count_entities_filtered(universe.isFilteredEntitiesChunkNeutral) * 0.005),
|
||||
1) * 0.20)
|
||||
|
||||
setPassable(map, chunk, pass)
|
||||
setPathRating(map, chunk, waterTiles + neutralObjects)
|
||||
setPlayerBaseGenerator(map, chunk, playerObjects)
|
||||
|
Loading…
x
Reference in New Issue
Block a user