From de19f8df3e97286ea4b94b3172ad1c9f14eef798 Mon Sep 17 00:00:00 2001 From: Dagothur Date: Fri, 2 Dec 2022 14:19:14 -0500 Subject: [PATCH] Bases no longer gain points in AI_STATE_PEACEFUL --- changelog.txt | 1 + libs/BaseUtils.lua | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/changelog.txt b/changelog.txt index bf41f15..90b944c 100644 --- a/changelog.txt +++ b/changelog.txt @@ -6,6 +6,7 @@ Version: 3.2.0 - Added minimum evolution of 20% before faction adaptation will happen - Increased the death thresholds to 17000 <50%, 34000 <70%, 60000 <90%, 100000 for adaptation - Changed spawner pollution check to use 75% of the chunk pollution diffuse value + - Bases no longer gain points in AI_STATE_PEACEFUL Bugfixes: - Removed layer-13 from projectiles - script_raised_built now looks for enemy faction and registers as needed diff --git a/libs/BaseUtils.lua b/libs/BaseUtils.lua index 991c7c4..7d5fa0b 100644 --- a/libs/BaseUtils.lua +++ b/libs/BaseUtils.lua @@ -548,6 +548,11 @@ function baseUtils.rebuildNativeTables(universe) end function baseUtils.modifyBasePoints(base, points, tag, x, y) + + if points > 0 and base.stateAI == BASE_AI_STATE_PEACEFUL then + return + end + tag = tag or "" x = x or nil y = y or nil