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