1
0
mirror of https://github.com/veden/Rampant.git synced 2024-12-28 21:08:22 +02:00

fixed base building

This commit is contained in:
Aaron Veden 2019-03-08 23:41:16 -08:00
parent be5ce8a6af
commit bf37a40591
5 changed files with 3 additions and 8 deletions

View File

@ -17,6 +17,7 @@ Date: 3. 5. 2019
- Fixed settlers not being able to see chunks with resources on them
- Fixed retreat command not disengaging biters
- Fixed Poison faction poison death cloud crash
- Fixed new enemies newly built settlements not creating nests or worms
---------------------------------------------------------------------------------------------------
Version: 0.17.3

View File

@ -624,7 +624,7 @@ local function onEnemyBaseBuild(event)
if not base then
base = createBase(map, natives, evolutionFactor, chunk, surface, event.tick)
end
entity = upgradeEntity(entity, surface, base.alignment, natives, evolutionFactor)
entity = upgradeEntity(entity, surface, base.alignment[mRandom(#base.alignment)], natives, evolutionFactor)
end
if entity and entity.valid then
event.entity = registerEnemyBaseStructure(map, entity, natives, evolutionFactor, surface, event.tick)

View File

@ -356,7 +356,7 @@ function baseUtils.upgradeEntity(entity, surface, baseAlignment, natives, evolut
((entityType == "unit-spawner") and "chunk-scanner-nest-rampant") or "chunk-scanner-worm-rampant",
position,
CHUNK_SIZE,
4,
2,
true
)
if newPosition then

View File

@ -156,10 +156,7 @@ function mapProcessor.processMap(map, surface, natives, tick, evolutionFactor)
for x=index,endIndex do
local chunk = processQueue[x]
if (chunk[CHUNK_TICK] ~= tick) then
-- chunk[CHUNK_TICK] = tick
commitPheromone(map, chunk, scentStaging[i], tick)
-- scents(map, chunk)
end
i = i + 1
end
@ -251,9 +248,7 @@ function mapProcessor.processPlayers(players, map, surface, natives, tick)
for y=playerChunk.y - PROCESS_PLAYER_BOUND, playerChunk.y + PROCESS_PLAYER_BOUND, 32 do
local chunk = getChunkByXY(map, x, y)
if (chunk ~= SENTINEL_IMPASSABLE_CHUNK) and (chunk[CHUNK_TICK] ~= tick) then
-- chunk[CHUNK_TICK] = tick
commitPheromone(map, chunk, scentStaging[i])
-- scents(map, chunk)
end
i = i + 1
end

View File

@ -157,7 +157,6 @@ local function settleMove(map, squad, natives, surface)
end
squad.status = SQUAD_BUILDING
elseif (getPlayerBaseGenerator(map, attackChunk) ~= 0) or
(attackChunk[PLAYER_PHEROMONE] >= natives.attackPlayerThreshold)
then