diff --git a/CHANGELOG.md b/CHANGELOG.md index 7967b54..2369db7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 0.2.8 + +fix: missing team theme + ## 0.2.7 fix: RankTracker shouldn't return -1 rankPoint diff --git a/src/constant.ts b/src/constant.ts index 328271b..1f26ac3 100644 --- a/src/constant.ts +++ b/src/constant.ts @@ -1,7 +1,7 @@ import type { StatInkPostBody, VsHistoryDetail } from "./types.ts"; export const AGENT_NAME = "s3si.ts"; -export const S3SI_VERSION = "0.2.7"; +export const S3SI_VERSION = "0.2.8"; export const NSOAPP_VERSION = "2.4.0"; export const WEB_VIEW_VERSION = "2.0.0-bd36a652"; export const S3SI_LINK = "https://github.com/spacemeowx2/s3si.ts"; diff --git a/src/exporters/stat.ink.ts b/src/exporters/stat.ink.ts index e69d55c..7cfdeab 100644 --- a/src/exporters/stat.ink.ts +++ b/src/exporters/stat.ink.ts @@ -499,17 +499,21 @@ export class StatInkExporter implements GameExporter { 0, ); - if (myTeam.tricolorRole && myTeam.festTeamName) { + if (myTeam.festTeamName) { + result.our_team_theme = myTeam.festTeamName; + } + if (myTeam.tricolorRole) { result.our_team_role = myTeam.tricolorRole === "DEFENSE" ? "defender" : "attacker"; - result.our_team_theme = myTeam.festTeamName; } - if (otherTeams[0].tricolorRole && otherTeams[0].festTeamName) { + if (otherTeams[0].festTeamName) { + result.their_team_theme = otherTeams[0].festTeamName; + } + if (otherTeams[0].tricolorRole) { result.their_team_role = otherTeams[0].tricolorRole === "DEFENSE" ? "defender" : "attacker"; - result.their_team_theme = otherTeams[0].festTeamName; } if (otherTeams.length === 2) { @@ -524,11 +528,13 @@ export class StatInkExporter implements GameExporter { (acc, i) => acc + i.paint, 0, ); - if (otherTeams[1].tricolorRole && otherTeams[1].festTeamName) { + if (otherTeams[1].festTeamName) { + result.third_team_theme = otherTeams[1].festTeamName; + } + if (otherTeams[1].tricolorRole) { result.third_team_role = otherTeams[1].tricolorRole === "DEFENSE" ? "defender" : "attacker"; - result.third_team_theme = otherTeams[1].festTeamName; } } }