yolkbot 1.4.8 → 1.5.0

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.
Files changed (129) hide show
  1. package/README.md +1 -1
  2. package/browser/build/global.js +1 -1
  3. package/browser/build/module.js +1 -1
  4. package/dist/api.d.ts +34 -16
  5. package/dist/api.js +164 -121
  6. package/dist/bot/GamePlayer.d.ts +2 -2
  7. package/dist/bot/GamePlayer.js +15 -5
  8. package/dist/bot.d.ts +121 -83
  9. package/dist/bot.js +624 -1077
  10. package/dist/comm/CommIn.js +14 -17
  11. package/dist/comm/CommOut.js +15 -15
  12. package/dist/constants/CommCode.js +1 -1
  13. package/dist/constants/findItemById.js +2 -1
  14. package/dist/constants/guns.d.ts +16 -41
  15. package/dist/constants/guns.js +137 -259
  16. package/dist/constants/index.d.ts +7 -9
  17. package/dist/constants/index.js +15 -13
  18. package/dist/dispatches/BanPlayerDispatch.d.ts +3 -1
  19. package/dist/dispatches/BootPlayerDispatch.d.ts +3 -1
  20. package/dist/dispatches/ChatDispatch.d.ts +3 -1
  21. package/dist/dispatches/ChatDispatch.js +3 -3
  22. package/dist/dispatches/FireDispatch.d.ts +3 -1
  23. package/dist/dispatches/GameOptionsDispatch.d.ts +3 -1
  24. package/dist/dispatches/GoToAmmoDispatch.d.ts +2 -0
  25. package/dist/dispatches/GoToAmmoDispatch.js +15 -16
  26. package/dist/dispatches/GoToCoopDispatch.d.ts +2 -0
  27. package/dist/dispatches/GoToCoopDispatch.js +19 -20
  28. package/dist/dispatches/GoToGrenadeDispatch.d.ts +2 -0
  29. package/dist/dispatches/GoToGrenadeDispatch.js +15 -16
  30. package/dist/dispatches/GoToPlayerDispatch.d.ts +3 -1
  31. package/dist/dispatches/GoToPlayerDispatch.js +16 -21
  32. package/dist/dispatches/GoToSpatulaDispatch.d.ts +2 -0
  33. package/dist/dispatches/GoToSpatulaDispatch.js +11 -14
  34. package/dist/dispatches/LookAtDispatch.d.ts +3 -1
  35. package/dist/dispatches/LookAtDispatch.js +8 -6
  36. package/dist/dispatches/LookAtPosDispatch.d.ts +3 -1
  37. package/dist/dispatches/LookAtPosDispatch.js +1 -1
  38. package/dist/dispatches/MeleeDispatch.d.ts +2 -0
  39. package/dist/dispatches/MeleeDispatch.js +4 -4
  40. package/dist/dispatches/MovementDispatch.d.ts +3 -1
  41. package/dist/dispatches/MovementDispatch.js +1 -1
  42. package/dist/dispatches/PauseDispatch.d.ts +2 -0
  43. package/dist/dispatches/ReloadDispatch.d.ts +2 -0
  44. package/dist/dispatches/ReloadDispatch.js +17 -10
  45. package/dist/dispatches/ReportPlayerDispatch.d.ts +4 -2
  46. package/dist/dispatches/ReportPlayerDispatch.js +8 -6
  47. package/dist/dispatches/ResetGameDispatch.d.ts +2 -0
  48. package/dist/dispatches/SaveLoadoutDispatch.d.ts +4 -2
  49. package/dist/dispatches/SaveLoadoutDispatch.js +9 -8
  50. package/dist/dispatches/SpawnDispatch.d.ts +2 -0
  51. package/dist/dispatches/SpawnDispatch.js +5 -1
  52. package/dist/dispatches/SwapWeaponDispatch.d.ts +3 -1
  53. package/dist/dispatches/SwapWeaponDispatch.js +1 -1
  54. package/dist/dispatches/SwitchTeamDispatch.d.ts +2 -0
  55. package/dist/dispatches/SwitchTeamDispatch.js +2 -1
  56. package/dist/dispatches/ThrowGrenadeDispatch.d.ts +3 -1
  57. package/dist/dispatches/index.d.ts +105 -182
  58. package/dist/dispatches/index.js +24 -25
  59. package/dist/enums.d.ts +154 -0
  60. package/dist/enums.js +114 -0
  61. package/dist/env/fetch.d.ts +15 -0
  62. package/dist/env/fetch.js +113 -79
  63. package/dist/env/globals.d.ts +9 -0
  64. package/dist/env/globals.js +11 -9
  65. package/dist/index.d.ts +31 -0
  66. package/dist/index.js +24 -14
  67. package/dist/packets/addPlayer.js +63 -0
  68. package/dist/packets/beginShellStreak.js +44 -0
  69. package/dist/packets/challengeCompleted.js +16 -0
  70. package/dist/packets/changeCharacter.js +46 -0
  71. package/dist/packets/chat.js +10 -0
  72. package/dist/packets/collectItem.js +26 -0
  73. package/dist/packets/die.js +40 -0
  74. package/dist/packets/endShellStreak.js +21 -0
  75. package/dist/packets/eventModifier.js +8 -0
  76. package/dist/packets/explode.js +19 -0
  77. package/dist/packets/fire.js +21 -0
  78. package/dist/packets/gameAction.js +33 -0
  79. package/dist/packets/gameJoined.js +64 -0
  80. package/dist/packets/gameOptions.js +27 -0
  81. package/dist/packets/hitMe.js +12 -0
  82. package/dist/packets/hitMeHardBoiled.js +18 -0
  83. package/dist/packets/hitThem.js +12 -0
  84. package/dist/packets/melee.js +8 -0
  85. package/dist/packets/metaGameState.js +62 -0
  86. package/dist/packets/pause.js +17 -0
  87. package/dist/packets/ping.js +19 -0
  88. package/dist/packets/playerInfo.js +15 -0
  89. package/dist/packets/reload.js +17 -0
  90. package/dist/packets/removePlayer.js +10 -0
  91. package/dist/packets/respawn.js +31 -0
  92. package/dist/packets/socketReady.js +16 -0
  93. package/dist/packets/spawnItem.js +11 -0
  94. package/dist/packets/swapWeapon.js +11 -0
  95. package/dist/packets/switchTeam.js +13 -0
  96. package/dist/packets/syncMe.js +25 -0
  97. package/dist/packets/syncThem.js +63 -0
  98. package/dist/packets/throwGrenade.js +17 -0
  99. package/dist/packets/updateBalance.js +8 -0
  100. package/dist/pathing/astar.js +33 -20
  101. package/dist/pathing/mapnode.d.ts +3 -1
  102. package/dist/pathing/mapnode.js +170 -65
  103. package/dist/socket.d.ts +21 -6
  104. package/dist/socket.js +48 -38
  105. package/dist/util.d.ts +4 -1
  106. package/dist/util.js +102 -44
  107. package/dist/wasm/bytes.d.ts +1 -1
  108. package/dist/wasm/bytes.js +1 -1
  109. package/dist/wasm/direct.d.ts +1 -1
  110. package/dist/wasm/direct.js +13 -13
  111. package/dist/wasm/legacy.d.ts +7 -6
  112. package/dist/wasm/legacy.js +14 -8
  113. package/package.json +43 -30
  114. package/dist/comm/index.d.ts +0 -12
  115. package/dist/comm/index.js +0 -11
  116. package/dist/constants/changelog.d.ts +0 -7
  117. package/dist/constants/housePromo.d.ts +0 -40
  118. package/dist/constants/language.d.ts +0 -3
  119. package/dist/constants/notices.d.ts +0 -4
  120. package/dist/constants/shellNews.d.ts +0 -12
  121. package/dist/constants/shellYoutube.d.ts +0 -12
  122. package/dist/constants/shopItems.d.ts +0 -15
  123. package/dist/constants/sounds.d.ts +0 -10
  124. package/dist/matchmaker.d.ts +0 -50
  125. package/dist/matchmaker.js +0 -141
  126. package/dist/pathing/binaryheap.d.ts +0 -18
  127. package/dist/pathing/binaryheap.js +0 -79
  128. package/dist/wasm/util.d.ts +0 -9
  129. package/dist/wasm/util.js +0 -19
