Move the delay into setup_and_run_task()
parent
f8e316bdc4
commit
ea4e8f0248
|
@ -518,6 +518,7 @@ def setup_and_run_task(start_field, start_position, start_heading, text, allowed
|
||||||
print("\nAvailable conditions: "+", ".join(allowed_conditions))
|
print("\nAvailable conditions: "+", ".join(allowed_conditions))
|
||||||
result = evaluate_parser_result(parse_code(input("\nCode: "), allowed_commands, allowed_conditions))
|
result = evaluate_parser_result(parse_code(input("\nCode: "), allowed_commands, allowed_conditions))
|
||||||
print(result)
|
print(result)
|
||||||
|
time.sleep(3)
|
||||||
if result=="Success!":
|
if result=="Success!":
|
||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
@ -573,7 +574,7 @@ if __name__ == "__main__":
|
||||||
print("Unknown start heading!")
|
print("Unknown start heading!")
|
||||||
sys.exit(1)
|
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()):
|
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:
|
if single_file_mode:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in New Issue