bencbartlett / Overmind

AI for Screeps, a multiplayer programming strategy game
MIT License
545 stars 155 forks source link

cherry pick: 0 = false, check for key exists. stop moving managers #177

Open ikiris opened 4 years ago

ikiris commented 4 years ago

Pull request summary

Description:

Manager was getting pushed, debuged to this logic bug that 0 fails the test intended to check if the element exists. Replaced with equivalent test logic.

Fixed:

MovePush check incorrectly treating manager 0 value as nonexistent and taking default 10 causing unintended push.

Testing checklist:

zGeneral commented 3 years ago

in the master branch, the manager had a value of 1 for a priority, this PR fixes it.