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
@@ -6,39 +6,37 @@ export class CommIn {
6
6
  this.idx = 0;
7
7
  }
8
8
  static isMoreDataAvailable() {
9
- return Math.max(0, this.buffer.length - this.idx);
9
+ return this.buffer.length - this.idx;
10
10
  }
11
11
  static unPackInt8U() {
12
- const i2 = this.idx;
13
- this.idx++;
14
- return this.buffer[i2];
12
+ return this.buffer[this.idx++];
15
13
  }
16
14
  static unPackInt8() {
17
15
  const v = this.unPackInt8U();
18
- return (v + 128) % 256 - 128;
16
+ return v << 24 >> 24;
19
17
  }
20
18
  static unPackInt16U() {
21
19
  const i2 = this.idx;
22
20
  this.idx += 2;
23
- return this.buffer[i2] + this.buffer[i2 + 1] * 256;
21
+ return this.buffer[i2] | this.buffer[i2 + 1] << 8;
24
22
  }
25
23
  static unPackInt24U() {
26
24
  const i2 = this.idx;
27
25
  this.idx += 3;
28
- return this.buffer[i2] + this.buffer[i2 + 1] * 256 + this.buffer[i2 + 2] * 65536;
26
+ return this.buffer[i2] | this.buffer[i2 + 1] << 8 | this.buffer[i2 + 2] << 16;
29
27
  }
30
28
  static unPackInt32U() {
31
29
  const i2 = this.idx;
32
30
  this.idx += 4;
33
- return this.buffer[i2] + this.buffer[i2 + 1] * 256 + this.buffer[i2 + 2] * 65536 + this.buffer[i2 + 3] * 16777216;
31
+ return (this.buffer[i2] | this.buffer[i2 + 1] << 8 | this.buffer[i2 + 2] << 16 | this.buffer[i2 + 3] << 24) >>> 0;
34
32
  }
35
33
  static unPackInt16() {
36
34
  const v = this.unPackInt16U();
37
- return (v + 32768) % 65536 - 32768;
35
+ return v << 16 >> 16;
38
36
  }
39
37
  static unPackInt32() {
40
38
  const v = this.unPackInt32U();
41
- return (v + 2147483648) % 4294967296 - 2147483648;
39
+ return v << 0;
42
40
  }
