fleethub-core 1.1.6 → 1.2.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.
- package/node/fleethub_core.d.ts +1841 -872
- package/node/fleethub_core.js +137 -137
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +209 -209
- package/package.json +2 -3
- package/pkg/fleethub_core.d.ts +1841 -872
- package/pkg/fleethub_core_bg.js +137 -137
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +209 -209
- package/bindings.d.ts +0 -918
package/node/fleethub_core.js
CHANGED
|
@@ -9,6 +9,20 @@ heap.push(undefined, null, true, false);
|
|
|
9
9
|
|
|
10
10
|
function getObject(idx) { return heap[idx]; }
|
|
11
11
|
|
|
12
|
+
let heap_next = heap.length;
|
|
13
|
+
|
|
14
|
+
function dropObject(idx) {
|
|
15
|
+
if (idx < 36) return;
|
|
16
|
+
heap[idx] = heap_next;
|
|
17
|
+
heap_next = idx;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function takeObject(idx) {
|
|
21
|
+
const ret = getObject(idx);
|
|
22
|
+
dropObject(idx);
|
|
23
|
+
return ret;
|
|
24
|
+
}
|
|
25
|
+
|
|
12
26
|
let WASM_VECTOR_LEN = 0;
|
|
13
27
|
|
|
14
28
|
let cachegetUint8Memory0 = null;
|
|
@@ -80,20 +94,6 @@ function getInt32Memory0() {
|
|
|
80
94
|
return cachegetInt32Memory0;
|
|
81
95
|
}
|
|
82
96
|
|
|
83
|
-
let heap_next = heap.length;
|
|
84
|
-
|
|
85
|
-
function dropObject(idx) {
|
|
86
|
-
if (idx < 36) return;
|
|
87
|
-
heap[idx] = heap_next;
|
|
88
|
-
heap_next = idx;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
function takeObject(idx) {
|
|
92
|
-
const ret = getObject(idx);
|
|
93
|
-
dropObject(idx);
|
|
94
|
-
return ret;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
97
|
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
98
98
|
|
|
99
99
|
cachedTextDecoder.decode();
|
|
@@ -176,29 +176,6 @@ function debugString(val) {
|
|
|
176
176
|
return className;
|
|
177
177
|
}
|
|
178
178
|
|
|
179
|
-
const u32CvtShim = new Uint32Array(2);
|
|
180
|
-
|
|
181
|
-
const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
|
182
|
-
|
|
183
|
-
function isLikeNone(x) {
|
|
184
|
-
return x === undefined || x === null;
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
let cachegetUint16Memory0 = null;
|
|
188
|
-
function getUint16Memory0() {
|
|
189
|
-
if (cachegetUint16Memory0 === null || cachegetUint16Memory0.buffer !== wasm.memory.buffer) {
|
|
190
|
-
cachegetUint16Memory0 = new Uint16Array(wasm.memory.buffer);
|
|
191
|
-
}
|
|
192
|
-
return cachegetUint16Memory0;
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
function passArray16ToWasm0(arg, malloc) {
|
|
196
|
-
const ptr = malloc(arg.length * 2);
|
|
197
|
-
getUint16Memory0().set(arg, ptr / 2);
|
|
198
|
-
WASM_VECTOR_LEN = arg.length;
|
|
199
|
-
return ptr;
|
|
200
|
-
}
|
|
201
|
-
|
|
202
179
|
function _assertClass(instance, klass) {
|
|
203
180
|
if (!(instance instanceof klass)) {
|
|
204
181
|
throw new Error(`expected instance of ${klass.name}`);
|
|
@@ -206,26 +183,13 @@ function _assertClass(instance, klass) {
|
|
|
206
183
|
return instance.ptr;
|
|
207
184
|
}
|
|
208
185
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
|
|
212
|
-
cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
213
|
-
}
|
|
214
|
-
return cachegetFloat64Memory0;
|
|
186
|
+
function isLikeNone(x) {
|
|
187
|
+
return x === undefined || x === null;
|
|
215
188
|
}
|
|
216
189
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
* @param {Gear} gear
|
|
222
|
-
* @returns {boolean}
|
|
223
|
-
*/
|
|
224
|
-
module.exports.air_squadron_can_equip = function(gear) {
|
|
225
|
-
_assertClass(gear, Gear);
|
|
226
|
-
var ret = wasm.air_squadron_can_equip(gear.ptr);
|
|
227
|
-
return ret !== 0;
|
|
228
|
-
};
|
|
190
|
+
const u32CvtShim = new Uint32Array(2);
|
|
191
|
+
|
|
192
|
+
const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
|
229
193
|
|
|
230
194
|
let cachegetUint32Memory0 = null;
|
|
231
195
|
function getUint32Memory0() {
|
|
@@ -244,14 +208,41 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
244
208
|
}
|
|
245
209
|
return result;
|
|
246
210
|
}
|
|
211
|
+
|
|
212
|
+
let cachegetFloat64Memory0 = null;
|
|
213
|
+
function getFloat64Memory0() {
|
|
214
|
+
if (cachegetFloat64Memory0 === null || cachegetFloat64Memory0.buffer !== wasm.memory.buffer) {
|
|
215
|
+
cachegetFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
216
|
+
}
|
|
217
|
+
return cachegetFloat64Memory0;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
let cachegetUint16Memory0 = null;
|
|
221
|
+
function getUint16Memory0() {
|
|
222
|
+
if (cachegetUint16Memory0 === null || cachegetUint16Memory0.buffer !== wasm.memory.buffer) {
|
|
223
|
+
cachegetUint16Memory0 = new Uint16Array(wasm.memory.buffer);
|
|
224
|
+
}
|
|
225
|
+
return cachegetUint16Memory0;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
function getArrayU16FromWasm0(ptr, len) {
|
|
229
|
+
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
230
|
+
}
|
|
247
231
|
/**
|
|
232
|
+
* @param {Gear} gear
|
|
233
|
+
* @returns {boolean}
|
|
248
234
|
*/
|
|
249
|
-
module.exports.
|
|
250
|
-
|
|
235
|
+
module.exports.air_squadron_can_equip = function(gear) {
|
|
236
|
+
_assertClass(gear, Gear);
|
|
237
|
+
var ret = wasm.air_squadron_can_equip(gear.ptr);
|
|
238
|
+
return ret !== 0;
|
|
251
239
|
};
|
|
252
240
|
|
|
241
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
242
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
243
|
+
}
|
|
253
244
|
/**
|
|
254
|
-
* @param {
|
|
245
|
+
* @param {OrgType} org_type
|
|
255
246
|
* @returns {boolean}
|
|
256
247
|
*/
|
|
257
248
|
module.exports.org_type_is_single = function(org_type) {
|
|
@@ -260,8 +251,8 @@ module.exports.org_type_is_single = function(org_type) {
|
|
|
260
251
|
};
|
|
261
252
|
|
|
262
253
|
/**
|
|
263
|
-
* @param {
|
|
264
|
-
* @returns {
|
|
254
|
+
* @param {OrgType} org_type
|
|
255
|
+
* @returns {Formation}
|
|
265
256
|
*/
|
|
266
257
|
module.exports.org_type_default_formation = function(org_type) {
|
|
267
258
|
var ret = wasm.org_type_default_formation(addHeapObject(org_type));
|
|
@@ -269,7 +260,7 @@ module.exports.org_type_default_formation = function(org_type) {
|
|
|
269
260
|
};
|
|
270
261
|
|
|
271
262
|
/**
|
|
272
|
-
* @param {
|
|
263
|
+
* @param {OrgType} org_type
|
|
273
264
|
* @returns {boolean}
|
|
274
265
|
*/
|
|
275
266
|
module.exports.org_type_is_player = function(org_type) {
|
|
@@ -278,16 +269,25 @@ module.exports.org_type_is_player = function(org_type) {
|
|
|
278
269
|
};
|
|
279
270
|
|
|
280
271
|
/**
|
|
281
|
-
* @param {
|
|
282
|
-
* @returns {
|
|
272
|
+
* @param {OrgType} org_type
|
|
273
|
+
* @returns {Side}
|
|
283
274
|
*/
|
|
284
275
|
module.exports.org_type_side = function(org_type) {
|
|
285
276
|
var ret = wasm.org_type_side(addHeapObject(org_type));
|
|
286
277
|
return takeObject(ret);
|
|
287
278
|
};
|
|
288
279
|
|
|
289
|
-
|
|
290
|
-
|
|
280
|
+
/**
|
|
281
|
+
*/
|
|
282
|
+
module.exports.set_panic_hook = function() {
|
|
283
|
+
wasm.set_panic_hook();
|
|
284
|
+
};
|
|
285
|
+
|
|
286
|
+
function passArray16ToWasm0(arg, malloc) {
|
|
287
|
+
const ptr = malloc(arg.length * 2);
|
|
288
|
+
getUint16Memory0().set(arg, ptr / 2);
|
|
289
|
+
WASM_VECTOR_LEN = arg.length;
|
|
290
|
+
return ptr;
|
|
291
291
|
}
|
|
292
292
|
|
|
293
293
|
function handleError(f, args) {
|
|
@@ -375,7 +375,7 @@ class AirSquadron {
|
|
|
375
375
|
return takeObject(ret);
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
|
-
* @param {
|
|
378
|
+
* @param {AirSquadronMode} arg0
|
|
379
379
|
*/
|
|
380
380
|
set mode(arg0) {
|
|
381
381
|
wasm.__wbg_set_airsquadron_mode(this.ptr, addHeapObject(arg0));
|
|
@@ -487,11 +487,11 @@ class Analyzer {
|
|
|
487
487
|
}
|
|
488
488
|
/**
|
|
489
489
|
* @param {Comp} comp
|
|
490
|
-
* @param {
|
|
490
|
+
* @param {Formation} formation
|
|
491
491
|
* @param {number} adjusted_anti_air_resist
|
|
492
492
|
* @param {number} fleet_anti_air_resist
|
|
493
493
|
* @param {number | undefined} aaci
|
|
494
|
-
* @returns {
|
|
494
|
+
* @returns {CompAntiAirInfo}
|
|
495
495
|
*/
|
|
496
496
|
analyze_anti_air(comp, formation, adjusted_anti_air_resist, fleet_anti_air_resist, aaci) {
|
|
497
497
|
_assertClass(comp, Comp);
|
|
@@ -500,7 +500,7 @@ class Analyzer {
|
|
|
500
500
|
}
|
|
501
501
|
/**
|
|
502
502
|
* @param {Comp} comp
|
|
503
|
-
* @returns {
|
|
503
|
+
* @returns {CompDayCutinRateInfo}
|
|
504
504
|
*/
|
|
505
505
|
analyze_day_cutin(comp) {
|
|
506
506
|
_assertClass(comp, Comp);
|
|
@@ -509,9 +509,9 @@ class Analyzer {
|
|
|
509
509
|
}
|
|
510
510
|
/**
|
|
511
511
|
* @param {Comp} comp
|
|
512
|
-
* @param {
|
|
513
|
-
* @param {
|
|
514
|
-
* @returns {
|
|
512
|
+
* @param {NightSituation} attacker_situation
|
|
513
|
+
* @param {NightSituation} target_situation
|
|
514
|
+
* @returns {FleetNightCutinRateInfo}
|
|
515
515
|
*/
|
|
516
516
|
analyze_night_cutin(comp, attacker_situation, target_situation) {
|
|
517
517
|
_assertClass(comp, Comp);
|
|
@@ -520,7 +520,7 @@ class Analyzer {
|
|
|
520
520
|
}
|
|
521
521
|
/**
|
|
522
522
|
* @param {Comp} comp
|
|
523
|
-
* @returns {
|
|
523
|
+
* @returns {CompContactChanceInfo}
|
|
524
524
|
*/
|
|
525
525
|
analyze_contact_chance(comp) {
|
|
526
526
|
_assertClass(comp, Comp);
|
|
@@ -528,10 +528,10 @@ class Analyzer {
|
|
|
528
528
|
return takeObject(ret);
|
|
529
529
|
}
|
|
530
530
|
/**
|
|
531
|
-
* @param {
|
|
531
|
+
* @param {WarfareAnalyzerContext} params
|
|
532
532
|
* @param {Ship} attacker
|
|
533
533
|
* @param {Ship} target
|
|
534
|
-
* @returns {
|
|
534
|
+
* @returns {WarfareInfo}
|
|
535
535
|
*/
|
|
536
536
|
analyze_warfare(params, attacker, target) {
|
|
537
537
|
_assertClass(attacker, Ship);
|
|
@@ -541,8 +541,8 @@ class Analyzer {
|
|
|
541
541
|
}
|
|
542
542
|
/**
|
|
543
543
|
* @param {Comp} comp
|
|
544
|
-
* @param {
|
|
545
|
-
* @returns {
|
|
544
|
+
* @param {Engagement} engagement
|
|
545
|
+
* @returns {FleetCutinAnalysis}
|
|
546
546
|
*/
|
|
547
547
|
analyze_fleet_cutin(comp, engagement) {
|
|
548
548
|
_assertClass(comp, Comp);
|
|
@@ -582,7 +582,7 @@ class Comp {
|
|
|
582
582
|
return takeObject(ret);
|
|
583
583
|
}
|
|
584
584
|
/**
|
|
585
|
-
* @param {
|
|
585
|
+
* @param {OrgType} arg0
|
|
586
586
|
*/
|
|
587
587
|
set org_type(arg0) {
|
|
588
588
|
wasm.__wbg_set_comp_org_type(this.ptr, addHeapObject(arg0));
|
|
@@ -669,7 +669,7 @@ class Comp {
|
|
|
669
669
|
wasm.__wbg_set_comp_boss_sup(this.ptr, ptr0);
|
|
670
670
|
}
|
|
671
671
|
/**
|
|
672
|
-
* @returns {
|
|
672
|
+
* @returns {Side}
|
|
673
673
|
*/
|
|
674
674
|
side() {
|
|
675
675
|
var ret = wasm.comp_side(this.ptr);
|
|
@@ -690,14 +690,14 @@ class Comp {
|
|
|
690
690
|
return ret !== 0;
|
|
691
691
|
}
|
|
692
692
|
/**
|
|
693
|
-
* @returns {
|
|
693
|
+
* @returns {CompMeta}
|
|
694
694
|
*/
|
|
695
695
|
meta() {
|
|
696
696
|
var ret = wasm.comp_meta(this.ptr);
|
|
697
697
|
return takeObject(ret);
|
|
698
698
|
}
|
|
699
699
|
/**
|
|
700
|
-
* @param {
|
|
700
|
+
* @param {FleetType} ft
|
|
701
701
|
* @returns {string | undefined}
|
|
702
702
|
*/
|
|
703
703
|
get_fleet_id(ft) {
|
|
@@ -717,7 +717,7 @@ class Comp {
|
|
|
717
717
|
}
|
|
718
718
|
}
|
|
719
719
|
/**
|
|
720
|
-
* @param {
|
|
720
|
+
* @param {FleetType} ft
|
|
721
721
|
* @param {string} key
|
|
722
722
|
* @returns {Ship | undefined}
|
|
723
723
|
*/
|
|
@@ -728,7 +728,7 @@ class Comp {
|
|
|
728
728
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
729
729
|
}
|
|
730
730
|
/**
|
|
731
|
-
* @param {
|
|
731
|
+
* @param {FleetType} ft
|
|
732
732
|
* @param {string} key
|
|
733
733
|
* @returns {string | undefined}
|
|
734
734
|
*/
|
|
@@ -761,7 +761,7 @@ class Comp {
|
|
|
761
761
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
762
762
|
}
|
|
763
763
|
/**
|
|
764
|
-
* @returns {
|
|
764
|
+
* @returns {Formation}
|
|
765
765
|
*/
|
|
766
766
|
default_formation() {
|
|
767
767
|
var ret = wasm.comp_default_formation(this.ptr);
|
|
@@ -779,7 +779,7 @@ class Comp {
|
|
|
779
779
|
/**
|
|
780
780
|
* 制空値
|
|
781
781
|
* @param {boolean} escort_participates
|
|
782
|
-
* @param {
|
|
782
|
+
* @param {AirWaveType} air_type
|
|
783
783
|
* @returns {number | undefined}
|
|
784
784
|
*/
|
|
785
785
|
fighter_power(escort_participates, air_type) {
|
|
@@ -863,7 +863,7 @@ class FhCore {
|
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
/**
|
|
866
|
-
* @param {
|
|
866
|
+
* @param {GearState | undefined} input
|
|
867
867
|
* @returns {Gear | undefined}
|
|
868
868
|
*/
|
|
869
869
|
create_gear(input) {
|
|
@@ -871,7 +871,7 @@ class FhCore {
|
|
|
871
871
|
return ret === 0 ? undefined : Gear.__wrap(ret);
|
|
872
872
|
}
|
|
873
873
|
/**
|
|
874
|
-
* @param {
|
|
874
|
+
* @param {ShipState | undefined} input
|
|
875
875
|
* @returns {Ship | undefined}
|
|
876
876
|
*/
|
|
877
877
|
create_ship(input) {
|
|
@@ -879,7 +879,7 @@ class FhCore {
|
|
|
879
879
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
880
880
|
}
|
|
881
881
|
/**
|
|
882
|
-
* @param {
|
|
882
|
+
* @param {AirSquadronState | undefined} input
|
|
883
883
|
* @returns {AirSquadron}
|
|
884
884
|
*/
|
|
885
885
|
create_air_squadron(input) {
|
|
@@ -887,7 +887,7 @@ class FhCore {
|
|
|
887
887
|
return AirSquadron.__wrap(ret);
|
|
888
888
|
}
|
|
889
889
|
/**
|
|
890
|
-
* @param {
|
|
890
|
+
* @param {FleetState | undefined} input
|
|
891
891
|
* @returns {Fleet}
|
|
892
892
|
*/
|
|
893
893
|
create_fleet(input) {
|
|
@@ -895,7 +895,7 @@ class FhCore {
|
|
|
895
895
|
return Fleet.__wrap(ret);
|
|
896
896
|
}
|
|
897
897
|
/**
|
|
898
|
-
* @param {
|
|
898
|
+
* @param {OrgState | undefined} input
|
|
899
899
|
* @returns {Org | undefined}
|
|
900
900
|
*/
|
|
901
901
|
create_org(input) {
|
|
@@ -940,9 +940,9 @@ class FhCore {
|
|
|
940
940
|
/**
|
|
941
941
|
* @param {Comp} player
|
|
942
942
|
* @param {Comp} enemy
|
|
943
|
-
* @param {
|
|
943
|
+
* @param {ShellingSupportSimulatorParams} params
|
|
944
944
|
* @param {number} times
|
|
945
|
-
* @returns {
|
|
945
|
+
* @returns {SimulatorResult}
|
|
946
946
|
*/
|
|
947
947
|
simulate_shelling_support(player, enemy, params, times) {
|
|
948
948
|
try {
|
|
@@ -1047,7 +1047,7 @@ class Fleet {
|
|
|
1047
1047
|
wasm.__wbg_set_fleet_len(this.ptr, arg0);
|
|
1048
1048
|
}
|
|
1049
1049
|
/**
|
|
1050
|
-
* @returns {
|
|
1050
|
+
* @returns {FleetMeta}
|
|
1051
1051
|
*/
|
|
1052
1052
|
meta() {
|
|
1053
1053
|
var ret = wasm.fleet_meta(this.ptr);
|
|
@@ -1119,7 +1119,7 @@ class Fleet {
|
|
|
1119
1119
|
}
|
|
1120
1120
|
/**
|
|
1121
1121
|
* @param {string} id
|
|
1122
|
-
* @param {
|
|
1122
|
+
* @param {DamageState} state
|
|
1123
1123
|
* @returns {number | undefined}
|
|
1124
1124
|
*/
|
|
1125
1125
|
get_damage_bound(id, state) {
|
|
@@ -1184,7 +1184,7 @@ class Fleet {
|
|
|
1184
1184
|
}
|
|
1185
1185
|
}
|
|
1186
1186
|
/**
|
|
1187
|
-
* @param {
|
|
1187
|
+
* @param {AirWaveType} air_type
|
|
1188
1188
|
* @returns {number | undefined}
|
|
1189
1189
|
*/
|
|
1190
1190
|
fighter_power(air_type) {
|
|
@@ -1410,7 +1410,7 @@ class Gear {
|
|
|
1410
1410
|
return takeObject(ret);
|
|
1411
1411
|
}
|
|
1412
1412
|
/**
|
|
1413
|
-
* @param {
|
|
1413
|
+
* @param {GearType} arg0
|
|
1414
1414
|
*/
|
|
1415
1415
|
set gear_type(arg0) {
|
|
1416
1416
|
wasm.__wbg_set_gear_gear_type(this.ptr, addHeapObject(arg0));
|
|
@@ -1667,7 +1667,7 @@ class Gear {
|
|
|
1667
1667
|
return ret;
|
|
1668
1668
|
}
|
|
1669
1669
|
/**
|
|
1670
|
-
* @param {
|
|
1670
|
+
* @param {GearAttr} attr
|
|
1671
1671
|
* @returns {boolean}
|
|
1672
1672
|
*/
|
|
1673
1673
|
has_attr(attr) {
|
|
@@ -1675,7 +1675,7 @@ class Gear {
|
|
|
1675
1675
|
return ret !== 0;
|
|
1676
1676
|
}
|
|
1677
1677
|
/**
|
|
1678
|
-
* @returns {
|
|
1678
|
+
* @returns {GearCategory}
|
|
1679
1679
|
*/
|
|
1680
1680
|
category() {
|
|
1681
1681
|
var ret = wasm.gear_category(this.ptr);
|
|
@@ -1769,7 +1769,7 @@ class Gear {
|
|
|
1769
1769
|
return ret;
|
|
1770
1770
|
}
|
|
1771
1771
|
/**
|
|
1772
|
-
* @param {
|
|
1772
|
+
* @param {AirStateRank} rank
|
|
1773
1773
|
* @returns {number}
|
|
1774
1774
|
*/
|
|
1775
1775
|
contact_selection_rate(rank) {
|
|
@@ -2138,7 +2138,7 @@ class Org {
|
|
|
2138
2138
|
return takeObject(ret);
|
|
2139
2139
|
}
|
|
2140
2140
|
/**
|
|
2141
|
-
* @param {
|
|
2141
|
+
* @param {OrgType} arg0
|
|
2142
2142
|
*/
|
|
2143
2143
|
set org_type(arg0) {
|
|
2144
2144
|
wasm.__wbg_set_org_org_type(this.ptr, addHeapObject(arg0));
|
|
@@ -2218,7 +2218,7 @@ class Org {
|
|
|
2218
2218
|
wasm.__wbg_set_org_boss_sup(this.ptr, ptr0, len0);
|
|
2219
2219
|
}
|
|
2220
2220
|
/**
|
|
2221
|
-
* @param {
|
|
2221
|
+
* @param {Role} role
|
|
2222
2222
|
* @returns {number}
|
|
2223
2223
|
*/
|
|
2224
2224
|
fleet_len(role) {
|
|
@@ -2226,7 +2226,7 @@ class Org {
|
|
|
2226
2226
|
return ret >>> 0;
|
|
2227
2227
|
}
|
|
2228
2228
|
/**
|
|
2229
|
-
* @param {
|
|
2229
|
+
* @param {Role} role
|
|
2230
2230
|
* @param {string} key
|
|
2231
2231
|
* @returns {string | undefined}
|
|
2232
2232
|
*/
|
|
@@ -2265,7 +2265,7 @@ class Org {
|
|
|
2265
2265
|
}
|
|
2266
2266
|
}
|
|
2267
2267
|
/**
|
|
2268
|
-
* @param {
|
|
2268
|
+
* @param {Role} role
|
|
2269
2269
|
* @returns {number | undefined}
|
|
2270
2270
|
*/
|
|
2271
2271
|
fleet_los_mod(role) {
|
|
@@ -2322,7 +2322,7 @@ class Org {
|
|
|
2322
2322
|
return Fleet.__wrap(ret);
|
|
2323
2323
|
}
|
|
2324
2324
|
/**
|
|
2325
|
-
* @param {
|
|
2325
|
+
* @param {Role} role
|
|
2326
2326
|
* @param {string} key
|
|
2327
2327
|
* @returns {Ship | undefined}
|
|
2328
2328
|
*/
|
|
@@ -2343,7 +2343,7 @@ class Org {
|
|
|
2343
2343
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
2344
2344
|
}
|
|
2345
2345
|
/**
|
|
2346
|
-
* @param {
|
|
2346
|
+
* @param {Role} role
|
|
2347
2347
|
* @returns {string}
|
|
2348
2348
|
*/
|
|
2349
2349
|
get_fleet_id_by_role(role) {
|
|
@@ -2474,8 +2474,8 @@ class Org {
|
|
|
2474
2474
|
}
|
|
2475
2475
|
/**
|
|
2476
2476
|
* @param {Ship} ship
|
|
2477
|
-
* @param {
|
|
2478
|
-
* @returns {
|
|
2477
|
+
* @param {Formation} formation
|
|
2478
|
+
* @returns {WarfareShipEnvironment}
|
|
2479
2479
|
*/
|
|
2480
2480
|
create_warfare_ship_environment(ship, formation) {
|
|
2481
2481
|
_assertClass(ship, Ship);
|
|
@@ -2520,7 +2520,7 @@ class Ship {
|
|
|
2520
2520
|
get id() {
|
|
2521
2521
|
try {
|
|
2522
2522
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2523
|
-
wasm.
|
|
2523
|
+
wasm.__wbg_get_airsquadron_id(retptr, this.ptr);
|
|
2524
2524
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2525
2525
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2526
2526
|
return getStringFromWasm0(r0, r1);
|
|
@@ -2535,14 +2535,14 @@ class Ship {
|
|
|
2535
2535
|
set id(arg0) {
|
|
2536
2536
|
var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2537
2537
|
var len0 = WASM_VECTOR_LEN;
|
|
2538
|
-
wasm.
|
|
2538
|
+
wasm.__wbg_set_airsquadron_id(this.ptr, ptr0, len0);
|
|
2539
2539
|
}
|
|
2540
2540
|
/**
|
|
2541
2541
|
*/
|
|
2542
2542
|
get xxh3() {
|
|
2543
2543
|
try {
|
|
2544
2544
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2545
|
-
wasm.
|
|
2545
|
+
wasm.__wbg_get_airsquadron_xxh3(retptr, this.ptr);
|
|
2546
2546
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2547
2547
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2548
2548
|
u32CvtShim[0] = r0;
|
|
@@ -2560,7 +2560,7 @@ class Ship {
|
|
|
2560
2560
|
uint64CvtShim[0] = arg0;
|
|
2561
2561
|
const low0 = u32CvtShim[0];
|
|
2562
2562
|
const high0 = u32CvtShim[1];
|
|
2563
|
-
wasm.
|
|
2563
|
+
wasm.__wbg_set_airsquadron_xxh3(this.ptr, low0, high0);
|
|
2564
2564
|
}
|
|
2565
2565
|
/**
|
|
2566
2566
|
*/
|
|
@@ -2641,7 +2641,7 @@ class Ship {
|
|
|
2641
2641
|
return takeObject(ret);
|
|
2642
2642
|
}
|
|
2643
2643
|
/**
|
|
2644
|
-
* @param {
|
|
2644
|
+
* @param {ShipType} arg0
|
|
2645
2645
|
*/
|
|
2646
2646
|
set ship_type(arg0) {
|
|
2647
2647
|
wasm.__wbg_set_ship_ship_type(this.ptr, addHeapObject(arg0));
|
|
@@ -2653,7 +2653,7 @@ class Ship {
|
|
|
2653
2653
|
return takeObject(ret);
|
|
2654
2654
|
}
|
|
2655
2655
|
/**
|
|
2656
|
-
* @param {
|
|
2656
|
+
* @param {ShipClass} arg0
|
|
2657
2657
|
*/
|
|
2658
2658
|
set ship_class(arg0) {
|
|
2659
2659
|
wasm.__wbg_set_ship_ship_class(this.ptr, addHeapObject(arg0));
|
|
@@ -2774,14 +2774,14 @@ class Ship {
|
|
|
2774
2774
|
return ret !== 0;
|
|
2775
2775
|
}
|
|
2776
2776
|
/**
|
|
2777
|
-
* @returns {
|
|
2777
|
+
* @returns {ShipState}
|
|
2778
2778
|
*/
|
|
2779
2779
|
state() {
|
|
2780
2780
|
var ret = wasm.ship_state(this.ptr);
|
|
2781
2781
|
return takeObject(ret);
|
|
2782
2782
|
}
|
|
2783
2783
|
/**
|
|
2784
|
-
* @returns {
|
|
2784
|
+
* @returns {ShipMeta}
|
|
2785
2785
|
*/
|
|
2786
2786
|
meta() {
|
|
2787
2787
|
var ret = wasm.ship_meta(this.ptr);
|
|
@@ -2867,28 +2867,28 @@ class Ship {
|
|
|
2867
2867
|
return ret !== 0;
|
|
2868
2868
|
}
|
|
2869
2869
|
/**
|
|
2870
|
-
* @returns {
|
|
2870
|
+
* @returns {DamageState}
|
|
2871
2871
|
*/
|
|
2872
2872
|
damage_state() {
|
|
2873
2873
|
var ret = wasm.ship_damage_state(this.ptr);
|
|
2874
2874
|
return takeObject(ret);
|
|
2875
2875
|
}
|
|
2876
2876
|
/**
|
|
2877
|
-
* @returns {
|
|
2877
|
+
* @returns {MoraleState}
|
|
2878
2878
|
*/
|
|
2879
2879
|
morale_state() {
|
|
2880
2880
|
var ret = wasm.ship_morale_state(this.ptr);
|
|
2881
2881
|
return takeObject(ret);
|
|
2882
2882
|
}
|
|
2883
2883
|
/**
|
|
2884
|
-
* @returns {
|
|
2884
|
+
* @returns {ShipCategory}
|
|
2885
2885
|
*/
|
|
2886
2886
|
category() {
|
|
2887
2887
|
var ret = wasm.ship_category(this.ptr);
|
|
2888
2888
|
return takeObject(ret);
|
|
2889
2889
|
}
|
|
2890
2890
|
/**
|
|
2891
|
-
* @param {
|
|
2891
|
+
* @param {ShipAttr} attr
|
|
2892
2892
|
* @returns {boolean}
|
|
2893
2893
|
*/
|
|
2894
2894
|
has_attr(attr) {
|
|
@@ -2909,11 +2909,11 @@ class Ship {
|
|
|
2909
2909
|
get_gear(key) {
|
|
2910
2910
|
var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2911
2911
|
var len0 = WASM_VECTOR_LEN;
|
|
2912
|
-
var ret = wasm.
|
|
2912
|
+
var ret = wasm.airsquadron_get_gear(this.ptr, ptr0, len0);
|
|
2913
2913
|
return ret === 0 ? undefined : Gear.__wrap(ret);
|
|
2914
2914
|
}
|
|
2915
2915
|
/**
|
|
2916
|
-
* @param {
|
|
2916
|
+
* @param {DamageState} state
|
|
2917
2917
|
* @returns {number | undefined}
|
|
2918
2918
|
*/
|
|
2919
2919
|
get_damage_bound(state) {
|
|
@@ -3135,7 +3135,7 @@ class Ship {
|
|
|
3135
3135
|
return ret;
|
|
3136
3136
|
}
|
|
3137
3137
|
/**
|
|
3138
|
-
* @param {
|
|
3138
|
+
* @param {AirWaveType} air_type
|
|
3139
3139
|
* @returns {number | undefined}
|
|
3140
3140
|
*/
|
|
3141
3141
|
fighter_power(air_type) {
|
|
@@ -3292,6 +3292,10 @@ class Ship {
|
|
|
3292
3292
|
}
|
|
3293
3293
|
module.exports.Ship = Ship;
|
|
3294
3294
|
|
|
3295
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
3296
|
+
takeObject(arg0);
|
|
3297
|
+
};
|
|
3298
|
+
|
|
3295
3299
|
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
3296
3300
|
const obj = getObject(arg1);
|
|
3297
3301
|
var ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -3301,10 +3305,6 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
3301
3305
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
3302
3306
|
};
|
|
3303
3307
|
|
|
3304
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
3305
|
-
takeObject(arg0);
|
|
3306
|
-
};
|
|
3307
|
-
|
|
3308
3308
|
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
3309
3309
|
var ret = getStringFromWasm0(arg0, arg1);
|
|
3310
3310
|
return addHeapObject(ret);
|
|
@@ -3340,15 +3340,15 @@ module.exports.__wbg_error_09919627ac0992f5 = function(arg0, arg1) {
|
|
|
3340
3340
|
}
|
|
3341
3341
|
};
|
|
3342
3342
|
|
|
3343
|
-
module.exports.
|
|
3344
|
-
getObject(arg0).
|
|
3343
|
+
module.exports.__wbg_getRandomValues_fb6b088efb6bead2 = function() { return handleError(function (arg0, arg1) {
|
|
3344
|
+
getObject(arg0).getRandomValues(getObject(arg1));
|
|
3345
3345
|
}, arguments) };
|
|
3346
3346
|
|
|
3347
|
-
module.exports.
|
|
3348
|
-
getObject(arg0).
|
|
3347
|
+
module.exports.__wbg_randomFillSync_654a7797990fb8db = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3348
|
+
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
3349
3349
|
}, arguments) };
|
|
3350
3350
|
|
|
3351
|
-
module.exports.
|
|
3351
|
+
module.exports.__wbg_process_70251ed1291754d5 = function(arg0) {
|
|
3352
3352
|
var ret = getObject(arg0).process;
|
|
3353
3353
|
return addHeapObject(ret);
|
|
3354
3354
|
};
|
|
@@ -3359,12 +3359,12 @@ module.exports.__wbindgen_is_object = function(arg0) {
|
|
|
3359
3359
|
return ret;
|
|
3360
3360
|
};
|
|
3361
3361
|
|
|
3362
|
-
module.exports.
|
|
3362
|
+
module.exports.__wbg_versions_b23f2588cdb2ddbb = function(arg0) {
|
|
3363
3363
|
var ret = getObject(arg0).versions;
|
|
3364
3364
|
return addHeapObject(ret);
|
|
3365
3365
|
};
|
|
3366
3366
|
|
|
3367
|
-
module.exports.
|
|
3367
|
+
module.exports.__wbg_node_61b8c9a82499895d = function(arg0) {
|
|
3368
3368
|
var ret = getObject(arg0).node;
|
|
3369
3369
|
return addHeapObject(ret);
|
|
3370
3370
|
};
|
|
@@ -3374,22 +3374,22 @@ module.exports.__wbindgen_is_string = function(arg0) {
|
|
|
3374
3374
|
return ret;
|
|
3375
3375
|
};
|
|
3376
3376
|
|
|
3377
|
-
module.exports.
|
|
3377
|
+
module.exports.__wbg_static_accessor_NODE_MODULE_33b45247c55045b0 = function() {
|
|
3378
3378
|
var ret = module;
|
|
3379
3379
|
return addHeapObject(ret);
|
|
3380
3380
|
};
|
|
3381
3381
|
|
|
3382
|
-
module.exports.
|
|
3382
|
+
module.exports.__wbg_require_2a93bc09fee45aca = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3383
3383
|
var ret = getObject(arg0).require(getStringFromWasm0(arg1, arg2));
|
|
3384
3384
|
return addHeapObject(ret);
|
|
3385
3385
|
}, arguments) };
|
|
3386
3386
|
|
|
3387
|
-
module.exports.
|
|
3387
|
+
module.exports.__wbg_crypto_2f56257a38275dbd = function(arg0) {
|
|
3388
3388
|
var ret = getObject(arg0).crypto;
|
|
3389
3389
|
return addHeapObject(ret);
|
|
3390
3390
|
};
|
|
3391
3391
|
|
|
3392
|
-
module.exports.
|
|
3392
|
+
module.exports.__wbg_msCrypto_d07655bf62361f21 = function(arg0) {
|
|
3393
3393
|
var ret = getObject(arg0).msCrypto;
|
|
3394
3394
|
return addHeapObject(ret);
|
|
3395
3395
|
};
|