diff --git a/last_area.txt b/last_area.txt index 6efe0c5..9d1e34a 100644 --- a/last_area.txt +++ b/last_area.txt @@ -1 +1 @@ -Cafeteria \ No newline at end of file +Admin \ No newline at end of file diff --git a/last_task.txt b/last_task.txt index 51ce227..3644ea3 100644 --- a/last_task.txt +++ b/last_task.txt @@ -1 +1 @@ -nothing. No tasks completed yet \ No newline at end of file +Upload Data in Admin \ No newline at end of file diff --git a/main.py b/main.py index fe66ffd..629fe67 100644 --- a/main.py +++ b/main.py @@ -187,6 +187,11 @@ def move_and_complete_tasks(G, move_list, tasks): move_list = sort_shortest_path(G, nearest, move_list, tasks) if tsk[0] == "Reset Reactor" or tsk[0] == "Restore Oxygen": move_list.pop(0) + if tsk[0] == "Inspect Sample" and return_code == 2: + temp = move_list[0] + move_list.pop(0) + move_list.append(temp) + continue # If we're done all out tasks diff --git a/solver.py b/solver.py index bf1bb05..d74b26c 100644 --- a/solver.py +++ b/solver.py @@ -108,7 +108,7 @@ def solve_task(task_name=None, task_location=None) -> int: return 1 if task_name != "Inspect Sample" else 2 time.sleep(1/30) - return 0 + return 2 if task_name == "Inspect Sample" else 0 print("Task not found") return -1 diff --git a/task-solvers/Inspect Sample.py b/task-solvers/Inspect Sample.py index 1c6d140..1aed148 100644 --- a/task-solvers/Inspect Sample.py +++ b/task-solvers/Inspect Sample.py @@ -15,9 +15,10 @@ y = dimensions[1] + round(dimensions[3] / 1.16) pyautogui.click((x,y)) -# Bruh -time.sleep(61) +click_close() +raise SystemExit(0) +""" y_offset = dimensions[3] dimensions[0] += round(dimensions[2] / 2.81) dimensions[1] += round(dimensions[3] / 3.2) @@ -25,4 +26,5 @@ dimensions[3] = round(dimensions[3] / 3.6) pos = pyautogui.locateCenterOnScreen(f"{get_dir()}\\task-solvers\\cv2-templates\\Inspect Sample\\anomaly.png", confidence=0.5, region=dimensions) -pyautogui.click(pos[0], pos[1] + round(y_offset / 2.87)) \ No newline at end of file +pyautogui.click(pos[0], pos[1] + round(y_offset / 2.87)) +""" \ No newline at end of file