43
41
  static unPackRadU() {
44
42
  return this.unPackInt24U() / 2097152;
@@ -64,16 +62,15 @@ export class CommIn {
64
62
  return this.unPackStringHelper(len);
65
63
  }
66
64
  static unPackStringHelper(len) {
67
- const remainder = this.isMoreDataAvailable();
68
- if (remainder < len)
69
- return 0;
70
- let str = "";
71
- for (let i2 = 0;i2 < len; i2++) {
65
+ if (this.isMoreDataAvailable() < len * 2)
66
+ return "";
67
+ const chars = [];
68
+ for (let i = 0;i < len; i++) {
72
69
  const c = this.unPackInt16U();
73
70
  if (c > 0)
74
- str += String.fromCodePoint(c);
71
+ chars.push(String.fromCodePoint(c));
75
72
  }
76
- return str;
73
+ return chars.join("");
77
74
  }
78
75
  }
79
76
  export default CommIn;
@@ -2,32 +2,28 @@ export class CommOut {
2
2
  constructor(size = 16384) {
3
3
  this.idx = 0;
4
4
  this.arrayBuffer = new ArrayBuffer(size);
5
- this.buffer = new Uint8Array(this.arrayBuffer, 0, size);
5
+ this.view = new DataView(this.arrayBuffer);
6
+ this.buffer = new Uint8Array(this.arrayBuffer);
6
7
  }
7
8
  send(ws2) {
8
9
  const b2 = new Uint8Array(this.arrayBuffer, 0, this.idx);
9
10
  ws2.send(b2);
10
11
  }
11
12
  packInt8(val) {
12
- this.buffer[this.idx] = val & 255;
13
+ this.view.setInt8(this.idx, val);
13
14
  this.idx++;
14
15
  }
15
16
  packInt16(val) {
16
- this.buffer[this.idx] = val & 255;
17
- this.buffer[this.idx + 1] = val >> 8 & 255;
17
+ this.view.setInt16(this.idx, val, true);
18
18
  this.idx += 2;
19
19
  }
20
20
  packInt24(val) {
21
- this.buffer[this.idx] = val & 255;
22
- this.buffer[this.idx + 1] = val >> 8 & 255;
23
- this.buffer[this.idx + 2] = val >> 16 & 255;
21
+ this.view.setInt16(this.idx, val & 65535, true);
22
+ this.view.setInt8(this.idx + 2, val >> 16 & 255);
24
23
  this.idx += 3;
25
24
  }
26
25
  packInt32(val) {
27
- this.buffer[this.idx] = val & 255;
28
- this.buffer[this.idx + 1] = val >> 8 & 255;
29
- this.buffer[this.idx + 2] = val >> 16 & 255;
30
- this.buffer[this.idx + 3] = val >> 24 & 255;
26
+ this.view.setInt32(this.idx, val, true);
31
27
  this.idx += 4;
32
28
  }
33
29
  packRadU(val) {
@@ -45,16 +41,20 @@ export class CommOut {
45
41
  packString(str) {
46
42
  if (typeof str !== "string")
47
43
  str = "";
44
+ if (str.length > 255) {
45
+ console.trace("truncated packString to fit int8 (shell protocol); this should not happen (report it on GitHub)");
46
+ str = str.slice(0, 255);
47
+ }
48
48
  this.packInt8(str.length);
49
- for (let i2 = 0;i2 < str.length; i2++)
50
- this.packInt16(str.charCodeAt(i2));
49
+ for (let i = 0;i < str.length; i++)
50
+ this.packInt16(str.charCodeAt(i));
51
51
  }
52
52
  packLongString(str) {
53
53
  if (typeof str !== "string")
54
54
  str = "";
55
55
  this.packInt16(str.length);
56
- for (let i2 = 0;i2 < str.length; i2++)
57
- this.packInt16(str.charCodeAt(i2));
56
+ for (let i = 0;i < str.length; i++)
57
+ this.packInt16(str.charCodeAt(i));
58
58
  }
59
59
  }
60
60
  export default CommOut;
@@ -1,4 +1,4 @@
1
- const CommCode = {
1
+ export const CommCode = {
2
2
  swapWeapon: 0,
3
3
  joinGame: 1,
4
4
  refreshGameState: 2,
@@ -1,2 +1,3 @@
1
1
  import { Items } from "./items.js";
2
- export const findItemById = (id) => Items.find((item) => item.id === id);
2
+ const itemsMap = new Map(Items.map((item) => [item.id, item]));
3
+ export const findItemById = (id) => itemsMap.get(id);
@@ -1,14 +1,11 @@
1
1
  export interface GunAmmo {
2
- rounds: number;
3
2
  capacity: number;
4
3
  reload: number;
5
4
  store: number;
6
- storeMax: number;
7
5
  pickup: number;
8
6
  }
9
7
 
10
- declare class Gun {
11
- // base props
8
+ export type Gun = {
12
9
  ammo: GunAmmo;
13
10
 
14
11
  longReloadTime: number;
@@ -18,47 +15,25 @@ declare class Gun {
18
15
  internalName: string;
19
16
  standardMeshName: string;
20
17
 
21
- automatic: boolean;
22
18
  damage: number;
23
19
  range: number;
24
- recoil: number;
25
20
  rof: number;
26
21
  totalDamage: number;
27
22
  velocity: number;
28
-
29
- accuracyMin: number;
30
- accuracyMax: number;
31
- accuracyLoss: number;
32
- accuracyRecover: number;
33
-
34
- // optional props
35
- adsMod: number;
36
- burst: number;
37
- burstRof: number;
38
- movementAccuracyMod: number;
39
- radius: number;
40
- reloadBloom: boolean;
41
- reloadTimeMod: number;
42
- tracer: number;
43
23
  }
44
24
 
45
- declare class Eggk47 extends Gun { }
46
- declare class DozenGauge extends Gun { }
47
- declare class CSG1 extends Gun { }
48
- declare class Cluck9mm extends Gun { }
49
- declare class RPEGG extends Gun { }
50
- declare class M24 extends Gun { }
51
- declare class AUG extends Gun { }
52
-
53
- export type AnyGun = Eggk47 | DozenGauge | CSG1 | Cluck9mm | RPEGG | SMG | M24 | AUG;
54
-
55
- export {
56
- Eggk47,
57
- DozenGauge,
58
- CSG1,
59
- Cluck9mm,
60
- RPEGG,
61
- SMG,
62
- M24,
63
- AUG
64
- }
25
+ export declare const EggK47: Gun;
26
+ export declare const DozenGauge: Gun;
27
+ export declare const CSG1: Gun;
28
+ export declare const Cluck9mm: Gun;
29
+ export declare const RPEGG: Gun;
30
+ export declare const SMG: Gun;
31
+ export declare const M24: Gun;
32
+ export declare const AUG: Gun;
33
+
34
+ export type CreatedGun = Gun & {
35
+ ammo: GunAmmo & {
36
+ rounds: number;
37
+ storeMax: number;
38
+ }
39
+ };
@@ -1,272 +1,150 @@
1
- const BaseGun = class {
2
- constructor() {
3
- this.adsMod = 0.5;
4
- this.burst = 0;
5
- this.burstRof = 0;
6
- this.movementAccuracyMod = 1;
7
- this.radius = 0;
8
- this.reloadBloom = true;
9
- this.reloadTimeMod = 1;
10
- this.tracer = 0;
11
- }
1
+ const EggK47 = {
2
+ ammo: {
3
+ capacity: 30,
4
+ reload: 30,
5
+ store: 240,
6
+ pickup: 30
7
+ },
8
+ longReloadTime: 205,
9
+ shortReloadTime: 160,
10
+ weaponName: "EggK-47",
11
+ internalName: "Eggk47",
12
+ standardMeshName: "eggk47",
13
+ damage: 30,
14
+ range: 20,
15
+ rof: 3,
16
+ totalDamage: 30,
17
+ velocity: 1.5
12
18
  };
13
- const Eggk47 = class _Eggk47 extends BaseGun {
14
- constructor() {
15
- super();
16
- this.ammo = {
17
- rounds: 30,
18
- capacity: 30,
19
- reload: 30,
20
- store: 240,
21
- storeMax: 240,
22
- pickup: 30
23
- };
24
- this.longReloadTime = 205;
25
- this.shortReloadTime = 160;
26
- this.weaponName = "EggK-47";
27
- this.internalName = "Eggk47";
28
- this.standardMeshName = "eggk47";
29
- this.automatic = true;
30
- this.damage = 30;
31
- this.range = 20;
32
- this.recoil = 7;
33
- this.rof = 3;
34
- this.totalDamage = 30;
35
- this.velocity = 1.5;
36
- this.accuracyMin = 0.15;
37
- this.accuracyMax = 0.03;
38
- this.accuracyLoss = 0.05;
39
- this.accuracyRecover = 0.025;
40
- this.tracer = 1;
41
- }
19
+ const DozenGauge = {
20
+ ammo: {
21
+ capacity: 2,
22
+ reload: 2,
23
+ store: 24,
24
+ pickup: 8
25
+ },
26
+ longReloadTime: 155,
27
+ shortReloadTime: 155,
28
+ weaponName: "Scrambler",
29
+ internalName: "Dozen Gauge",
30
+ standardMeshName: "dozenGauge",
31
+ damage: 8.5,
32
+ range: 8,
33
+ rof: 8,
34
+ totalDamage: 170,
35
+ velocity: 1
42
36
  };
43
- const DozenGauge = class _DozenGauge extends BaseGun {
44
- constructor() {
45
- super();
46
- this.ammo = {
47
- rounds: 2,
48
- capacity: 2,
49
- reload: 2,
50
- store: 24,
51
- storeMax: 24,
52
- pickup: 8
53
- };
54
- this.longReloadTime = 155;
55
- this.shortReloadTime = 155;
56
- this.weaponName = "Scrambler";
57
- this.internalName = "Dozen Gauge";
58
- this.standardMeshName = "dozenGauge";
59
- this.automatic = false;
60
- this.damage = 8.5;
61
- this.range = 8;
62
- this.recoil = 10;
63
- this.rof = 8;
64
- this.totalDamage = 170;
65
- this.velocity = 1;
66
- this.accuracyMin = 0.16;
67
- this.accuracyMax = 0.13;
68
- this.accuracyLoss = 0.17;
69
- this.accuracyRecover = 0.02;
70
- this.adsMod = 0.6;
71
- this.movementAccuracyMod = 0.2;
72
- this.tracer = 0;
73
- }
37
+ const CSG1 = {
38
+ ammo: {
39
+ capacity: 15,
40
+ reload: 15,
41
+ store: 60,
42
+ pickup: 15
43
+ },
44
+ longReloadTime: 225,
45
+ shortReloadTime: 165,
46
+ weaponName: "Free Ranger",
47
+ internalName: "CSG-1",
48
+ standardMeshName: "csg1",
49
+ damage: 105,
50
+ range: 50,
51
+ rof: 13,
52
+ totalDamage: 105,
53
+ velocity: 1.75
74
54
  };
75
- const CSG1 = class _CSG1 extends BaseGun {
76
- constructor() {
77
- super();
78
- this.ammo = {
79
- rounds: 15,
80
- capacity: 15,
81
- reload: 15,
82
- store: 60,
83
- storeMax: 60,
84
- pickup: 15
85
- };
86
- this.longReloadTime = 225;
87
- this.shortReloadTime = 165;
88
- this.weaponName = "Free Ranger";
89
- this.internalName = "CSG-1";
90
- this.standardMeshName = "csg1";
91
- this.automatic = false;
92
- this.damage = 105;
93
- this.range = 50;
94
- this.recoil = 13;
95
- this.rof = 13;
96
- this.totalDamage = 105;
97
- this.velocity = 1.75;
98
- this.accuracyMin = 0.3;
99
- this.accuracyMax = 0.004;
100
- this.accuracyLoss = 0.3;
101
- this.accuracyRecover = 0.025;
102
- this.tracer = 0;
103
- }
55
+ const Cluck9mm = {
56
+ ammo: {
57
+ capacity: 15,
58
+ reload: 15,
59
+ store: 60,
60
+ pickup: 15
61
+ },
62
+ longReloadTime: 195,
63
+ shortReloadTime: 160,
64
+ weaponName: "Cluck 9mm",
65
+ internalName: "Cluck 9mm",
66
+ standardMeshName: "cluck9mm",
67
+ damage: 26,
68
+ range: 15,
69
+ rof: 4,
70
+ totalDamage: 26,
71
+ velocity: 1
104
72
  };
105
- const Cluck9mm = class _Cluck9mm extends BaseGun {
106
- constructor() {
107
- super();
108
- this.ammo = {
109
- rounds: 15,
110
- capacity: 15,
111
- reload: 15,
112
- store: 60,
113
- storeMax: 60,
114
- pickup: 15
115
- };
116
- this.longReloadTime = 195;
117
- this.shortReloadTime = 160;
118
- this.weaponName = "Cluck 9mm";
119
- this.internalName = "Cluck 9mm";
120
- this.standardMeshName = "cluck9mm";
121
- this.automatic = false;
122
- this.damage = 26;
123
- this.range = 15;
124
- this.recoil = 6;
125
- this.rof = 4;
126
- this.totalDamage = 26;
127
- this.velocity = 1;
128
- this.accuracyMin = 0.15;
129
- this.accuracyMax = 0.035;
130
- this.accuracyLoss = 0.09;
131
- this.accuracyRecover = 0.08;
132
- this.adsMod = 0.8;
133
- this.movementAccuracyMod = 0.6;
134
- this.tracer = 0;
135
- }
73
+ const RPEGG = {
74
+ ammo: {
75
+ capacity: 1,
76
+ reload: 1,
77
+ store: 3,
78
+ pickup: 1
79
+ },
80
+ longReloadTime: 170,
81
+ shortReloadTime: 170,
82
+ weaponName: "RPEGG",
83
+ internalName: "Eggsploder",
84
+ standardMeshName: "rpegg",
85
+ damage: 140,
86
+ range: 45,
87
+ rof: 40,
88
+ totalDamage: 192.5,
89
+ velocity: 0.4
136
90
  };
137
- const RPEGG = class _RPEGG extends BaseGun {
138
- constructor() {
139
- super();
140
- this.ammo = {
141
- rounds: 1,
142
- capacity: 1,
143
- reload: 1,
144
- store: 3,
145
- storeMax: 3,
146
- pickup: 1
147
- };
148
- this.longReloadTime = 170;
149
- this.shortReloadTime = 170;
150
- this.weaponName = "RPEGG";
151
- this.internalName = "Eggsploder";
152
- this.standardMeshName = "rpegg";
153
- this.automatic = false;
154
- this.damage = 140;
155
- this.range = 45;
156
- this.recoil = 60;
157
- this.rof = 40;
158
- this.totalDamage = 192.5;
159
- this.velocity = 0.4;
160
- this.accuracyMin = 0.3;
161
- this.accuracyMax = 0.015;
162
- this.accuracyLoss = 0.3;
163
- this.accuracyRecover = 0.02;
164
- this.radius = 2.75;
165
- }
91
+ const SMG = {
92
+ ammo: {
93
+ capacity: 40,
94
+ reload: 40,
95
+ store: 200,
96
+ pickup: 40
97
+ },
98
+ longReloadTime: 225,
99
+ shortReloadTime: 190,
100
+ weaponName: "Whipper",
101
+ internalName: "SMEGG",
102
+ standardMeshName: "smg",
103
+ damage: 23,
104
+ range: 20,
105
+ rof: 2,
106
+ totalDamage: 23,
107
+ velocity: 1.25
166
108
  };
167
- const SMG = class _SMG extends BaseGun {
168
- constructor() {
169
- super();
170
- this.ammo = {
171
- rounds: 40,
172
- capacity: 40,
173
- reload: 40,
174
- store: 200,
175
- storeMax: 200,
176
- pickup: 40
177
- };
178
- this.longReloadTime = 225;
179
- this.shortReloadTime = 190;
180
- this.weaponName = "Whipper";
181
- this.internalName = "SMEGG";
182
- this.standardMeshName = "smg";
183
- this.automatic = true;
184
- this.damage = 23;
185
- this.range = 20;
186
- this.recoil = 7;
187
- this.rof = 2;
188
- this.totalDamage = 23;
189
- this.velocity = 1.25;
190
- this.accuracyMin = 0.19;
191
- this.accuracyMax = 0.06;
192
- this.accuracyLoss = 0.045;
193
- this.accuracyRecover = 0.05;
194
- this.adsMod = 0.6;
195
- this.movementAccuracyMod = 0.7;
196
- this.tracer = 2;
197
- }
109
+ const M24 = {
110
+ ammo: {
111
+ capacity: 1,
112
+ reload: 1,
113
+ store: 12,
114
+ pickup: 4
115
+ },
116
+ longReloadTime: 144,
117
+ shortReloadTime: 144,
118
+ weaponName: "Crackshot",
119
+ internalName: "M2DZ",
120
+ standardMeshName: "m24",
121
+ damage: 170,
122
+ range: 60,
123
+ rof: 15,
124
+ totalDamage: 170,
125
+ velocity: 2
198
126
  };
199
- const M24 = class _M24 extends BaseGun {
200
- constructor() {
201
- super();
202
- this.ammo = {
203
- rounds: 1,
204
- capacity: 1,
205
- reload: 1,
206
- store: 12,
207
- storeMax: 12,
208
- pickup: 4
209
- };
210
- this.longReloadTime = 144;
211
- this.shortReloadTime = 144;
212
- this.weaponName = "Crackshot";
213
- this.internalName = "M2DZ";
214
- this.standardMeshName = "m24";
215
- this.automatic = true;
216
- this.damage = 170;
217
- this.range = 60;
218
- this.recoil = 20;
219
- this.rof = 15;
220
- this.totalDamage = 170;
221
- this.velocity = 2;
222
- this.accuracyMin = 0.35;
223
- this.accuracyMax = 0;
224
- this.accuracyLoss = 0.1;
225
- this.accuracyRecover = 0.023;
226
- this.movementAccuracyMod = 1.3;
227
- this.reloadBloom = false;
228
- this.reloadTimeMod = 0.8;
229
- this.tracer = 0;
230
- }
231
- };
232
- const AUG = class _AUG extends BaseGun {
233
- constructor() {
234
- super();
235
- this.ammo = {
236
- rounds: 24,
237
- capacity: 24,
238
- reload: 24,
239
- store: 150,
240
- storeMax: 150,
241
- pickup: 24
242
- };
243
- this.longReloadTime = 205;
244
- this.shortReloadTime = 160;
245
- this.weaponName = "Tri-Hard";
246
- this.internalName = "AUG";
247
- this.standardMeshName = "aug";
248
- this.automatic = false;
249
- this.damage = 32;
250
- this.range = 20;
251
- this.recoil = 18;
252
- this.rof = 15;
253
- this.totalDamage = 34;
254
- this.velocity = 1.5;
255
- this.accuracyMin = 0.15;
256
- this.accuracyMax = 0.03;
257
- this.accuracyLoss = 0.037;
258
- this.accuracyRecover = 0.03;
259
- this.adsMod = 0.6;
260
- this.burst = 3;
261
- this.burstRof = 3;
262
- this.movementAccuracyMod = 0.8;
263
- this.movementInstability = 2;
264
- this.tracer = 0;
265
- }
127
+ const AUG = {
128
+ ammo: {
129
+ capacity: 24,
130
+ reload: 24,
131
+ store: 150,
132
+ pickup: 24
133
+ },
134
+ longReloadTime: 205,
135
+ shortReloadTime: 160,
136
+ weaponName: "Tri-Hard",
137
+ internalName: "AUG",
138
+ standardMeshName: "aug",
139
+ damage: 32,
140
+ range: 20,
141
+ rof: 15,
142
+ totalDamage: 34,
143
+ velocity: 1.5
266
144
  };
267
145
 
268
146
  export {
269
- Eggk47,
147
+ EggK47,
270
148
  DozenGauge,
271
149
  CSG1,
272
150
  Cluck9mm,
@@ -1,4 +1,4 @@
1
- import { AUG, CSG1, DozenGauge, Eggk47, M24, RPEGG, SMG } from './guns';
1
+ import { Gun } from './guns';
2
2
 
3
3
  export { findItemById } from './findItemById';
4
4
 
@@ -78,7 +78,7 @@ export declare const GameMode: {
78
78
  KOTC: number;
79
79
  };
80
80
 
81
- export declare const GameOptionFlags: {
81
+ export declare const GameOptionFlag: {
82
82
  Locked: number;
83
83
  NoTeamChange: number;
84
84
  NoTeamShuffle: number;
@@ -86,7 +86,7 @@ export declare const GameOptionFlags: {
86
86
 
87
87
  export declare const GunEquipTime: number;
88
88
 
89
- export declare const GunList: Array<typeof Eggk47 | typeof DozenGauge | typeof CSG1 | typeof RPEGG | typeof SMG | typeof M24 | typeof AUG>;
89
+ export declare const GunList: Array<Gun>;
90
90
 
91
91
  export declare const ItemType: {
92
92
  Hat: number;
@@ -108,10 +108,10 @@ export declare const Movement: {
108
108
  Scope: number;
109
109
  };
110
110
 
111
- export declare const PlayTypes: {
112
- joinPublic: number;
113
- createPrivate: number;
114
- joinPrivate: number;
111
+ export declare const PlayType: {
112
+ JoinPublic: number;
113
+ CreatePrivate: number;
114
+ JoinPrivate: number;
115
115
  };
116
116
 
117
117
  export declare const ShellStreak: {
@@ -150,6 +150,4 @@ export declare const Team: {
150
150
  Red: number;
151
151
  };
152
152
 
153
- export declare const URLRewards: string[];
154
-
155
153
  export declare const UserAgent: string;