diff --git a/CHANGELOG.md b/CHANGELOG.md index c57eaa809..ac6e65f7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,9 +3,20 @@ All notable changes to this project will be documented in this file. The format ## [Unreleased] + + +## Overmind [0.5.2.1] - 2019.2.8 + +This patch fixes a critical bug with the `RoomIntel` module. + +### Fixed +- Fixed an unprotected access error with `RoomIntel.getSafetyData()` + + + ## Overmind [0.5.2] - 2019.2.1 -This patch adds improvements to Overmind's performance at lower RCL, fixes boosting logic to account for the removal of pre-boosting, and improves road planning, room intel, and swarms. This release is the version running in botarena 202. +This release adds improvements to Overmind's performance at lower RCL, fixes boosting logic to account for the removal of pre-boosting, and improves road planning, room intel, and swarms. This release is the version running in botarena 202. ### Added - Visualizer improvements: @@ -440,7 +451,8 @@ release of the Task system) - Initial pre-release of Overmind after 190 commits and about 80,000 additions. -[Unreleased]: https://github.com/bencbartlett/Overmind/compare/v0.5.2...HEAD +[Unreleased]: https://github.com/bencbartlett/Overmind/compare/v0.5.2.1...HEAD +[0.5.2.1]: https://github.com/bencbartlett/Overmind/compare/v0.5.2...v0.5.2.1 [0.5.1]: https://github.com/bencbartlett/Overmind/compare/v0.5.1...v0.5.2 [0.5.1]: https://github.com/bencbartlett/Overmind/compare/v0.5.0...v0.5.1 [0.5.0]: https://github.com/bencbartlett/Overmind/compare/v0.4.1...v0.5.0 diff --git a/src/Overseer.ts b/src/Overseer.ts index 012f469cf..edc92e229 100644 --- a/src/Overseer.ts +++ b/src/Overseer.ts @@ -205,12 +205,13 @@ export class Overseer implements IOverseer { invader => invader.boosts.length > 0 ? 2 : 1)); let needsDefending = effectiveInvaderCount >= 3 || colony.room.dangerousPlayerHostiles.length > 0; - // Place defensive directive after hostiles have been present for a long enough time - let safetyData = RoomIntel.getSafetyData(colony.room.name); - let invasionIsPersistent = safetyData.unsafeFor > 20; - - if (needsDefending && invasionIsPersistent) { - DirectiveInvasionDefense.createIfNotPresent(colony.controller.pos, 'room'); + if (needsDefending) { + // Place defensive directive after hostiles have been present for a long enough time + let safetyData = RoomIntel.getSafetyData(colony.room.name); + let invasionIsPersistent = safetyData.unsafeFor > 20; + if (invasionIsPersistent) { + DirectiveInvasionDefense.createIfNotPresent(colony.controller.pos, 'room'); + } } } }