Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 16 additions & 8 deletions src/model/ToolsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export class ToolsData {
name: "",
logoUrl: "",
backdropUrl: "",
enabled: false,
};
public timeoutDuration: number = 60;
public timeoutCounter: ITimeoutInfo = {
Expand Down Expand Up @@ -43,15 +42,13 @@ export class ToolsData {
public nameOverrides: INameOverrides = {
overrides: "[]",
};
public roundWinBox: IRoundWinBox = {
type: "disabled",
sponsors: [],
};

public constructor(init?: Partial<ToolsData>) {
Object.assign(this, init);

if (this.tournamentInfo.logoUrl != "" || this.tournamentInfo.name != "") {
this.tournamentInfo.enabled = true;
} else {
this.tournamentInfo.enabled = false;
}
this.timeoutCounter.left = this.timeoutCounter.max;
this.timeoutCounter.right = this.timeoutCounter.max;
}
Expand All @@ -73,7 +70,6 @@ export type ITournamentInfo = {
name: string;
logoUrl: string;
backdropUrl: string;
enabled: boolean;
};

export type ITimeoutInfo = {
Expand Down Expand Up @@ -107,6 +103,18 @@ export type INameOverrides = {
overrides: string; // JSON representation of Map<string, string> for easier transfer
};

export type IRoundWinBox = {
type: "disabled" | "tournamentInfo" | "sponsors";
sponsors: IRoundWinBoxSponsors[];
};

export type IRoundWinBoxSponsors = {
wonTeam: "all" | "left" | "right";
roundCeremonie: ("all" | "normal" | "ace" | "clutch" | "teamAce" | "flawless" | "thrifty")[];
iconUrl: string;
backdropUrl: string;
};

export type IOverridesPlayercamsData = {
nameOverrides: string; // JSON representation of Map<string, string> for easier transfer
enabledPlayers: string[];
Expand Down
5 changes: 4 additions & 1 deletion src/replay/ReplayConnectorService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export class ReplayConnectorService {
name: "Tournament Name",
logoUrl: "",
backdropUrl: "",
enabled: true,
},
timeoutDuration: 60,
sponsorInfo: {
Expand All @@ -134,6 +133,10 @@ export class ReplayConnectorService {
nameOverrides: {
overrides: "[]",
},
roundWinBox: {
type: "tournamentInfo",
sponsors: [],
},
timeoutCounter: {
max: 2,
left: 2,
Expand Down
Loading