@@ -16,22 +16,24 @@ export class ReportPlayerDispatch {
16
16
  if (this.reasons[i] === true)
17
17
  this.reasonInt |= 1 << i;
18
18
  }
19
- validate(bot) {
20
- if (this.reasons.every((reason) => reason === false))
19
+ $grabPlayer(bot) {
20
+ return bot.players[this.idOrName.toString()] || Object.values(bot.players).find((player) => player.name === this.idOrName.toString());
21
+ }
22
+ validate() {
23
+ if (typeof this.idOrName !== "string" && typeof this.idOrName !== "number")
21
24
  return false;
22
- const target = bot.players[this.idOrName.toString()] || bot.players.find((player) => player.name === this.idOrName);
23
- if (!target)
25
+ if (this.reasons.every((reason) => reason === false))
24
26
  return false;
25
27
  return true;
26
28
  }
27
29
  check(bot) {
28
30
  if (!bot.state.inGame)
29
31
  return false;
30
- const target = bot.players[this.idOrName.toString()] || bot.players.find((player) => player.name === this.idOrName);
32
+ const target = this.$grabPlayer(bot);
31
33
  return !!target;
32
34
  }
33
35
  execute(bot) {
34
- const target = bot.players[this.idOrName.toString()] || bot.players.find((player) => player.name === this.idOrName);
36
+ const target = this.$grabPlayer(bot);
35
37
  const out = new CommOut;
36
38
  out.packInt8(CommCode.reportPlayer);
37
39
  out.packString(target.uniqueId);
@@ -1,5 +1,7 @@
1
1
  import Bot from '../bot';
2
2
 
3
+ export type Params = [];
4
+
3
5
  export class ResetGameDispatch {
4
6
  validate(bot: Bot): boolean;
5
7
  check(bot: Bot): boolean;
@@ -11,7 +11,7 @@ export interface Changes {
11
11
  secondaryId?: number[];
12
12
  }
13
13
 
14
- export interface Opts {
14
+ export interface LoadoutOptions {
15
15
  gunId?: number;
16
16
  hatId?: number;
17
17
  stampId?: number;
@@ -22,10 +22,12 @@ export interface Opts {
22
22
  secondaryIds?: number[];
23
23
  }
24
24
 
25
+ export type Params = [loadoutOptions: LoadoutOptions];
26
+
25
27
  export class SaveLoadoutDispatch {
26
28
  changes: Changes;
27
29
 
28
- constructor(opts: Opts);
30
+ constructor(...args: Params);
29
31
 
30
32
  validate(bot: Bot): boolean;
31
33
  check(bot: Bot): boolean;
@@ -1,6 +1,8 @@
1
1
  import CommOut from "../comm/CommOut.js";
2
2
  import CommCode from "../constants/CommCode.js";
3
3
  import { findItemById, GunList, ItemType } from "../constants/index.js";
4
+ import { createGun } from "../util.js";
5
+ import { Intents } from "../enums.js";
4
6
  const isDefault = (itemId) => findItemById(itemId) && findItemById(itemId).unlock === "default";
5
7
  const isType = (itemId, type) => findItemById(itemId) && findItemById(itemId).item_type_id === type;
6
8
 
@@ -16,7 +18,7 @@ export class SaveLoadoutDispatch {
16
18
  primaryId: opts.primaryIds,
17
19
  secondaryId: opts.secondaryIds
18
20
  };
19
- this.changes = Object.fromEntries(Object.entries(this.changes).filter(([, v]) => !!v));
21
+ this.changes = Object.fromEntries(Object.entries(this.changes).filter(([, v]) => typeof v !== "undefined"));
20
22
  }
21
23
  validate(bot) {
22
24
  const load = this.changes;
@@ -32,7 +34,7 @@ export class SaveLoadoutDispatch {
32
34
  return false;
33
35
  if (isType(load.meleeId, ItemType.Melee) && !isDefault(load.meleeId) && !bot.account.ownedItemIds.includes(load.meleeId))
34
36
  return false;
35
- if (typeof load.classIdx === "number" && load.classIdx > 6 || load.classIdx < 0)
37
+ if (typeof load.classIdx === "number" && (load.classIdx > 6 || load.classIdx < 0))
36
38
  return false;
37
39
  if (this.changes.primaryId) {
38
40
  for (let i = 0;i < 7; i++) {
@@ -56,10 +58,9 @@ export class SaveLoadoutDispatch {
56
58
  return !bot.me.playing;
57
59
  }
58
60
  execute(bot) {
59
- if (bot.me && this.changes.classIdx && this.changes.classIdx !== bot.me.selectedGun) {
60
- bot.me.weapons[0] = new GunList[this.changes.classIdx];
61
- }
62
- bot.state.weaponIdx = this.changes.classIdx || bot.state.weaponIdx;
61
+ if (bot.me && typeof this.changes.classIdx !== "undefined" && this.changes.classIdx !== bot.me.selectedGun)
62
+ bot.me.weapons[0] = createGun(GunList[this.changes.classIdx]);
63
+ bot.state.weaponIdx = this.changes.classIdx ?? bot.state.weaponIdx;
63
64
  const loadout = {
64
65
  ...bot.account.loadout,
65
66
  ...this.changes
@@ -77,10 +78,10 @@ export class SaveLoadoutDispatch {
77
78
  if (bot.state.inGame) {
78
79
  const out = new CommOut;
79
80
  out.packInt8(CommCode.changeCharacter);
80
- out.packInt8(this.changes?.classIdx || bot.me.selectedGun);
81
+ out.packInt8(this.changes?.classIdx ?? bot.me.selectedGun);
81
82
  out.send(bot.game.socket);
82
83
  }
83
- const findCosmetics = bot.intents.includes(bot.Intents.COSMETIC_DATA);
84
+ const findCosmetics = bot.intents.includes(Intents.COSMETIC_DATA);
84
85
  Object.entries(this.changes).forEach(([changeKey, changeValue]) => {
85
86
  if (changeKey === "classIdx")
86
87
  bot.me.selectedGun = changeValue;
@@ -1,5 +1,7 @@
1
1
  import Bot from '../bot';
2
2
 
3
+ export type Params = [];
4
+
3
5
  export class SpawnDispatch {
4
6
  validate(bot: Bot): boolean;
5
7
  check(bot: Bot): boolean;
@@ -1,14 +1,18 @@
1
1
  import CommOut from "../comm/CommOut.js";
2
2
  import CommCode from "../constants/CommCode.js";
3
+ import { Intents } from "../enums.js";
3
4
 
4
5
  export class SpawnDispatch {
5
6
  validate() {
6
7
  return true;
7
8
  }
8
9
  check(bot) {
10
+ const respawnTime = bot.intents.includes(Intents.FASTER_RESPAWN) ? 5000 : 6000;
9
11
  if (bot.me.playing)
10
12
  return false;
11
- if (bot.intents.includes(bot.Intents.OBSERVE_GAME))
13
+ if (bot.intents.includes(Intents.OBSERVE_GAME))
14
+ return false;
15
+ if (bot.lastDeathTime > 0 && bot.lastDeathTime + respawnTime > Date.now())
12
16
  return false;
13
17
  return true;
14
18
  }
@@ -1,9 +1,11 @@
1
1
  import Bot from '../bot';
2
2
 
3
+ export type Params = [manualWeapon?: 0 | 1];
4
+
3
5
  export class SwapWeaponDispatch {
4
6
  manualWeapon: 0 | 1;
5
7
 
6
- constructor(manualWeapon?: 0 | 1);
8
+ constructor(...args: Params);
7
9
 
8
10
  validate(bot: Bot): boolean;
9
11
  check(bot: Bot): boolean;
@@ -6,7 +6,7 @@ export class SwapWeaponDispatch {
6
6
  this.manualWeapon = manualWeapon;
7
7
  }
8
8
  validate() {
9
- return typeof this.manualWeapon === "number" || typeof this.manualWeapon === "undefined";
9
+ return [0, 1].includes(this.manualWeapon) || typeof this.manualWeapon === "undefined";
10
10
  }
11
11
  check(bot) {
12
12
  return bot.me.playing && !bot.state.reloading && !bot.state.swappingGun && !bot.state.usingMelee;
@@ -1,5 +1,7 @@
1
1
  import Bot from '../bot';
2
2
 
3
+ export type Params = [];
4
+
3
5
  export class SwitchTeamDispatch {
4
6
  validate(bot: Bot): boolean;
5
7
  check(bot: Bot): boolean;
@@ -1,5 +1,6 @@
1
1
  import CommOut from "../comm/CommOut.js";
2
2
  import CommCode from "../constants/CommCode.js";
3
+ import { Intents } from "../enums.js";
3
4
 
4
5
  export class SwitchTeamDispatch {
5
6
  validate() {
@@ -10,7 +11,7 @@ export class SwitchTeamDispatch {
10
11
  return false;
11
12
  if (bot.game.gameModeId === 0)
12
13
  return false;
13
- if (bot.intents.includes(bot.Intents.OBSERVE_GAME))
14
+ if (bot.intents.includes(Intents.OBSERVE_GAME))
14
15
  return false;
15
16
  if (bot.game.isPrivate)
16
17
  return !bot.game.options.noTeamChange;
@@ -1,9 +1,11 @@
1
1
  import Bot from '../bot';
2
2
 
3
+ export type Params = [power?: number];
4
+
3
5
  export class ThrowGrenadeDispatch {
4
6
  power: number;
5
7
 
6
- constructor(power?: number);
8
+ constructor(...args: Params);
7
9
 
8
10
  validate(bot: Bot): boolean;
9
11
  check(bot: Bot): boolean;
@@ -1,182 +1,105 @@
1
- import BanPlayerDispatch from './BanPlayerDispatch';
2
- import BootPlayerDispatch from './BootPlayerDispatch';
3
- import ChatDispatch from './ChatDispatch';
4
- import FireDispatch from './FireDispatch';
5
- import GameOptionsDispatch from './GameOptionsDispatch';
6
- import GoToAmmoDispatch from './GoToAmmoDispatch';
7
- import GoToCoopDispatch from './GoToCoopDispatch';
8
- import GoToGrenadeDispatch from './GoToGrenadeDispatch';
9
- import GoToPlayerDispatch from './GoToPlayerDispatch';
10
- import GoToSpatulaDispatch from './GoToSpatulaDispatch';
11
- import LookAtDispatch from './LookAtDispatch';
12
- import LookAtPosDispatch from './LookAtPosDispatch';
13
- import MeleeDispatch from './MeleeDispatch';
14
- import MovementDispatch from './MovementDispatch';
15
- import PauseDispatch from './PauseDispatch';
16
- import ReloadDispatch from './ReloadDispatch';
17
- import ReportPlayerDispatch from './ReportPlayerDispatch';
18
- import SaveLoadoutDispatch from './SaveLoadoutDispatch';
19
- import SpawnDispatch from './SpawnDispatch';
20
- import SwapWeaponDispatch from './SwapWeaponDispatch';
21
- import SwitchTeamDispatch from './SwitchTeamDispatch';
22
- import ThrowGrenadeDispatch from './ThrowGrenadeDispatch';
23
-
24
- declare module 'BanPlayerDispatch' {
25
- export default BanPlayerDispatch;
26
- }
27
-
28
- declare module 'BootPlayerDispatch' {
29
- export default BootPlayerDispatch;
30
- }
31
-
32
- declare module 'ChatDispatch' {
33
- export default ChatDispatch;
34
- }
35
-
36
- declare module 'FireDispatch' {
37
- export default FireDispatch;
38
- }
39
-
40
- declare module 'GameOptionsDispatch' {
41
- export default GameOptionsDispatch;
42
- }
43
-
44
- declare module 'GoToAmmoDispatch' {
45
- export default GoToAmmoDispatch;
46
- }
47
-
48
- declare module 'GoToCoopDispatch' {
49
- export default GoToCoopDispatch;
50
- }
51
-
52
- declare module 'GoToGrenadeDispatch' {
53
- export default GoToGrenadeDispatch;
54
- }
55
-
56
- declare module 'GoToPlayerDispatch' {
57
- export default GoToPlayerDispatch;
58
- }
59
-
60
- declare module 'GoToSpatulaDispatch' {
61
- export default GoToSpatulaDispatch;
62
- }
63
-
64
- declare module 'LookAtDispatch' {
65
- export default LookAtDispatch;
66
- }
67
-
68
- declare module 'LookAtPosDispatch' {
69
- export default LookAtPosDispatch;
70
- }
71
-
72
- declare module 'MeleeDispatch' {
73
- export default MeleeDispatch;
74
- }
75
-
76
- declare module 'MovementDispatch' {
77
- export default MovementDispatch;
78
- }
79
-
80
- declare module 'PauseDispatch' {
81
- export default PauseDispatch;
82
- }
83
-
84
- declare module 'ReloadDispatch' {
85
- export default ReloadDispatch;
86
- }
87
-
88
- declare module 'ReportPlayerDispatch' {
89
- export default ReportPlayerDispatch;
90
- }
91
-
92
- declare module 'SaveLoadoutDispatch' {
93
- export default SaveLoadoutDispatch;
94
- }
95
-
96
- declare module 'SpawnDispatch' {
97
- export default SpawnDispatch;
98
- }
99
-
100
- declare module 'SwapWeaponDispatch' {
101
- export default SwapWeaponDispatch;
102
- }
103
-
104
- declare module 'SwitchTeamDispatch' {
105
- export default SwitchTeamDispatch;
106
- }
107
-
108
- declare module 'dispatches' {
109
- export {
110
- BanPlayerDispatch,
111
- BootPlayerDispatch,
112
- ChatDispatch,
113
- FireDispatch,
114
- GameOptionsDispatch,
115
- GoToAmmoDispatch,
116
- GoToCoopDispatch,
117
- GoToGreandeDispatch,
118
- GoToPlayerDispatch,
119
- GoToSpatulaDispatch,
120
- LookAtDispatch,
121
- LookAtPosDispatch,
122
- MeleeDispatch,
123
- MovementDispatch,
124
- PauseDispatch,
125
- ReloadDispatch,
126
- ReportPlayerDispatch,
127
- SaveLoadoutDispatch,
128
- SpawnDispatch,
129
- SwapWeaponDispatch,
130
- SwitchTeamDispatch
131
- }
132
-
133
- const dispatches: {
134
- BanPlayerDispatch: typeof BanPlayerDispatch,
135
- BootPlayerDispatch: typeof BootPlayerDispatch,
136
- ChatDispatch: typeof ChatDispatch,
137
- FireDispatch: typeof FireDispatch,
138
- GameOptionsDispatch: typeof GameOptionsDispatch,
139
- GoToAmmoDispatch: typeof GoToAmmoDispatch,
140
- GoToCoopDispatch: typeof GoToCoopDispatch,
141
- GoToGrenadeDispatch: typeof GoToGrenadeDispatch,
142
- GoToPlayerDispatch: typeof GoToPlayerDispatch,
143
- GoToSpatulaDispatch: typeof GoToSpatulaDispatch,
144
- LookAtDispatch: typeof LookAtDispatch,
145
- LookAtPosDispatch: typeof LookAtPosDispatch,
146
- MeleeDispatch: typeof MeleeDispatch,
147
- MovementDispatch: typeof MovementDispatch,
148
- PauseDispatch: typeof PauseDispatch,
149
- ReloadDispatch: typeof ReloadDispatch,
150
- ReportPlayerDispatch: typeof ReportPlayerDispatch,
151
- SaveLoadoutDispatch: typeof SaveLoadoutDispatch,
152
- SpawnDispatch: typeof SpawnDispatch,
153
- SwapWeaponDispatch: typeof SwapWeaponDispatch,
154
- SwitchTeamDispatch: typeof SwitchTeamDispatch
155
- };
156
-
157
- export default dispatches;
158
- }
159
-
160
- export type ADispatch =
161
- BanPlayerDispatch |
162
- BootPlayerDispatch |
163
- ChatDispatch |
164
- FireDispatch |
165
- GameOptionsDispatch |
166
- GoToAmmoDispatch |
167
- GoToCoopDispatch |
168
- GoToGrenadeDispatch |
169
- GoToPlayerDispatch |
170
- GoToSpatulaDispatch |
171
- LookAtDispatch |
172
- LookAtPosDispatch |
173
- MeleeDispatch |
174
- MovementDispatch |
175
- PauseDispatch |
176
- ReloadDispatch |
177
- ReportPlayerDispatch |
178
- SaveLoadoutDispatch |
179
- SpawnDispatch |
180
- SwapWeaponDispatch |
181
- SwitchTeamDispatch |
182
- ThrowGrenadeDispatch;
1
+ import BanPlayerDispatch, { Params as BanPlayerParams } from './BanPlayerDispatch';
2
+ import BootPlayerDispatch, { Params as BootPlayerParams } from './BootPlayerDispatch';
3
+ import ChatDispatch, { Params as ChatParams } from './ChatDispatch';
4
+ import FireDispatch, { Params as FireParams } from './FireDispatch';
5
+ import GameOptionsDispatch, { Params as GameOptionsParams } from './GameOptionsDispatch';
6
+ import GoToAmmoDispatch, { Params as GoToAmmoParams } from './GoToAmmoDispatch';
7
+ import GoToCoopDispatch, { Params as GoToCoopParams } from './GoToCoopDispatch';
8
+ import GoToGrenadeDispatch, { Params as GoToGrenadeParams } from './GoToGrenadeDispatch';
9
+ import GoToPlayerDispatch, { Params as GoToPlayerParams } from './GoToPlayerDispatch';
10
+ import GoToSpatulaDispatch, { Params as GoToSpatulaParams } from './GoToSpatulaDispatch';
11
+ import LookAtDispatch, { Params as LookAtParams } from './LookAtDispatch';
12
+ import LookAtPosDispatch, { Params as LookAtPosParams } from './LookAtPosDispatch';
13
+ import MeleeDispatch, { Params as MeleeParams } from './MeleeDispatch';
14
+ import MovementDispatch, { Params as MovementParams } from './MovementDispatch';
15
+ import PauseDispatch, { Params as PauseParams } from './PauseDispatch';
16
+ import ReloadDispatch, { Params as ReloadParams } from './ReloadDispatch';
17
+ import ReportPlayerDispatch, { Params as ReportPlayerParams } from './ReportPlayerDispatch';
18
+ import ResetGameDispatch, { Params as ResetGameParams } from './ResetGameDispatch';
19
+ import SaveLoadoutDispatch, { Params as SaveLoadoutParams } from './SaveLoadoutDispatch';
20
+ import SpawnDispatch, { Params as SpawnParams } from './SpawnDispatch';
21
+ import SwapWeaponDispatch, { Params as SwapWeaponParams } from './SwapWeaponDispatch';
22
+ import SwitchTeamDispatch, { Params as SwitchTeamParams } from './SwitchTeamDispatch';
23
+ import ThrowGrenadeDispatch, { Params as ThrowGrenadeParams } from './ThrowGrenadeDispatch';
24
+
25
+ export interface DispatchParams {
26
+ banPlayer: BanPlayerParams;
27
+ bootPlayer: BootPlayerParams;
28
+ chat: ChatParams;
29
+ fire: FireParams;
30
+ gameOptions: GameOptionsParams;
31
+ goToAmmo: GoToAmmoParams;
32
+ goToCoop: GoToCoopParams;
33
+ goToGrenade: GoToGrenadeParams;
34
+ goToPlayer: GoToPlayerParams;
35
+ goToSpatula: GoToSpatulaParams;
36
+ lookAt: LookAtParams;
37
+ lookAtPos: LookAtPosParams;
38
+ melee: MeleeParams;
39
+ move: MovementParams;
40
+ pause: PauseParams;
41
+ reload: ReloadParams;
42
+ reportPlayer: ReportPlayerParams;
43
+ resetGame: ResetGameParams;
44
+ saveLoadout: SaveLoadoutParams;
45
+ spawn: SpawnParams;
46
+ swapWeapon: SwapWeaponParams;
47
+ switchTeam: SwitchTeamParams;
48
+ throwGrenade: ThrowGrenadeParams;
49
+ }
50
+
51
+ export declare const DispatchIndex: {
52
+ 'banPlayer': typeof BanPlayerDispatch,
53
+ 'bootPlayer': typeof BootPlayerDispatch,
54
+ 'chat': typeof ChatDispatch,
55
+ 'fire': typeof FireDispatch,
56
+ 'gameOptions': typeof GameOptionsDispatch,
57
+ 'goToAmmo': typeof GoToAmmoDispatch,
58
+ 'goToCoop': typeof GoToCoopDispatch,
59
+ 'goToGrenade': typeof GoToGrenadeDispatch,
60
+ 'goToPlayer': typeof GoToPlayerDispatch,
61
+ 'goToSpatula': typeof GoToSpatulaDispatch,
62
+ 'lookAt': typeof LookAtDispatch,
63
+ 'lookAtPos': typeof LookAtPosDispatch,
64
+ 'melee': typeof MeleeDispatch,
65
+ 'move': typeof MovementDispatch,
66
+ 'pause': typeof PauseDispatch,
67
+ 'reload': typeof ReloadDispatch,
68
+ 'reportPlayer': typeof ReportPlayerDispatch,
69
+ 'resetGame': typeof ResetGameDispatch,
70
+ 'saveLoadout': typeof SaveLoadoutDispatch,
71
+ 'spawn': typeof SpawnDispatch,
72
+ 'swapWeapon': typeof SwapWeaponDispatch,
73
+ 'switchTeam': typeof SwitchTeamDispatch,
74
+ 'throwGrenade': typeof ThrowGrenadeDispatch
75
+ }
76
+
77
+ declare const _default: {
78
+ BanPlayerDispatch: typeof BanPlayerDispatch,
79
+ BootPlayerDispatch: typeof BootPlayerDispatch,
80
+ ChatDispatch: typeof ChatDispatch,
81
+ FireDispatch: typeof FireDispatch,
82
+ GameOptionsDispatch: typeof GameOptionsDispatch,
83
+ GoToAmmoDispatch: typeof GoToAmmoDispatch,
84
+ GoToCoopDispatch: typeof GoToCoopDispatch,
85
+ GoToGrenadeDispatch: typeof GoToGrenadeDispatch,
86
+ GoToPlayerDispatch: typeof GoToPlayerDispatch,
87
+ GoToSpatulaDispatch: typeof GoToSpatulaDispatch,
88
+ LookAtDispatch: typeof LookAtDispatch,
89
+ LookAtPosDispatch: typeof LookAtPosDispatch,
90
+ MeleeDispatch: typeof MeleeDispatch,
91
+ MovementDispatch: typeof MovementDispatch,
92
+ PauseDispatch: typeof PauseDispatch,
93
+ ReloadDispatch: typeof ReloadDispatch,
94
+ ReportPlayerDispatch: typeof ReportPlayerDispatch,
95
+ ResetGameDispatch: typeof ResetGameDispatch,
96
+ SaveLoadoutDispatch: typeof SaveLoadoutDispatch,
97
+ SpawnDispatch: typeof SpawnDispatch,
98
+ SwapWeaponDispatch: typeof SwapWeaponDispatch,
99
+ SwitchTeamDispatch: typeof SwitchTeamDispatch,
100
+ ThrowGrenadeDispatch: typeof ThrowGrenadeDispatch
101
+ };
102
+
103
+ export default _default;
104
+
105
+ export type ADispatch = typeof DispatchIndex[keyof typeof DispatchIndex];
@@ -21,31 +21,30 @@ import SpawnDispatch from "./SpawnDispatch.js";
21
21
  import SwapWeaponDispatch from "./SwapWeaponDispatch.js";
22
22
  import SwitchTeamDispatch from "./SwitchTeamDispatch.js";
23
23
  import ThrowGrenadeDispatch from "./ThrowGrenadeDispatch.js";
24
-
25
- export {
26
- BanPlayerDispatch,
27
- BootPlayerDispatch,
28
- ChatDispatch,
29
- FireDispatch,
30
- GameOptionsDispatch,
31
- GoToAmmoDispatch,
32
- GoToCoopDispatch,
33
- GoToGrenadeDispatch,
34
- GoToPlayerDispatch,
35
- GoToSpatulaDispatch,
36
- LookAtDispatch,
37
- LookAtPosDispatch,
38
- MeleeDispatch,
39
- MovementDispatch,
40
- PauseDispatch,
41
- ReloadDispatch,
42
- ReportPlayerDispatch,
43
- ResetGameDispatch,
44
- SaveLoadoutDispatch,
45
- SpawnDispatch,
46
- SwapWeaponDispatch,
47
- SwitchTeamDispatch,
48
- ThrowGrenadeDispatch
24
+ export const DispatchIndex = {
25
+ banPlayer: BanPlayerDispatch,
26
+ bootPlayer: BootPlayerDispatch,
27
+ chat: ChatDispatch,
28
+ fire: FireDispatch,
29
+ gameOptions: GameOptionsDispatch,
30
+ goToAmmo: GoToAmmoDispatch,
31
+ goToCoop: GoToCoopDispatch,
32
+ goToGrenade: GoToGrenadeDispatch,
33
+ goToPlayer: GoToPlayerDispatch,
34
+ goToSpatula: GoToSpatulaDispatch,
35
+ lookAt: LookAtDispatch,
36
+ lookAtPos: LookAtPosDispatch,
37
+ melee: MeleeDispatch,
38
+ move: MovementDispatch,
39
+ pause: PauseDispatch,
40
+ reload: ReloadDispatch,
41
+ reportPlayer: ReportPlayerDispatch,
42
+ resetGame: ResetGameDispatch,
43
+ saveLoadout: SaveLoadoutDispatch,
44
+ spawn: SpawnDispatch,
45
+ swapWeapon: SwapWeaponDispatch,
46
+ switchTeam: SwitchTeamDispatch,
47
+ throwGrenade: ThrowGrenadeDispatch
49
48
  };
50
49
  export default {
51
50
  BanPlayerDispatch,