moons-ta-client 1.1.7 → 1.1.9
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 +82 -5
- package/dist/index.esm.js +165 -4
- package/dist/models/commands.d.ts +38 -0
- package/dist/models/commands.js +72 -1
- package/dist/models/pushes.d.ts +40 -0
- package/dist/models/pushes.js +82 -1
- package/dist/tournament-assistant-client.d.ts +2 -0
- package/dist/tournament-assistant-client.js +21 -0
- 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.9";
|
|
4
|
+
export declare const versionCode = 119;
|
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,8 +4391,52 @@ 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
|
|
|
4427
|
+
/**
|
|
4428
|
+
* @generated from protobuf enum proto.packets.Command.ModifyGameplay.Modifier
|
|
4429
|
+
*/
|
|
4430
|
+
declare enum Command_ModifyGameplay_Modifier {
|
|
4431
|
+
/**
|
|
4432
|
+
* @generated from protobuf enum value: InvertColors = 0;
|
|
4433
|
+
*/
|
|
4434
|
+
InvertColors = 0,
|
|
4435
|
+
/**
|
|
4436
|
+
* @generated from protobuf enum value: InvertHandedness = 1;
|
|
4437
|
+
*/
|
|
4438
|
+
InvertHandedness = 1
|
|
4439
|
+
}
|
|
4390
4440
|
declare class Command$Type extends MessageType<Command> {
|
|
4391
4441
|
constructor();
|
|
4392
4442
|
create(value?: PartialMessage<Command>): Command;
|
|
@@ -4444,6 +4494,12 @@ interface Command {
|
|
|
4444
4494
|
* @generated from protobuf field: string discord_authorize = 9;
|
|
4445
4495
|
*/
|
|
4446
4496
|
discordAuthorize: string;
|
|
4497
|
+
} | {
|
|
4498
|
+
oneofKind: "modifyGameplay";
|
|
4499
|
+
/**
|
|
4500
|
+
* @generated from protobuf field: proto.packets.Command.ModifyGameplay modify_gameplay = 10;
|
|
4501
|
+
*/
|
|
4502
|
+
modifyGameplay: Command_ModifyGameplay;
|
|
4447
4503
|
} | {
|
|
4448
4504
|
oneofKind: undefined;
|
|
4449
4505
|
};
|
|
@@ -4493,7 +4549,26 @@ interface Command_SendBotMessage {
|
|
|
4493
4549
|
/**
|
|
4494
4550
|
* @generated MessageType for protobuf message proto.packets.Command.SendBotMessage
|
|
4495
4551
|
*/
|
|
4496
|
-
declare const Command_SendBotMessage: Command_SendBotMessage$Type;
|
|
4552
|
+
declare const Command_SendBotMessage: Command_SendBotMessage$Type;
|
|
4553
|
+
declare class Command_ModifyGameplay$Type extends MessageType<Command_ModifyGameplay> {
|
|
4554
|
+
constructor();
|
|
4555
|
+
create(value?: PartialMessage<Command_ModifyGameplay>): Command_ModifyGameplay;
|
|
4556
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_ModifyGameplay): Command_ModifyGameplay;
|
|
4557
|
+
internalBinaryWrite(message: Command_ModifyGameplay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
4558
|
+
}
|
|
4559
|
+
/**
|
|
4560
|
+
* @generated from protobuf message proto.packets.Command.ModifyGameplay
|
|
4561
|
+
*/
|
|
4562
|
+
interface Command_ModifyGameplay {
|
|
4563
|
+
/**
|
|
4564
|
+
* @generated from protobuf field: proto.packets.Command.ModifyGameplay.Modifier modifier = 1;
|
|
4565
|
+
*/
|
|
4566
|
+
modifier: Command_ModifyGameplay_Modifier;
|
|
4567
|
+
}
|
|
4568
|
+
/**
|
|
4569
|
+
* @generated MessageType for protobuf message proto.packets.Command.ModifyGameplay
|
|
4570
|
+
*/
|
|
4571
|
+
declare const Command_ModifyGameplay: Command_ModifyGameplay$Type;
|
|
4497
4572
|
|
|
4498
4573
|
/**
|
|
4499
4574
|
* @generated from protobuf enum proto.packets.Acknowledgement.AcknowledgementType
|
|
@@ -4731,6 +4806,8 @@ declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
4731
4806
|
sendResponse(response: Response, to?: string[]): Promise<void>;
|
|
4732
4807
|
playSong: (gameplayParameters: GameplayParameters, userIds: string[]) => void;
|
|
4733
4808
|
returnToMenu: (userIds: string[]) => void;
|
|
4809
|
+
flipColors: (userIds: string[]) => void;
|
|
4810
|
+
flipHands: (userIds: string[]) => void;
|
|
4734
4811
|
showLoadedImage: (userIds: string[]) => void;
|
|
4735
4812
|
delayTestFinished: (userIds: string[]) => void;
|
|
4736
4813
|
joinTournament: (tournamentId: string) => Promise<Response>;
|
|
@@ -4789,7 +4866,7 @@ declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
4789
4866
|
|
|
4790
4867
|
declare const masterAddress = "server.tournamentassistant.net";
|
|
4791
4868
|
declare const masterPort = "8676";
|
|
4792
|
-
declare const version = "1.1.
|
|
4793
|
-
declare const versionCode =
|
|
4869
|
+
declare const version = "1.1.9";
|
|
4870
|
+
declare const versionCode = 119;
|
|
4794
4871
|
|
|
4795
|
-
export { Acknowledgement, Acknowledgement_AcknowledgementType, Beatmap, Channel, Characteristic, Command, 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 };
|
|
4872
|
+
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,11 +14672,86 @@ 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();
|
|
14668
14748
|
init_buffer2();
|
|
14669
14749
|
init_process2();
|
|
14750
|
+
var Command_ModifyGameplay_Modifier = /* @__PURE__ */ ((Command_ModifyGameplay_Modifier2) => {
|
|
14751
|
+
Command_ModifyGameplay_Modifier2[Command_ModifyGameplay_Modifier2["InvertColors"] = 0] = "InvertColors";
|
|
14752
|
+
Command_ModifyGameplay_Modifier2[Command_ModifyGameplay_Modifier2["InvertHandedness"] = 1] = "InvertHandedness";
|
|
14753
|
+
return Command_ModifyGameplay_Modifier2;
|
|
14754
|
+
})(Command_ModifyGameplay_Modifier || {});
|
|
14670
14755
|
var Command$Type = class extends MessageType {
|
|
14671
14756
|
constructor() {
|
|
14672
14757
|
super("proto.packets.Command", [
|
|
@@ -14711,7 +14796,8 @@ var Command$Type = class extends MessageType {
|
|
|
14711
14796
|
oneof: "type",
|
|
14712
14797
|
T: 9
|
|
14713
14798
|
/*ScalarType.STRING*/
|
|
14714
|
-
}
|
|
14799
|
+
},
|
|
14800
|
+
{ no: 10, name: "modify_gameplay", kind: "message", oneof: "type", T: () => Command_ModifyGameplay }
|
|
14715
14801
|
]);
|
|
14716
14802
|
}
|
|
14717
14803
|
create(value) {
|
|
@@ -14775,6 +14861,13 @@ var Command$Type = class extends MessageType {
|
|
|
14775
14861
|
discordAuthorize: reader.string()
|
|
14776
14862
|
};
|
|
14777
14863
|
break;
|
|
14864
|
+
case /* proto.packets.Command.ModifyGameplay modify_gameplay */
|
|
14865
|
+
10:
|
|
14866
|
+
message.type = {
|
|
14867
|
+
oneofKind: "modifyGameplay",
|
|
14868
|
+
modifyGameplay: Command_ModifyGameplay.internalBinaryRead(reader, reader.uint32(), options, message.type.modifyGameplay)
|
|
14869
|
+
};
|
|
14870
|
+
break;
|
|
14778
14871
|
default:
|
|
14779
14872
|
let u2 = options.readUnknownField;
|
|
14780
14873
|
if (u2 === "throw")
|
|
@@ -14801,6 +14894,8 @@ var Command$Type = class extends MessageType {
|
|
|
14801
14894
|
Command_SendBotMessage.internalBinaryWrite(message.type.sendBotMessage, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
|
|
14802
14895
|
if (message.type.oneofKind === "discordAuthorize")
|
|
14803
14896
|
writer.tag(9, WireType.LengthDelimited).string(message.type.discordAuthorize);
|
|
14897
|
+
if (message.type.oneofKind === "modifyGameplay")
|
|
14898
|
+
Command_ModifyGameplay.internalBinaryWrite(message.type.modifyGameplay, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
14804
14899
|
let u2 = options.writeUnknownFields;
|
|
14805
14900
|
if (u2 !== false)
|
|
14806
14901
|
(u2 == true ? UnknownFieldHandler.onWrite : u2)(this.typeName, message, writer);
|
|
@@ -14907,6 +15002,49 @@ var Command_SendBotMessage$Type = class extends MessageType {
|
|
|
14907
15002
|
}
|
|
14908
15003
|
};
|
|
14909
15004
|
var Command_SendBotMessage = new Command_SendBotMessage$Type();
|
|
15005
|
+
var Command_ModifyGameplay$Type = class extends MessageType {
|
|
15006
|
+
constructor() {
|
|
15007
|
+
super("proto.packets.Command.ModifyGameplay", [
|
|
15008
|
+
{ no: 1, name: "modifier", kind: "enum", T: () => ["proto.packets.Command.ModifyGameplay.Modifier", Command_ModifyGameplay_Modifier] }
|
|
15009
|
+
]);
|
|
15010
|
+
}
|
|
15011
|
+
create(value) {
|
|
15012
|
+
const message = { modifier: 0 };
|
|
15013
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
15014
|
+
if (value !== void 0)
|
|
15015
|
+
reflectionMergePartial(this, message, value);
|
|
15016
|
+
return message;
|
|
15017
|
+
}
|
|
15018
|
+
internalBinaryRead(reader, length, options, target) {
|
|
15019
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
15020
|
+
while (reader.pos < end) {
|
|
15021
|
+
let [fieldNo, wireType] = reader.tag();
|
|
15022
|
+
switch (fieldNo) {
|
|
15023
|
+
case /* proto.packets.Command.ModifyGameplay.Modifier modifier */
|
|
15024
|
+
1:
|
|
15025
|
+
message.modifier = reader.int32();
|
|
15026
|
+
break;
|
|
15027
|
+
default:
|
|
15028
|
+
let u2 = options.readUnknownField;
|
|
15029
|
+
if (u2 === "throw")
|
|
15030
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
15031
|
+
let d = reader.skip(wireType);
|
|
15032
|
+
if (u2 !== false)
|
|
15033
|
+
(u2 === true ? UnknownFieldHandler.onRead : u2)(this.typeName, message, fieldNo, wireType, d);
|
|
15034
|
+
}
|
|
15035
|
+
}
|
|
15036
|
+
return message;
|
|
15037
|
+
}
|
|
15038
|
+
internalBinaryWrite(message, writer, options) {
|
|
15039
|
+
if (message.modifier !== 0)
|
|
15040
|
+
writer.tag(1, WireType.Varint).int32(message.modifier);
|
|
15041
|
+
let u2 = options.writeUnknownFields;
|
|
15042
|
+
if (u2 !== false)
|
|
15043
|
+
(u2 == true ? UnknownFieldHandler.onWrite : u2)(this.typeName, message, writer);
|
|
15044
|
+
return writer;
|
|
15045
|
+
}
|
|
15046
|
+
};
|
|
15047
|
+
var Command_ModifyGameplay = new Command_ModifyGameplay$Type();
|
|
14910
15048
|
|
|
14911
15049
|
// src/models/packets.ts
|
|
14912
15050
|
var Acknowledgement_AcknowledgementType = /* @__PURE__ */ ((Acknowledgement_AcknowledgementType2) => {
|
|
@@ -15572,8 +15710,8 @@ init_buffer2();
|
|
|
15572
15710
|
init_process2();
|
|
15573
15711
|
var masterAddress = "server.tournamentassistant.net";
|
|
15574
15712
|
var masterPort = "8676";
|
|
15575
|
-
var version = "1.1.
|
|
15576
|
-
var versionCode =
|
|
15713
|
+
var version = "1.1.9";
|
|
15714
|
+
var versionCode = 119;
|
|
15577
15715
|
|
|
15578
15716
|
// src/tournament-assistant-client.ts
|
|
15579
15717
|
var import_ws2 = __toESM(require_ws(), 1);
|
|
@@ -15919,6 +16057,26 @@ var TAClient = class extends CustomEventEmitter {
|
|
|
15919
16057
|
}
|
|
15920
16058
|
}, userIds);
|
|
15921
16059
|
};
|
|
16060
|
+
flipColors = (userIds) => {
|
|
16061
|
+
this.sendCommand({
|
|
16062
|
+
type: {
|
|
16063
|
+
oneofKind: "modifyGameplay",
|
|
16064
|
+
modifyGameplay: {
|
|
16065
|
+
modifier: 0 /* InvertColors */
|
|
16066
|
+
}
|
|
16067
|
+
}
|
|
16068
|
+
}, userIds);
|
|
16069
|
+
};
|
|
16070
|
+
flipHands = (userIds) => {
|
|
16071
|
+
this.sendCommand({
|
|
16072
|
+
type: {
|
|
16073
|
+
oneofKind: "modifyGameplay",
|
|
16074
|
+
modifyGameplay: {
|
|
16075
|
+
modifier: 1 /* InvertHandedness */
|
|
16076
|
+
}
|
|
16077
|
+
}
|
|
16078
|
+
}, userIds);
|
|
16079
|
+
};
|
|
15922
16080
|
showLoadedImage = (userIds) => {
|
|
15923
16081
|
this.sendCommand({
|
|
15924
16082
|
type: {
|
|
@@ -16884,6 +17042,8 @@ export {
|
|
|
16884
17042
|
Channel,
|
|
16885
17043
|
Characteristic,
|
|
16886
17044
|
Command,
|
|
17045
|
+
Command_ModifyGameplay,
|
|
17046
|
+
Command_ModifyGameplay_Modifier,
|
|
16887
17047
|
Command_PlaySong,
|
|
16888
17048
|
Command_SendBotMessage,
|
|
16889
17049
|
CoreServer,
|
|
@@ -16919,6 +17079,7 @@ export {
|
|
|
16919
17079
|
PlayerSpecificSettings_NoteJumpDurationTypeSettings,
|
|
16920
17080
|
PlayerSpecificSettings_PlayerOptions,
|
|
16921
17081
|
Push,
|
|
17082
|
+
Push_QualifierScoreSubmitted,
|
|
16922
17083
|
Push_SongFinished,
|
|
16923
17084
|
Push_SongFinished_CompletionType,
|
|
16924
17085
|
QualifierEvent,
|
|
@@ -57,6 +57,12 @@ export interface Command {
|
|
|
57
57
|
* @generated from protobuf field: string discord_authorize = 9;
|
|
58
58
|
*/
|
|
59
59
|
discordAuthorize: string;
|
|
60
|
+
} | {
|
|
61
|
+
oneofKind: "modifyGameplay";
|
|
62
|
+
/**
|
|
63
|
+
* @generated from protobuf field: proto.packets.Command.ModifyGameplay modify_gameplay = 10;
|
|
64
|
+
*/
|
|
65
|
+
modifyGameplay: Command_ModifyGameplay;
|
|
60
66
|
} | {
|
|
61
67
|
oneofKind: undefined;
|
|
62
68
|
};
|
|
@@ -83,6 +89,28 @@ export interface Command_SendBotMessage {
|
|
|
83
89
|
*/
|
|
84
90
|
message: string;
|
|
85
91
|
}
|
|
92
|
+
/**
|
|
93
|
+
* @generated from protobuf message proto.packets.Command.ModifyGameplay
|
|
94
|
+
*/
|
|
95
|
+
export interface Command_ModifyGameplay {
|
|
96
|
+
/**
|
|
97
|
+
* @generated from protobuf field: proto.packets.Command.ModifyGameplay.Modifier modifier = 1;
|
|
98
|
+
*/
|
|
99
|
+
modifier: Command_ModifyGameplay_Modifier;
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @generated from protobuf enum proto.packets.Command.ModifyGameplay.Modifier
|
|
103
|
+
*/
|
|
104
|
+
export declare enum Command_ModifyGameplay_Modifier {
|
|
105
|
+
/**
|
|
106
|
+
* @generated from protobuf enum value: InvertColors = 0;
|
|
107
|
+
*/
|
|
108
|
+
InvertColors = 0,
|
|
109
|
+
/**
|
|
110
|
+
* @generated from protobuf enum value: InvertHandedness = 1;
|
|
111
|
+
*/
|
|
112
|
+
InvertHandedness = 1
|
|
113
|
+
}
|
|
86
114
|
declare class Command$Type extends MessageType<Command> {
|
|
87
115
|
constructor();
|
|
88
116
|
create(value?: PartialMessage<Command>): Command;
|
|
@@ -113,4 +141,14 @@ declare class Command_SendBotMessage$Type extends MessageType<Command_SendBotMes
|
|
|
113
141
|
* @generated MessageType for protobuf message proto.packets.Command.SendBotMessage
|
|
114
142
|
*/
|
|
115
143
|
export declare const Command_SendBotMessage: Command_SendBotMessage$Type;
|
|
144
|
+
declare class Command_ModifyGameplay$Type extends MessageType<Command_ModifyGameplay> {
|
|
145
|
+
constructor();
|
|
146
|
+
create(value?: PartialMessage<Command_ModifyGameplay>): Command_ModifyGameplay;
|
|
147
|
+
internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_ModifyGameplay): Command_ModifyGameplay;
|
|
148
|
+
internalBinaryWrite(message: Command_ModifyGameplay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* @generated MessageType for protobuf message proto.packets.Command.ModifyGameplay
|
|
152
|
+
*/
|
|
153
|
+
export declare const Command_ModifyGameplay: Command_ModifyGameplay$Type;
|
|
116
154
|
export {};
|
package/dist/models/commands.js
CHANGED
|
@@ -5,6 +5,20 @@ import { MESSAGE_TYPE } from "@protobuf-ts/runtime";
|
|
|
5
5
|
import { MessageType } from "@protobuf-ts/runtime";
|
|
6
6
|
import { Channel } from './discord.js';
|
|
7
7
|
import { GameplayParameters } from './models.js';
|
|
8
|
+
/**
|
|
9
|
+
* @generated from protobuf enum proto.packets.Command.ModifyGameplay.Modifier
|
|
10
|
+
*/
|
|
11
|
+
export var Command_ModifyGameplay_Modifier;
|
|
12
|
+
(function (Command_ModifyGameplay_Modifier) {
|
|
13
|
+
/**
|
|
14
|
+
* @generated from protobuf enum value: InvertColors = 0;
|
|
15
|
+
*/
|
|
16
|
+
Command_ModifyGameplay_Modifier[Command_ModifyGameplay_Modifier["InvertColors"] = 0] = "InvertColors";
|
|
17
|
+
/**
|
|
18
|
+
* @generated from protobuf enum value: InvertHandedness = 1;
|
|
19
|
+
*/
|
|
20
|
+
Command_ModifyGameplay_Modifier[Command_ModifyGameplay_Modifier["InvertHandedness"] = 1] = "InvertHandedness";
|
|
21
|
+
})(Command_ModifyGameplay_Modifier = Command_ModifyGameplay_Modifier || (Command_ModifyGameplay_Modifier = {}));
|
|
8
22
|
// @generated message type with reflection information, may provide speed optimized methods
|
|
9
23
|
class Command$Type extends MessageType {
|
|
10
24
|
constructor() {
|
|
@@ -15,7 +29,8 @@ class Command$Type extends MessageType {
|
|
|
15
29
|
{ no: 4, name: "stream_sync_show_image", kind: "scalar", oneof: "type", T: 8 /*ScalarType.BOOL*/ },
|
|
16
30
|
{ no: 6, name: "play_song", kind: "message", oneof: "type", T: () => Command_PlaySong },
|
|
17
31
|
{ no: 7, name: "send_bot_message", kind: "message", oneof: "type", T: () => Command_SendBotMessage },
|
|
18
|
-
{ no: 9, name: "discord_authorize", kind: "scalar", oneof: "type", T: 9 /*ScalarType.STRING*/ }
|
|
32
|
+
{ no: 9, name: "discord_authorize", kind: "scalar", oneof: "type", T: 9 /*ScalarType.STRING*/ },
|
|
33
|
+
{ no: 10, name: "modify_gameplay", kind: "message", oneof: "type", T: () => Command_ModifyGameplay }
|
|
19
34
|
]);
|
|
20
35
|
}
|
|
21
36
|
create(value) {
|
|
@@ -72,6 +87,12 @@ class Command$Type extends MessageType {
|
|
|
72
87
|
discordAuthorize: reader.string()
|
|
73
88
|
};
|
|
74
89
|
break;
|
|
90
|
+
case /* proto.packets.Command.ModifyGameplay modify_gameplay */ 10:
|
|
91
|
+
message.type = {
|
|
92
|
+
oneofKind: "modifyGameplay",
|
|
93
|
+
modifyGameplay: Command_ModifyGameplay.internalBinaryRead(reader, reader.uint32(), options, message.type.modifyGameplay)
|
|
94
|
+
};
|
|
95
|
+
break;
|
|
75
96
|
default:
|
|
76
97
|
let u = options.readUnknownField;
|
|
77
98
|
if (u === "throw")
|
|
@@ -105,6 +126,9 @@ class Command$Type extends MessageType {
|
|
|
105
126
|
/* string discord_authorize = 9; */
|
|
106
127
|
if (message.type.oneofKind === "discordAuthorize")
|
|
107
128
|
writer.tag(9, WireType.LengthDelimited).string(message.type.discordAuthorize);
|
|
129
|
+
/* proto.packets.Command.ModifyGameplay modify_gameplay = 10; */
|
|
130
|
+
if (message.type.oneofKind === "modifyGameplay")
|
|
131
|
+
Command_ModifyGameplay.internalBinaryWrite(message.type.modifyGameplay, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
|
|
108
132
|
let u = options.writeUnknownFields;
|
|
109
133
|
if (u !== false)
|
|
110
134
|
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
@@ -216,3 +240,50 @@ class Command_SendBotMessage$Type extends MessageType {
|
|
|
216
240
|
* @generated MessageType for protobuf message proto.packets.Command.SendBotMessage
|
|
217
241
|
*/
|
|
218
242
|
export const Command_SendBotMessage = new Command_SendBotMessage$Type();
|
|
243
|
+
// @generated message type with reflection information, may provide speed optimized methods
|
|
244
|
+
class Command_ModifyGameplay$Type extends MessageType {
|
|
245
|
+
constructor() {
|
|
246
|
+
super("proto.packets.Command.ModifyGameplay", [
|
|
247
|
+
{ no: 1, name: "modifier", kind: "enum", T: () => ["proto.packets.Command.ModifyGameplay.Modifier", Command_ModifyGameplay_Modifier] }
|
|
248
|
+
]);
|
|
249
|
+
}
|
|
250
|
+
create(value) {
|
|
251
|
+
const message = { modifier: 0 };
|
|
252
|
+
globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
|
|
253
|
+
if (value !== undefined)
|
|
254
|
+
reflectionMergePartial(this, message, value);
|
|
255
|
+
return message;
|
|
256
|
+
}
|
|
257
|
+
internalBinaryRead(reader, length, options, target) {
|
|
258
|
+
let message = target ?? this.create(), end = reader.pos + length;
|
|
259
|
+
while (reader.pos < end) {
|
|
260
|
+
let [fieldNo, wireType] = reader.tag();
|
|
261
|
+
switch (fieldNo) {
|
|
262
|
+
case /* proto.packets.Command.ModifyGameplay.Modifier modifier */ 1:
|
|
263
|
+
message.modifier = reader.int32();
|
|
264
|
+
break;
|
|
265
|
+
default:
|
|
266
|
+
let u = options.readUnknownField;
|
|
267
|
+
if (u === "throw")
|
|
268
|
+
throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
|
|
269
|
+
let d = reader.skip(wireType);
|
|
270
|
+
if (u !== false)
|
|
271
|
+
(u === true ? UnknownFieldHandler.onRead : u)(this.typeName, message, fieldNo, wireType, d);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return message;
|
|
275
|
+
}
|
|
276
|
+
internalBinaryWrite(message, writer, options) {
|
|
277
|
+
/* proto.packets.Command.ModifyGameplay.Modifier modifier = 1; */
|
|
278
|
+
if (message.modifier !== 0)
|
|
279
|
+
writer.tag(1, WireType.Varint).int32(message.modifier);
|
|
280
|
+
let u = options.writeUnknownFields;
|
|
281
|
+
if (u !== false)
|
|
282
|
+
(u == true ? UnknownFieldHandler.onWrite : u)(this.typeName, message, writer);
|
|
283
|
+
return writer;
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* @generated MessageType for protobuf message proto.packets.Command.ModifyGameplay
|
|
288
|
+
*/
|
|
289
|
+
export const Command_ModifyGameplay = new Command_ModifyGameplay$Type();
|
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();
|
|
@@ -60,6 +60,8 @@ export declare class TAClient extends CustomEventEmitter<TAClientEvents> {
|
|
|
60
60
|
sendResponse(response: Response, to?: string[]): Promise<void>;
|
|
61
61
|
playSong: (gameplayParameters: GameplayParameters, userIds: string[]) => void;
|
|
62
62
|
returnToMenu: (userIds: string[]) => void;
|
|
63
|
+
flipColors: (userIds: string[]) => void;
|
|
64
|
+
flipHands: (userIds: string[]) => void;
|
|
63
65
|
showLoadedImage: (userIds: string[]) => void;
|
|
64
66
|
delayTestFinished: (userIds: string[]) => void;
|
|
65
67
|
joinTournament: (tournamentId: string) => Promise<Response>;
|
|
@@ -3,6 +3,7 @@ import { CustomEventEmitter } from "./custom-event-emitter.js";
|
|
|
3
3
|
import { v4 as uuidv4 } from "uuid";
|
|
4
4
|
import { StateManager } from "./state-manager.js";
|
|
5
5
|
import { Response_ResponseType, } from "./models/responses.js";
|
|
6
|
+
import { Command_ModifyGameplay_Modifier } from "./models/commands.js";
|
|
6
7
|
import { versionCode } from "./constants.js";
|
|
7
8
|
import WebSocket from "ws";
|
|
8
9
|
// Created by Moon on 6/12/2022
|
|
@@ -257,6 +258,26 @@ export class TAClient extends CustomEventEmitter {
|
|
|
257
258
|
},
|
|
258
259
|
}, userIds);
|
|
259
260
|
};
|
|
261
|
+
flipColors = (userIds) => {
|
|
262
|
+
this.sendCommand({
|
|
263
|
+
type: {
|
|
264
|
+
oneofKind: "modifyGameplay",
|
|
265
|
+
modifyGameplay: {
|
|
266
|
+
modifier: Command_ModifyGameplay_Modifier.InvertColors
|
|
267
|
+
},
|
|
268
|
+
},
|
|
269
|
+
}, userIds);
|
|
270
|
+
};
|
|
271
|
+
flipHands = (userIds) => {
|
|
272
|
+
this.sendCommand({
|
|
273
|
+
type: {
|
|
274
|
+
oneofKind: "modifyGameplay",
|
|
275
|
+
modifyGameplay: {
|
|
276
|
+
modifier: Command_ModifyGameplay_Modifier.InvertHandedness
|
|
277
|
+
},
|
|
278
|
+
},
|
|
279
|
+
}, userIds);
|
|
280
|
+
};
|
|
260
281
|
showLoadedImage = (userIds) => {
|
|
261
282
|
this.sendCommand({
|
|
262
283
|
type: {
|