yolkbot 1.3.11 → 1.4.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 (65) hide show
  1. package/README.md +7 -7
  2. package/browser/build/global.js +1 -123
  3. package/browser/build/module.js +1 -123
  4. package/dist/api.js +1 -3
  5. package/dist/bot/GamePlayer.js +1 -3
  6. package/dist/bot.js +1 -3
  7. package/dist/comm/CommIn.js +1 -3
  8. package/dist/comm/CommOut.js +1 -3
  9. package/dist/comm/index.js +1 -3
  10. package/dist/constants/CloseCode.js +1 -3
  11. package/dist/constants/CommCode.js +1 -3
  12. package/dist/constants/challenges.js +1 -3
  13. package/dist/constants/guns.js +1 -3
  14. package/dist/constants/index.js +1 -3
  15. package/dist/constants/items.js +1 -3
  16. package/dist/constants/maps.js +1 -3
  17. package/dist/constants/regions.js +1 -3
  18. package/dist/dispatches/BanPlayerDispatch.js +1 -3
  19. package/dist/dispatches/BootPlayerDispatch.js +1 -3
  20. package/dist/dispatches/ChatDispatch.js +1 -3
  21. package/dist/dispatches/FireDispatch.js +1 -3
  22. package/dist/dispatches/GameOptionsDispatch.js +1 -3
  23. package/dist/dispatches/GoToAmmoDispatch.js +1 -3
  24. package/dist/dispatches/GoToCoopDispatch.js +1 -3
  25. package/dist/dispatches/GoToGrenadeDispatch.js +1 -3
  26. package/dist/dispatches/GoToPlayerDispatch.js +1 -3
  27. package/dist/dispatches/GoToSpatulaDispatch.js +1 -3
  28. package/dist/dispatches/LookAtDispatch.js +1 -3
  29. package/dist/dispatches/LookAtPosDispatch.js +1 -3
  30. package/dist/dispatches/MeleeDispatch.js +1 -3
  31. package/dist/dispatches/MovementDispatch.js +1 -3
  32. package/dist/dispatches/PauseDispatch.js +1 -3
  33. package/dist/dispatches/ReloadDispatch.js +1 -3
  34. package/dist/dispatches/ReportPlayerDispatch.js +1 -3
  35. package/dist/dispatches/ResetGameDispatch.js +1 -3
  36. package/dist/dispatches/SaveLoadoutDispatch.js +1 -3
  37. package/dist/dispatches/SpawnDispatch.js +1 -3
  38. package/dist/dispatches/SwapWeaponDispatch.js +1 -3
  39. package/dist/dispatches/SwitchTeamDispatch.js +1 -3
  40. package/dist/dispatches/ThrowGrenadeDispatch.js +1 -3
  41. package/dist/dispatches/index.js +1 -3
  42. package/dist/env/fetch.js +10 -12
  43. package/dist/env/globals.js +1 -3
  44. package/dist/index.js +2 -10
  45. package/dist/matchmaker.js +1 -3
  46. package/dist/pathing/astar.js +1 -3
  47. package/dist/pathing/binaryheap.js +1 -3
  48. package/dist/pathing/mapnode.js +1 -3
  49. package/dist/socket.js +1 -3
  50. package/dist/types/api.d.ts +1 -1
  51. package/dist/types/matchmaker.d.ts +1 -1
  52. package/dist/types/wasm/bytes.d.ts +1 -0
  53. package/dist/types/wasm/direct.d.ts +3 -0
  54. package/dist/types/wasm/legacy.d.ts +63 -0
  55. package/dist/types/wasm/util.d.ts +9 -0
  56. package/dist/util.js +1 -3
  57. package/dist/wasm/bytes.js +1 -3
  58. package/dist/wasm/direct.js +1 -0
  59. package/dist/wasm/legacy.js +1 -0
  60. package/dist/wasm/util.js +1 -0
  61. package/package.json +17 -8
  62. package/dist/types/wasm/wrapper.d.ts +0 -10
  63. package/dist/wasm/imports.js +0 -125
  64. package/dist/wasm/utils.js +0 -3
  65. package/dist/wasm/wrapper.js +0 -3
