mirror of
https://github.com/veden/Rampant.git
synced 2024-12-26 20:54:12 +02:00
FACTO-54: added check for hives on resource chunks when early building
This commit is contained in:
parent
fe5fda3c33
commit
cfdd128351
@ -14,6 +14,7 @@ Date: 29. 12. 2021
|
||||
- Increased visual size of worms
|
||||
- Inverted Hive colors for easier visual identification
|
||||
Bugfixes:
|
||||
- Fixed added check for hives on resource chunks before early building
|
||||
- Fixed Hives spawning excessive amounts of entities
|
||||
- Fixed chunkPack nil in processNests (Thanks Skallywaggz for the report)
|
||||
- Fixed random generator seed overflow (Thanks NeveHanter for the report)
|
||||
|
@ -64,6 +64,8 @@ local removeSquadFromChunk = chunkPropertyUtils.removeSquadFromChunk
|
||||
local addDeathGenerator = chunkPropertyUtils.addDeathGenerator
|
||||
local getDeathGenerator = chunkPropertyUtils.getDeathGenerator
|
||||
|
||||
|
||||
local getHiveCount = chunkPropertyUtils.getHiveCount
|
||||
local getNestCount = chunkPropertyUtils.getNestCount
|
||||
|
||||
local getNeighborChunks = mapUtils.getNeighborChunks
|
||||
@ -156,7 +158,12 @@ local function settleMove(map, squad)
|
||||
local surface = map.surface
|
||||
|
||||
if (chunk ~= -1) and
|
||||
((distance >= squad.maxDistance) or ((getResourceGenerator(map, chunk) ~= 0) and (getNestCount(map, chunk) == 0)))
|
||||
(
|
||||
(distance >= squad.maxDistance) or
|
||||
(
|
||||
(getResourceGenerator(map, chunk) ~= 0) and (getNestCount(map, chunk) == 0) and (getHiveCount(map, chunk) == 0)
|
||||
)
|
||||
)
|
||||
then
|
||||
position = findMovementPosition(surface, groupPosition)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user