moons-ta-client 1.1.8 → 1.1.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/constants.d.ts +2 -2
- package/dist/constants.js +2 -2
- package/dist/index.d.ts +42 -4
- package/dist/index.esm.js +189 -73
- package/dist/models/pushes.d.ts +40 -0
- package/dist/models/pushes.js +82 -1
- package/dist/tournament-assistant-client.d.ts +2 -1
- package/dist/tournament-assistant-client.js +57 -50
- package/package.json +1 -1
package/dist/constants.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const masterAddress = "server.tournamentassistant.net";
|
|
2
2
|
export declare const masterPort = "8676";
|
|
3
|
-
export declare const version = "1.1.
|
|
4
|
-
export declare const versionCode =
|
|
3
|
+
export declare const version = "1.1.10";
|
|
4
|
+
export declare const versionCode = 1110;
|
package/dist/constants.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -4323,6 +4323,12 @@ interface Push {
|
|
|
4323
4323
|
* @generated from protobuf field: proto.packets.Push.SongFinished song_finished = 2;
|
|
4324
4324
|
*/
|
|
4325
4325
|
songFinished: Push_SongFinished;
|
|
4326
|
+
} | {
|
|
4327
|
+
oneofKind: "qualifierScoreSubmtited";
|
|
4328
|
+
/**
|
|
4329
|
+
* @generated from protobuf field: proto.packets.Push.QualifierScoreSubmitted qualifier_score_submtited = 3;
|
|
4330
|
+
*/
|
|
4331
|
+
qualifierScoreSubmtited: Push_QualifierScoreSubmitted;
|
|
4326
4332
|
} | {
|
|
4327
4333
|
oneofKind: undefined;
|
|
4328
4334
|
};
|
|
@@ -4385,7 +4391,38 @@ interface Push_SongFinished {
|
|
|
4385
4391
|
/**
|
|
4386
4392
|
* @generated MessageType for protobuf message proto.packets.Push.SongFinished
|
|
4387
4393
|
*/
|
|
4388
|
-
declare const Push_SongFinished: Push_SongFinished$Type;
|
|
4394
|
+
declare const Push_SongFinished: Push_SongFinished$Type;
|
|
4395
|
+
declare class Push_QualifierScoreSubmitted$Type extends MessageType<Push_QualifierScoreSubmitted> {
|
|
4396
|
+
constructor();
|
|
4397
|
+
create(value?: PartialMessage<Push_QualifierScoreSubmitted>): Push_QualifierScoreSubmitted;
|
|
4398
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Push_QualifierScoreSubmitted): Push_QualifierScoreSubmitted;
|
|
4399
|
+
internalBinaryWrite(message: Push_QualifierScoreSubmitted, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
4400
|
+
}
|
|
4401
|
+
/**
|
|
4402
|
+
* @generated from protobuf message proto.packets.Push.QualifierScoreSubmitted
|
|
4403
|
+
*/
|
|
4404
|
+
interface Push_QualifierScoreSubmitted {
|
|
4405
|
+
/**
|
|
4406
|
+
* @generated from protobuf field: string tournament_id = 1;
|
|
4407
|
+
*/
|
|
4408
|
+
tournamentId: string;
|
|
4409
|
+
/**
|
|
4410
|
+
* @generated from protobuf field: proto.models.QualifierEvent event = 2;
|
|
4411
|
+
*/
|
|
4412
|
+
event?: QualifierEvent;
|
|
4413
|
+
/**
|
|
4414
|
+
* @generated from protobuf field: proto.models.GameplayParameters map = 3;
|
|
4415
|
+
*/
|
|
4416
|
+
map?: GameplayParameters;
|
|
4417
|
+
/**
|
|
4418
|
+
* @generated from protobuf field: proto.models.LeaderboardEntry qualifier_score = 4;
|
|
4419
|
+
*/
|
|
4420
|
+
qualifierScore?: LeaderboardEntry;
|
|
4421
|
+
}
|
|
4422
|
+
/**
|
|
4423
|
+
* @generated MessageType for protobuf message proto.packets.Push.QualifierScoreSubmitted
|
|
4424
|
+
*/
|
|
4425
|
+
declare const Push_QualifierScoreSubmitted: Push_QualifierScoreSubmitted$Type;
|
|
4389
4426
|
|
|
4390
4427
|
/**
|
|
4391
4428
|
* @generated from protobuf enum proto.packets.Command.ModifyGameplay.Modifier
|
|
@@ -4728,6 +4765,7 @@ type TAClientEvents = {
|
|
|
4728
4765
|
loadSongRequested: [string, string, Request_LoadSong];
|
|
4729
4766
|
songFinished: Push_SongFinished;
|
|
4730
4767
|
realtimeScore: RealtimeScore;
|
|
4768
|
+
qualifierScoreSubmitted: Push_QualifierScoreSubmitted;
|
|
4731
4769
|
responseReceived: ResponseFromUser;
|
|
4732
4770
|
joinedTournament: {};
|
|
4733
4771
|
failedToJoinTournament: {};
|
|
@@ -4829,7 +4867,7 @@ declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
4829
4867
|
|
|
4830
4868
|
declare const masterAddress = "server.tournamentassistant.net";
|
|
4831
4869
|
declare const masterPort = "8676";
|
|
4832
|
-
declare const version = "1.1.
|
|
4833
|
-
declare const versionCode =
|
|
4870
|
+
declare const version = "1.1.10";
|
|
4871
|
+
declare const versionCode = 1110;
|
|
4834
4872
|
|
|
4835
|
-
export { Acknowledgement, Acknowledgement_AcknowledgementType, Beatmap, Channel, Characteristic, Command, Command_ModifyGameplay, Command_ModifyGameplay_Modifier, Command_PlaySong, Command_SendBotMessage, CoreServer, CustomEventEmitter, DiscordUser, Event, Event_MatchCreated, Event_MatchDeleted, Event_MatchUpdated, Event_QualifierCreated, Event_QualifierDeleted, Event_QualifierUpdated, Event_ServerAdded, Event_ServerDeleted, Event_TournamentCreated, Event_TournamentDeleted, Event_TournamentUpdated, Event_UserAdded, Event_UserLeft, Event_UserUpdated, ForwardingPacket, GameplayModifiers, GameplayModifiers_GameOptions, GameplayParameters, Guild, LeaderboardEntry, Map, Match, Packet, Permissions, PlayerSpecificSettings, PlayerSpecificSettings_ArcVisibilityType, PlayerSpecificSettings_NoteJumpDurationTypeSettings, PlayerSpecificSettings_PlayerOptions, Push, Push_SongFinished, Push_SongFinished_CompletionType, QualifierEvent, QualifierEvent_EventSettings, QualifierEvent_LeaderboardSort, RealtimeScore, Request, Request_AddAuthorizedUser, Request_AddAuthorizedUserPermission, Request_AddQualifierMaps, Request_AddServer, Request_AddTournamentPool, Request_AddTournamentPoolMaps, Request_AddTournamentTeam, Request_AddUserToMatch, Request_Connect, Request_CreateMatch, Request_CreateQualifierEvent, Request_CreateTournament, Request_DeleteMatch, Request_DeleteQualifierEvent, Request_DeleteTournament, Request_GenerateBotToken, Request_GetAuthorizedUsers, Request_GetBotTokensForUser, Request_GetDiscordInfo, Request_Join, Request_LoadSong, Request_PreloadImageForStreamSync, Request_QualifierScores, Request_RemainingAttempts, Request_RemoveAuthorizedUser, Request_RemoveAuthorizedUserPermission, Request_RemoveQualifierMap, Request_RemoveTournamentPool, Request_RemoveTournamentPoolMap, Request_RemoveTournamentTeam, Request_RemoveUserFromMatch, Request_RevokeBotToken, Request_SetMatchLeader, Request_SetMatchMap, Request_SetQualifierFlags, Request_SetQualifierImage, Request_SetQualifierInfoChannel, Request_SetQualifierLeaderboardSort, Request_SetQualifierName, Request_SetTournamentAllowUnauthorizedView, Request_SetTournamentBannedMods, Request_SetTournamentEnablePools, Request_SetTournamentEnableTeams, Request_SetTournamentImage, Request_SetTournamentName, Request_SetTournamentPoolName, Request_SetTournamentScoreUpdateFrequency, Request_SetTournamentShowQualifierButton, Request_SetTournamentShowTournamentButton, Request_SetTournamentTeamImage, Request_SetTournamentTeamName, Request_ShowPrompt, Request_ShowPrompt_PromptOption, Request_SubmitQualifierScore, Request_UpdateQualifierMap, Request_UpdateTournamentPoolMap, Request_UpdateUser, Response, type ResponseFromUser, Response_AddAuthorizedUser, Response_AddServer, Response_Connect, Response_Connect_ConnectFailReason, Response_CreateMatch, Response_CreateQualifierEvent, Response_CreateTournament, Response_DeleteMatch, Response_DeleteQualifierEvent, Response_DeleteTournament, Response_GenerateBotToken, Response_GetAuthorizedUsers, Response_GetAuthorizedUsers_AuthroizedUser, Response_GetBotTokensForUser, Response_GetBotTokensForUser_BotUser, Response_GetDiscordInfo, Response_Join, Response_Join_JoinFailReason, Response_LeaderboardEntries, Response_LoadSong, Response_PreloadImageForStreamSync, Response_RemainingAttempts, Response_RemoveAuthorizedUser, Response_ResponseType, Response_RevokeBotToken, Response_ShowPrompt, Response_UpdateAuthorizedUser, Response_UpdateMatch, Response_UpdateQualifierEvent, Response_UpdateTournament, Response_UpdateUser, ScoreTrackerHand, State, TAClient, Tournament, Tournament_TournamentSettings, Tournament_TournamentSettings_Pool, Tournament_TournamentSettings_Team, User, User_ClientTypes, User_DiscordInfo, User_DownloadStates, User_PlayStates, User_Point, getTournaments, masterAddress, masterPort, version, versionCode };
|
|
4873
|
+
export { Acknowledgement, Acknowledgement_AcknowledgementType, Beatmap, Channel, Characteristic, Command, Command_ModifyGameplay, Command_ModifyGameplay_Modifier, Command_PlaySong, Command_SendBotMessage, CoreServer, CustomEventEmitter, DiscordUser, Event, Event_MatchCreated, Event_MatchDeleted, Event_MatchUpdated, Event_QualifierCreated, Event_QualifierDeleted, Event_QualifierUpdated, Event_ServerAdded, Event_ServerDeleted, Event_TournamentCreated, Event_TournamentDeleted, Event_TournamentUpdated, Event_UserAdded, Event_UserLeft, Event_UserUpdated, ForwardingPacket, GameplayModifiers, GameplayModifiers_GameOptions, GameplayParameters, Guild, LeaderboardEntry, Map, Match, Packet, Permissions, PlayerSpecificSettings, PlayerSpecificSettings_ArcVisibilityType, PlayerSpecificSettings_NoteJumpDurationTypeSettings, PlayerSpecificSettings_PlayerOptions, Push, Push_QualifierScoreSubmitted, Push_SongFinished, Push_SongFinished_CompletionType, QualifierEvent, QualifierEvent_EventSettings, QualifierEvent_LeaderboardSort, RealtimeScore, Request, Request_AddAuthorizedUser, Request_AddAuthorizedUserPermission, Request_AddQualifierMaps, Request_AddServer, Request_AddTournamentPool, Request_AddTournamentPoolMaps, Request_AddTournamentTeam, Request_AddUserToMatch, Request_Connect, Request_CreateMatch, Request_CreateQualifierEvent, Request_CreateTournament, Request_DeleteMatch, Request_DeleteQualifierEvent, Request_DeleteTournament, Request_GenerateBotToken, Request_GetAuthorizedUsers, Request_GetBotTokensForUser, Request_GetDiscordInfo, Request_Join, Request_LoadSong, Request_PreloadImageForStreamSync, Request_QualifierScores, Request_RemainingAttempts, Request_RemoveAuthorizedUser, Request_RemoveAuthorizedUserPermission, Request_RemoveQualifierMap, Request_RemoveTournamentPool, Request_RemoveTournamentPoolMap, Request_RemoveTournamentTeam, Request_RemoveUserFromMatch, Request_RevokeBotToken, Request_SetMatchLeader, Request_SetMatchMap, Request_SetQualifierFlags, Request_SetQualifierImage, Request_SetQualifierInfoChannel, Request_SetQualifierLeaderboardSort, Request_SetQualifierName, Request_SetTournamentAllowUnauthorizedView, Request_SetTournamentBannedMods, Request_SetTournamentEnablePools, Request_SetTournamentEnableTeams, Request_SetTournamentImage, Request_SetTournamentName, Request_SetTournamentPoolName, Request_SetTournamentScoreUpdateFrequency, Request_SetTournamentShowQualifierButton, Request_SetTournamentShowTournamentButton, Request_SetTournamentTeamImage, Request_SetTournamentTeamName, Request_ShowPrompt, Request_ShowPrompt_PromptOption, Request_SubmitQualifierScore, Request_UpdateQualifierMap, Request_UpdateTournamentPoolMap, Request_UpdateUser, Response, type ResponseFromUser, Response_AddAuthorizedUser, Response_AddServer, Response_Connect, Response_Connect_ConnectFailReason, Response_CreateMatch, Response_CreateQualifierEvent, Response_CreateTournament, Response_DeleteMatch, Response_DeleteQualifierEvent, Response_DeleteTournament, Response_GenerateBotToken, Response_GetAuthorizedUsers, Response_GetAuthorizedUsers_AuthroizedUser, Response_GetBotTokensForUser, Response_GetBotTokensForUser_BotUser, Response_GetDiscordInfo, Response_Join, Response_Join_JoinFailReason, Response_LeaderboardEntries, Response_LoadSong, Response_PreloadImageForStreamSync, Response_RemainingAttempts, Response_RemoveAuthorizedUser, Response_ResponseType, Response_RevokeBotToken, Response_ShowPrompt, Response_UpdateAuthorizedUser, Response_UpdateMatch, Response_UpdateQualifierEvent, Response_UpdateTournament, Response_UpdateUser, ScoreTrackerHand, State, TAClient, Tournament, Tournament_TournamentSettings, Tournament_TournamentSettings_Pool, Tournament_TournamentSettings_Team, User, User_ClientTypes, User_DiscordInfo, User_DownloadStates, User_PlayStates, User_Point, getTournaments, masterAddress, masterPort, version, versionCode };
|
package/dist/index.esm.js
CHANGED
|
@@ -14462,7 +14462,8 @@ var Push$Type = class extends MessageType {
|
|
|
14462
14462
|
constructor() {
|
|
14463
14463
|
super("proto.packets.Push", [
|
|
14464
14464
|
{ no: 1, name: "realtime_score", kind: "message", oneof: "data", T: () => RealtimeScore },
|
|
14465
|
-
{ no: 2, name: "song_finished", kind: "message", oneof: "data", T: () => Push_SongFinished }
|
|
14465
|
+
{ no: 2, name: "song_finished", kind: "message", oneof: "data", T: () => Push_SongFinished },
|
|
14466
|
+
{ no: 3, name: "qualifier_score_submtited", kind: "message", oneof: "data", T: () => Push_QualifierScoreSubmitted }
|
|
14466
14467
|
]);
|
|
14467
14468
|
}
|
|
14468
14469
|
create(value) {
|
|
@@ -14491,6 +14492,13 @@ var Push$Type = class extends MessageType {
|
|
|
14491
14492
|
songFinished: Push_SongFinished.internalBinaryRead(reader, reader.uint32(), options, message.data.songFinished)
|
|
14492
14493
|
};
|
|
14493
14494
|
break;
|
|
14495
|
+
case /* proto.packets.Push.QualifierScoreSubmitted qualifier_score_submtited */
|
|
14496
|
+
3:
|
|
14497
|
+
message.data = {
|
|
14498
|
+
oneofKind: "qualifierScoreSubmtited",
|
|
14499
|
+
qualifierScoreSubmtited: Push_QualifierScoreSubmitted.internalBinaryRead(reader, reader.uint32(), options, message.data.qualifierScoreSubmtited)
|
|
14500
|
+
};
|
|
14501
|
+
break;
|
|
14494
14502
|
default:
|
|
14495
14503
|
let u2 = options.readUnknownField;
|
|
14496
14504
|
if (u2 === "throw")
|
|
@@ -14507,6 +14515,8 @@ var Push$Type = class extends MessageType {
|
|
|
14507
14515
|
RealtimeScore.internalBinaryWrite(message.data.realtimeScore, writer.tag(1, WireType.LengthDelimited).fork(), options).join();
|
|
14508
14516
|
if (message.data.oneofKind === "songFinished")
|
|
14509
14517
|
Push_SongFinished.internalBinaryWrite(message.data.songFinished, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
14518
|
+
if (message.data.oneofKind === "qualifierScoreSubmtited")
|
|
14519
|
+
Push_QualifierScoreSubmitted.internalBinaryWrite(message.data.qualifierScoreSubmtited, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
14510
14520
|
let u2 = options.writeUnknownFields;
|
|
14511
14521
|
if (u2 !== false)
|
|
14512
14522
|
(u2 == true ? UnknownFieldHandler.onWrite : u2)(this.typeName, message, writer);
|
|
@@ -14662,6 +14672,76 @@ var Push_SongFinished$Type = class extends MessageType {
|
|
|
14662
14672
|
}
|
|
14663
14673
|
};
|
|
14664
14674
|
var Push_SongFinished = new Push_SongFinished$Type();
|
|
14675
|
+
var Push_QualifierScoreSubmitted$Type = class extends MessageType {
|
|
14676
|
+
constructor() {
|
|
14677
|
+
super("proto.packets.Push.QualifierScoreSubmitted", [
|
|
14678
|
+
{
|
|
14679
|
+
no: 1,
|
|
14680
|
+
name: "tournament_id",
|
|
14681
|
+
kind: "scalar",
|
|
14682
|
+
T: 9
|
|
14683
|
+
/*ScalarType.STRING*/
|
|
14684
|
+
},
|
|
14685
|
+
{ no: 2, name: "event", kind: "message", T: () => QualifierEvent },
|
|
14686
|
+
{ no: 3, name: "map", kind: "message", T: () => GameplayParameters },
|
|
14687
|
+
{ no: 4, name: "qualifier_score", kind: "message", T: () => LeaderboardEntry }
|
|
14688
|
+
]);
|
|
14689
|
+
}
|
|
14690
|
+
create(value) {
|
|
14691
|
+
const message = { tournamentId: "" };
|
|
14692
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
14693
|
+
if (value !== void 0)
|
|
14694
|
+
reflectionMergePartial(this, message, value);
|
|
14695
|
+
return message;
|
|
14696
|
+
}
|
|
14697
|
+
internalBinaryRead(reader, length, options, target) {
|
|
14698
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
14699
|
+
while (reader.pos < end) {
|
|
14700
|
+
let [fieldNo, wireType] = reader.tag();
|
|
14701
|
+
switch (fieldNo) {
|
|
14702
|
+
case /* string tournament_id */
|
|
14703
|
+
1:
|
|
14704
|
+
message.tournamentId = reader.string();
|
|
14705
|
+
break;
|
|
14706
|
+
case /* proto.models.QualifierEvent event */
|
|
14707
|
+
2:
|
|
14708
|
+
message.event = QualifierEvent.internalBinaryRead(reader, reader.uint32(), options, message.event);
|
|
14709
|
+
break;
|
|
14710
|
+
case /* proto.models.GameplayParameters map */
|
|
14711
|
+
3:
|
|
14712
|
+
message.map = GameplayParameters.internalBinaryRead(reader, reader.uint32(), options, message.map);
|
|
14713
|
+
break;
|
|
14714
|
+
case /* proto.models.LeaderboardEntry qualifier_score */
|
|
14715
|
+
4:
|
|
14716
|
+
message.qualifierScore = LeaderboardEntry.internalBinaryRead(reader, reader.uint32(), options, message.qualifierScore);
|
|
14717
|
+
break;
|
|
14718
|
+
default:
|
|
14719
|
+
let u2 = options.readUnknownField;
|
|
14720
|
+
if (u2 === "throw")
|
|
14721
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
14722
|
+
let d = reader.skip(wireType);
|
|
14723
|
+
if (u2 !== false)
|
|
14724
|
+
(u2 === true ? UnknownFieldHandler.onRead : u2)(this.typeName, message, fieldNo, wireType, d);
|
|
14725
|
+
}
|
|
14726
|
+
}
|
|
14727
|
+
return message;
|
|
14728
|
+
}
|
|
14729
|
+
internalBinaryWrite(message, writer, options) {
|
|
14730
|
+
if (message.tournamentId !== "")
|
|
14731
|
+
writer.tag(1, WireType.LengthDelimited).string(message.tournamentId);
|
|
14732
|
+
if (message.event)
|
|
14733
|
+
QualifierEvent.internalBinaryWrite(message.event, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
14734
|
+
if (message.map)
|
|
14735
|
+
GameplayParameters.internalBinaryWrite(message.map, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
14736
|
+
if (message.qualifierScore)
|
|
14737
|
+
LeaderboardEntry.internalBinaryWrite(message.qualifierScore, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
14738
|
+
let u2 = options.writeUnknownFields;
|
|
14739
|
+
if (u2 !== false)
|
|
14740
|
+
(u2 == true ? UnknownFieldHandler.onWrite : u2)(this.typeName, message, writer);
|
|
14741
|
+
return writer;
|
|
14742
|
+
}
|
|
14743
|
+
};
|
|
14744
|
+
var Push_QualifierScoreSubmitted = new Push_QualifierScoreSubmitted$Type();
|
|
14665
14745
|
|
|
14666
14746
|
// src/models/commands.ts
|
|
14667
14747
|
init_dirname();
|
|
@@ -15630,8 +15710,8 @@ init_buffer2();
|
|
|
15630
15710
|
init_process2();
|
|
15631
15711
|
var masterAddress = "server.tournamentassistant.net";
|
|
15632
15712
|
var masterPort = "8676";
|
|
15633
|
-
var version = "1.1.
|
|
15634
|
-
var versionCode =
|
|
15713
|
+
var version = "1.1.10";
|
|
15714
|
+
var versionCode = 1110;
|
|
15635
15715
|
|
|
15636
15716
|
// src/tournament-assistant-client.ts
|
|
15637
15717
|
var import_ws2 = __toESM(require_ws(), 1);
|
|
@@ -15960,58 +16040,76 @@ var TAClient = class extends CustomEventEmitter {
|
|
|
15960
16040
|
}
|
|
15961
16041
|
// --- Commands --- //
|
|
15962
16042
|
playSong = (gameplayParameters, userIds) => {
|
|
15963
|
-
this.sendCommand(
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
16043
|
+
this.sendCommand(
|
|
16044
|
+
{
|
|
16045
|
+
type: {
|
|
16046
|
+
oneofKind: "playSong",
|
|
16047
|
+
playSong: {
|
|
16048
|
+
gameplayParameters
|
|
16049
|
+
}
|
|
15968
16050
|
}
|
|
15969
|
-
}
|
|
15970
|
-
|
|
16051
|
+
},
|
|
16052
|
+
userIds
|
|
16053
|
+
);
|
|
15971
16054
|
};
|
|
15972
16055
|
returnToMenu = (userIds) => {
|
|
15973
|
-
this.sendCommand(
|
|
15974
|
-
|
|
15975
|
-
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
16056
|
+
this.sendCommand(
|
|
16057
|
+
{
|
|
16058
|
+
type: {
|
|
16059
|
+
oneofKind: "returnToMenu",
|
|
16060
|
+
returnToMenu: true
|
|
16061
|
+
}
|
|
16062
|
+
},
|
|
16063
|
+
userIds
|
|
16064
|
+
);
|
|
15979
16065
|
};
|
|
15980
16066
|
flipColors = (userIds) => {
|
|
15981
|
-
this.sendCommand(
|
|
15982
|
-
|
|
15983
|
-
|
|
15984
|
-
|
|
15985
|
-
|
|
16067
|
+
this.sendCommand(
|
|
16068
|
+
{
|
|
16069
|
+
type: {
|
|
16070
|
+
oneofKind: "modifyGameplay",
|
|
16071
|
+
modifyGameplay: {
|
|
16072
|
+
modifier: 0 /* InvertColors */
|
|
16073
|
+
}
|
|
15986
16074
|
}
|
|
15987
|
-
}
|
|
15988
|
-
|
|
16075
|
+
},
|
|
16076
|
+
userIds
|
|
16077
|
+
);
|
|
15989
16078
|
};
|
|
15990
16079
|
flipHands = (userIds) => {
|
|
15991
|
-
this.sendCommand(
|
|
15992
|
-
|
|
15993
|
-
|
|
15994
|
-
|
|
15995
|
-
|
|
16080
|
+
this.sendCommand(
|
|
16081
|
+
{
|
|
16082
|
+
type: {
|
|
16083
|
+
oneofKind: "modifyGameplay",
|
|
16084
|
+
modifyGameplay: {
|
|
16085
|
+
modifier: 1 /* InvertHandedness */
|
|
16086
|
+
}
|
|
15996
16087
|
}
|
|
15997
|
-
}
|
|
15998
|
-
|
|
16088
|
+
},
|
|
16089
|
+
userIds
|
|
16090
|
+
);
|
|
15999
16091
|
};
|
|
16000
16092
|
showLoadedImage = (userIds) => {
|
|
16001
|
-
this.sendCommand(
|
|
16002
|
-
|
|
16003
|
-
|
|
16004
|
-
|
|
16005
|
-
|
|
16006
|
-
|
|
16093
|
+
this.sendCommand(
|
|
16094
|
+
{
|
|
16095
|
+
type: {
|
|
16096
|
+
oneofKind: "streamSyncShowImage",
|
|
16097
|
+
streamSyncShowImage: true
|
|
16098
|
+
}
|
|
16099
|
+
},
|
|
16100
|
+
userIds
|
|
16101
|
+
);
|
|
16007
16102
|
};
|
|
16008
16103
|
delayTestFinished = (userIds) => {
|
|
16009
|
-
this.sendCommand(
|
|
16010
|
-
|
|
16011
|
-
|
|
16012
|
-
|
|
16013
|
-
|
|
16014
|
-
|
|
16104
|
+
this.sendCommand(
|
|
16105
|
+
{
|
|
16106
|
+
type: {
|
|
16107
|
+
oneofKind: "delayTestFinish",
|
|
16108
|
+
delayTestFinish: true
|
|
16109
|
+
}
|
|
16110
|
+
},
|
|
16111
|
+
userIds
|
|
16112
|
+
);
|
|
16015
16113
|
};
|
|
16016
16114
|
// --- Requests --- //
|
|
16017
16115
|
joinTournament = async (tournamentId) => {
|
|
@@ -16046,51 +16144,62 @@ var TAClient = class extends CustomEventEmitter {
|
|
|
16046
16144
|
return response[0].response;
|
|
16047
16145
|
};
|
|
16048
16146
|
loadSong = async (levelId, userIds, timeout) => {
|
|
16049
|
-
const response = await this.sendRequest(
|
|
16050
|
-
|
|
16051
|
-
|
|
16052
|
-
|
|
16053
|
-
|
|
16054
|
-
|
|
16147
|
+
const response = await this.sendRequest(
|
|
16148
|
+
{
|
|
16149
|
+
type: {
|
|
16150
|
+
oneofKind: "loadSong",
|
|
16151
|
+
loadSong: {
|
|
16152
|
+
levelId,
|
|
16153
|
+
customHostUrl: ""
|
|
16154
|
+
}
|
|
16055
16155
|
}
|
|
16056
|
-
}
|
|
16057
|
-
|
|
16156
|
+
},
|
|
16157
|
+
userIds,
|
|
16158
|
+
timeout
|
|
16159
|
+
);
|
|
16058
16160
|
if (response.length <= 0) {
|
|
16059
16161
|
throw new Error("Server timed out, or no users responded");
|
|
16060
16162
|
}
|
|
16061
16163
|
return response;
|
|
16062
16164
|
};
|
|
16063
16165
|
loadImage = async (bitmap, userIds) => {
|
|
16064
|
-
const response = await this.sendRequest(
|
|
16065
|
-
|
|
16066
|
-
|
|
16067
|
-
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16166
|
+
const response = await this.sendRequest(
|
|
16167
|
+
{
|
|
16168
|
+
type: {
|
|
16169
|
+
oneofKind: "preloadImageForStreamSync",
|
|
16170
|
+
preloadImageForStreamSync: {
|
|
16171
|
+
fileId: v4_default(),
|
|
16172
|
+
data: bitmap,
|
|
16173
|
+
compressed: false
|
|
16174
|
+
}
|
|
16071
16175
|
}
|
|
16072
|
-
}
|
|
16073
|
-
|
|
16176
|
+
},
|
|
16177
|
+
userIds
|
|
16178
|
+
);
|
|
16074
16179
|
if (response.length <= 0) {
|
|
16075
16180
|
throw new Error("Server timed out, or no users responded");
|
|
16076
16181
|
}
|
|
16077
16182
|
return response;
|
|
16078
16183
|
};
|
|
16079
16184
|
showPrompt = async (userIds, titleText, bodyText, canClose, options, timer) => {
|
|
16080
|
-
const response = await this.sendRequest(
|
|
16081
|
-
|
|
16082
|
-
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
|
|
16086
|
-
|
|
16087
|
-
|
|
16088
|
-
|
|
16089
|
-
|
|
16090
|
-
|
|
16185
|
+
const response = await this.sendRequest(
|
|
16186
|
+
{
|
|
16187
|
+
type: {
|
|
16188
|
+
oneofKind: "showPrompt",
|
|
16189
|
+
showPrompt: {
|
|
16190
|
+
promptId: v4_default(),
|
|
16191
|
+
messageTitle: titleText,
|
|
16192
|
+
messageText: bodyText,
|
|
16193
|
+
showTimer: !!timer,
|
|
16194
|
+
timeout: timer ?? 0,
|
|
16195
|
+
canClose,
|
|
16196
|
+
options
|
|
16197
|
+
}
|
|
16091
16198
|
}
|
|
16092
|
-
}
|
|
16093
|
-
|
|
16199
|
+
},
|
|
16200
|
+
userIds,
|
|
16201
|
+
timer ? timer * 1e3 : timer
|
|
16202
|
+
);
|
|
16094
16203
|
if (response.length <= 0) {
|
|
16095
16204
|
throw new Error("Server timed out, or no users responded");
|
|
16096
16205
|
}
|
|
@@ -16110,7 +16219,11 @@ var TAClient = class extends CustomEventEmitter {
|
|
|
16110
16219
|
} else if (packet.packet.oneofKind === "request") {
|
|
16111
16220
|
const request = packet.packet.request;
|
|
16112
16221
|
if (request.type.oneofKind === "loadSong") {
|
|
16113
|
-
this.emit("loadSongRequested", [
|
|
16222
|
+
this.emit("loadSongRequested", [
|
|
16223
|
+
packet.id,
|
|
16224
|
+
packet.from,
|
|
16225
|
+
request.type.loadSong
|
|
16226
|
+
]);
|
|
16114
16227
|
}
|
|
16115
16228
|
} else if (packet.packet.oneofKind === "response") {
|
|
16116
16229
|
const response = packet.packet.response;
|
|
@@ -16242,6 +16355,8 @@ var TAClient = class extends CustomEventEmitter {
|
|
|
16242
16355
|
this.emit("songFinished", push.data.songFinished);
|
|
16243
16356
|
} else if (push.data.oneofKind === "realtimeScore") {
|
|
16244
16357
|
this.emit("realtimeScore", push.data.realtimeScore);
|
|
16358
|
+
} else if (push.data.oneofKind === "qualifierScoreSubmtited") {
|
|
16359
|
+
this.emit("qualifierScoreSubmitted", push.data.qualifierScoreSubmtited);
|
|
16245
16360
|
}
|
|
16246
16361
|
}
|
|
16247
16362
|
};
|
|
@@ -16999,6 +17114,7 @@ export {
|
|
|
16999
17114
|
PlayerSpecificSettings_NoteJumpDurationTypeSettings,
|
|
17000
17115
|
PlayerSpecificSettings_PlayerOptions,
|
|
17001
17116
|
Push,
|
|
17117
|
+
Push_QualifierScoreSubmitted,
|
|
17002
17118
|
Push_SongFinished,
|
|
17003
17119
|
Push_SongFinished_CompletionType,
|
|
17004
17120
|
QualifierEvent,
|
package/dist/models/pushes.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ import type { BinaryReadOptions } from "@protobuf-ts/runtime";
|
|
|
4
4
|
import type { IBinaryReader } from "@protobuf-ts/runtime";
|
|
5
5
|
import type { PartialMessage } from "@protobuf-ts/runtime";
|
|
6
6
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
7
|
+
import { LeaderboardEntry } from './models.js';
|
|
8
|
+
import { GameplayParameters } from './models.js';
|
|
9
|
+
import { QualifierEvent } from './models.js';
|
|
7
10
|
import { Beatmap } from './models.js';
|
|
8
11
|
import { User } from './models.js';
|
|
9
12
|
import { RealtimeScore } from './models.js';
|
|
@@ -28,6 +31,12 @@ export interface Push {
|
|
|
28
31
|
* @generated from protobuf field: proto.packets.Push.SongFinished song_finished = 2;
|
|
29
32
|
*/
|
|
30
33
|
songFinished: Push_SongFinished;
|
|
34
|
+
} | {
|
|
35
|
+
oneofKind: "qualifierScoreSubmtited";
|
|
36
|
+
/**
|
|
37
|
+
* @generated from protobuf field: proto.packets.Push.QualifierScoreSubmitted qualifier_score_submtited = 3;
|
|
38
|
+
*/
|
|
39
|
+
qualifierScoreSubmtited: Push_QualifierScoreSubmitted;
|
|
31
40
|
} | {
|
|
32
41
|
oneofKind: undefined;
|
|
33
42
|
};
|
|
@@ -94,6 +103,27 @@ export declare enum Push_SongFinished_CompletionType {
|
|
|
94
103
|
*/
|
|
95
104
|
Quit = 2
|
|
96
105
|
}
|
|
106
|
+
/**
|
|
107
|
+
* @generated from protobuf message proto.packets.Push.QualifierScoreSubmitted
|
|
108
|
+
*/
|
|
109
|
+
export interface Push_QualifierScoreSubmitted {
|
|
110
|
+
/**
|
|
111
|
+
* @generated from protobuf field: string tournament_id = 1;
|
|
112
|
+
*/
|
|
113
|
+
tournamentId: string;
|
|
114
|
+
/**
|
|
115
|
+
* @generated from protobuf field: proto.models.QualifierEvent event = 2;
|
|
116
|
+
*/
|
|
117
|
+
event?: QualifierEvent;
|
|
118
|
+
/**
|
|
119
|
+
* @generated from protobuf field: proto.models.GameplayParameters map = 3;
|
|
120
|
+
*/
|
|
121
|
+
map?: GameplayParameters;
|
|
122
|
+
/**
|
|
123
|
+
* @generated from protobuf field: proto.models.LeaderboardEntry qualifier_score = 4;
|
|
124
|
+
*/
|
|
125
|
+
qualifierScore?: LeaderboardEntry;
|
|
126
|
+
}
|
|
97
127
|
declare class Push$Type extends MessageType<Push> {
|
|
98
128
|
constructor();
|
|
99
129
|
create(value?: PartialMessage<Push>): Push;
|
|
@@ -114,4 +144,14 @@ declare class Push_SongFinished$Type extends MessageType<Push_SongFinished> {
|
|
|
114
144
|
* @generated MessageType for protobuf message proto.packets.Push.SongFinished
|
|
115
145
|
*/
|
|
116
146
|
export declare const Push_SongFinished: Push_SongFinished$Type;
|
|
147
|
+
declare class Push_QualifierScoreSubmitted$Type extends MessageType<Push_QualifierScoreSubmitted> {
|
|
148
|
+
constructor();
|
|
149
|
+
create(value?: PartialMessage<Push_QualifierScoreSubmitted>): Push_QualifierScoreSubmitted;
|
|
150
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Push_QualifierScoreSubmitted): Push_QualifierScoreSubmitted;
|
|
151
|
+
internalBinaryWrite(message: Push_QualifierScoreSubmitted, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* @generated MessageType for protobuf message proto.packets.Push.QualifierScoreSubmitted
|
|
155
|
+
*/
|
|
156
|
+
export declare const Push_QualifierScoreSubmitted: Push_QualifierScoreSubmitted$Type;
|
|
117
157
|
export {};
|
package/dist/models/pushes.js
CHANGED
|
@@ -3,6 +3,9 @@ import { UnknownFieldHandler } from "@protobuf-ts/runtime";
|
|
|
3
3
|
import { reflectionMergePartial } from "@protobuf-ts/runtime";
|
|
4
4
|
import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
5
5
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
6
|
+
import { LeaderboardEntry } from './models.js';
|
|
7
|
+
import { GameplayParameters } from './models.js';
|
|
8
|
+
import { QualifierEvent } from './models.js';
|
|
6
9
|
import { Beatmap } from './models.js';
|
|
7
10
|
import { User } from './models.js';
|
|
8
11
|
import { RealtimeScore } from './models.js';
|
|
@@ -29,7 +32,8 @@ class Push$Type extends MessageType {
|
|
|
29
32
|
constructor() {
|
|
30
33
|
super("proto.packets.Push", [
|
|
31
34
|
{ no: 1, name: "realtime_score", kind: "message", oneof: "data", T: () => RealtimeScore },
|
|
32
|
-
{ no: 2, name: "song_finished", kind: "message", oneof: "data", T: () => Push_SongFinished }
|
|
35
|
+
{ no: 2, name: "song_finished", kind: "message", oneof: "data", T: () => Push_SongFinished },
|
|
36
|
+
{ no: 3, name: "qualifier_score_submtited", kind: "message", oneof: "data", T: () => Push_QualifierScoreSubmitted }
|
|
33
37
|
]);
|
|
34
38
|
}
|
|
35
39
|
create(value) {
|
|
@@ -56,6 +60,12 @@ class Push$Type extends MessageType {
|
|
|
56
60
|
songFinished: Push_SongFinished.internalBinaryRead(reader, reader.uint32(), options, message.data.songFinished)
|
|
57
61
|
};
|
|
58
62
|
break;
|
|
63
|
+
case /* proto.packets.Push.QualifierScoreSubmitted qualifier_score_submtited */ 3:
|
|
64
|
+
message.data = {
|
|
65
|
+
oneofKind: "qualifierScoreSubmtited",
|
|
66
|
+
qualifierScoreSubmtited: Push_QualifierScoreSubmitted.internalBinaryRead(reader, reader.uint32(), options, message.data.qualifierScoreSubmtited)
|
|
67
|
+
};
|
|
68
|
+
break;
|
|
59
69
|
default:
|
|
60
70
|
let u = options.readUnknownField;
|
|
61
71
|
if (u === "throw")
|
|
@@ -74,6 +84,9 @@ class Push$Type extends MessageType {
|
|
|
74
84
|
/* proto.packets.Push.SongFinished song_finished = 2; */
|
|
75
85
|
if (message.data.oneofKind === "songFinished")
|
|
76
86
|
Push_SongFinished.internalBinaryWrite(message.data.songFinished, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
87
|
+
/* proto.packets.Push.QualifierScoreSubmitted qualifier_score_submtited = 3; */
|
|
88
|
+
if (message.data.oneofKind === "qualifierScoreSubmtited")
|
|
89
|
+
Push_QualifierScoreSubmitted.internalBinaryWrite(message.data.qualifierScoreSubmtited, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
77
90
|
let u = options.writeUnknownFields;
|
|
78
91
|
if (u !== false)
|
|
79
92
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -194,3 +207,71 @@ class Push_SongFinished$Type extends MessageType {
|
|
|
194
207
|
* @generated MessageType for protobuf message proto.packets.Push.SongFinished
|
|
195
208
|
*/
|
|
196
209
|
export const Push_SongFinished = new Push_SongFinished$Type();
|
|
210
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
211
|
+
class Push_QualifierScoreSubmitted$Type extends MessageType {
|
|
212
|
+
constructor() {
|
|
213
|
+
super("proto.packets.Push.QualifierScoreSubmitted", [
|
|
214
|
+
{ no: 1, name: "tournament_id", kind: "scalar", T: 9 /*ScalarType.STRING*/ },
|
|
215
|
+
{ no: 2, name: "event", kind: "message", T: () => QualifierEvent },
|
|
216
|
+
{ no: 3, name: "map", kind: "message", T: () => GameplayParameters },
|
|
217
|
+
{ no: 4, name: "qualifier_score", kind: "message", T: () => LeaderboardEntry }
|
|
218
|
+
]);
|
|
219
|
+
}
|
|
220
|
+
create(value) {
|
|
221
|
+
const message = { tournamentId: "" };
|
|
222
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
223
|
+
if (value !== undefined)
|
|
224
|
+
reflectionMergePartial(this, message, value);
|
|
225
|
+
return message;
|
|
226
|
+
}
|
|
227
|
+
internalBinaryRead(reader, length, options, target) {
|
|
228
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
229
|
+
while (reader.pos < end) {
|
|
230
|
+
let [fieldNo, wireType] = reader.tag();
|
|
231
|
+
switch (fieldNo) {
|
|
232
|
+
case /* string tournament_id */ 1:
|
|
233
|
+
message.tournamentId = reader.string();
|
|
234
|
+
break;
|
|
235
|
+
case /* proto.models.QualifierEvent event */ 2:
|
|
236
|
+
message.event = QualifierEvent.internalBinaryRead(reader, reader.uint32(), options, message.event);
|
|
237
|
+
break;
|
|
238
|
+
case /* proto.models.GameplayParameters map */ 3:
|
|
239
|
+
message.map = GameplayParameters.internalBinaryRead(reader, reader.uint32(), options, message.map);
|
|
240
|
+
break;
|
|
241
|
+
case /* proto.models.LeaderboardEntry qualifier_score */ 4:
|
|
242
|
+
message.qualifierScore = LeaderboardEntry.internalBinaryRead(reader, reader.uint32(), options, message.qualifierScore);
|
|
243
|
+
break;
|
|
244
|
+
default:
|
|
245
|
+
let u = options.readUnknownField;
|
|
246
|
+
if (u === "throw")
|
|
247
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
248
|
+
let d = reader.skip(wireType);
|
|
249
|
+
if (u !== false)
|
|
250
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return message;
|
|
254
|
+
}
|
|
255
|
+
internalBinaryWrite(message, writer, options) {
|
|
256
|
+
/* string tournament_id = 1; */
|
|
257
|
+
if (message.tournamentId !== "")
|
|
258
|
+
writer.tag(1, WireType.LengthDelimited).string(message.tournamentId);
|
|
259
|
+
/* proto.models.QualifierEvent event = 2; */
|
|
260
|
+
if (message.event)
|
|
261
|
+
QualifierEvent.internalBinaryWrite(message.event, writer.tag(2, WireType.LengthDelimited).fork(), options).join();
|
|
262
|
+
/* proto.models.GameplayParameters map = 3; */
|
|
263
|
+
if (message.map)
|
|
264
|
+
GameplayParameters.internalBinaryWrite(message.map, writer.tag(3, WireType.LengthDelimited).fork(), options).join();
|
|
265
|
+
/* proto.models.LeaderboardEntry qualifier_score = 4; */
|
|
266
|
+
if (message.qualifierScore)
|
|
267
|
+
LeaderboardEntry.internalBinaryWrite(message.qualifierScore, writer.tag(4, WireType.LengthDelimited).fork(), options).join();
|
|
268
|
+
let u = options.writeUnknownFields;
|
|
269
|
+
if (u !== false)
|
|
270
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
271
|
+
return writer;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* @generated MessageType for protobuf message proto.packets.Push.QualifierScoreSubmitted
|
|
276
|
+
*/
|
|
277
|
+
export const Push_QualifierScoreSubmitted = new Push_QualifierScoreSubmitted$Type();
|
|
@@ -3,7 +3,7 @@ import { User, Match, QualifierEvent, CoreServer, Tournament, GameplayParameters
|
|
|
3
3
|
import { StateManager } from "./state-manager.js";
|
|
4
4
|
import { Response, Response_Connect } from "./models/responses.js";
|
|
5
5
|
import { Request_LoadSong, Request_ShowPrompt_PromptOption } from "./models/requests.js";
|
|
6
|
-
import { Channel, Push_SongFinished } from "./models/index.js";
|
|
6
|
+
import { Channel, Push_QualifierScoreSubmitted, Push_SongFinished } from "./models/index.js";
|
|
7
7
|
export * from "./scraper.js";
|
|
8
8
|
export * from "./models/models.js";
|
|
9
9
|
export type ResponseFromUser = {
|
|
@@ -19,6 +19,7 @@ type TAClientEvents = {
|
|
|
19
19
|
loadSongRequested: [string, string, Request_LoadSong];
|
|
20
20
|
songFinished: Push_SongFinished;
|
|
21
21
|
realtimeScore: RealtimeScore;
|
|
22
|
+
qualifierScoreSubmitted: Push_QualifierScoreSubmitted;
|
|
22
23
|
responseReceived: ResponseFromUser;
|
|
23
24
|
joinedTournament: {};
|
|
24
25
|
failedToJoinTournament: {};
|
|
@@ -51,7 +51,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
51
51
|
oneofKind: "connect",
|
|
52
52
|
connect: {
|
|
53
53
|
clientVersion: versionCode,
|
|
54
|
-
uiVersion: this.uiVersion ?? 0
|
|
54
|
+
uiVersion: this.uiVersion ?? 0,
|
|
55
55
|
},
|
|
56
56
|
},
|
|
57
57
|
});
|
|
@@ -195,8 +195,8 @@ export class TAClient extends CustomEventEmitter {
|
|
|
195
195
|
type: Response_ResponseType.Fail,
|
|
196
196
|
respondingToPacketId: packet.id,
|
|
197
197
|
details: {
|
|
198
|
-
oneofKind: undefined
|
|
199
|
-
}
|
|
198
|
+
oneofKind: undefined,
|
|
199
|
+
},
|
|
200
200
|
},
|
|
201
201
|
});
|
|
202
202
|
}
|
|
@@ -263,7 +263,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
263
263
|
type: {
|
|
264
264
|
oneofKind: "modifyGameplay",
|
|
265
265
|
modifyGameplay: {
|
|
266
|
-
modifier: Command_ModifyGameplay_Modifier.InvertColors
|
|
266
|
+
modifier: Command_ModifyGameplay_Modifier.InvertColors,
|
|
267
267
|
},
|
|
268
268
|
},
|
|
269
269
|
}, userIds);
|
|
@@ -273,7 +273,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
273
273
|
type: {
|
|
274
274
|
oneofKind: "modifyGameplay",
|
|
275
275
|
modifyGameplay: {
|
|
276
|
-
modifier: Command_ModifyGameplay_Modifier.InvertHandedness
|
|
276
|
+
modifier: Command_ModifyGameplay_Modifier.InvertHandedness,
|
|
277
277
|
},
|
|
278
278
|
},
|
|
279
279
|
}, userIds);
|
|
@@ -332,7 +332,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
332
332
|
oneofKind: "loadSong",
|
|
333
333
|
loadSong: {
|
|
334
334
|
levelId,
|
|
335
|
-
customHostUrl: ""
|
|
335
|
+
customHostUrl: "",
|
|
336
336
|
},
|
|
337
337
|
},
|
|
338
338
|
}, userIds, timeout);
|
|
@@ -348,7 +348,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
348
348
|
preloadImageForStreamSync: {
|
|
349
349
|
fileId: uuidv4(),
|
|
350
350
|
data: bitmap,
|
|
351
|
-
compressed: false
|
|
351
|
+
compressed: false,
|
|
352
352
|
},
|
|
353
353
|
},
|
|
354
354
|
}, userIds);
|
|
@@ -368,7 +368,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
368
368
|
showTimer: !!timer,
|
|
369
369
|
timeout: timer ?? 0,
|
|
370
370
|
canClose: canClose,
|
|
371
|
-
options
|
|
371
|
+
options,
|
|
372
372
|
},
|
|
373
373
|
},
|
|
374
374
|
}, userIds, timer ? timer * 1000 : timer);
|
|
@@ -397,14 +397,18 @@ export class TAClient extends CustomEventEmitter {
|
|
|
397
397
|
// }
|
|
398
398
|
if (packet.packet.oneofKind === "command") {
|
|
399
399
|
const command = packet.packet.command;
|
|
400
|
-
if (command.type.oneofKind ===
|
|
400
|
+
if (command.type.oneofKind === "discordAuthorize") {
|
|
401
401
|
this.emit("authorizationRequestedFromServer", command.type.discordAuthorize);
|
|
402
402
|
}
|
|
403
403
|
}
|
|
404
|
-
else if (packet.packet.oneofKind ===
|
|
404
|
+
else if (packet.packet.oneofKind === "request") {
|
|
405
405
|
const request = packet.packet.request;
|
|
406
|
-
if (request.type.oneofKind ===
|
|
407
|
-
this.emit("loadSongRequested", [
|
|
406
|
+
if (request.type.oneofKind === "loadSong") {
|
|
407
|
+
this.emit("loadSongRequested", [
|
|
408
|
+
packet.id,
|
|
409
|
+
packet.from,
|
|
410
|
+
request.type.loadSong,
|
|
411
|
+
]);
|
|
408
412
|
}
|
|
409
413
|
}
|
|
410
414
|
else if (packet.packet.oneofKind === "response") {
|
|
@@ -543,6 +547,9 @@ export class TAClient extends CustomEventEmitter {
|
|
|
543
547
|
else if (push.data.oneofKind === "realtimeScore") {
|
|
544
548
|
this.emit("realtimeScore", push.data.realtimeScore);
|
|
545
549
|
}
|
|
550
|
+
else if (push.data.oneofKind === "qualifierScoreSubmtited") {
|
|
551
|
+
this.emit("qualifierScoreSubmitted", push.data.qualifierScoreSubmtited);
|
|
552
|
+
}
|
|
546
553
|
}
|
|
547
554
|
};
|
|
548
555
|
// --- State Actions --- //
|
|
@@ -584,7 +591,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
584
591
|
addUserToMatch: {
|
|
585
592
|
tournamentId,
|
|
586
593
|
matchId,
|
|
587
|
-
userId
|
|
594
|
+
userId,
|
|
588
595
|
},
|
|
589
596
|
},
|
|
590
597
|
});
|
|
@@ -600,7 +607,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
600
607
|
removeUserFromMatch: {
|
|
601
608
|
tournamentId,
|
|
602
609
|
matchId,
|
|
603
|
-
userId
|
|
610
|
+
userId,
|
|
604
611
|
},
|
|
605
612
|
},
|
|
606
613
|
});
|
|
@@ -616,7 +623,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
616
623
|
setMatchLeader: {
|
|
617
624
|
tournamentId,
|
|
618
625
|
matchId,
|
|
619
|
-
userId
|
|
626
|
+
userId,
|
|
620
627
|
},
|
|
621
628
|
},
|
|
622
629
|
});
|
|
@@ -632,7 +639,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
632
639
|
setMatchMap: {
|
|
633
640
|
tournamentId,
|
|
634
641
|
matchId,
|
|
635
|
-
map
|
|
642
|
+
map,
|
|
636
643
|
},
|
|
637
644
|
},
|
|
638
645
|
});
|
|
@@ -678,7 +685,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
678
685
|
setQualifierName: {
|
|
679
686
|
tournamentId,
|
|
680
687
|
qualifierId,
|
|
681
|
-
qualifierName
|
|
688
|
+
qualifierName,
|
|
682
689
|
},
|
|
683
690
|
},
|
|
684
691
|
});
|
|
@@ -694,7 +701,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
694
701
|
setQualifierImage: {
|
|
695
702
|
tournamentId,
|
|
696
703
|
qualifierId,
|
|
697
|
-
qualifierImage
|
|
704
|
+
qualifierImage,
|
|
698
705
|
},
|
|
699
706
|
},
|
|
700
707
|
});
|
|
@@ -710,7 +717,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
710
717
|
setQualifierInfoChannel: {
|
|
711
718
|
tournamentId,
|
|
712
719
|
qualifierId,
|
|
713
|
-
infoChannel
|
|
720
|
+
infoChannel,
|
|
714
721
|
},
|
|
715
722
|
},
|
|
716
723
|
});
|
|
@@ -726,7 +733,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
726
733
|
setQualifierFlags: {
|
|
727
734
|
tournamentId,
|
|
728
735
|
qualifierId,
|
|
729
|
-
qualifierFlags
|
|
736
|
+
qualifierFlags,
|
|
730
737
|
},
|
|
731
738
|
},
|
|
732
739
|
});
|
|
@@ -742,7 +749,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
742
749
|
setQualifierLeaderboardSort: {
|
|
743
750
|
tournamentId,
|
|
744
751
|
qualifierId,
|
|
745
|
-
qualifierLeaderboardSort
|
|
752
|
+
qualifierLeaderboardSort,
|
|
746
753
|
},
|
|
747
754
|
},
|
|
748
755
|
});
|
|
@@ -758,7 +765,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
758
765
|
addQualifierMaps: {
|
|
759
766
|
tournamentId,
|
|
760
767
|
qualifierId,
|
|
761
|
-
maps
|
|
768
|
+
maps,
|
|
762
769
|
},
|
|
763
770
|
},
|
|
764
771
|
});
|
|
@@ -774,7 +781,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
774
781
|
updateQualifierMap: {
|
|
775
782
|
tournamentId,
|
|
776
783
|
qualifierId,
|
|
777
|
-
map
|
|
784
|
+
map,
|
|
778
785
|
},
|
|
779
786
|
},
|
|
780
787
|
});
|
|
@@ -790,7 +797,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
790
797
|
removeQualifierMap: {
|
|
791
798
|
tournamentId,
|
|
792
799
|
qualifierId,
|
|
793
|
-
mapId
|
|
800
|
+
mapId,
|
|
794
801
|
},
|
|
795
802
|
},
|
|
796
803
|
});
|
|
@@ -821,7 +828,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
821
828
|
addAuthorizedUser: {
|
|
822
829
|
tournamentId,
|
|
823
830
|
discordId,
|
|
824
|
-
permissionFlags
|
|
831
|
+
permissionFlags,
|
|
825
832
|
},
|
|
826
833
|
},
|
|
827
834
|
});
|
|
@@ -836,7 +843,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
836
843
|
oneofKind: "removeAuthorizedUser",
|
|
837
844
|
removeAuthorizedUser: {
|
|
838
845
|
tournamentId,
|
|
839
|
-
discordId
|
|
846
|
+
discordId,
|
|
840
847
|
},
|
|
841
848
|
},
|
|
842
849
|
});
|
|
@@ -865,7 +872,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
865
872
|
oneofKind: "getDiscordInfo",
|
|
866
873
|
getDiscordInfo: {
|
|
867
874
|
tournamentId,
|
|
868
|
-
discordId
|
|
875
|
+
discordId,
|
|
869
876
|
},
|
|
870
877
|
},
|
|
871
878
|
});
|
|
@@ -879,7 +886,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
879
886
|
type: {
|
|
880
887
|
oneofKind: "getBotTokensForUser",
|
|
881
888
|
getBotTokensForUser: {
|
|
882
|
-
ownerDiscordId
|
|
889
|
+
ownerDiscordId,
|
|
883
890
|
},
|
|
884
891
|
},
|
|
885
892
|
});
|
|
@@ -893,7 +900,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
893
900
|
type: {
|
|
894
901
|
oneofKind: "generateBotToken",
|
|
895
902
|
generateBotToken: {
|
|
896
|
-
username
|
|
903
|
+
username,
|
|
897
904
|
},
|
|
898
905
|
},
|
|
899
906
|
});
|
|
@@ -907,7 +914,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
907
914
|
type: {
|
|
908
915
|
oneofKind: "revokeBotToken",
|
|
909
916
|
revokeBotToken: {
|
|
910
|
-
botTokenGuid
|
|
917
|
+
botTokenGuid,
|
|
911
918
|
},
|
|
912
919
|
},
|
|
913
920
|
});
|
|
@@ -936,7 +943,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
936
943
|
oneofKind: "setTournamentName",
|
|
937
944
|
setTournamentName: {
|
|
938
945
|
tournamentId,
|
|
939
|
-
tournamentName
|
|
946
|
+
tournamentName,
|
|
940
947
|
},
|
|
941
948
|
},
|
|
942
949
|
});
|
|
@@ -951,7 +958,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
951
958
|
oneofKind: "setTournamentImage",
|
|
952
959
|
setTournamentImage: {
|
|
953
960
|
tournamentId,
|
|
954
|
-
tournamentImage
|
|
961
|
+
tournamentImage,
|
|
955
962
|
},
|
|
956
963
|
},
|
|
957
964
|
});
|
|
@@ -966,7 +973,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
966
973
|
oneofKind: "setTournamentEnableTeams",
|
|
967
974
|
setTournamentEnableTeams: {
|
|
968
975
|
tournamentId,
|
|
969
|
-
enableTeams
|
|
976
|
+
enableTeams,
|
|
970
977
|
},
|
|
971
978
|
},
|
|
972
979
|
});
|
|
@@ -981,7 +988,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
981
988
|
oneofKind: "setTournamentEnablePools",
|
|
982
989
|
setTournamentEnablePools: {
|
|
983
990
|
tournamentId,
|
|
984
|
-
enablePools
|
|
991
|
+
enablePools,
|
|
985
992
|
},
|
|
986
993
|
},
|
|
987
994
|
});
|
|
@@ -996,7 +1003,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
996
1003
|
oneofKind: "setTournamentShowTournamentButton",
|
|
997
1004
|
setTournamentShowTournamentButton: {
|
|
998
1005
|
tournamentId,
|
|
999
|
-
showTournamentButton
|
|
1006
|
+
showTournamentButton,
|
|
1000
1007
|
},
|
|
1001
1008
|
},
|
|
1002
1009
|
});
|
|
@@ -1011,7 +1018,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1011
1018
|
oneofKind: "setTournamentShowQualifierButton",
|
|
1012
1019
|
setTournamentShowQualifierButton: {
|
|
1013
1020
|
tournamentId,
|
|
1014
|
-
showQualifierButton
|
|
1021
|
+
showQualifierButton,
|
|
1015
1022
|
},
|
|
1016
1023
|
},
|
|
1017
1024
|
});
|
|
@@ -1026,7 +1033,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1026
1033
|
oneofKind: "setTournamentAllowUnauthorizedView",
|
|
1027
1034
|
setTournamentAllowUnauthorizedView: {
|
|
1028
1035
|
tournamentId,
|
|
1029
|
-
allowUnauthorizedView
|
|
1036
|
+
allowUnauthorizedView,
|
|
1030
1037
|
},
|
|
1031
1038
|
},
|
|
1032
1039
|
});
|
|
@@ -1041,7 +1048,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1041
1048
|
oneofKind: "setTournamentScoreUpdateFrequency",
|
|
1042
1049
|
setTournamentScoreUpdateFrequency: {
|
|
1043
1050
|
tournamentId,
|
|
1044
|
-
scoreUpdateFrequency
|
|
1051
|
+
scoreUpdateFrequency,
|
|
1045
1052
|
},
|
|
1046
1053
|
},
|
|
1047
1054
|
});
|
|
@@ -1053,10 +1060,10 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1053
1060
|
setTournamentBannedMods = async (tournamentId, bannedMods) => {
|
|
1054
1061
|
const response = await this.sendRequest({
|
|
1055
1062
|
type: {
|
|
1056
|
-
oneofKind:
|
|
1063
|
+
oneofKind: "setTournamentBannedMods",
|
|
1057
1064
|
setTournamentBannedMods: {
|
|
1058
1065
|
tournamentId,
|
|
1059
|
-
bannedMods
|
|
1066
|
+
bannedMods,
|
|
1060
1067
|
},
|
|
1061
1068
|
},
|
|
1062
1069
|
});
|
|
@@ -1071,7 +1078,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1071
1078
|
oneofKind: "addTournamentTeam",
|
|
1072
1079
|
addTournamentTeam: {
|
|
1073
1080
|
tournamentId,
|
|
1074
|
-
team
|
|
1081
|
+
team,
|
|
1075
1082
|
},
|
|
1076
1083
|
},
|
|
1077
1084
|
});
|
|
@@ -1087,7 +1094,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1087
1094
|
setTournamentTeamName: {
|
|
1088
1095
|
tournamentId,
|
|
1089
1096
|
teamId,
|
|
1090
|
-
teamName
|
|
1097
|
+
teamName,
|
|
1091
1098
|
},
|
|
1092
1099
|
},
|
|
1093
1100
|
});
|
|
@@ -1103,7 +1110,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1103
1110
|
setTournamentTeamImage: {
|
|
1104
1111
|
tournamentId,
|
|
1105
1112
|
teamId,
|
|
1106
|
-
teamImage
|
|
1113
|
+
teamImage,
|
|
1107
1114
|
},
|
|
1108
1115
|
},
|
|
1109
1116
|
});
|
|
@@ -1118,7 +1125,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1118
1125
|
oneofKind: "removeTournamentTeam",
|
|
1119
1126
|
removeTournamentTeam: {
|
|
1120
1127
|
tournamentId,
|
|
1121
|
-
teamId
|
|
1128
|
+
teamId,
|
|
1122
1129
|
},
|
|
1123
1130
|
},
|
|
1124
1131
|
});
|
|
@@ -1133,7 +1140,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1133
1140
|
oneofKind: "addTournamentPool",
|
|
1134
1141
|
addTournamentPool: {
|
|
1135
1142
|
tournamentId,
|
|
1136
|
-
pool
|
|
1143
|
+
pool,
|
|
1137
1144
|
},
|
|
1138
1145
|
},
|
|
1139
1146
|
});
|
|
@@ -1149,7 +1156,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1149
1156
|
setTournamentPoolName: {
|
|
1150
1157
|
tournamentId,
|
|
1151
1158
|
poolId,
|
|
1152
|
-
poolName
|
|
1159
|
+
poolName,
|
|
1153
1160
|
},
|
|
1154
1161
|
},
|
|
1155
1162
|
});
|
|
@@ -1165,7 +1172,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1165
1172
|
addTournamentPoolMaps: {
|
|
1166
1173
|
tournamentId,
|
|
1167
1174
|
poolId,
|
|
1168
|
-
maps
|
|
1175
|
+
maps,
|
|
1169
1176
|
},
|
|
1170
1177
|
},
|
|
1171
1178
|
});
|
|
@@ -1181,7 +1188,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1181
1188
|
updateTournamentPoolMap: {
|
|
1182
1189
|
tournamentId,
|
|
1183
1190
|
poolId,
|
|
1184
|
-
map
|
|
1191
|
+
map,
|
|
1185
1192
|
},
|
|
1186
1193
|
},
|
|
1187
1194
|
});
|
|
@@ -1197,7 +1204,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1197
1204
|
removeTournamentPoolMap: {
|
|
1198
1205
|
tournamentId,
|
|
1199
1206
|
poolId,
|
|
1200
|
-
mapId
|
|
1207
|
+
mapId,
|
|
1201
1208
|
},
|
|
1202
1209
|
},
|
|
1203
1210
|
});
|
|
@@ -1212,7 +1219,7 @@ export class TAClient extends CustomEventEmitter {
|
|
|
1212
1219
|
oneofKind: "removeTournamentPool",
|
|
1213
1220
|
removeTournamentPool: {
|
|
1214
1221
|
tournamentId,
|
|
1215
|
-
poolId
|
|
1222
|
+
poolId,
|
|
1216
1223
|
},
|
|
1217
1224
|
},
|
|
1218
1225
|
});
|