From 7895191e9ebea13b16027ad76408e8b8fb7d18de Mon Sep 17 00:00:00 2001 From: Aaron Veden Date: Wed, 24 Nov 2021 20:52:44 -0800 Subject: [PATCH] added hive spawn chance outside resource patches --- changelog.txt | 1 + libs/BaseUtils.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/changelog.txt b/changelog.txt index 5d79010..a8bd19f 100644 --- a/changelog.txt +++ b/changelog.txt @@ -3,6 +3,7 @@ Version: 1.1.5 Date: 23. 11. 2021 Tweaks: - Doubled the processing rate of regional faction bases with new enemies + - Added a small chance (0.5%) that Hives can spawn outside resource patches (Thank you Dimm2101) Bugfixes: - Fixed vengence squads only processing half the expected chunks - Fixed nest processing only processing half the nests (Thank you Dimm2101) diff --git a/libs/BaseUtils.lua b/libs/BaseUtils.lua index c71b6e0..c4f6473 100644 --- a/libs/BaseUtils.lua +++ b/libs/BaseUtils.lua @@ -215,6 +215,7 @@ local function findEntityUpgrade(baseAlignment, currentEvo, evoIndex, originalEn if evolve then local chunk = getChunkByPosition(map, originalEntity.position) local makeHive = (chunk ~= -1) and (getResourceGenerator(map, chunk) > 0) and (mRandom() < 0.2) + makeHive = makeHive or (not makeHive and (mRandom() < 0.005)) return initialEntityUpgrade(baseAlignment, tier, maxTier, map, (makeHive and "hive")) else return entityUpgrade(baseAlignment, tier, maxTier, originalEntity, map)