From 545bdc2e1fd9e9af26f3b0112aad43ba33c85b35 Mon Sep 17 00:00:00 2001 From: Peter Lomason Date: Fri, 12 Jul 2024 04:19:55 -0400 Subject: [PATCH] Recall the last guardian used, write it to the file, set the dropdown correctly. Update ini text. --- double_chest_farm.ahk | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/double_chest_farm.ahk b/double_chest_farm.ahk index 139f85b..3eb923f 100644 --- a/double_chest_farm.ahk +++ b/double_chest_farm.ahk @@ -1374,11 +1374,11 @@ read_ini() { ; check if there is a file called `afk_chest_stats.ini` and if so, load the stats from it if (FileExist("afk_chest_stats.ini")) { - IniRead, CURRENT_GUARDIAN, afk_chest_stats.ini, stats, last_guardian, Hunter - IniRead, TOTAL_FARM_TIME, afk_chest_stats.ini, stats, time, 0 - IniRead, TOTAL_RUNS, afk_chest_stats.ini, stats, runs, 0 - IniRead, TOTAL_CHESTS, afk_chest_stats.ini, stats, chests, 0 - IniRead, TOTAL_EXOTICS, afk_chest_stats.ini, stats, exotics, 0 + IniRead, CURRENT_GUARDIAN, afk_chest_stats.ini, Stats, Last_Guardian, Hunter + IniRead, TOTAL_FARM_TIME, afk_chest_stats.ini, Stats, Time, 0 + IniRead, TOTAL_RUNS, afk_chest_stats.ini, Stats, Runs, 0 + IniRead, TOTAL_CHESTS, afk_chest_stats.ini, Stats, Chests, 0 + IniRead, TOTAL_EXOTICS, afk_chest_stats.ini, Stats, Exotics, 0 for _, class_type in CLASSES { for _, stat_type in STAT_TYPES { @@ -1402,6 +1402,8 @@ write_ini() { if (CURRENT_FARM_START_TIME) { + IniWrite, % CURRENT_GUARDIAN, afk_chest_stats.ini, Stats, Last_Guardian + ; Calculate the updated totals TOTAL_FARM_TIME += A_TickCount - CURRENT_FARM_START_TIME TOTAL_RUNS := TOTAL_RUNS + CURRENT_RUNS