diff --git a/changelog.txt b/changelog.txt index 5d8c34f..df8e7e6 100644 --- a/changelog.txt +++ b/changelog.txt @@ -12,6 +12,7 @@ Version: 3.0.0 - Added point loss on unit death - Removed squad refunds when vanilla AI or other mods create enemy unit groups above the squad limit - Halved the base distance bonus per regional base level so regional base cover less ground + - Walls and transport belts no longer provide points to the AI when they are destroyed Bugfixes: - Fixed Krastorio2 on_force_created playerforces being nil - Fixed enemy map scan creating bases unnecessarily diff --git a/libs/ChunkUtils.lua b/libs/ChunkUtils.lua index 80d3aa9..31f29c6 100644 --- a/libs/ChunkUtils.lua +++ b/libs/ChunkUtils.lua @@ -586,16 +586,20 @@ function chunkUtils.accountPlayerEntity(entity, map, addObject, base) local overlapArray = getEntityOverlapChunks(map, entity) if not addObject then if base then + local pointValue = entityValue + if pointValue == GENERATOR_PHEROMONE_LEVEL_1 then + pointValue = 0 + end base.destroyPlayerBuildings = base.destroyPlayerBuildings + 1 if (base.stateAI == BASE_AI_STATE_ONSLAUGHT) then - base.unitPoints = base.unitPoints + entityValue + base.unitPoints = base.unitPoints + pointValue if universe.aiPointsPrintGainsToChat then - game.print(map.surface.name .. ": Points: +" .. math.floor(entityValue) .. ". [Structure Kill] Total: " .. string.format("%.2f", base.unitPoints)) + game.print(map.surface.name .. ": Points: +" .. math.floor(pointValue) .. ". [Structure Kill] Total: " .. string.format("%.2f", base.unitPoints)) end else - base.unitPoints = base.unitPoints + (entityValue * 0.12) + base.unitPoints = base.unitPoints + (pointValue * 0.12) if universe.aiPointsPrintGainsToChat then - game.print(map.surface.name .. ": Points: +" .. math.floor(entityValue * 0.12) .. ". [Structure Kill] Total: " .. string.format("%.2f", base.unitPoints)) + game.print(map.surface.name .. ": Points: +" .. math.floor(pointValue) .. ". [Structure Kill] Total: " .. string.format("%.2f", base.unitPoints)) end end end