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

FACTO-165: Fixed aggressive squad count going negative

This commit is contained in:
Aaron Veden 2022-06-12 18:16:14 -07:00
parent 1be7168199
commit b3d575fcda
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
3 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
---------------------------------------------------------------------------------------------------
Version: 3.1.2
Bugfixes:
- Fixed sent aggressive squads count could be negative
---------------------------------------------------------------------------------------------------
Version: 3.1.1
Bugfixes:

View File

@ -1,7 +1,7 @@
{
"name" : "Rampant",
"factorio_version" : "1.1",
"version" : "3.1.1",
"version" : "3.1.2",
"title" : "Rampant",
"author" : "Veden",
"homepage" : "https://forums.factorio.com/viewtopic.php?f=94&t=31445",

View File

@ -442,6 +442,9 @@ function squadAttack.cleanSquads(universe, tick)
if squad.type == BASE_AI_STATE_AGGRESSIVE then
local base = squad.base
base.sentAggressiveGroups = base.sentAggressiveGroups - 1
if base.sentAggressiveGroups < 0 then
base.sentAggressiveGroups = 0
end
end
end
squads[groupId] = nil