@@ -1,125 +0,0 @@
1
- /* eslint-disable */
2
-
3
- var m=Object.defineProperty;var e=(i,c)=>m(i,"name",{value:c,configurable:!0});import{addToExternrefTable as b,getStringFromWasm as d,passStringToWasm as u}from"./utils.js";const y=`
4
- var comp_spinner_overlay = {
5
- template: '#spinner-overlay-template',
6
- components: {
7
- 'wobbly-egg': comp_wobbly_egg
8
- },
9
- props: ['loc', 'adblockerbanner', 'hideAds', 'adUnit', 'accountDate'],
10
-
11
- data: function () {
12
- return {
13
- isShowing: false,
14
- header: '',
15
- footer: '',
16
- adIsShowing: false,
17
- isShowTips: false,
18
- tipKey: null,
19
- tips: [],
20
- tip: '',
21
- eggGuyImg: 'img/shellShockers_loadingTipEgg.webp',
22
- goodBrowser: true,
23
- browserTipShown: false,
24
- }
25
- },
26
-
27
- mounted() {
28
- this.isNotChrome().then(result => {
29
- if (result) {
30
- this.goodBrowser = false;
31
- }
32
- });
33
- },
34
-
35
- methods: {
36
- show: function (headerLocKey, footerLocKey, showTips) {
37
- this.header = this.loc[headerLocKey];
38
- this.footer = this.loc[footerLocKey];
39
- this.isShowing = true;
40
- this.isShowTips = showTips;
41
- },
42
-
43
- showSpinnerLoadProgress: function (percent) {
44
- var msg = this.loc['ui_game_loading'];
45
- this.header = this.loc['building_map'];
46
- this.footer = '{0}... {1}%'.format(msg, percent);
47
- this.isShowTips = true;
48
- this.isShowing = true;
49
- },
50
-
51
- hide: function () {
52
- this.isShowing = false;
53
- this.isShowTips = this.isShowing;
54
- this.$emit('close-display-ad');
55
- },
56
-
57
- hideDisplayAd() {
58
- this.adIsShowing = false;
59
- console.log('do it');
60
- },
61
- showDisplayAd() {
62
- this.adIsShowing = true;
63
- },
64
- toggleDisplayAd() {
65
- return this.adIsShowing = this.adIsShowing ? false : true;
66
- },
67
- getTipKey() {
68
- if (!this.accountDate) {
69
- this.tipKey = 'tipNew_';
70
- } else {
71
- if (!this.accountDays) {
72
- this.accountDays = Math.ceil((new Date().getTime() - new Date(this.accountDate).getTime()) / (1000 * 3600 * 24));
73
- }
74
- if (this.accountDays <= 14) {
75
- this.tipKey = 'tipNew_';
76
- } else {
77
- this.tipKey = 'tip_';
78
- }
79
- }
80
- },
81
- randomTip() {
82
- if (!this.goodBrowser && !this.browserTipShown) {
83
- this.tip = 'tip_ofthe_day_107';
84
- this.browserTipShown = true;
85
- return;
86
- }
87
-
88
- if (this.tipKey === null) {
89
- this.getTipKey();
90
- }
91
-
92
- if (this.tips.length === 0) {
93
- Object.keys(this.loc).forEach(key => {
94
- if (key.startsWith(this.tipKey)) {
95
- this.tips.push(key);
96
- }
97
- });
98
- }
99
- this.tip = this.tips[Math.floor(Math.random() * this.tips.length)];
100
- },
101
-
102
- async isNotChrome() {
103
- if (navigator.userAgentData) {
104
- const brands = navigator.userAgentData.brands || [];
105
- const isChrome = brands.some(brand => brand.brand === 'Google Chrome');
106
- return !isChrome;
107
- } else {
108
- // Fallback to userAgent for older browsers
109
- return this.isNotChromeFallback();
110
- }
111
- },
112
- isNotChromeFallback() {
113
- const ua = navigator.userAgent;
114
- return !(ua.includes('Chrome') && !ua.includes('Edg') && !ua.includes('OPR'));
115
- }
116
- },
117
- watch: {
118
- isShowing(val, old) {
119
- if (val && !old) {
120
- this.randomTip();
121
- }
122
- }
123
- }
124
- };
125
- `,S={},a={textContent:""},D=e((i,c)=>{const l=new FinalizationRegistry(t=>{i().__wbindgen_export_5.get(t.dtor)(t.a,t.b)}),w=e((t,n,s,o)=>{const _={a:t,b:n,cnt:1,dtor:s},r=e((...p)=>{_.cnt++;const h=_.a;_.a=0;try{return o(h,_.b,...p)}finally{--_.cnt===0?(i().__wbindgen_export_5.get(_.dtor)(h,_.b),l.unregister(_)):_.a=h}},"real");return r.original=_,l.register(r,_,_),r},"makeMutClosure"),f=e((t,n,s)=>i().closure28_externref_shim(t,n,s),"__wbg_adapter_22");let g=1;return{wbg:{__wbg_addEventListener_90e553fdce254421:e((t,n,s,o)=>S[d(i(),n,s)]=o,"__wbg_addEventListener_90e553fdce254421"),__wbg_appendChild_8204974b7328bf98:e(()=>{},"__wbg_appendChild_8204974b7328bf98"),__wbg_axes_b1da727bd9ea422d:e(()=>{},"__wbg_axes_b1da727bd9ea422d"),__wbg_body_942ea927546a04ba:e(()=>b(i(),null),"__wbg_body_942ea927546a04ba"),__wbg_call_672a4d21634d4a24:e(()=>{},"__wbg_call_672a4d21634d4a24"),__wbg_childNodes_c4423003f3a9441f:e(()=>[],"__wbg_childNodes_c4423003f3a9441f"),__wbg_createElement_8c9931a732ee2fea:e(()=>a,"__wbg_createElement_8c9931a732ee2fea"),__wbg_document_d249400bd7bd996d:e(()=>b(i(),{}),"__wbg_document_d249400bd7bd996d"),__wbg_from_2a5d3e218e67aa85:e((...t)=>Array.from(t[0]),"__wbg_from_2a5d3e218e67aa85"),__wbg_getGamepads_1f997cef580c9088:e((...t)=>t[0].getGamepads(),"__wbg_getGamepads_1f997cef580c9088"),__wbg_get_67b2ba62fc30de12:e((...t)=>Reflect.get(t[0],t[1]),"__wbg_get_67b2ba62fc30de12"),__wbg_get_b9b93047fe3cf45b:e((...t)=>t[0][t[1]>>>0],"__wbg_get_b9b93047fe3cf45b"),__wbg_has_a5ea9117f258a0ec:e(()=>!0,"__wbg_has_a5ea9117f258a0ec"),__wbg_innerText_df9aeb9435e40973:e(()=>{},"__wbg_innerText_df9aeb9435e40973"),__wbg_instanceof_Gamepad_365ec8404255ce00:e(()=>!0,"__wbg_instanceof_Gamepad_365ec8404255ce00"),__wbg_instanceof_HtmlElement_51378c201250b16c:e(()=>!0,"__wbg_instanceof_HtmlElement_51378c201250b16c"),__wbg_instanceof_Window_def73ea0955fc569:e(()=>!0,"__wbg_instanceof_Window_def73ea0955fc569"),__wbg_isTrusted_cc994b7949c53593:e(()=>!0,"__wbg_isTrusted_cc994b7949c53593"),__wbg_item_8be407c958853a13:e((...t)=>b(i(),t[0][t[1]>>>0]),"__wbg_item_8be407c958853a13"),__wbg_length_49b2ba67f0897e97:e(()=>(g--,g<=0?(g=1,0):g),"__wbg_length_49b2ba67f0897e97"),__wbg_length_e2d2a49132c1b256:e((...t)=>t[0].length,"__wbg_length_e2d2a49132c1b256"),__wbg_movementX_1aa05f864931369b:e((...t)=>t[0].movementX,"__wbg_movementX_1aa05f864931369b"),__wbg_movementY_8acfedb38a70e624:e((...t)=>t[0].movementY,"__wbg_movementY_8acfedb38a70e624"),__wbg_navigator_1577371c070c8947:e((...t)=>t[0].navigator,"__wbg_navigator_1577371c070c8947"),__wbg_new_405e22f390576ce2:e(()=>new Object,"__wbg_new_405e22f390576ce2"),__wbg_newnoargs_105ed471475aaf50:e(()=>{},"__wbg_newnoargs_105ed471475aaf50"),__wbg_nodeType_5e1153141daac26a:e(()=>3,"__wbg_nodeType_5e1153141daac26a"),__wbg_now_807e54c39636c349:e(()=>c.processDate||Date.now(),"__wbg_now_807e54c39636c349"),__wbg_set_bb8cecf6a62b9f46:e((...t)=>Reflect.set(t[0],t[1],t[2]),"__wbg_set_bb8cecf6a62b9f46"),__wbg_settextContent_d29397f7b994d314:e(async(...t)=>{a.textContent=d(i(),t[1],t[2]),c.processListeners.forEach(n=>n(a.textContent))},"__wbg_settextContent_d29397f7b994d314"),__wbg_static_accessor_GLOBAL_88a902d13a557d07:e(()=>{},"__wbg_static_accessor_GLOBAL_88a902d13a557d07"),__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0:e(()=>{},"__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0"),__wbg_static_accessor_SELF_37c5d418e4bf5819:e(()=>b(i(),{}),"__wbg_static_accessor_SELF_37c5d418e4bf5819"),__wbg_static_accessor_WINDOW_5de37043a91a9c40:e(()=>{},"__wbg_static_accessor_WINDOW_5de37043a91a9c40"),__wbg_textContent_215d0f87d539368a:e((t,n)=>{const[s,o]=u(i(),n===a?a.textContent:y),_=new DataView(i().memory.buffer);_.setInt32(t+4,o,!0),_.setInt32(t+0,s,!0)},"__wbg_textContent_215d0f87d539368a"),__wbindgen_debug_string:e(()=>{},"__wbindgen_debug_string"),__wbindgen_init_externref_table:e(()=>{},"__wbindgen_init_externref_table"),__wbindgen_throw:e(()=>{},"__wbindgen_throw"),__wbindgen_number_new:e(t=>t,"__wbindgen_number_new"),__wbindgen_string_new:e((t,n)=>d(i(),t,n),"__wbindgen_string_new"),__wbindgen_string_get:e((t,n)=>{const s=d(i(),t,n),[o,_]=u(i(),s),r=new DataView(i().memory.buffer);r.setInt32(t+4,_,!0),r.setInt32(t+0,o,!0)},"__wbindgen_string_get"),__wbindgen_is_undefined:e(t=>t===void 0?1:0,"__wbindgen_is_undefined"),__wbindgen_is_null:e(t=>t===null?1:0,"__wbindgen_is_null"),__wbindgen_boolean_get:e(t=>{const n=t;return typeof n=="boolean"?n?1:0:2},"__wbindgen_boolean_get"),__wbindgen_closure_wrapper94:e((t,n)=>w(t,n,31,f),"__wbindgen_closure_wrapper94"),__wbindgen_closure_wrapper95:e((t,n)=>w(t,n,31,f),"__wbindgen_closure_wrapper95"),__wbindgen_number_get:e((t,n)=>{const s=n,o=typeof s=="number"?s:void 0,_=new DataView(i().memory.buffer);_.setFloat64(t+8,o,!0),_.setInt32(t+0,1,!0)},"__wbindgen_number_get")}}},"getImports");export{S as canvasListeners,D as getImports};
@@ -1,3 +0,0 @@
1
- /* eslint-disable */
2
-
3
- var a=Object.defineProperty;var t=(e,r)=>a(e,"name",{value:r,configurable:!0});const s=t((e,r,n)=>(r>>>=0,new TextDecoder().decode(new Uint8Array(e.memory.buffer).subarray(r,r+n))),"getStringFromWasm"),_=t((e,r)=>{const n=new TextEncoder().encode(r),o=e.__wbindgen_malloc(n.length,1)>>>0;return new Uint8Array(e.memory.buffer).subarray(o,o+n.length).set(n),[o,n.length]},"passStringToWasm"),d=t((e,r)=>{const n=e.__externref_table_alloc();return e.__wbindgen_export_2.set(n,r),n},"addToExternrefTable");export{d as addToExternrefTable,s as getStringFromWasm,_ as passStringToWasm};
@@ -1,3 +0,0 @@
1
- /* eslint-disable */
2
-
3
- var P=Object.defineProperty;var a=(t,e)=>P(t,"name",{value:e,configurable:!0});import Y from"../env/globals.js";import{canvasListeners as l,getImports as y}from"./imports.js";import{getStringFromWasm as _,passStringToWasm as m}from"./utils.js";import{wasmBytes as b}from"./bytes.js";const p={processListeners:[],processDate:null},h={};let s;Object.assign(h,y(()=>s,p));const w=a(async()=>{s=(await WebAssembly.instantiate(b,h)).instance.exports;const e=a(o=>Math.floor(Math.random()*o)+1,"rnd");s.start();const[n,r]=m(s,[...Array(14)].map(()=>Math.random().toString(36)[2]).join(""));s.set_mouse_params(50,1,.9,!1,n,r);for(let o=0;o<5;o++)l.pointermove({movementX:e(5),movementY:e(10)})},"initWasm");Y.isBrowser?w():await w();const I=a(async(t,e)=>{e&&(p.processDate=e);const n=new Promise(c=>p.processListeners.push(c)),[r,o]=m(s,t);return s.process(r,o),n},"process"),S=a(t=>{let e,n;try{const[r,o]=m(s,t),c=s.validate(r,o);return e=c[0],n=c[1],_(s,e,n)}finally{s.__wbindgen_free(e,n,1)}},"validate"),v=a(t=>{for(;t<0;)t+=2*Math.PI;for(;t>=2*Math.PI;)t-=2*Math.PI;return t},"normalizeYaw"),z=a((t,e,n,r)=>{const o=v(t);let i=v(n)-o;Math.abs(i)>Math.PI&&(i=i>0?i-2*Math.PI:i+2*Math.PI);const f=r-e,g=.0025,u=.0025,M=Math.round(-i/g),d=Math.round(-f/u);return{movementX:M,movementY:d}},"calculateMovements"),D=a(()=>s.get_yaw_pitch(),"getYawPitch"),L=a((t,e)=>{const n=s.get_yaw_pitch(),r=z(n.yaw,n.pitch,t,e);return l.pointermove({movementX:r.movementX,movementY:r.movementY}),s.get_yaw_pitch().coords},"coords");export{L as coords,D as getYawPitch,I as process,S as validate};