From dcd6abc28c998138b706a4a2c57760406a238762 Mon Sep 17 00:00:00 2001 From: Vishal Date: Fri, 17 Jan 2025 01:35:24 +0530 Subject: [PATCH] Removing timer for chests for gold pass players --- src/assets/ba_data/python/bauiv1lib/chest.py | 37 +++++++++++--------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/assets/ba_data/python/bauiv1lib/chest.py b/src/assets/ba_data/python/bauiv1lib/chest.py index 2b0226ad..27f6d12a 100644 --- a/src/assets/ba_data/python/bauiv1lib/chest.py +++ b/src/assets/ba_data/python/bauiv1lib/chest.py @@ -325,23 +325,26 @@ class ChestWindow(bui.MainWindow): ) # Time string. - self._time_string_text = bui.textwidget( - parent=self._root_widget, - position=(self._width * 0.5, self._height - 85 + self._yoffs), - size=(0, 0), - text='', - maxwidth=700, - scale=0.6, - color=(0.6, 1.0, 0.6), - h_align='center', - v_align='center', - ) - self._update_time_display(chest.unlock_time) - self._time_string_timer = bui.AppTimer( - 1.0, - repeat=True, - call=bui.WeakCall(self._update_time_display, chest.unlock_time), - ) + if chest.unlock_tokens != 0: + self._time_string_text = bui.textwidget( + parent=self._root_widget, + position=(self._width * 0.5, self._height - 85 + self._yoffs), + size=(0, 0), + text='', + maxwidth=700, + scale=0.6, + color=(0.6, 1.0, 0.6), + h_align='center', + v_align='center', + ) + self._update_time_display(chest.unlock_time) + self._time_string_timer = bui.AppTimer( + 1.0, + repeat=True, + call=bui.WeakCall( + self._update_time_display, chest.unlock_time + ), + ) # Allow watching an ad IF the server tells us we can AND we have # an ad ready to show.