mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
FACTO-81: walls and transport belts no longer provide points to the AI
when destroyed
This commit is contained in:
parent
4aa7914757
commit
fe271b5c56
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user