1
0
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:
Aaron Veden 2022-01-16 17:40:14 -08:00
parent fe5fda3c33
commit cfdd128351
No known key found for this signature in database
GPG Key ID: FF5990B1C6DD3F84
2 changed files with 9 additions and 1 deletions

View File

@ -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)

View File

@ -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)