1
0
mirror of https://github.com/veden/Rampant.git synced 2025-03-17 20:58:35 +02:00

FACTO-205: Changed spawner activeness check to use 75% of pollution diffuse value

This commit is contained in:
Aaron Veden 2022-07-09 20:51:42 -07:00
parent eae7fbe727
commit 8858651e95
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
3 changed files with 14 additions and 4 deletions

View File

@ -623,6 +623,11 @@ function upgrade.attempt(universe)
universe.vanillaEntityTypeLookup = nil
universe.entitySkipCountLookup = nil
universe.evoToTierMapping = nil
end
if global.version < 306 then
global.version = 306
local minDiffuse = game.map_settings.pollution.min_to_diffuse
universe.pollutionDiffuseMinimum = minDiffuse * 0.75
game.print("Rampant - Version 3.1.3")
end

View File

@ -2,6 +2,10 @@
Version: 3.1.3
Compatibility:
- Added interface for adding and removing excluded surfaces
Tweaks:
- Added minimum evolution of 20% before faction adaptation will happen
- Increased the death thresholds to 17000 <50%, 34000 <70%, 60000 <90%, 100000 for adaptation
- Changed spawner pollution check to use 75% of the chunk pollution diffuse value
Bugfixes:
- Removed layer-13 from projectiles
- script_raised_built now looks for enemy faction and registers as needed

View File

@ -626,22 +626,23 @@ function chunkPropertyUtils.processNestActiveness(map, chunk)
local x = chunk.x
local y = chunk.y
local position = {x=0,y=0}
local pollutionThreshold = universe.pollutionDiffuseMinimum
position.x = x + 32
position.y = y
if (surface.get_pollution(position) > 0) then
if (surface.get_pollution(position) > pollutionThreshold) then
chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base)
else
position.x = x - 32
if (surface.get_pollution(position) > 0) then
if (surface.get_pollution(position) > pollutionThreshold) then
chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base)
else
position.x = x
position.y = y - 32
if (surface.get_pollution(position) > 0) then
if (surface.get_pollution(position) > pollutionThreshold) then
chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base)
else
position.y = y + 32
if (surface.get_pollution(position) > 0) then
if (surface.get_pollution(position) > pollutionThreshold) then
chunkPropertyUtils.setNestActiveness(map, chunk, mMin(activeness + 5, 20), base)
else
chunkPropertyUtils.setNestActiveness(map, chunk, activeness - 2, base)