fleethub-core 1.8.9 → 1.8.12

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.
@@ -114,18 +114,6 @@ function getInt32Memory0() {
114
114
  return cachedInt32Memory0;
115
115
  }
116
116
 
117
- function _assertClass(instance, klass) {
118
- if (!(instance instanceof klass)) {
119
- throw new Error(`expected instance of ${klass.name}`);
120
- }
121
- return instance.ptr;
122
- }
123
- /**
124
- */
125
- module.exports.set_panic_hook = function() {
126
- wasm.set_panic_hook();
127
- };
128
-
129
117
  let cachedFloat64Memory0 = new Float64Array();
130
118
 
131
119
  function getFloat64Memory0() {
@@ -135,6 +123,13 @@ function getFloat64Memory0() {
135
123
  return cachedFloat64Memory0;
136
124
  }
137
125
 
126
+ function _assertClass(instance, klass) {
127
+ if (!(instance instanceof klass)) {
128
+ throw new Error(`expected instance of ${klass.name}`);
129
+ }
130
+ return instance.ptr;
131
+ }
132
+
138
133
  function isLikeNone(x) {
139
134
  return x === undefined || x === null;
140
135
  }
@@ -155,18 +150,6 @@ function passArray16ToWasm0(arg, malloc) {
155
150
  return ptr;
156
151
  }
157
152
 
158
- const u32CvtShim = new Uint32Array(2);
159
-
160
- const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
161
- /**
162
- * @param {ShipConditions} value
163
- * @returns {ShipConditions}
164
- */
165
- module.exports.parse_ship_conditions = function(value) {
166
- const ret = wasm.parse_ship_conditions(addHeapObject(value));
167
- return takeObject(ret);
168
- };
169
-
170
153
  let cachedUint32Memory0 = new Uint32Array();
171
154
 
172
155
  function getUint32Memory0() {
@@ -189,6 +172,14 @@ function getArrayJsValueFromWasm0(ptr, len) {
189
172
  function getArrayU16FromWasm0(ptr, len) {
190
173
  return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
191
174
  }
175
+ /**
176
+ * @param {ShipConditions} value
177
+ * @returns {ShipConditions}
178
+ */
179
+ module.exports.parse_ship_conditions = function(value) {
180
+ const ret = wasm.parse_ship_conditions(addHeapObject(value));
181
+ return takeObject(ret);
182
+ };
192
183
 
193
184
  function getArrayU8FromWasm0(ptr, len) {
194
185
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
@@ -200,6 +191,11 @@ function passArray8ToWasm0(arg, malloc) {
200
191
  WASM_VECTOR_LEN = arg.length;
201
192
  return ptr;
202
193
  }
194
+ /**
195
+ */
196
+ module.exports.set_panic_hook = function() {
197
+ wasm.set_panic_hook();
198
+ };
203
199
 
204
200
  function handleError(f, args) {
205
201
  try {
@@ -259,27 +255,14 @@ class AirSquadron {
259
255
  * @returns {bigint}
260
256
  */
261
257
  get hash() {
262
- try {
263
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
264
- wasm.__wbg_get_airsquadron_hash(retptr, this.ptr);
265
- var r0 = getInt32Memory0()[retptr / 4 + 0];
266
- var r1 = getInt32Memory0()[retptr / 4 + 1];
267
- u32CvtShim[0] = r0;
268
- u32CvtShim[1] = r1;
269
- const n0 = uint64CvtShim[0];
270
- return n0;
271
- } finally {
272
- wasm.__wbindgen_add_to_stack_pointer(16);
273
- }
258
+ const ret = wasm.__wbg_get_airsquadron_hash(this.ptr);
259
+ return BigInt.asUintN(64, ret);
274
260
  }
275
261
  /**
276
262
  * @param {bigint} arg0
277
263
  */
278
264
  set hash(arg0) {
279
- uint64CvtShim[0] = arg0;
280
- const low0 = u32CvtShim[0];
281
- const high0 = u32CvtShim[1];
282
- wasm.__wbg_set_airsquadron_hash(this.ptr, low0, high0);
265
+ wasm.__wbg_set_airsquadron_hash(this.ptr, arg0);
283
266
  }
284
267
  /**
285
268
  * @returns {AirSquadronMode}
@@ -420,6 +403,21 @@ class Analyzer {
420
403
  return takeObject(ret);
421
404
  }
422
405
  /**
406
+ * @param {NodeAttackAnalyzerConfig} config
407
+ * @param {Comp} left_comp
408
+ * @param {Comp} right_comp
409
+ * @param {string} attacker_id
410
+ * @returns {NodeAttackAnalysis2 | undefined}
411
+ */
412
+ analyze_node_attack2(config, left_comp, right_comp, attacker_id) {
413
+ _assertClass(left_comp, Comp);
414
+ _assertClass(right_comp, Comp);
415
+ const ptr0 = passStringToWasm0(attacker_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
416
+ const len0 = WASM_VECTOR_LEN;
417
+ const ret = wasm.analyzer_analyze_node_attack2(this.ptr, addHeapObject(config), left_comp.ptr, right_comp.ptr, ptr0, len0);
418
+ return takeObject(ret);
419
+ }
420
+ /**
423
421
  * @param {Comp} comp
424
422
  * @param {CompAnalyzerConfig} config
425
423
  * @returns {CompAnalysis}
@@ -630,34 +628,30 @@ class Comp {
630
628
  }
631
629
  /**
632
630
  * @param {FleetType} ft
633
- * @param {string} key
631
+ * @param {ShipKey} key
634
632
  * @returns {Ship | undefined}
635
633
  */
636
634
  get_ship_with_clone(ft, key) {
637
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
638
- const len0 = WASM_VECTOR_LEN;
639
- const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), ptr0, len0);
635
+ const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), addHeapObject(key));
640
636
  return ret === 0 ? undefined : Ship.__wrap(ret);
641
637
  }
642
638
  /**
643
639
  * @param {FleetType} ft
644
- * @param {string} key
640
+ * @param {ShipKey} key
645
641
  * @returns {string | undefined}
646
642
  */
647
643
  get_ship_entity_id(ft, key) {
648
644
  try {
649
645
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
650
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
651
- const len0 = WASM_VECTOR_LEN;
652
- wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), ptr0, len0);
646
+ wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), addHeapObject(key));
653
647
  var r0 = getInt32Memory0()[retptr / 4 + 0];
654
648
  var r1 = getInt32Memory0()[retptr / 4 + 1];
655
- let v1;
649
+ let v0;
656
650
  if (r0 !== 0) {
657
- v1 = getStringFromWasm0(r0, r1).slice();
651
+ v0 = getStringFromWasm0(r0, r1).slice();
658
652
  wasm.__wbindgen_free(r0, r1 * 1);
659
653
  }
660
- return v1;
654
+ return v0;
661
655
  } finally {
662
656
  wasm.__wbindgen_add_to_stack_pointer(16);
663
657
  }
@@ -739,6 +733,21 @@ class Comp {
739
733
  const ret = wasm.comp_get_ship_conditions(this.ptr, ship.ptr, isLikeNone(formation) ? 0 : addHeapObject(formation));
740
734
  return takeObject(ret);
741
735
  }
736
+ /**
737
+ * @param {FleetType} fleet_type
738
+ * @returns {number | undefined}
739
+ */
740
+ fleet_los_mod(fleet_type) {
741
+ try {
742
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
743
+ wasm.comp_fleet_los_mod(retptr, this.ptr, addHeapObject(fleet_type));
744
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
745
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
746
+ return r0 === 0 ? undefined : r2;
747
+ } finally {
748
+ wasm.__wbindgen_add_to_stack_pointer(16);
749
+ }
750
+ }
742
751
  }
