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:
parent
1be7168199
commit
b3d575fcda
@ -1,3 +1,8 @@
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 3.1.2
|
||||
Bugfixes:
|
||||
- Fixed sent aggressive squads count could be negative
|
||||
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 3.1.1
|
||||
Bugfixes:
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user