Skip to content
Open
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
7 changes: 7 additions & 0 deletions src/model/Match.ts
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,9 @@ export class Match {
if (this.agentSelectStartTime == undefined) {
this.agentSelectStartTime = data.timestamp;
}
if (this.tools.agentSelectAutostart) {
this.tools.agentSelectActive = true;
}
correctTeam.receiveTeamSpecificData(data);
break;

Expand Down Expand Up @@ -371,6 +374,10 @@ export class Match {
this.showAliveKDA = !this.showAliveKDA;
break;

case DataTypes.TOGGLE_AGENT_SELECT:
this.tools.agentSelectActive = !this.tools.agentSelectActive;
break;

case DataTypes.TOAST:
this.handleToast(data.data as IToastInfo);
break;
Expand Down
5 changes: 4 additions & 1 deletion src/model/ToolsData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ export class ToolsData {
type: "disabled",
sponsors: [],
};
public agentSelectAutostart: boolean = true;
public agentSelectActive: boolean = false;

public constructor(init?: Partial<ToolsData>) {
public constructor(init?: Partial<ToolsData> & { agentSelectHotkeyEnabled?: boolean }) {
Object.assign(this, init);
this.timeoutCounter.left = this.timeoutCounter.max;
this.timeoutCounter.right = this.timeoutCounter.max;
this.agentSelectAutostart = !(init?.agentSelectHotkeyEnabled ?? false);
}
}

Expand Down
1 change: 1 addition & 0 deletions src/model/eventData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ export enum DataTypes {
LEFT_TIMEOUT = "left_timeout",
RIGHT_TIMEOUT = "right_timeout",
SWITCH_KDA_CREDITS = "switch_kda_credits",
TOGGLE_AGENT_SELECT = "toggle_agent_select",
// Preview data types
PREVIEW = "preview",
// Mid Match data types
Expand Down
Loading