moons-ta-client 1.1.7 → 1.1.8

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.
@@ -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.7";
4
- export declare const versionCode = 117;
3
+ export declare const version = "1.1.8";
4
+ export declare const versionCode = 118;
package/dist/constants.js CHANGED
@@ -1,4 +1,4 @@
1
1
  export const masterAddress = "server.tournamentassistant.net";
2
2
  export const masterPort = "8676";
3
- export const version = "1.1.7";
4
- export const versionCode = 117;
3
+ export const version = "1.1.8";
4
+ export const versionCode = 118;
package/dist/index.d.ts CHANGED
@@ -4387,6 +4387,19 @@ interface Push_SongFinished {
4387
4387
  */
4388
4388
  declare const Push_SongFinished: Push_SongFinished$Type;
4389
4389
 
4390
+ /**
4391
+ * @generated from protobuf enum proto.packets.Command.ModifyGameplay.Modifier
4392
+ */
4393
+ declare enum Command_ModifyGameplay_Modifier {
4394
+ /**
4395
+ * @generated from protobuf enum value: InvertColors = 0;
4396
+ */
4397
+ InvertColors = 0,
4398
+ /**
4399
+ * @generated from protobuf enum value: InvertHandedness = 1;
4400
+ */
4401
+ InvertHandedness = 1
4402
+ }
4390
4403
  declare class Command$Type extends MessageType<Command> {
4391
4404
  constructor();
4392
4405
  create(value?: PartialMessage<Command>): Command;
@@ -4444,6 +4457,12 @@ interface Command {
4444
4457
  * @generated from protobuf field: string discord_authorize = 9;
4445
4458
  */
4446
4459
  discordAuthorize: string;
4460
+ } | {
4461
+ oneofKind: "modifyGameplay";
4462
+ /**
4463
+ * @generated from protobuf field: proto.packets.Command.ModifyGameplay modify_gameplay = 10;
4464
+ */
4465
+ modifyGameplay: Command_ModifyGameplay;
4447
4466
  } | {
4448
4467
  oneofKind: undefined;
4449
4468
  };
@@ -4493,7 +4512,26 @@ interface Command_SendBotMessage {
4493
4512
  /**
4494
4513
  * @generated MessageType for protobuf message proto.packets.Command.SendBotMessage
4495
4514
  */
4496
- declare const Command_SendBotMessage: Command_SendBotMessage$Type;
4515
+ declare const Command_SendBotMessage: Command_SendBotMessage$Type;
4516
+ declare class Command_ModifyGameplay$Type extends MessageType<Command_ModifyGameplay> {
4517
+ constructor();
4518
+ create(value?: PartialMessage<Command_ModifyGameplay>): Command_ModifyGameplay;
4519
+ internalBinaryRead(reader: IBinaryReader, length: number, options: BinaryReadOptions, target?: Command_ModifyGameplay): Command_ModifyGameplay;
4520
+ internalBinaryWrite(message: Command_ModifyGameplay, writer: IBinaryWriter, options: BinaryWriteOptions): IBinaryWriter;
4521
+ }
4522
+ /**
4523
+ * @generated from protobuf message proto.packets.Command.ModifyGameplay
4524
+ */
4525
+ interface Command_ModifyGameplay {
4526
+ /**
4527
+ * @generated from protobuf field: proto.packets.Command.ModifyGameplay.Modifier modifier = 1;
4528
+ */
4529
+ modifier: Command_ModifyGameplay_Modifier;
4530
+ }
4531
+ /**
4532
+ * @generated MessageType for protobuf message proto.packets.Command.ModifyGameplay
4533
+ */
4534
+ declare const Command_ModifyGameplay: Command_ModifyGameplay$Type;
4497
4535
 
4498
4536
  /**
4499
4537
  * @generated from protobuf enum proto.packets.Acknowledgement.AcknowledgementType
@@ -4731,6 +4769,8 @@ declare class TAClient extends CustomEventEmitter<TAClientEvents> {
4731
4769
  sendResponse(response: Response, to?: string[]): Promise<void>;
4732
4770
  playSong: (gameplayParameters: GameplayParameters, userIds: string[]) => void;
4733
4771
  returnToMenu: (userIds: string[]) => void;
4772
+ flipColors: (userIds: string[]) => void;
4773
+ flipHands: (userIds: string[]) => void;
4734
4774
  showLoadedImage: (userIds: string[]) => void;
4735
4775
  delayTestFinished: (userIds: string[]) => void;
4736
4776
  joinTournament: (tournamentId: string) => Promise<Response>;
@@ -4789,7 +4829,7 @@ declare class TAClient extends CustomEventEmitter<TAClientEvents> {
4789
4829
 
4790
4830
  declare const masterAddress = "server.tournamentassistant.net";
4791
4831
  declare const masterPort = "8676";
4792
- declare const version = "1.1.7";
4793
- declare const versionCode = 117;
4832
+ declare const version = "1.1.8";
4833
+ declare const versionCode = 118;
4794
4834
 
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 };
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 };
package/dist/index.esm.js CHANGED
@@ -14667,6 +14667,11 @@ var Push_SongFinished = new Push_SongFinished$Type();
14667
14667
  init_dirname();
14668
14668
  init_buffer2();
14669
14669
  init_process2();
14670
+ var Command_ModifyGameplay_Modifier = /* @__PURE__ */ ((Command_ModifyGameplay_Modifier2) => {
14671
+ Command_ModifyGameplay_Modifier2[Command_ModifyGameplay_Modifier2["InvertColors"] = 0] = "InvertColors";
14672
+ Command_ModifyGameplay_Modifier2[Command_ModifyGameplay_Modifier2["InvertHandedness"] = 1] = "InvertHandedness";
14673
+ return Command_ModifyGameplay_Modifier2;
14674
+ })(Command_ModifyGameplay_Modifier || {});
14670
14675
  var Command$Type = class extends MessageType {
14671
14676
  constructor() {
14672
14677
  super("proto.packets.Command", [
@@ -14711,7 +14716,8 @@ var Command$Type = class extends MessageType {
14711
14716
  oneof: "type",
14712
14717
  T: 9
14713
14718
  /*ScalarType.STRING*/
14714
- }
14719
+ },
14720
+ { no: 10, name: "modify_gameplay", kind: "message", oneof: "type", T: () => Command_ModifyGameplay }
14715
14721
  ]);
14716
14722
  }
14717
14723
  create(value) {
@@ -14775,6 +14781,13 @@ var Command$Type = class extends MessageType {
14775
14781
  discordAuthorize: reader.string()
14776
14782
  };
14777
14783
  break;
14784
+ case /* proto.packets.Command.ModifyGameplay modify_gameplay */
14785
+ 10:
14786
+ message.type = {
14787
+ oneofKind: "modifyGameplay",
14788
+ modifyGameplay: Command_ModifyGameplay.internalBinaryRead(reader, reader.uint32(), options, message.type.modifyGameplay)
14789
+ };
14790
+ break;
14778
14791
  default:
14779
14792
  let u2 = options.readUnknownField;
14780
14793
  if (u2 === "throw")
@@ -14801,6 +14814,8 @@ var Command$Type = class extends MessageType {
14801
14814
  Command_SendBotMessage.internalBinaryWrite(message.type.sendBotMessage, writer.tag(7, WireType.LengthDelimited).fork(), options).join();
14802
14815
  if (message.type.oneofKind === "discordAuthorize")
14803
14816
  writer.tag(9, WireType.LengthDelimited).string(message.type.discordAuthorize);
14817
+ if (message.type.oneofKind === "modifyGameplay")
14818
+ Command_ModifyGameplay.internalBinaryWrite(message.type.modifyGameplay, writer.tag(10, WireType.LengthDelimited).fork(), options).join();
14804
14819
  let u2 = options.writeUnknownFields;
14805
14820
  if (u2 !== false)
14806
14821
  (u2 == true ? UnknownFieldHandler.onWrite : u2)(this.typeName, message, writer);
@@ -14907,6 +14922,49 @@ var Command_SendBotMessage$Type = class extends MessageType {
14907
14922
  }
14908
14923
  };
14909
14924
  var Command_SendBotMessage = new Command_SendBotMessage$Type();
14925
+ var Command_ModifyGameplay$Type = class extends MessageType {
14926
+ constructor() {
14927
+ super("proto.packets.Command.ModifyGameplay", [
14928
+ { no: 1, name: "modifier", kind: "enum", T: () => ["proto.packets.Command.ModifyGameplay.Modifier", Command_ModifyGameplay_Modifier] }
14929
+ ]);
14930
+ }
14931
+ create(value) {
14932
+ const message = { modifier: 0 };
14933
+ globalThis.Object.defineProperty(message, MESSAGE_TYPE, { enumerable: false, value: this });
14934
+ if (value !== void 0)
14935
+ reflectionMergePartial(this, message, value);
14936
+ return message;
14937
+ }
14938
+ internalBinaryRead(reader, length, options, target) {
14939
+ let message = target ?? this.create(), end = reader.pos + length;
14940
+ while (reader.pos < end) {
14941
+ let [fieldNo, wireType] = reader.tag();
14942
+ switch (fieldNo) {
14943
+ case /* proto.packets.Command.ModifyGameplay.Modifier modifier */
14944
+ 1:
14945
+ message.modifier = reader.int32();
14946
+ break;
14947
+ default:
14948
+ let u2 = options.readUnknownField;
14949
+ if (u2 === "throw")
14950
+ throw new globalThis.Error(`Unknown field ${fieldNo} (wire type ${wireType}) for ${this.typeName}`);
14951
+ let d = reader.skip(wireType);
14952
+ if (u2 !== false)
14953
+ (u2 === true ? UnknownFieldHandler.onRead : u2)(this.typeName, message, fieldNo, wireType, d);
14954
+ }
14955
+ }
14956
+ return message;
14957
+ }
14958
+ internalBinaryWrite(message, writer, options) {
14959
+ if (message.modifier !== 0)
14960
+ writer.tag(1, WireType.Varint).int32(message.modifier);
14961
+ let u2 = options.writeUnknownFields;
14962
+ if (u2 !== false)
14963
+ (u2 == true ? UnknownFieldHandler.onWrite : u2)(this.typeName, message, writer);
14964
+ return writer;
14965
+ }
14966
+ };
14967
+ var Command_ModifyGameplay = new Command_ModifyGameplay$Type();
14910
14968
 
14911
14969
  // src/models/packets.ts
14912
14970
  var Acknowledgement_AcknowledgementType = /* @__PURE__ */ ((Acknowledgement_AcknowledgementType2) => {
@@ -15572,8 +15630,8 @@ init_buffer2();
15572
15630
  init_process2();
15573
15631
  var masterAddress = "server.tournamentassistant.net";
15574
15632
  var masterPort = "8676";
15575
- var version = "1.1.7";
15576
- var versionCode = 117;
15633
+ var version = "1.1.8";
15634
+ var versionCode = 118;
15577
15635
 
15578
15636
  // src/tournament-assistant-client.ts
15579
15637
  var import_ws2 = __toESM(require_ws(), 1);
@@ -15919,6 +15977,26 @@ var TAClient = class extends CustomEventEmitter {
15919
15977
  }
15920
15978
  }, userIds);
15921
15979
  };
15980
+ flipColors = (userIds) => {
15981
+ this.sendCommand({
15982
+ type: {
15983
+ oneofKind: "modifyGameplay",
15984
+ modifyGameplay: {
15985
+ modifier: 0 /* InvertColors */
15986
+ }
15987
+ }
15988
+ }, userIds);
15989
+ };
15990
+ flipHands = (userIds) => {
15991
+ this.sendCommand({
15992
+ type: {
15993
+ oneofKind: "modifyGameplay",
15994
+ modifyGameplay: {
15995
+ modifier: 1 /* InvertHandedness */
15996
+ }
15997
+ }
15998
+ }, userIds);
15999
+ };
15922
16000
  showLoadedImage = (userIds) => {
15923
16001
  this.sendCommand({
15924
16002
  type: {
@@ -16884,6 +16962,8 @@ export {
16884
16962
  Channel,
16885
16963
  Characteristic,
16886
16964
  Command,
16965
+ Command_ModifyGameplay,
16966
+ Command_ModifyGameplay_Modifier,
16887
16967
  Command_PlaySong,
16888
16968
  Command_SendBotMessage,
16889
16969
  CoreServer,
@@ -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 {};
@@ -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();
@@ -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: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "moons-ta-client",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "type": "module",
5
5
  "main": "./dist/index.esm.js",
6
6
  "types": "./dist/index.d.ts",