743
752
  module.exports.Comp = Comp;
744
753
 
@@ -918,18 +927,8 @@ class Fleet {
918
927
  * @returns {bigint}
919
928
  */
920
929
  get hash() {
921
- try {
922
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
923
- wasm.__wbg_get_fleet_hash(retptr, this.ptr);
924
- var r0 = getInt32Memory0()[retptr / 4 + 0];
925
- var r1 = getInt32Memory0()[retptr / 4 + 1];
926
- u32CvtShim[0] = r0;
927
- u32CvtShim[1] = r1;
928
- const n0 = uint64CvtShim[0];
929
- return n0;
930
- } finally {
931
- wasm.__wbindgen_add_to_stack_pointer(16);
932
- }
930
+ const ret = wasm.__wbg_get_fleet_hash(this.ptr);
931
+ return BigInt.asUintN(64, ret);
933
932
  }
934
933
  /**
935
934
  * @returns {number}
@@ -1052,13 +1051,11 @@ class Fleet {
1052
1051
  return ret >>> 0;
1053
1052
  }
1054
1053
  /**
1055
- * @param {string} key
1054
+ * @param {ShipKey} key
1056
1055
  * @returns {Ship | undefined}
1057
1056
  */
1058
1057
  get_ship(key) {
1059
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1060
- const len0 = WASM_VECTOR_LEN;
1061
- const ret = wasm.fleet_get_ship(this.ptr, ptr0, len0);
1058
+ const ret = wasm.fleet_get_ship(this.ptr, addHeapObject(key));
1062
1059
  return ret === 0 ? undefined : Ship.__wrap(ret);
1063
1060
  }
1064
1061
  /**
@@ -1205,18 +1202,8 @@ class Gear {
1205
1202
  * @returns {bigint}
1206
1203
  */
1207
1204
  get hash() {
1208
- try {
1209
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1210
- wasm.__wbg_get_airsquadron_hash(retptr, this.ptr);
1211
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1212
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1213
- u32CvtShim[0] = r0;
1214
- u32CvtShim[1] = r1;
1215
- const n0 = uint64CvtShim[0];
1216
- return n0;
1217
- } finally {
1218
- wasm.__wbindgen_add_to_stack_pointer(16);
1219
- }
1205
+ const ret = wasm.__wbg_get_airsquadron_hash(this.ptr);
1206
+ return BigInt.asUintN(64, ret);
1220
1207
  }
1221
1208
  /**
1222
1209
  * @returns {number}
@@ -1697,18 +1684,8 @@ class Org {
1697
1684
  * @returns {bigint}
1698
1685
  */
1699
1686
  get hash() {
1700
- try {
1701
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1702
- wasm.__wbg_get_org_hash(retptr, this.ptr);
1703
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1704
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1705
- u32CvtShim[0] = r0;
1706
- u32CvtShim[1] = r1;
1707
- const n0 = uint64CvtShim[0];
1708
- return n0;
1709
- } finally {
1710
- wasm.__wbindgen_add_to_stack_pointer(16);
1711
- }
1687
+ const ret = wasm.__wbg_get_org_hash(this.ptr);
1688
+ return BigInt.asUintN(64, ret);
1712
1689
  }
1713
1690
  /**
1714
1691
  * @returns {number}
@@ -1725,35 +1702,33 @@ class Org {
1725
1702
  return takeObject(ret);
1726
1703
  }
1727
1704
  /**
1728
- * @returns {string}
1705
+ * @returns {FleetKey}
1729
1706
  */
1730
1707
  get sortie() {
1731
- try {
1732
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1733
- wasm.__wbg_get_org_sortie(retptr, this.ptr);
1734
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1735
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1736
- return getStringFromWasm0(r0, r1);
1737
- } finally {
1738
- wasm.__wbindgen_add_to_stack_pointer(16);
1739
- wasm.__wbindgen_free(r0, r1);
1740
- }
1708
+ const ret = wasm.__wbg_get_org_sortie(this.ptr);
1709
+ return takeObject(ret);
1741
1710
  }
1742
1711
  /**
1743
- * @param {string} arg0
1712
+ * @returns {FleetKey | undefined}
1744
1713
  */
1745
- set sortie(arg0) {
1746
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1747
- const len0 = WASM_VECTOR_LEN;
1748
- wasm.__wbg_set_org_sortie(this.ptr, ptr0, len0);
1714
+ get route_sup() {
1715
+ const ret = wasm.__wbg_get_org_route_sup(this.ptr);
1716
+ return takeObject(ret);
1717
+ }
1718
+ /**
1719
+ * @returns {FleetKey | undefined}
1720
+ */
1721
+ get boss_sup() {
1722
+ const ret = wasm.__wbg_get_org_boss_sup(this.ptr);
1723
+ return takeObject(ret);
1749
1724
  }
1750
1725
  /**
1751
1726
  * @returns {string | undefined}
1752
1727
  */
1753
- get route_sup() {
1728
+ first_ship_id() {
1754
1729
  try {
1755
1730
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1756
- wasm.__wbg_get_org_route_sup(retptr, this.ptr);
1731
+ wasm.org_first_ship_id(retptr, this.ptr);
1757
1732
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1758
1733
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1759
1734
  let v0;
@@ -1767,20 +1742,23 @@ class Org {
1767
1742
  }
1768
1743
  }
1769
1744
  /**
1770
- * @param {string | undefined} arg0
1745
+ * @param {FleetKey} fleet_key
1746
+ * @param {ShipKey} ship_key
1747
+ * @returns {number | undefined}
1771
1748
  */
1772
- set route_sup(arg0) {
1773
- var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1774
- var len0 = WASM_VECTOR_LEN;
1775
- wasm.__wbg_set_org_route_sup(this.ptr, ptr0, len0);
1749
+ get_ship_mid(fleet_key, ship_key) {
1750
+ const ret = wasm.org_get_ship_mid(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
1751
+ return ret === 0xFFFFFF ? undefined : ret;
1776
1752
  }
1777
1753
  /**
1754
+ * @param {FleetKey} fleet_key
1755
+ * @param {ShipKey} ship_key
1778
1756
  * @returns {string | undefined}
1779
1757
  */
1780
- get boss_sup() {
1758
+ get_ship_eid(fleet_key, ship_key) {
1781
1759
  try {
1782
1760
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1783
- wasm.__wbg_get_org_boss_sup(retptr, this.ptr);
1761
+ wasm.org_get_ship_eid(retptr, this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
1784
1762
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1785
1763
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1786
1764
  let v0;
@@ -1794,34 +1772,19 @@ class Org {
1794
1772
  }
1795
1773
  }
1796
1774
  /**
1797
- * @param {string | undefined} arg0
1798
- */
1799
- set boss_sup(arg0) {
1800
- var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1801
- var len0 = WASM_VECTOR_LEN;
1802
- wasm.__wbg_set_org_boss_sup(this.ptr, ptr0, len0);
1803
- }
1804
- /**
1805
- * @param {Role} role
1806
- * @param {string} key
1807
- * @returns {string | undefined}
1775
+ * @param {FleetKey} key
1776
+ * @returns {string}
1808
1777
  */
1809
- get_ship_entity_id(role, key) {
1778
+ get_fleet_id(key) {
1810
1779
  try {
1811
1780
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1812
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1813
- const len0 = WASM_VECTOR_LEN;
1814
- wasm.org_get_ship_entity_id(retptr, this.ptr, addHeapObject(role), ptr0, len0);
1781
+ wasm.org_get_fleet_id(retptr, this.ptr, addHeapObject(key));
1815
1782
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1816
1783
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1817
- let v1;
1818
- if (r0 !== 0) {
1819
- v1 = getStringFromWasm0(r0, r1).slice();
1820
- wasm.__wbindgen_free(r0, r1 * 1);
1821
- }
1822
- return v1;
1784
+ return getStringFromWasm0(r0, r1);
1823
1785
  } finally {
1824
1786
  wasm.__wbindgen_add_to_stack_pointer(16);
1787
+ wasm.__wbindgen_free(r0, r1);
1825
1788
  }
1826
1789
  }
1827
1790
  /**
@@ -1873,16 +1836,23 @@ class Org {
1873
1836
  }
1874
1837
  }
1875
1838
  /**
1876
- * @param {string} key
1839
+ * @param {FleetKey} key
1877
1840
  * @returns {Fleet}
1878
1841
  */
1879
1842
  clone_fleet(key) {
1880
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1881
- const len0 = WASM_VECTOR_LEN;
1882
- const ret = wasm.org_clone_fleet(this.ptr, ptr0, len0);
1843
+ const ret = wasm.org_clone_fleet(this.ptr, addHeapObject(key));
1883
1844
  return Fleet.__wrap(ret);
1884
1845
  }
1885
1846
  /**
1847
+ * @param {FleetKey} fleet_key
1848
+ * @param {ShipKey} ship_key
1849
+ * @returns {Ship | undefined}
1850
+ */
1851
+ clone_ship(fleet_key, ship_key) {
1852
+ const ret = wasm.org_clone_ship(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
1853
+ return ret === 0 ? undefined : Ship.__wrap(ret);
1854
+ }
1855
+ /**
1886
1856
  * @param {string} id
1887
1857
  * @returns {Ship | undefined}
1888
1858
  */
@@ -1893,6 +1863,23 @@ class Org {
1893
1863
  return ret === 0 ? undefined : Ship.__wrap(ret);
1894
1864
  }
1895
1865
  /**
1866
+ * @param {FleetKey} key
1867
+ * @returns {(string)[]}
1868
+ */
1869
+ ship_keys(key) {
1870
+ try {
1871
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1872
+ wasm.org_ship_keys(retptr, this.ptr, addHeapObject(key));
1873
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
1874
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
1875
+ var v0 = getArrayJsValueFromWasm0(r0, r1).slice();
1876
+ wasm.__wbindgen_free(r0, r1 * 4);
1877
+ return v0;
1878
+ } finally {
1879
+ wasm.__wbindgen_add_to_stack_pointer(16);
1880
+ }
1881
+ }
1882
+ /**
1896
1883
  * @returns {Comp}
1897
1884
  */
1898
1885
  create_comp() {
@@ -1900,13 +1887,11 @@ class Org {
1900
1887
  return Comp.__wrap(ret);
1901
1888
  }
1902
1889
  /**
1903
- * @param {string} key
1890
+ * @param {FleetKey} key
1904
1891
  * @returns {Comp}
1905
1892
  */
1906
1893
  create_comp_by_key(key) {
1907
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1908
- const len0 = WASM_VECTOR_LEN;
1909
- const ret = wasm.org_create_comp_by_key(this.ptr, ptr0, len0);
1894
+ const ret = wasm.org_create_comp_by_key(this.ptr, addHeapObject(key));
1910
1895
  return Comp.__wrap(ret);
1911
1896
  }
1912
1897
  /**
@@ -2013,6 +1998,26 @@ class Org {
2013
1998
  const ret = wasm.org_high_altitude_interception_power(this.ptr);
2014
1999
  return ret;
2015
2000
  }
2001
+ /**
2002
+ * @param {string} id
2003
+ * @param {number} x
2004
+ * @param {number} y
2005
+ * @returns {MoveShipPayload | undefined}
2006
+ */
2007
+ create_move_ship_payload(id, x, y) {
2008
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2009
+ const len0 = WASM_VECTOR_LEN;
2010
+ const ret = wasm.org_create_move_ship_payload(this.ptr, ptr0, len0, x, y);
2011
+ return takeObject(ret);
2012
+ }
2013
+ /**
2014
+ * @param {FleetKey} key
2015
+ * @returns {FleetType | undefined}
2016
+ */
2017
+ get_fleet_type(key) {
2018
+ const ret = wasm.org_get_fleet_type(this.ptr, addHeapObject(key));
2019
+ return takeObject(ret);
2020
+ }
2016
2021
  }
2017
2022
  module.exports.Org = Org;
2018
2023
 
@@ -2103,18 +2108,8 @@ class Ship {
2103
2108
  * @returns {bigint}
2104
2109
  */
2105
2110
  get hash() {
2106
- try {
2107
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2108
- wasm.__wbg_get_ship_hash(retptr, this.ptr);
2109
- var r0 = getInt32Memory0()[retptr / 4 + 0];
2110
- var r1 = getInt32Memory0()[retptr / 4 + 1];
2111
- u32CvtShim[0] = r0;
2112
- u32CvtShim[1] = r1;
2113
- const n0 = uint64CvtShim[0];
2114
- return n0;
2115
- } finally {
2116
- wasm.__wbindgen_add_to_stack_pointer(16);
2117
- }
2111
+ const ret = wasm.__wbg_get_ship_hash(this.ptr);
2112
+ return BigInt.asUintN(64, ret);
2118
2113
  }
2119
2114
  /**
2120
2115
  * @returns {number}
@@ -2646,6 +2641,20 @@ class Ship {
2646
2641
  return ret !== 0;
2647
2642
  }
2648
2643
  /**
2644
+ * @returns {SpecialEnemyType}
2645
+ */
2646
+ special_enemy_type() {
2647
+ const ret = wasm.ship_special_enemy_type(this.ptr);
2648
+ return takeObject(ret);
2649
+ }
2650
+ /**
2651
+ * @returns {boolean}
2652
+ */
2653
+ is_attackable_by_torpedo() {
2654
+ const ret = wasm.ship_is_attackable_by_torpedo(this.ptr);
2655
+ return ret !== 0;
2656
+ }
2657
+ /**
2649
2658
  * @param {number} index
2650
2659
  * @returns {number | undefined}
2651
2660
  */
@@ -2853,27 +2862,27 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
2853
2862
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2854
2863
  };
2855
2864
 
2856
- module.exports.__wbg_createEquipmentBonuses_c15680c31fad94ad = function(arg0, arg1) {
2865
+ module.exports.__wbg_createEquipmentBonuses_15500ac43151ffc3 = function(arg0, arg1) {
2857
2866
  const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
2858
2867
  return addHeapObject(ret);
2859
2868
  };
2860
2869
 
2861
- module.exports.__wbg_ship_new = function(arg0) {
2862
- const ret = Ship.__wrap(arg0);
2870
+ module.exports.__wbindgen_json_parse = function(arg0, arg1) {
2871
+ const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2863
2872
  return addHeapObject(ret);
2864
2873
  };
2865
2874
 
2866
- module.exports.__wbindgen_json_parse = function(arg0, arg1) {
2867
- const ret = JSON.parse(getStringFromWasm0(arg0, arg1));
2875
+ module.exports.__wbg_ship_new = function(arg0) {
2876
+ const ret = Ship.__wrap(arg0);
2868
2877
  return addHeapObject(ret);
2869
2878
  };
2870
2879
 
2871
- module.exports.__wbg_new_693216e109162396 = function() {
2880
+ module.exports.__wbg_new_abda76e883ba8a5f = function() {
2872
2881
  const ret = new Error();
2873
2882
  return addHeapObject(ret);
2874
2883
  };
2875
2884
 
2876
- module.exports.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) {
2885
+ module.exports.__wbg_stack_658279fe44541cf6 = function(arg0, arg1) {
2877
2886
  const ret = getObject(arg1).stack;
2878
2887
  const ptr0 = passStringToWasm0(ret, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2879
2888
  const len0 = WASM_VECTOR_LEN;
@@ -2881,7 +2890,7 @@ module.exports.__wbg_stack_0ddaca5d1abfb52f = function(arg0, arg1) {
2881
2890
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
2882
2891
  };
2883
2892
 
2884
- module.exports.__wbg_error_09919627ac0992f5 = function(arg0, arg1) {
2893
+ module.exports.__wbg_error_f851667af71bcfc6 = function(arg0, arg1) {
2885
2894
  try {
2886
2895
  console.error(getStringFromWasm0(arg0, arg1));
2887
2896
  } finally {
@@ -2889,15 +2898,7 @@ module.exports.__wbg_error_09919627ac0992f5 = function(arg0, arg1) {
2889
2898
  }
2890
2899
  };
2891
2900
 
2892
- module.exports.__wbg_randomFillSync_91e2b39becca6147 = function() { return handleError(function (arg0, arg1, arg2) {
2893
- getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
2894
- }, arguments) };
2895
-
2896
- module.exports.__wbg_getRandomValues_b14734aa289bc356 = function() { return handleError(function (arg0, arg1) {
2897
- getObject(arg0).getRandomValues(getObject(arg1));
2898
- }, arguments) };
2899
-
2900
- module.exports.__wbg_process_e56fd54cf6319b6c = function(arg0) {
2901
+ module.exports.__wbg_process_0cc2ada8524d6f83 = function(arg0) {
2901
2902
  const ret = getObject(arg0).process;
2902
2903
  return addHeapObject(ret);
2903
2904
  };
@@ -2908,12 +2909,12 @@ module.exports.__wbindgen_is_object = function(arg0) {
2908
2909
  return ret;
2909
2910
  };
2910
2911
 
2911
- module.exports.__wbg_versions_77e21455908dad33 = function(arg0) {
2912
+ module.exports.__wbg_versions_c11acceab27a6c87 = function(arg0) {
2912
2913
  const ret = getObject(arg0).versions;
2913
2914
  return addHeapObject(ret);
2914
2915
  };
2915
2916
 
2916
- module.exports.__wbg_node_0dd25d832e4785d5 = function(arg0) {
2917
+ module.exports.__wbg_node_7ff1ce49caf23815 = function(arg0) {
2917
2918
  const ret = getObject(arg0).node;
2918
2919
  return addHeapObject(ret);
2919
2920
  };
@@ -2923,37 +2924,45 @@ module.exports.__wbindgen_is_string = function(arg0) {
2923
2924
  return ret;
2924
2925
  };
2925
2926
 
2926
- module.exports.__wbg_static_accessor_NODE_MODULE_26b231378c1be7dd = function() {
2927
+ module.exports.__wbg_static_accessor_NODE_MODULE_cf6401cc1091279e = function() {
2927
2928
  const ret = module;
2928
2929
  return addHeapObject(ret);
2929
2930
  };
2930
2931
 
2931
- module.exports.__wbg_require_0db1598d9ccecb30 = function() { return handleError(function (arg0, arg1, arg2) {
2932
+ module.exports.__wbg_require_a746e79b322b9336 = function() { return handleError(function (arg0, arg1, arg2) {
2932
2933
  const ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
2933
2934
  return addHeapObject(ret);
2934
2935
  }, arguments) };
2935
2936
 
2936
- module.exports.__wbg_crypto_b95d7173266618a9 = function(arg0) {
2937
+ module.exports.__wbg_crypto_2036bed7c44c25e7 = function(arg0) {
2937
2938
  const ret = getObject(arg0).crypto;
2938
2939
  return addHeapObject(ret);
2939
2940
  };
2940
2941
 
2941
- module.exports.__wbg_msCrypto_5a86d77a66230f81 = function(arg0) {
2942
+ module.exports.__wbg_msCrypto_a21fc88caf1ecdc8 = function(arg0) {
2942
2943
  const ret = getObject(arg0).msCrypto;
2943
2944
  return addHeapObject(ret);
2944
2945
  };
2945
2946
 
2946
- module.exports.__wbg_new_ee1a3da85465d621 = function() {
2947
+ module.exports.__wbg_getRandomValues_b99eec4244a475bb = function() { return handleError(function (arg0, arg1) {
2948
+ getObject(arg0).getRandomValues(getObject(arg1));
2949
+ }, arguments) };
2950
+
2951
+ module.exports.__wbg_randomFillSync_065afffde01daa66 = function() { return handleError(function (arg0, arg1, arg2) {
2952
+ getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
2953
+ }, arguments) };
2954
+
2955
+ module.exports.__wbg_new_1d9a920c6bfc44a8 = function() {
2947
2956
  const ret = new Array();
2948
2957
  return addHeapObject(ret);
2949
2958
  };
2950
2959
 
2951
- module.exports.__wbg_newnoargs_971e9a5abe185139 = function(arg0, arg1) {
2960
+ module.exports.__wbg_newnoargs_b5b063fc6c2f0376 = function(arg0, arg1) {
2952
2961
  const ret = new Function(getStringFromWasm0(arg0, arg1));
2953
2962
  return addHeapObject(ret);
2954
2963
  };
2955
2964
 
2956
- module.exports.__wbg_call_33d7bcddbbfa394a = function() { return handleError(function (arg0, arg1) {
2965
+ module.exports.__wbg_call_97ae9d8645dc388b = function() { return handleError(function (arg0, arg1) {
2957
2966
  const ret = getObject(arg0).call(getObject(arg1));
2958
2967
  return addHeapObject(ret);
2959
2968
  }, arguments) };
@@ -2963,22 +2972,22 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
2963
2972
  return addHeapObject(ret);
2964
2973
  };
2965
2974
 
2966
- module.exports.__wbg_self_fd00a1ef86d1b2ed = function() { return handleError(function () {
2975
+ module.exports.__wbg_self_6d479506f72c6a71 = function() { return handleError(function () {
2967
2976
  const ret = self.self;
2968
2977
  return addHeapObject(ret);
2969
2978
  }, arguments) };
2970
2979
 
2971
- module.exports.__wbg_window_6f6e346d8bbd61d7 = function() { return handleError(function () {
2980
+ module.exports.__wbg_window_f2557cc78490aceb = function() { return handleError(function () {
2972
2981
  const ret = window.window;
2973
2982
  return addHeapObject(ret);
2974
2983
  }, arguments) };
2975
2984
 
2976
- module.exports.__wbg_globalThis_3348936ac49df00a = function() { return handleError(function () {
2985
+ module.exports.__wbg_globalThis_7f206bda628d5286 = function() { return handleError(function () {
2977
2986
  const ret = globalThis.globalThis;
2978
2987
  return addHeapObject(ret);
2979
2988
  }, arguments) };
2980
2989
 
2981
- module.exports.__wbg_global_67175caf56f55ca9 = function() { return handleError(function () {
2990
+ module.exports.__wbg_global_ba75c50d1cf384f4 = function() { return handleError(function () {
2982
2991
  const ret = global.global;
2983
2992
  return addHeapObject(ret);
2984
2993
  }, arguments) };
@@ -2988,36 +2997,36 @@ module.exports.__wbindgen_is_undefined = function(arg0) {
2988
2997
  return ret;
2989
2998
  };
2990
2999
 
2991
- module.exports.__wbg_push_0bc7fce4a139a883 = function(arg0, arg1) {
3000
+ module.exports.__wbg_push_740e4b286702d964 = function(arg0, arg1) {
2992
3001
  const ret = getObject(arg0).push(getObject(arg1));
2993
3002
  return ret;
2994
3003
  };
2995
3004
 
2996
- module.exports.__wbg_buffer_34f5ec9f8a838ba0 = function(arg0) {
3005
+ module.exports.__wbg_buffer_3f3d764d4747d564 = function(arg0) {
2997
3006
  const ret = getObject(arg0).buffer;
2998
3007
  return addHeapObject(ret);
2999
3008
  };
3000
3009
 
3001
- module.exports.__wbg_new_cda198d9dbc6d7ea = function(arg0) {
3010
+ module.exports.__wbg_new_8c3f0052272a457a = function(arg0) {
3002
3011
  const ret = new Uint8Array(getObject(arg0));
3003
3012
  return addHeapObject(ret);
3004
3013
  };
3005
3014
 
3006
- module.exports.__wbg_set_1a930cfcda1a8067 = function(arg0, arg1, arg2) {
3015
+ module.exports.__wbg_set_83db9690f9353e79 = function(arg0, arg1, arg2) {
3007
3016
  getObject(arg0).set(getObject(arg1), arg2 >>> 0);
3008
3017
  };
3009
3018
 
3010
- module.exports.__wbg_length_51f19f73d6d9eff3 = function(arg0) {
3019
+ module.exports.__wbg_length_9e1ae1900cb0fbd5 = function(arg0) {
3011
3020
  const ret = getObject(arg0).length;
3012
3021
  return ret;
3013
3022
  };
3014
3023
 
3015
- module.exports.__wbg_newwithlength_66e5530e7079ea1b = function(arg0) {
3024
+ module.exports.__wbg_newwithlength_f5933855e4f48a19 = function(arg0) {
3016
3025
  const ret = new Uint8Array(arg0 >>> 0);
3017
3026
  return addHeapObject(ret);
3018
3027
  };
3019
3028
 
3020
- module.exports.__wbg_subarray_270ff8dd5582c1ac = function(arg0, arg1, arg2) {
3029
+ module.exports.__wbg_subarray_58ad4efbb5bcb886 = function(arg0, arg1, arg2) {
3021
3030
  const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);
3022
3031
  return addHeapObject(ret);
3023
3032
  };