yolkbot 0.1.0-alpha.9 → 0.1.1-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/build/browser.js +6 -6
  2. package/package.json +29 -9
  3. package/src/api.js +97 -23
  4. package/src/bot/GamePlayer.js +2 -2
  5. package/src/bot.js +888 -481
  6. package/src/comm/Codes.js +73 -0
  7. package/src/constants/challenges.js +1822 -0
  8. package/src/constants/index.js +25 -1
  9. package/src/constants/items.js +663 -264
  10. package/src/constants/maps.js +57 -18
  11. package/src/dispatches/BootPlayerDispatch.js +1 -1
  12. package/src/dispatches/ChatDispatch.js +1 -1
  13. package/src/dispatches/GameOptionsDispatch.js +1 -1
  14. package/src/dispatches/GoToAmmoDispatch.js +44 -0
  15. package/src/dispatches/GoToCoopDispatch.js +44 -0
  16. package/src/dispatches/GoToGrenadeDispatch.js +44 -0
  17. package/src/dispatches/GoToPlayerDispatch.js +5 -1
  18. package/src/dispatches/GoToSpatulaDispatch.js +5 -1
  19. package/src/dispatches/LookAtPosDispatch.js +0 -2
  20. package/src/dispatches/LookDispatch2.js +18 -0
  21. package/src/dispatches/MeleeDispatch.js +1 -1
  22. package/src/dispatches/PauseDispatch.js +1 -1
  23. package/src/dispatches/ReloadDispatch.js +14 -2
  24. package/src/dispatches/ReportPlayerDispatch.js +1 -1
  25. package/src/dispatches/SaveLoadoutDispatch.js +11 -34
  26. package/src/dispatches/SpawnDispatch.js +1 -1
  27. package/src/dispatches/SwapWeaponDispatch.js +1 -1
  28. package/src/dispatches/SwitchTeamDispatch.js +1 -1
  29. package/src/dispatches/ThrowGrenadeDispatch.js +1 -1
  30. package/src/dispatches/index.js +9 -0
  31. package/src/matchmaker.js +13 -7
  32. package/src/pathing/mapnode.js +89 -250
  33. package/src/socket.js +2 -3
  34. package/src/types/api.d.ts +2 -16
  35. package/src/types/bot/GamePlayer.d.ts +25 -21
  36. package/src/types/bot.d.ts +125 -54
  37. package/src/types/constants/challenges.d.ts +19 -0
  38. package/src/types/constants/guns.d.ts +240 -0
  39. package/src/types/constants/index.d.ts +102 -0
  40. package/src/types/constants/items.d.ts +21 -0
  41. package/src/types/constants/maps.d.ts +15 -0
  42. package/src/types/dispatches/GoToAmmoDispatch.d.ts +8 -0
  43. package/src/types/dispatches/GoToCoopDispatch.d.ts +8 -0
  44. package/src/types/dispatches/GoToGrenadeDispatch.d.ts +8 -0
  45. package/src/types/dispatches/MovementDispatch.d.ts +2 -0
  46. package/src/types/dispatches/index.d.ts +45 -1
  47. package/src/types/matchmaker.d.ts +19 -14
  48. package/src/types/socket.d.ts +7 -0
  49. package/src/types/gun.d.ts +0 -131
package/src/comm/Codes.js CHANGED
@@ -1,3 +1,4 @@
1
+ /*
1
2
  const CommCode = {
2
3
  announcement: 10, // unused
3
4
  updateBalance: 11,
@@ -71,6 +72,78 @@ const CommCode = {
71
72
  startReload: 70 // unused
72
73
  }
73
74
 
75
+ */
76
+
77
+ const CommCode = {
78
+ swapWeapon: 0,
79
+ joinGame: 0,
80
+ refreshGameState: 0,
81
+ spawnItem: 0,
82
+ observeGame: 0,
83
+ ping: 0,
84
+ bootPlayer: 0,
85
+ banPlayer: 0,
86
+ loginRequired: 0,
87
+ gameLocked: 0,
88
+ reportPlayer: 0,
89
+ banned: 0,
90
+ createPrivateGame: 0,
91
+ switchTeam: 0,
92
+ changeCharacter: 0,
93
+ pause: 0,
94
+ gameOptions: 0,
95
+ gameAction: 0,
96
+ requestGameOptions: 0,
97
+ gameJoined: 0,
98
+ socketReady: 0,
99
+ addPlayer: 0,
100
+ removePlayer: 0,
101
+ fire: 0,
102
+ melee: 0,
103
+ throwGrenade: 0,
104
+ info: 0,
105
+ eventModifier: 0,
106
+ hitThem: 0,
107
+ hitMe: 0,
108
+ collectItem: 0,
109
+ chlgPlayerRerollInGame: 0,
110
+ playerInGameReward: 0,
111
+ playerRewards: 0,
112
+ chat: 0,
113
+ syncThem: 0,
114
+ syncAmmo: 0,
115
+ die: 0,
116
+ beginShellStreak: 0,
117
+ endShellStreak: 0,
118
+ startReload: 0,
119
+ announcement: 0,
120
+ updateBalance: 0,
121
+ reload: 0,
122
+ respawn: 0,
123
+ respawnDenied: 0,
124
+ pong: 0,
125
+ clientReady: 0,
126
+ requestRespawn: 0,
127
+ joinPublicGame: 0,
128
+ joinPrivateGame: 0,
129
+ switchTeamFail: 0,
130
+ expireUpgrade: 0,
131
+ metaGameState: 0,
132
+ syncMe: 0,
133
+ explode: 0,
134
+ keepAlive: 0,
135
+ musicInfo: 0,
136
+ hitMeHardBoiled: 0,
137
+ playerInfo: 0,
138
+ challengeCompleted: 0
139
+ };
140
+
141
+ let ih = 1;
142
+
143
+ Object.keys(CommCode).forEach(e => {
144
+ CommCode[e] = ih++;
145
+ });
146
+
74
147
  const CloseCode = {
75
148
  gameNotFound: 4000,
76
149
  gameFull: 4001,