Skip to content

Commit

Permalink
add UI time tracking, support AKI 3.7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
ezra-sg committed Nov 21, 2023
1 parent 7a6d274 commit 250e52b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "time_in_raid_tracker",
"version": "1.0.2",
"version": "1.1.0",
"main": "src/mod.js",
"license": "MIT",
"author": "plebeian_rat",
Expand Down
Binary file not shown.
5 changes: 4 additions & 1 deletion dist/src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Mod implements IPreAkiLoadMod
const raidTimeElapsed = Date.now() - startTime;
const profileName = profile.Info.Nickname;

const filePath = path.join(process.cwd(), "user", "mods", "plebeianrat-timeinraidtracker-1.0.2", `${profileName}-time-tracker.txt`);
const filePath = path.join(process.cwd(), "user", "mods", "plebeianrat-timeinraidtracker-1.1.0", `${profileName}-time-tracker.txt`);

fs.readFile(filePath, "utf8", async (err, data) =>
{
Expand Down Expand Up @@ -102,6 +102,9 @@ class Mod implements IPreAkiLoadMod
}
logger.logWithColor("Time tracker: time tracked successfully", LogTextColor.GREEN);
});

const raidTimeSeconds = Math.floor(totalTimePlayedInMilliseconds / 1000);
profile.Stats.TotalInGameTime = raidTimeSeconds;
});

return output;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "time_in_raid_tracker",
"version": "1.0.2",
"version": "1.1.0",
"main": "src/mod.js",
"license": "MIT",
"author": "plebeian_rat",
Expand Down
5 changes: 4 additions & 1 deletion src/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class Mod implements IPreAkiLoadMod
const raidTimeElapsed = Date.now() - startTime;
const profileName = profile.Info.Nickname;

const filePath = path.join(process.cwd(), "user", "mods", "plebeianrat-timeinraidtracker-1.0.2", `${profileName}-time-tracker.txt`);
const filePath = path.join(process.cwd(), "user", "mods", "plebeianrat-timeinraidtracker-1.1.0", `${profileName}-time-tracker.txt`);

fs.readFile(filePath, "utf8", async (err, data) =>
{
Expand Down Expand Up @@ -102,6 +102,9 @@ class Mod implements IPreAkiLoadMod
}
logger.logWithColor("Time tracker: time tracked successfully", LogTextColor.GREEN);
});

const raidTimeSeconds = Math.floor(totalTimePlayedInMilliseconds / 1000);
profile.Stats.TotalInGameTime = raidTimeSeconds;
});

return output;
Expand Down

0 comments on commit 250e52b

Please sign in to comment.