fleethub-core 1.8.8 → 1.8.11
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 +352 -352
- package/node/fleethub_core.js +187 -412
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +122 -153
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +352 -352
- package/pkg/fleethub_core_bg.js +186 -410
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +122 -153
package/node/fleethub_core.js
CHANGED
|
@@ -2,15 +2,11 @@ let imports = {};
|
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
4
|
const { createEquipmentBonuses } = require(`equipment-bonus`);
|
|
5
|
-
const {
|
|
5
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
heap.push(undefined, null, true, false);
|
|
10
|
-
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
7
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
cachedTextDecoder.decode();
|
|
14
10
|
|
|
15
11
|
let cachedUint8Memory0 = new Uint8Array();
|
|
16
12
|
|
|
@@ -21,6 +17,41 @@ function getUint8Memory0() {
|
|
|
21
17
|
return cachedUint8Memory0;
|
|
22
18
|
}
|
|
23
19
|
|
|
20
|
+
function getStringFromWasm0(ptr, len) {
|
|
21
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const heap = new Array(32).fill(undefined);
|
|
25
|
+
|
|
26
|
+
heap.push(undefined, null, true, false);
|
|
27
|
+
|
|
28
|
+
let heap_next = heap.length;
|
|
29
|
+
|
|
30
|
+
function addHeapObject(obj) {
|
|
31
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
32
|
+
const idx = heap_next;
|
|
33
|
+
heap_next = heap[idx];
|
|
34
|
+
|
|
35
|
+
heap[idx] = obj;
|
|
36
|
+
return idx;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getObject(idx) { return heap[idx]; }
|
|
40
|
+
|
|
41
|
+
function dropObject(idx) {
|
|
42
|
+
if (idx < 36) return;
|
|
43
|
+
heap[idx] = heap_next;
|
|
44
|
+
heap_next = idx;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function takeObject(idx) {
|
|
48
|
+
const ret = getObject(idx);
|
|
49
|
+
dropObject(idx);
|
|
50
|
+
return ret;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let WASM_VECTOR_LEN = 0;
|
|
54
|
+
|
|
24
55
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
25
56
|
|
|
26
57
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -82,46 +113,16 @@ function getInt32Memory0() {
|
|
|
82
113
|
}
|
|
83
114
|
return cachedInt32Memory0;
|
|
84
115
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
heap[idx] = heap_next;
|
|
91
|
-
heap_next = idx;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function takeObject(idx) {
|
|
95
|
-
const ret = getObject(idx);
|
|
96
|
-
dropObject(idx);
|
|
97
|
-
return ret;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
101
|
-
|
|
102
|
-
cachedTextDecoder.decode();
|
|
103
|
-
|
|
104
|
-
function getStringFromWasm0(ptr, len) {
|
|
105
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function addHeapObject(obj) {
|
|
109
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
110
|
-
const idx = heap_next;
|
|
111
|
-
heap_next = heap[idx];
|
|
112
|
-
|
|
113
|
-
heap[idx] = obj;
|
|
114
|
-
return idx;
|
|
115
|
-
}
|
|
116
|
+
/**
|
|
117
|
+
*/
|
|
118
|
+
module.exports.set_panic_hook = function() {
|
|
119
|
+
wasm.set_panic_hook();
|
|
120
|
+
};
|
|
116
121
|
|
|
117
122
|
const u32CvtShim = new Uint32Array(2);
|
|
118
123
|
|
|
119
124
|
const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
|
120
125
|
|
|
121
|
-
function isLikeNone(x) {
|
|
122
|
-
return x === undefined || x === null;
|
|
123
|
-
}
|
|
124
|
-
|
|
125
126
|
let cachedUint32Memory0 = new Uint32Array();
|
|
126
127
|
|
|
127
128
|
function getUint32Memory0() {
|
|
@@ -150,6 +151,17 @@ function getFloat64Memory0() {
|
|
|
150
151
|
return cachedFloat64Memory0;
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
function _assertClass(instance, klass) {
|
|
155
|
+
if (!(instance instanceof klass)) {
|
|
156
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
157
|
+
}
|
|
158
|
+
return instance.ptr;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function isLikeNone(x) {
|
|
162
|
+
return x === undefined || x === null;
|
|
163
|
+
}
|
|
164
|
+
|
|
153
165
|
let cachedUint16Memory0 = new Uint16Array();
|
|
154
166
|
|
|
155
167
|
function getUint16Memory0() {
|
|
@@ -159,15 +171,6 @@ function getUint16Memory0() {
|
|
|
159
171
|
return cachedUint16Memory0;
|
|
160
172
|
}
|
|
161
173
|
|
|
162
|
-
function getArrayU16FromWasm0(ptr, len) {
|
|
163
|
-
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
164
|
-
}
|
|
165
|
-
/**
|
|
166
|
-
*/
|
|
167
|
-
module.exports.set_panic_hook = function() {
|
|
168
|
-
wasm.set_panic_hook();
|
|
169
|
-
};
|
|
170
|
-
|
|
171
174
|
function passArray16ToWasm0(arg, malloc) {
|
|
172
175
|
const ptr = malloc(arg.length * 2);
|
|
173
176
|
getUint16Memory0().set(arg, ptr / 2);
|
|
@@ -175,6 +178,18 @@ function passArray16ToWasm0(arg, malloc) {
|
|
|
175
178
|
return ptr;
|
|
176
179
|
}
|
|
177
180
|
|
|
181
|
+
function getArrayU16FromWasm0(ptr, len) {
|
|
182
|
+
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* @param {ShipConditions} value
|
|
186
|
+
* @returns {ShipConditions}
|
|
187
|
+
*/
|
|
188
|
+
module.exports.parse_ship_conditions = function(value) {
|
|
189
|
+
const ret = wasm.parse_ship_conditions(addHeapObject(value));
|
|
190
|
+
return takeObject(ret);
|
|
191
|
+
};
|
|
192
|
+
|
|
178
193
|
function getArrayU8FromWasm0(ptr, len) {
|
|
179
194
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
180
195
|
}
|
|
@@ -186,21 +201,6 @@ function passArray8ToWasm0(arg, malloc) {
|
|
|
186
201
|
return ptr;
|
|
187
202
|
}
|
|
188
203
|
|
|
189
|
-
function _assertClass(instance, klass) {
|
|
190
|
-
if (!(instance instanceof klass)) {
|
|
191
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
192
|
-
}
|
|
193
|
-
return instance.ptr;
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* @param {ShipConditions} value
|
|
197
|
-
* @returns {ShipConditions}
|
|
198
|
-
*/
|
|
199
|
-
module.exports.parse_ship_conditions = function(value) {
|
|
200
|
-
const ret = wasm.parse_ship_conditions(addHeapObject(value));
|
|
201
|
-
return takeObject(ret);
|
|
202
|
-
};
|
|
203
|
-
|
|
204
204
|
function handleError(f, args) {
|
|
205
205
|
try {
|
|
206
206
|
return f.apply(this, args);
|
|
@@ -420,6 +420,21 @@ class Analyzer {
|
|
|
420
420
|
return takeObject(ret);
|
|
421
421
|
}
|
|
422
422
|
/**
|
|
423
|
+
* @param {NodeAttackAnalyzerConfig} config
|
|
424
|
+
* @param {Comp} left_comp
|
|
425
|
+
* @param {Comp} right_comp
|
|
426
|
+
* @param {string} attacker_id
|
|
427
|
+
* @returns {NodeAttackAnalysis2 | undefined}
|
|
428
|
+
*/
|
|
429
|
+
analyze_node_attack2(config, left_comp, right_comp, attacker_id) {
|
|
430
|
+
_assertClass(left_comp, Comp);
|
|
431
|
+
_assertClass(right_comp, Comp);
|
|
432
|
+
const ptr0 = passStringToWasm0(attacker_id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
433
|
+
const len0 = WASM_VECTOR_LEN;
|
|
434
|
+
const ret = wasm.analyzer_analyze_node_attack2(this.ptr, addHeapObject(config), left_comp.ptr, right_comp.ptr, ptr0, len0);
|
|
435
|
+
return takeObject(ret);
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
423
438
|
* @param {Comp} comp
|
|
424
439
|
* @param {CompAnalyzerConfig} config
|
|
425
440
|
* @returns {CompAnalysis}
|
|
@@ -630,34 +645,30 @@ class Comp {
|
|
|
630
645
|
}
|
|
631
646
|
/**
|
|
632
647
|
* @param {FleetType} ft
|
|
633
|
-
* @param {
|
|
648
|
+
* @param {ShipKey} key
|
|
634
649
|
* @returns {Ship | undefined}
|
|
635
650
|
*/
|
|
636
651
|
get_ship_with_clone(ft, key) {
|
|
637
|
-
const
|
|
638
|
-
const len0 = WASM_VECTOR_LEN;
|
|
639
|
-
const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), ptr0, len0);
|
|
652
|
+
const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), addHeapObject(key));
|
|
640
653
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
641
654
|
}
|
|
642
655
|
/**
|
|
643
656
|
* @param {FleetType} ft
|
|
644
|
-
* @param {
|
|
657
|
+
* @param {ShipKey} key
|
|
645
658
|
* @returns {string | undefined}
|
|
646
659
|
*/
|
|
647
660
|
get_ship_entity_id(ft, key) {
|
|
648
661
|
try {
|
|
649
662
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
650
|
-
|
|
651
|
-
const len0 = WASM_VECTOR_LEN;
|
|
652
|
-
wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), ptr0, len0);
|
|
663
|
+
wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), addHeapObject(key));
|
|
653
664
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
654
665
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
655
|
-
let
|
|
666
|
+
let v0;
|
|
656
667
|
if (r0 !== 0) {
|
|
657
|
-
|
|
668
|
+
v0 = getStringFromWasm0(r0, r1).slice();
|
|
658
669
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
659
670
|
}
|
|
660
|
-
return
|
|
671
|
+
return v0;
|
|
661
672
|
} finally {
|
|
662
673
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
663
674
|
}
|
|
@@ -739,6 +750,21 @@ class Comp {
|
|
|
739
750
|
const ret = wasm.comp_get_ship_conditions(this.ptr, ship.ptr, isLikeNone(formation) ? 0 : addHeapObject(formation));
|
|
740
751
|
return takeObject(ret);
|
|
741
752
|
}
|
|
753
|
+
/**
|
|
754
|
+
* @param {FleetType} fleet_type
|
|
755
|
+
* @returns {number | undefined}
|
|
756
|
+
*/
|
|
757
|
+
fleet_los_mod(fleet_type) {
|
|
758
|
+
try {
|
|
759
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
760
|
+
wasm.comp_fleet_los_mod(retptr, this.ptr, addHeapObject(fleet_type));
|
|
761
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
762
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
763
|
+
return r0 === 0 ? undefined : r2;
|
|
764
|
+
} finally {
|
|
765
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
766
|
+
}
|
|
767
|
+
}
|
|
742
768
|
}
|
|
743
769
|
module.exports.Comp = Comp;
|
|
744
770
|
|
|
@@ -1052,13 +1078,11 @@ class Fleet {
|
|
|
1052
1078
|
return ret >>> 0;
|
|
1053
1079
|
}
|
|
1054
1080
|
/**
|
|
1055
|
-
* @param {
|
|
1081
|
+
* @param {ShipKey} key
|
|
1056
1082
|
* @returns {Ship | undefined}
|
|
1057
1083
|
*/
|
|
1058
1084
|
get_ship(key) {
|
|
1059
|
-
const
|
|
1060
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1061
|
-
const ret = wasm.fleet_get_ship(this.ptr, ptr0, len0);
|
|
1085
|
+
const ret = wasm.fleet_get_ship(this.ptr, addHeapObject(key));
|
|
1062
1086
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
1063
1087
|
}
|
|
1064
1088
|
/**
|
|
@@ -1207,7 +1231,7 @@ class Gear {
|
|
|
1207
1231
|
get hash() {
|
|
1208
1232
|
try {
|
|
1209
1233
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1210
|
-
wasm.
|
|
1234
|
+
wasm.__wbg_get_airsquadron_hash(retptr, this.ptr);
|
|
1211
1235
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1212
1236
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1213
1237
|
u32CvtShim[0] = r0;
|
|
@@ -1647,233 +1671,6 @@ class Gear {
|
|
|
1647
1671
|
}
|
|
1648
1672
|
module.exports.Gear = Gear;
|
|
1649
1673
|
|
|
1650
|
-
const IBonusesFinalization = new FinalizationRegistry(ptr => wasm.__wbg_ibonuses_free(ptr));
|
|
1651
|
-
/**
|
|
1652
|
-
*/
|
|
1653
|
-
class IBonuses {
|
|
1654
|
-
|
|
1655
|
-
__destroy_into_raw() {
|
|
1656
|
-
const ptr = this.ptr;
|
|
1657
|
-
this.ptr = 0;
|
|
1658
|
-
IBonusesFinalization.unregister(this);
|
|
1659
|
-
return ptr;
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
free() {
|
|
1663
|
-
const ptr = this.__destroy_into_raw();
|
|
1664
|
-
wasm.__wbg_ibonuses_free(ptr);
|
|
1665
|
-
}
|
|
1666
|
-
/**
|
|
1667
|
-
* @returns {number}
|
|
1668
|
-
*/
|
|
1669
|
-
get shelling_power() {
|
|
1670
|
-
const ret = wasm.__wbg_get_ibonuses_shelling_power(this.ptr);
|
|
1671
|
-
return ret;
|
|
1672
|
-
}
|
|
1673
|
-
/**
|
|
1674
|
-
* @param {number} arg0
|
|
1675
|
-
*/
|
|
1676
|
-
set shelling_power(arg0) {
|
|
1677
|
-
wasm.__wbg_set_ibonuses_shelling_power(this.ptr, arg0);
|
|
1678
|
-
}
|
|
1679
|
-
/**
|
|
1680
|
-
* @returns {number}
|
|
1681
|
-
*/
|
|
1682
|
-
get carrier_shelling_power() {
|
|
1683
|
-
const ret = wasm.__wbg_get_ibonuses_carrier_shelling_power(this.ptr);
|
|
1684
|
-
return ret;
|
|
1685
|
-
}
|
|
1686
|
-
/**
|
|
1687
|
-
* @param {number} arg0
|
|
1688
|
-
*/
|
|
1689
|
-
set carrier_shelling_power(arg0) {
|
|
1690
|
-
wasm.__wbg_set_ibonuses_carrier_shelling_power(this.ptr, arg0);
|
|
1691
|
-
}
|
|
1692
|
-
/**
|
|
1693
|
-
* @returns {number}
|
|
1694
|
-
*/
|
|
1695
|
-
get shelling_accuracy() {
|
|
1696
|
-
const ret = wasm.__wbg_get_ibonuses_shelling_accuracy(this.ptr);
|
|
1697
|
-
return ret;
|
|
1698
|
-
}
|
|
1699
|
-
/**
|
|
1700
|
-
* @param {number} arg0
|
|
1701
|
-
*/
|
|
1702
|
-
set shelling_accuracy(arg0) {
|
|
1703
|
-
wasm.__wbg_set_ibonuses_shelling_accuracy(this.ptr, arg0);
|
|
1704
|
-
}
|
|
1705
|
-
/**
|
|
1706
|
-
* @returns {number}
|
|
1707
|
-
*/
|
|
1708
|
-
get torpedo_power() {
|
|
1709
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_power(this.ptr);
|
|
1710
|
-
return ret;
|
|
1711
|
-
}
|
|
1712
|
-
/**
|
|
1713
|
-
* @param {number} arg0
|
|
1714
|
-
*/
|
|
1715
|
-
set torpedo_power(arg0) {
|
|
1716
|
-
wasm.__wbg_set_ibonuses_torpedo_power(this.ptr, arg0);
|
|
1717
|
-
}
|
|
1718
|
-
/**
|
|
1719
|
-
* @returns {number}
|
|
1720
|
-
*/
|
|
1721
|
-
get torpedo_accuracy() {
|
|
1722
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_accuracy(this.ptr);
|
|
1723
|
-
return ret;
|
|
1724
|
-
}
|
|
1725
|
-
/**
|
|
1726
|
-
* @param {number} arg0
|
|
1727
|
-
*/
|
|
1728
|
-
set torpedo_accuracy(arg0) {
|
|
1729
|
-
wasm.__wbg_set_ibonuses_torpedo_accuracy(this.ptr, arg0);
|
|
1730
|
-
}
|
|
1731
|
-
/**
|
|
1732
|
-
* @returns {number}
|
|
1733
|
-
*/
|
|
1734
|
-
get torpedo_evasion() {
|
|
1735
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_evasion(this.ptr);
|
|
1736
|
-
return ret;
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* @param {number} arg0
|
|
1740
|
-
*/
|
|
1741
|
-
set torpedo_evasion(arg0) {
|
|
1742
|
-
wasm.__wbg_set_ibonuses_torpedo_evasion(this.ptr, arg0);
|
|
1743
|
-
}
|
|
1744
|
-
/**
|
|
1745
|
-
* @returns {number}
|
|
1746
|
-
*/
|
|
1747
|
-
get asw_power() {
|
|
1748
|
-
const ret = wasm.__wbg_get_ibonuses_asw_power(this.ptr);
|
|
1749
|
-
return ret;
|
|
1750
|
-
}
|
|
1751
|
-
/**
|
|
1752
|
-
* @param {number} arg0
|
|
1753
|
-
*/
|
|
1754
|
-
set asw_power(arg0) {
|
|
1755
|
-
wasm.__wbg_set_ibonuses_asw_power(this.ptr, arg0);
|
|
1756
|
-
}
|
|
1757
|
-
/**
|
|
1758
|
-
* @returns {number}
|
|
1759
|
-
*/
|
|
1760
|
-
get asw_accuracy() {
|
|
1761
|
-
const ret = wasm.__wbg_get_ibonuses_asw_accuracy(this.ptr);
|
|
1762
|
-
return ret;
|
|
1763
|
-
}
|
|
1764
|
-
/**
|
|
1765
|
-
* @param {number} arg0
|
|
1766
|
-
*/
|
|
1767
|
-
set asw_accuracy(arg0) {
|
|
1768
|
-
wasm.__wbg_set_ibonuses_asw_accuracy(this.ptr, arg0);
|
|
1769
|
-
}
|
|
1770
|
-
/**
|
|
1771
|
-
* @returns {number}
|
|
1772
|
-
*/
|
|
1773
|
-
get night_power() {
|
|
1774
|
-
const ret = wasm.__wbg_get_ibonuses_night_power(this.ptr);
|
|
1775
|
-
return ret;
|
|
1776
|
-
}
|
|
1777
|
-
/**
|
|
1778
|
-
* @param {number} arg0
|
|
1779
|
-
*/
|
|
1780
|
-
set night_power(arg0) {
|
|
1781
|
-
wasm.__wbg_set_ibonuses_night_power(this.ptr, arg0);
|
|
1782
|
-
}
|
|
1783
|
-
/**
|
|
1784
|
-
* @returns {number}
|
|
1785
|
-
*/
|
|
1786
|
-
get night_accuracy() {
|
|
1787
|
-
const ret = wasm.__wbg_get_ibonuses_night_accuracy(this.ptr);
|
|
1788
|
-
return ret;
|
|
1789
|
-
}
|
|
1790
|
-
/**
|
|
1791
|
-
* @param {number} arg0
|
|
1792
|
-
*/
|
|
1793
|
-
set night_accuracy(arg0) {
|
|
1794
|
-
wasm.__wbg_set_ibonuses_night_accuracy(this.ptr, arg0);
|
|
1795
|
-
}
|
|
1796
|
-
/**
|
|
1797
|
-
* @returns {number}
|
|
1798
|
-
*/
|
|
1799
|
-
get defense_power() {
|
|
1800
|
-
const ret = wasm.__wbg_get_ibonuses_defense_power(this.ptr);
|
|
1801
|
-
return ret;
|
|
1802
|
-
}
|
|
1803
|
-
/**
|
|
1804
|
-
* @param {number} arg0
|
|
1805
|
-
*/
|
|
1806
|
-
set defense_power(arg0) {
|
|
1807
|
-
wasm.__wbg_set_ibonuses_defense_power(this.ptr, arg0);
|
|
1808
|
-
}
|
|
1809
|
-
/**
|
|
1810
|
-
* @returns {number}
|
|
1811
|
-
*/
|
|
1812
|
-
get contact_selection() {
|
|
1813
|
-
const ret = wasm.__wbg_get_ibonuses_contact_selection(this.ptr);
|
|
1814
|
-
return ret;
|
|
1815
|
-
}
|
|
1816
|
-
/**
|
|
1817
|
-
* @param {number} arg0
|
|
1818
|
-
*/
|
|
1819
|
-
set contact_selection(arg0) {
|
|
1820
|
-
wasm.__wbg_set_ibonuses_contact_selection(this.ptr, arg0);
|
|
1821
|
-
}
|
|
1822
|
-
/**
|
|
1823
|
-
* @returns {number}
|
|
1824
|
-
*/
|
|
1825
|
-
get fighter_power() {
|
|
1826
|
-
const ret = wasm.__wbg_get_ibonuses_fighter_power(this.ptr);
|
|
1827
|
-
return ret;
|
|
1828
|
-
}
|
|
1829
|
-
/**
|
|
1830
|
-
* @param {number} arg0
|
|
1831
|
-
*/
|
|
1832
|
-
set fighter_power(arg0) {
|
|
1833
|
-
wasm.__wbg_set_ibonuses_fighter_power(this.ptr, arg0);
|
|
1834
|
-
}
|
|
1835
|
-
/**
|
|
1836
|
-
* @returns {number}
|
|
1837
|
-
*/
|
|
1838
|
-
get ship_anti_air() {
|
|
1839
|
-
const ret = wasm.__wbg_get_ibonuses_ship_anti_air(this.ptr);
|
|
1840
|
-
return ret;
|
|
1841
|
-
}
|
|
1842
|
-
/**
|
|
1843
|
-
* @param {number} arg0
|
|
1844
|
-
*/
|
|
1845
|
-
set ship_anti_air(arg0) {
|
|
1846
|
-
wasm.__wbg_set_ibonuses_ship_anti_air(this.ptr, arg0);
|
|
1847
|
-
}
|
|
1848
|
-
/**
|
|
1849
|
-
* @returns {number}
|
|
1850
|
-
*/
|
|
1851
|
-
get fleet_anti_air() {
|
|
1852
|
-
const ret = wasm.__wbg_get_ibonuses_fleet_anti_air(this.ptr);
|
|
1853
|
-
return ret;
|
|
1854
|
-
}
|
|
1855
|
-
/**
|
|
1856
|
-
* @param {number} arg0
|
|
1857
|
-
*/
|
|
1858
|
-
set fleet_anti_air(arg0) {
|
|
1859
|
-
wasm.__wbg_set_ibonuses_fleet_anti_air(this.ptr, arg0);
|
|
1860
|
-
}
|
|
1861
|
-
/**
|
|
1862
|
-
* @returns {number}
|
|
1863
|
-
*/
|
|
1864
|
-
get elos() {
|
|
1865
|
-
const ret = wasm.__wbg_get_ibonuses_elos(this.ptr);
|
|
1866
|
-
return ret;
|
|
1867
|
-
}
|
|
1868
|
-
/**
|
|
1869
|
-
* @param {number} arg0
|
|
1870
|
-
*/
|
|
1871
|
-
set elos(arg0) {
|
|
1872
|
-
wasm.__wbg_set_ibonuses_elos(this.ptr, arg0);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
module.exports.IBonuses = IBonuses;
|
|
1876
|
-
|
|
1877
1674
|
const OrgFinalization = new FinalizationRegistry(ptr => wasm.__wbg_org_free(ptr));
|
|
1878
1675
|
/**
|
|
1879
1676
|
*/
|
|
@@ -1952,35 +1749,33 @@ class Org {
|
|
|
1952
1749
|
return takeObject(ret);
|
|
1953
1750
|
}
|
|
1954
1751
|
/**
|
|
1955
|
-
* @returns {
|
|
1752
|
+
* @returns {FleetKey}
|
|
1956
1753
|
*/
|
|
1957
1754
|
get sortie() {
|
|
1958
|
-
|
|
1959
|
-
|
|
1960
|
-
wasm.__wbg_get_org_sortie(retptr, this.ptr);
|
|
1961
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1962
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1963
|
-
return getStringFromWasm0(r0, r1);
|
|
1964
|
-
} finally {
|
|
1965
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1966
|
-
wasm.__wbindgen_free(r0, r1);
|
|
1967
|
-
}
|
|
1755
|
+
const ret = wasm.__wbg_get_org_sortie(this.ptr);
|
|
1756
|
+
return takeObject(ret);
|
|
1968
1757
|
}
|
|
1969
1758
|
/**
|
|
1970
|
-
* @
|
|
1759
|
+
* @returns {FleetKey | undefined}
|
|
1971
1760
|
*/
|
|
1972
|
-
|
|
1973
|
-
const
|
|
1974
|
-
|
|
1975
|
-
|
|
1761
|
+
get route_sup() {
|
|
1762
|
+
const ret = wasm.__wbg_get_org_route_sup(this.ptr);
|
|
1763
|
+
return takeObject(ret);
|
|
1764
|
+
}
|
|
1765
|
+
/**
|
|
1766
|
+
* @returns {FleetKey | undefined}
|
|
1767
|
+
*/
|
|
1768
|
+
get boss_sup() {
|
|
1769
|
+
const ret = wasm.__wbg_get_org_boss_sup(this.ptr);
|
|
1770
|
+
return takeObject(ret);
|
|
1976
1771
|
}
|
|
1977
1772
|
/**
|
|
1978
1773
|
* @returns {string | undefined}
|
|
1979
1774
|
*/
|
|
1980
|
-
|
|
1775
|
+
first_ship_id() {
|
|
1981
1776
|
try {
|
|
1982
1777
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1983
|
-
wasm.
|
|
1778
|
+
wasm.org_first_ship_id(retptr, this.ptr);
|
|
1984
1779
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1985
1780
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1986
1781
|
let v0;
|
|
@@ -1994,20 +1789,23 @@ class Org {
|
|
|
1994
1789
|
}
|
|
1995
1790
|
}
|
|
1996
1791
|
/**
|
|
1997
|
-
* @param {
|
|
1792
|
+
* @param {FleetKey} fleet_key
|
|
1793
|
+
* @param {ShipKey} ship_key
|
|
1794
|
+
* @returns {number | undefined}
|
|
1998
1795
|
*/
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2002
|
-
wasm.__wbg_set_org_route_sup(this.ptr, ptr0, len0);
|
|
1796
|
+
get_ship_mid(fleet_key, ship_key) {
|
|
1797
|
+
const ret = wasm.org_get_ship_mid(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
1798
|
+
return ret === 0xFFFFFF ? undefined : ret;
|
|
2003
1799
|
}
|
|
2004
1800
|
/**
|
|
1801
|
+
* @param {FleetKey} fleet_key
|
|
1802
|
+
* @param {ShipKey} ship_key
|
|
2005
1803
|
* @returns {string | undefined}
|
|
2006
1804
|
*/
|
|
2007
|
-
|
|
1805
|
+
get_ship_eid(fleet_key, ship_key) {
|
|
2008
1806
|
try {
|
|
2009
1807
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2010
|
-
wasm.
|
|
1808
|
+
wasm.org_get_ship_eid(retptr, this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
2011
1809
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2012
1810
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2013
1811
|
let v0;
|
|
@@ -2021,42 +1819,19 @@ class Org {
|
|
|
2021
1819
|
}
|
|
2022
1820
|
}
|
|
2023
1821
|
/**
|
|
2024
|
-
* @param {
|
|
2025
|
-
|
|
2026
|
-
set boss_sup(arg0) {
|
|
2027
|
-
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2028
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2029
|
-
wasm.__wbg_set_org_boss_sup(this.ptr, ptr0, len0);
|
|
2030
|
-
}
|
|
2031
|
-
/**
|
|
2032
|
-
* @param {Role} role
|
|
2033
|
-
* @returns {number}
|
|
2034
|
-
*/
|
|
2035
|
-
fleet_len(role) {
|
|
2036
|
-
const ret = wasm.org_fleet_len(this.ptr, addHeapObject(role));
|
|
2037
|
-
return ret >>> 0;
|
|
2038
|
-
}
|
|
2039
|
-
/**
|
|
2040
|
-
* @param {Role} role
|
|
2041
|
-
* @param {string} key
|
|
2042
|
-
* @returns {string | undefined}
|
|
1822
|
+
* @param {FleetKey} key
|
|
1823
|
+
* @returns {string}
|
|
2043
1824
|
*/
|
|
2044
|
-
|
|
1825
|
+
get_fleet_id(key) {
|
|
2045
1826
|
try {
|
|
2046
1827
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2047
|
-
|
|
2048
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2049
|
-
wasm.org_get_ship_entity_id(retptr, this.ptr, addHeapObject(role), ptr0, len0);
|
|
1828
|
+
wasm.org_get_fleet_id(retptr, this.ptr, addHeapObject(key));
|
|
2050
1829
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2051
1830
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2052
|
-
|
|
2053
|
-
if (r0 !== 0) {
|
|
2054
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
2055
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
2056
|
-
}
|
|
2057
|
-
return v1;
|
|
1831
|
+
return getStringFromWasm0(r0, r1);
|
|
2058
1832
|
} finally {
|
|
2059
1833
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1834
|
+
wasm.__wbindgen_free(r0, r1);
|
|
2060
1835
|
}
|
|
2061
1836
|
}
|
|
2062
1837
|
/**
|
|
@@ -2076,21 +1851,6 @@ class Org {
|
|
|
2076
1851
|
}
|
|
2077
1852
|
}
|
|
2078
1853
|
/**
|
|
2079
|
-
* @param {Role} role
|
|
2080
|
-
* @returns {number | undefined}
|
|
2081
|
-
*/
|
|
2082
|
-
fleet_los_mod(role) {
|
|
2083
|
-
try {
|
|
2084
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2085
|
-
wasm.org_fleet_los_mod(retptr, this.ptr, addHeapObject(role));
|
|
2086
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2087
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2088
|
-
return r0 === 0 ? undefined : r2;
|
|
2089
|
-
} finally {
|
|
2090
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
/**
|
|
2094
1854
|
* @returns {Uint16Array}
|
|
2095
1855
|
*/
|
|
2096
1856
|
main_ship_ids() {
|
|
@@ -2123,24 +1883,20 @@ class Org {
|
|
|
2123
1883
|
}
|
|
2124
1884
|
}
|
|
2125
1885
|
/**
|
|
2126
|
-
* @param {
|
|
1886
|
+
* @param {FleetKey} key
|
|
2127
1887
|
* @returns {Fleet}
|
|
2128
1888
|
*/
|
|
2129
1889
|
clone_fleet(key) {
|
|
2130
|
-
const
|
|
2131
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2132
|
-
const ret = wasm.org_clone_fleet(this.ptr, ptr0, len0);
|
|
1890
|
+
const ret = wasm.org_clone_fleet(this.ptr, addHeapObject(key));
|
|
2133
1891
|
return Fleet.__wrap(ret);
|
|
2134
1892
|
}
|
|
2135
1893
|
/**
|
|
2136
|
-
* @param {
|
|
2137
|
-
* @param {
|
|
1894
|
+
* @param {FleetKey} fleet_key
|
|
1895
|
+
* @param {ShipKey} ship_key
|
|
2138
1896
|
* @returns {Ship | undefined}
|
|
2139
1897
|
*/
|
|
2140
|
-
|
|
2141
|
-
const
|
|
2142
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2143
|
-
const ret = wasm.org_get_ship(this.ptr, addHeapObject(role), ptr0, len0);
|
|
1898
|
+
clone_ship(fleet_key, ship_key) {
|
|
1899
|
+
const ret = wasm.org_clone_ship(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
2144
1900
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
2145
1901
|
}
|
|
2146
1902
|
/**
|
|
@@ -2154,19 +1910,20 @@ class Org {
|
|
|
2154
1910
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
2155
1911
|
}
|
|
2156
1912
|
/**
|
|
2157
|
-
* @param {
|
|
2158
|
-
* @returns {string}
|
|
1913
|
+
* @param {FleetKey} key
|
|
1914
|
+
* @returns {(string)[]}
|
|
2159
1915
|
*/
|
|
2160
|
-
|
|
1916
|
+
ship_keys(key) {
|
|
2161
1917
|
try {
|
|
2162
1918
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2163
|
-
wasm.
|
|
1919
|
+
wasm.org_ship_keys(retptr, this.ptr, addHeapObject(key));
|
|
2164
1920
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2165
1921
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2166
|
-
|
|
1922
|
+
var v0 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1923
|
+
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1924
|
+
return v0;
|
|
2167
1925
|
} finally {
|
|
2168
1926
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2169
|
-
wasm.__wbindgen_free(r0, r1);
|
|
2170
1927
|
}
|
|
2171
1928
|
}
|
|
2172
1929
|
/**
|
|
@@ -2177,13 +1934,11 @@ class Org {
|
|
|
2177
1934
|
return Comp.__wrap(ret);
|
|
2178
1935
|
}
|
|
2179
1936
|
/**
|
|
2180
|
-
* @param {
|
|
1937
|
+
* @param {FleetKey} key
|
|
2181
1938
|
* @returns {Comp}
|
|
2182
1939
|
*/
|
|
2183
1940
|
create_comp_by_key(key) {
|
|
2184
|
-
const
|
|
2185
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2186
|
-
const ret = wasm.org_create_comp_by_key(this.ptr, ptr0, len0);
|
|
1941
|
+
const ret = wasm.org_create_comp_by_key(this.ptr, addHeapObject(key));
|
|
2187
1942
|
return Comp.__wrap(ret);
|
|
2188
1943
|
}
|
|
2189
1944
|
/**
|
|
@@ -2291,11 +2046,24 @@ class Org {
|
|
|
2291
2046
|
return ret;
|
|
2292
2047
|
}
|
|
2293
2048
|
/**
|
|
2294
|
-
* @
|
|
2049
|
+
* @param {string} id
|
|
2050
|
+
* @param {number} x
|
|
2051
|
+
* @param {number} y
|
|
2052
|
+
* @returns {MoveShipPayload | undefined}
|
|
2295
2053
|
*/
|
|
2296
|
-
|
|
2297
|
-
const
|
|
2298
|
-
|
|
2054
|
+
create_move_ship_payload(id, x, y) {
|
|
2055
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2056
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2057
|
+
const ret = wasm.org_create_move_ship_payload(this.ptr, ptr0, len0, x, y);
|
|
2058
|
+
return takeObject(ret);
|
|
2059
|
+
}
|
|
2060
|
+
/**
|
|
2061
|
+
* @param {FleetKey} key
|
|
2062
|
+
* @returns {FleetType | undefined}
|
|
2063
|
+
*/
|
|
2064
|
+
get_fleet_type(key) {
|
|
2065
|
+
const ret = wasm.org_get_fleet_type(this.ptr, addHeapObject(key));
|
|
2066
|
+
return takeObject(ret);
|
|
2299
2067
|
}
|
|
2300
2068
|
}
|
|
2301
2069
|
module.exports.Org = Org;
|
|
@@ -2930,6 +2698,13 @@ class Ship {
|
|
|
2930
2698
|
return ret !== 0;
|
|
2931
2699
|
}
|
|
2932
2700
|
/**
|
|
2701
|
+
* @returns {boolean}
|
|
2702
|
+
*/
|
|
2703
|
+
is_attackable_by_torpedo() {
|
|
2704
|
+
const ret = wasm.ship_is_attackable_by_torpedo(this.ptr);
|
|
2705
|
+
return ret !== 0;
|
|
2706
|
+
}
|
|
2707
|
+
/**
|
|
2933
2708
|
* @param {number} index
|
|
2934
2709
|
* @returns {number | undefined}
|
|
2935
2710
|
*/
|
|
@@ -3119,6 +2894,15 @@ class Ship {
|
|
|
3119
2894
|
}
|
|
3120
2895
|
module.exports.Ship = Ship;
|
|
3121
2896
|
|
|
2897
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2898
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2899
|
+
return addHeapObject(ret);
|
|
2900
|
+
};
|
|
2901
|
+
|
|
2902
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2903
|
+
takeObject(arg0);
|
|
2904
|
+
};
|
|
2905
|
+
|
|
3122
2906
|
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
3123
2907
|
const obj = getObject(arg1);
|
|
3124
2908
|
const ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -3128,16 +2912,7 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
3128
2912
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
3129
2913
|
};
|
|
3130
2914
|
|
|
3131
|
-
module.exports.
|
|
3132
|
-
takeObject(arg0);
|
|
3133
|
-
};
|
|
3134
|
-
|
|
3135
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
3136
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
3137
|
-
return addHeapObject(ret);
|
|
3138
|
-
};
|
|
3139
|
-
|
|
3140
|
-
module.exports.__wbg_createEquipmentBonuses_d565e4083bca7b6e = function(arg0, arg1) {
|
|
2915
|
+
module.exports.__wbg_createEquipmentBonuses_90acf8ea4a0803e5 = function(arg0, arg1) {
|
|
3141
2916
|
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
3142
2917
|
return addHeapObject(ret);
|
|
3143
2918
|
};
|