add vehichle force on next cycle

This commit is contained in:
gitGnome
2026-04-01 13:29:47 +02:00
parent 7495a44596
commit 541f2ff09c
2 changed files with 27 additions and 3 deletions
+7 -3
View File
@@ -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)