Move the delay into setup_and_run_task()

master
BodgeMaster 2023-01-06 15:10:12 +01:00
parent f8e316bdc4
commit ea4e8f0248
1 changed files with 2 additions and 1 deletions

View File

@ -518,6 +518,7 @@ def setup_and_run_task(start_field, start_position, start_heading, text, allowed
print("\nAvailable conditions: "+", ".join(allowed_conditions))
result = evaluate_parser_result(parse_code(input("\nCode: "), allowed_commands, allowed_conditions))
print(result)
time.sleep(3)
if result=="Success!":
return True
return False
@ -573,7 +574,7 @@ if __name__ == "__main__":
print("Unknown start heading!")
sys.exit(1)
while not setup_and_run_task(level_data["field"].copy(), level_data["start position"].copy(), cursor_start, level_data["text"], level_data["allowed commands"].copy(), level_data["allowed conditions"].copy()):
time.sleep(3)
pass
if single_file_mode:
break