From 2cfaeb0d5089570bb64fdb07449b1e7d6788a3df Mon Sep 17 00:00:00 2001 From: asd111333 <63152071+asd111333@users.noreply.github.com> Date: Fri, 22 May 2020 00:39:33 -0400 Subject: [PATCH] fix dorm bar detection in new UI --- modules/headquarters.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/modules/headquarters.py b/modules/headquarters.py index 1b3fcd6..9e46074 100644 --- a/modules/headquarters.py +++ b/modules/headquarters.py @@ -222,7 +222,7 @@ def feed_snacks(self): def get_dorm_bar_color(self, percentage, corner_bar): if corner_bar: - x_coord = 45 + int(780 * percentage) + x_coord = 40 + int(625 * percentage) y_coord = 1025 else: x_coord = 630 + int(880 * percentage) @@ -230,17 +230,17 @@ def get_dorm_bar_color(self, percentage, corner_bar): return Utils.get_region_color_average(Region(x_coord, y_coord, 10, 10)) def get_dorm_bar_filled(self, percentage, corner_bar=False): - return not self.get_dorm_bar_empty(percentage, corner_bar) - - def get_dorm_bar_empty(self, percentage, corner_bar=False): - low = np.array([0, 0, 0]) - high = np.array([255, 20, 128]) + low = np.array([0, 0, 220]) + high = np.array([255, 255, 255]) col = self.get_dorm_bar_color(percentage, corner_bar) if np.all((low <= col) & (col <= high)): return True else: return False + def get_dorm_bar_empty(self, percentage, corner_bar=False): + return not self.get_dorm_bar_filled(percentage, corner_bar) + def skill_levelling(self): """ This method ensures that the skills currently being levelled continue to do so.