mirror of
https://github.com/veden/Rampant.git
synced 2025-03-17 20:58:35 +02:00
FACTO-256: missed unit death pheromone
This commit is contained in:
parent
664de5ba83
commit
32672f6b83
@ -466,7 +466,7 @@ local function onDeath(event)
|
||||
|
||||
local artilleryBlast = (cause and ((cause.type == "artillery-wagon") or (cause.type == "artillery-turret")))
|
||||
if (entityType == "unit") and not ENTITY_SKIP_COUNT_LOOKUP[entity.name] then
|
||||
deathScent(map, chunk)
|
||||
deathScent(chunk)
|
||||
if base then
|
||||
base.lostEnemyUnits = base.lostEnemyUnits + 1
|
||||
if damageTypeName then
|
||||
@ -803,8 +803,6 @@ local function onUnitGroupCreated(event)
|
||||
squad = createSquad(nil, map, group, settler, base)
|
||||
Universe.groupNumberToSquad[group.group_number] = squad
|
||||
|
||||
squad.base = base
|
||||
|
||||
if settler then
|
||||
Universe.builderCount = Universe.builderCount + 1
|
||||
else
|
||||
@ -816,7 +814,7 @@ local function onUnitGroupCreated(event)
|
||||
return
|
||||
end
|
||||
|
||||
local settler = canMigrate(map, base) and
|
||||
local settler = canMigrate(base) and
|
||||
(Universe.builderCount < Universe.AI_MAX_VANILLA_BUILDER_COUNT) and
|
||||
(Universe.random() < 0.25)
|
||||
|
||||
@ -833,8 +831,6 @@ local function onUnitGroupCreated(event)
|
||||
squad = createSquad(nil, map, group, settler, base)
|
||||
Universe.groupNumberToSquad[group.group_number] = squad
|
||||
|
||||
squad.base = base
|
||||
|
||||
if settler then
|
||||
Universe.builderCount = Universe.builderCount + 1
|
||||
else
|
||||
|
@ -238,6 +238,8 @@ function MapUtils.prepMap(surface)
|
||||
end
|
||||
end
|
||||
|
||||
Universe.flushPendingChunks = true
|
||||
|
||||
return map
|
||||
end
|
||||
|
||||
|
@ -455,11 +455,13 @@ function Processor.processPendingChunks(tick, flush)
|
||||
end
|
||||
|
||||
local endCount = 1
|
||||
if flush then
|
||||
local flushAllChunks = flush or Universe.flushPendingChunks
|
||||
if flushAllChunks then
|
||||
endCount = tableSize(pendingChunks)
|
||||
Universe.flushPendingChunks = false
|
||||
end
|
||||
for _=1,endCount do
|
||||
if not flush and (event.tick > tick) then
|
||||
if not flushAllChunks and (event.tick > tick) then
|
||||
return
|
||||
end
|
||||
local newEventId, newEvent = next(pendingChunks, eventId)
|
||||
|
@ -419,6 +419,7 @@ function Upgrade.addUniverseProperties()
|
||||
global.universePropertyVersion = 1
|
||||
|
||||
Universe.safeEntities = {}
|
||||
Universe.flushPendingChunks = false
|
||||
|
||||
Universe.aiPointsScaler = settings.global["rampant--aiPointsScaler"].value
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user