add vehichle force on next cycle
This commit is contained in:
+7
-3
@@ -308,9 +308,13 @@ def handle_program1():
|
||||
if scroll_node_active:
|
||||
bottom_text_iteration_count += 1
|
||||
scroll_node_active = False
|
||||
if s['program_vehicles_enabled'] and bottom_text_iteration_count >= config.PROGRAM2_TEXT_ITERATIONS:
|
||||
bottom_text_iteration_count = 0
|
||||
if random.randint(0, 99) < config.PROGRAM2_TRIGGER_CHANCE:
|
||||
force = s.get('force_vehicles', False)
|
||||
if force:
|
||||
with server._lock:
|
||||
server.state['force_vehicles'] = False
|
||||
if s['program_vehicles_enabled'] and (force or bottom_text_iteration_count >= config.PROGRAM2_TEXT_ITERATIONS):
|
||||
if force or random.randint(0, 99) < config.PROGRAM2_TRIGGER_CHANCE:
|
||||
bottom_text_iteration_count = 0
|
||||
program2_active = True
|
||||
reset_program2()
|
||||
low_level.fill_pixels(0, 9, config.DISPLAY_MAX_X, config.DISPLAY_MAX_Y, 0, 0, 0)
|
||||
|
||||
Reference in New Issue
Block a user