fleethub-core 0.3.3 → 0.4.3
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/bindings.d.ts +19 -1
- package/node/fh_core.d.ts +83 -3
- package/node/fh_core.js +305 -37
- package/node/fh_core_bg.wasm +0 -0
- package/node/fh_core_bg.wasm.d.ts +59 -34
- package/package.json +1 -1
- package/pkg/fh_core.d.ts +83 -3
- package/pkg/fh_core_bg.js +304 -37
- package/pkg/fh_core_bg.wasm +0 -0
- package/pkg/fh_core_bg.wasm.d.ts +59 -34
package/bindings.d.ts
CHANGED
|
@@ -461,6 +461,8 @@ export interface FleetState {
|
|
|
461
461
|
s7?: ShipState;
|
|
462
462
|
}
|
|
463
463
|
|
|
464
|
+
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
465
|
+
|
|
464
466
|
export interface AirSquadronState {
|
|
465
467
|
id?: string;
|
|
466
468
|
mode?: AirSquadronMode;
|
|
@@ -488,6 +490,8 @@ export interface OrgState {
|
|
|
488
490
|
a3?: AirSquadronState;
|
|
489
491
|
hq_level?: number;
|
|
490
492
|
org_type?: OrgType;
|
|
493
|
+
route_sup?: string;
|
|
494
|
+
boss_sup?: string;
|
|
491
495
|
}
|
|
492
496
|
|
|
493
497
|
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
@@ -501,6 +505,21 @@ export interface BattleConfig {
|
|
|
501
505
|
night_cutin: Array<NightCutinDef>;
|
|
502
506
|
}
|
|
503
507
|
|
|
508
|
+
export interface ShipMeta {
|
|
509
|
+
id: string;
|
|
510
|
+
ship_id: number;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
export interface FleetMeta {
|
|
514
|
+
id: string;
|
|
515
|
+
len: number;
|
|
516
|
+
ships: Array<[string, ShipMeta | null]>;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
export interface CompMeta {
|
|
520
|
+
fleets: Record<FleetType, FleetMeta>;
|
|
521
|
+
}
|
|
522
|
+
|
|
504
523
|
export interface MasterGear {
|
|
505
524
|
gear_id: number;
|
|
506
525
|
name: string;
|
|
@@ -620,7 +639,6 @@ export interface MasterData {
|
|
|
620
639
|
gear_attrs: Array<MasterAttrRule>;
|
|
621
640
|
ships: Array<MasterShip>;
|
|
622
641
|
ship_attrs: Array<MasterAttrRule>;
|
|
623
|
-
ship_banners: Record<string, string>;
|
|
624
642
|
equippable: MasterEquippable;
|
|
625
643
|
ibonuses: MasterIBonuses;
|
|
626
644
|
config: BattleConfig;
|
package/node/fh_core.d.ts
CHANGED
|
@@ -85,6 +85,65 @@ export class AirSquadron {
|
|
|
85
85
|
}
|
|
86
86
|
/**
|
|
87
87
|
*/
|
|
88
|
+
export class Comp {
|
|
89
|
+
free(): void;
|
|
90
|
+
/**
|
|
91
|
+
* @returns {boolean}
|
|
92
|
+
*/
|
|
93
|
+
is_combined(): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* @returns {boolean}
|
|
96
|
+
*/
|
|
97
|
+
is_enemy(): boolean;
|
|
98
|
+
/**
|
|
99
|
+
* @returns {bindings.CompMeta}
|
|
100
|
+
*/
|
|
101
|
+
meta(): bindings.CompMeta;
|
|
102
|
+
/**
|
|
103
|
+
* @param {bindings.FleetType} ft
|
|
104
|
+
* @returns {string | undefined}
|
|
105
|
+
*/
|
|
106
|
+
get_fleet_id(ft: bindings.FleetType): string | undefined;
|
|
107
|
+
/**
|
|
108
|
+
* @param {bindings.FleetType} ft
|
|
109
|
+
* @param {string} key
|
|
110
|
+
* @returns {Ship | undefined}
|
|
111
|
+
*/
|
|
112
|
+
get_ship_with_clone(ft: bindings.FleetType, key: string): Ship | undefined;
|
|
113
|
+
/**
|
|
114
|
+
* @param {bindings.FleetType} ft
|
|
115
|
+
* @param {string} key
|
|
116
|
+
* @returns {string | undefined}
|
|
117
|
+
*/
|
|
118
|
+
get_ship_entity_id(ft: bindings.FleetType, key: string): string | undefined;
|
|
119
|
+
/**
|
|
120
|
+
* @param {string} id
|
|
121
|
+
* @returns {Ship | undefined}
|
|
122
|
+
*/
|
|
123
|
+
get_ship_by_eid_with_clone(id: string): Ship | undefined;
|
|
124
|
+
/**
|
|
125
|
+
* @returns {Fleet | undefined}
|
|
126
|
+
*/
|
|
127
|
+
boss_sup?: Fleet;
|
|
128
|
+
/**
|
|
129
|
+
* @returns {Fleet | undefined}
|
|
130
|
+
*/
|
|
131
|
+
escort?: Fleet;
|
|
132
|
+
/**
|
|
133
|
+
* @returns {Fleet}
|
|
134
|
+
*/
|
|
135
|
+
main: Fleet;
|
|
136
|
+
/**
|
|
137
|
+
* @returns {bindings.OrgType}
|
|
138
|
+
*/
|
|
139
|
+
org_type: bindings.OrgType;
|
|
140
|
+
/**
|
|
141
|
+
* @returns {Fleet | undefined}
|
|
142
|
+
*/
|
|
143
|
+
route_sup?: Fleet;
|
|
144
|
+
}
|
|
145
|
+
/**
|
|
146
|
+
*/
|
|
88
147
|
export class FhCore {
|
|
89
148
|
free(): void;
|
|
90
149
|
/**
|
|
@@ -174,19 +233,23 @@ export class FhCore {
|
|
|
174
233
|
*/
|
|
175
234
|
analyze_fleet_cutin(org: Org, key: string, engagement: bindings.Engagement): bindings.FleetCutinAnalysis;
|
|
176
235
|
/**
|
|
177
|
-
* @param {
|
|
178
|
-
* @param {
|
|
236
|
+
* @param {Comp} player
|
|
237
|
+
* @param {Comp} enemy
|
|
179
238
|
* @param {bindings.ShellingSupportSimulatorParams} params
|
|
180
239
|
* @param {number} times
|
|
181
240
|
* @returns {bindings.SimulatorResult}
|
|
182
241
|
*/
|
|
183
|
-
simulate_shelling_support(player:
|
|
242
|
+
simulate_shelling_support(player: Comp, enemy: Comp, params: bindings.ShellingSupportSimulatorParams, times: number): bindings.SimulatorResult;
|
|
184
243
|
}
|
|
185
244
|
/**
|
|
186
245
|
*/
|
|
187
246
|
export class Fleet {
|
|
188
247
|
free(): void;
|
|
189
248
|
/**
|
|
249
|
+
* @returns {bindings.FleetMeta}
|
|
250
|
+
*/
|
|
251
|
+
meta(): bindings.FleetMeta;
|
|
252
|
+
/**
|
|
190
253
|
* @returns {(string)[]}
|
|
191
254
|
*/
|
|
192
255
|
ship_keys(): (string)[];
|
|
@@ -641,6 +704,11 @@ export class Org {
|
|
|
641
704
|
get_fleet_id_by_role(role: bindings.Role): string;
|
|
642
705
|
/**
|
|
643
706
|
* @param {string} key
|
|
707
|
+
* @returns {Comp}
|
|
708
|
+
*/
|
|
709
|
+
create_comp_by_key(key: string): Comp;
|
|
710
|
+
/**
|
|
711
|
+
* @param {string} key
|
|
644
712
|
* @returns {AirSquadron}
|
|
645
713
|
*/
|
|
646
714
|
get_air_squadron(key: string): AirSquadron;
|
|
@@ -718,6 +786,10 @@ export class Org {
|
|
|
718
786
|
*/
|
|
719
787
|
static default(): Org;
|
|
720
788
|
/**
|
|
789
|
+
* @returns {string}
|
|
790
|
+
*/
|
|
791
|
+
boss_sup: string;
|
|
792
|
+
/**
|
|
721
793
|
* @returns {number}
|
|
722
794
|
*/
|
|
723
795
|
readonly hq_level: number;
|
|
@@ -731,6 +803,10 @@ export class Org {
|
|
|
731
803
|
readonly org_type: bindings.OrgType;
|
|
732
804
|
/**
|
|
733
805
|
* @returns {string}
|
|
806
|
+
*/
|
|
807
|
+
route_sup: string;
|
|
808
|
+
/**
|
|
809
|
+
* @returns {string}
|
|
734
810
|
*/
|
|
735
811
|
readonly xxh3: string;
|
|
736
812
|
}
|
|
@@ -752,6 +828,10 @@ export class Ship {
|
|
|
752
828
|
*/
|
|
753
829
|
state(): bindings.ShipState;
|
|
754
830
|
/**
|
|
831
|
+
* @returns {bindings.ShipMeta}
|
|
832
|
+
*/
|
|
833
|
+
meta(): bindings.ShipMeta;
|
|
834
|
+
/**
|
|
755
835
|
* @returns {number}
|
|
756
836
|
*/
|
|
757
837
|
remodel_rank(): number;
|
package/node/fh_core.js
CHANGED
|
@@ -36,18 +36,6 @@ function addHeapObject(obj) {
|
|
|
36
36
|
|
|
37
37
|
function getObject(idx) { return heap[idx]; }
|
|
38
38
|
|
|
39
|
-
function dropObject(idx) {
|
|
40
|
-
if (idx < 36) return;
|
|
41
|
-
heap[idx] = heap_next;
|
|
42
|
-
heap_next = idx;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
function takeObject(idx) {
|
|
46
|
-
const ret = getObject(idx);
|
|
47
|
-
dropObject(idx);
|
|
48
|
-
return ret;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
39
|
let WASM_VECTOR_LEN = 0;
|
|
52
40
|
|
|
53
41
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -111,6 +99,18 @@ function getInt32Memory0() {
|
|
|
111
99
|
return cachegetInt32Memory0;
|
|
112
100
|
}
|
|
113
101
|
|
|
102
|
+
function dropObject(idx) {
|
|
103
|
+
if (idx < 36) return;
|
|
104
|
+
heap[idx] = heap_next;
|
|
105
|
+
heap_next = idx;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function takeObject(idx) {
|
|
109
|
+
const ret = getObject(idx);
|
|
110
|
+
dropObject(idx);
|
|
111
|
+
return ret;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
114
|
function debugString(val) {
|
|
115
115
|
// primitive types
|
|
116
116
|
const type = typeof val;
|
|
@@ -182,6 +182,10 @@ function _assertClass(instance, klass) {
|
|
|
182
182
|
}
|
|
183
183
|
return instance.ptr;
|
|
184
184
|
}
|
|
185
|
+
|
|
186
|
+
function isLikeNone(x) {
|
|
187
|
+
return x === undefined || x === null;
|
|
188
|
+
}
|
|
185
189
|
/**
|
|
186
190
|
* @param {Gear} gear
|
|
187
191
|
* @returns {boolean}
|
|
@@ -217,15 +221,6 @@ function getFloat64Memory0() {
|
|
|
217
221
|
}
|
|
218
222
|
return cachegetFloat64Memory0;
|
|
219
223
|
}
|
|
220
|
-
/**
|
|
221
|
-
*/
|
|
222
|
-
module.exports.set_panic_hook = function() {
|
|
223
|
-
wasm.set_panic_hook();
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
function isLikeNone(x) {
|
|
227
|
-
return x === undefined || x === null;
|
|
228
|
-
}
|
|
229
224
|
|
|
230
225
|
let cachegetUint16Memory0 = null;
|
|
231
226
|
function getUint16Memory0() {
|
|
@@ -238,6 +233,12 @@ function getUint16Memory0() {
|
|
|
238
233
|
function getArrayU16FromWasm0(ptr, len) {
|
|
239
234
|
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
240
235
|
}
|
|
236
|
+
/**
|
|
237
|
+
*/
|
|
238
|
+
module.exports.set_panic_hook = function() {
|
|
239
|
+
wasm.set_panic_hook();
|
|
240
|
+
};
|
|
241
|
+
|
|
241
242
|
/**
|
|
242
243
|
* @param {bindings.OrgType} org_type
|
|
243
244
|
* @returns {boolean}
|
|
@@ -414,6 +415,203 @@ class AirSquadron {
|
|
|
414
415
|
}
|
|
415
416
|
module.exports.AirSquadron = AirSquadron;
|
|
416
417
|
|
|
418
|
+
const CompFinalization = new FinalizationRegistry(ptr => wasm.__wbg_comp_free(ptr));
|
|
419
|
+
/**
|
|
420
|
+
*/
|
|
421
|
+
class Comp {
|
|
422
|
+
|
|
423
|
+
static __wrap(ptr) {
|
|
424
|
+
const obj = Object.create(Comp.prototype);
|
|
425
|
+
obj.ptr = ptr;
|
|
426
|
+
CompFinalization.register(obj, obj.ptr, obj);
|
|
427
|
+
return obj;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
__destroy_into_raw() {
|
|
431
|
+
const ptr = this.ptr;
|
|
432
|
+
this.ptr = 0;
|
|
433
|
+
CompFinalization.unregister(this);
|
|
434
|
+
return ptr;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
free() {
|
|
438
|
+
const ptr = this.__destroy_into_raw();
|
|
439
|
+
wasm.__wbg_comp_free(ptr);
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* @returns {bindings.OrgType}
|
|
443
|
+
*/
|
|
444
|
+
get org_type() {
|
|
445
|
+
var ret = wasm.__wbg_get_comp_org_type(this.ptr);
|
|
446
|
+
return takeObject(ret);
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* @param {bindings.OrgType} arg0
|
|
450
|
+
*/
|
|
451
|
+
set org_type(arg0) {
|
|
452
|
+
wasm.__wbg_set_comp_org_type(this.ptr, addHeapObject(arg0));
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* @returns {Fleet}
|
|
456
|
+
*/
|
|
457
|
+
get main() {
|
|
458
|
+
var ret = wasm.__wbg_get_comp_main(this.ptr);
|
|
459
|
+
return Fleet.__wrap(ret);
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
* @param {Fleet} arg0
|
|
463
|
+
*/
|
|
464
|
+
set main(arg0) {
|
|
465
|
+
_assertClass(arg0, Fleet);
|
|
466
|
+
var ptr0 = arg0.ptr;
|
|
467
|
+
arg0.ptr = 0;
|
|
468
|
+
wasm.__wbg_set_comp_main(this.ptr, ptr0);
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* @returns {Fleet | undefined}
|
|
472
|
+
*/
|
|
473
|
+
get escort() {
|
|
474
|
+
var ret = wasm.__wbg_get_comp_escort(this.ptr);
|
|
475
|
+
return ret === 0 ? undefined : Fleet.__wrap(ret);
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* @param {Fleet | undefined} arg0
|
|
479
|
+
*/
|
|
480
|
+
set escort(arg0) {
|
|
481
|
+
let ptr0 = 0;
|
|
482
|
+
if (!isLikeNone(arg0)) {
|
|
483
|
+
_assertClass(arg0, Fleet);
|
|
484
|
+
ptr0 = arg0.ptr;
|
|
485
|
+
arg0.ptr = 0;
|
|
486
|
+
}
|
|
487
|
+
wasm.__wbg_set_comp_escort(this.ptr, ptr0);
|
|
488
|
+
}
|
|
489
|
+
/**
|
|
490
|
+
* @returns {Fleet | undefined}
|
|
491
|
+
*/
|
|
492
|
+
get route_sup() {
|
|
493
|
+
var ret = wasm.__wbg_get_comp_route_sup(this.ptr);
|
|
494
|
+
return ret === 0 ? undefined : Fleet.__wrap(ret);
|
|
495
|
+
}
|
|
496
|
+
/**
|
|
497
|
+
* @param {Fleet | undefined} arg0
|
|
498
|
+
*/
|
|
499
|
+
set route_sup(arg0) {
|
|
500
|
+
let ptr0 = 0;
|
|
501
|
+
if (!isLikeNone(arg0)) {
|
|
502
|
+
_assertClass(arg0, Fleet);
|
|
503
|
+
ptr0 = arg0.ptr;
|
|
504
|
+
arg0.ptr = 0;
|
|
505
|
+
}
|
|
506
|
+
wasm.__wbg_set_comp_route_sup(this.ptr, ptr0);
|
|
507
|
+
}
|
|
508
|
+
/**
|
|
509
|
+
* @returns {Fleet | undefined}
|
|
510
|
+
*/
|
|
511
|
+
get boss_sup() {
|
|
512
|
+
var ret = wasm.__wbg_get_comp_boss_sup(this.ptr);
|
|
513
|
+
return ret === 0 ? undefined : Fleet.__wrap(ret);
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* @param {Fleet | undefined} arg0
|
|
517
|
+
*/
|
|
518
|
+
set boss_sup(arg0) {
|
|
519
|
+
let ptr0 = 0;
|
|
520
|
+
if (!isLikeNone(arg0)) {
|
|
521
|
+
_assertClass(arg0, Fleet);
|
|
522
|
+
ptr0 = arg0.ptr;
|
|
523
|
+
arg0.ptr = 0;
|
|
524
|
+
}
|
|
525
|
+
wasm.__wbg_set_comp_boss_sup(this.ptr, ptr0);
|
|
526
|
+
}
|
|
527
|
+
/**
|
|
528
|
+
* @returns {boolean}
|
|
529
|
+
*/
|
|
530
|
+
is_combined() {
|
|
531
|
+
var ret = wasm.comp_is_combined(this.ptr);
|
|
532
|
+
return ret !== 0;
|
|
533
|
+
}
|
|
534
|
+
/**
|
|
535
|
+
* @returns {boolean}
|
|
536
|
+
*/
|
|
537
|
+
is_enemy() {
|
|
538
|
+
var ret = wasm.comp_is_enemy(this.ptr);
|
|
539
|
+
return ret !== 0;
|
|
540
|
+
}
|
|
541
|
+
/**
|
|
542
|
+
* @returns {bindings.CompMeta}
|
|
543
|
+
*/
|
|
544
|
+
meta() {
|
|
545
|
+
var ret = wasm.comp_meta(this.ptr);
|
|
546
|
+
return takeObject(ret);
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* @param {bindings.FleetType} ft
|
|
550
|
+
* @returns {string | undefined}
|
|
551
|
+
*/
|
|
552
|
+
get_fleet_id(ft) {
|
|
553
|
+
try {
|
|
554
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
555
|
+
wasm.comp_get_fleet_id(retptr, this.ptr, addHeapObject(ft));
|
|
556
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
557
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
558
|
+
let v0;
|
|
559
|
+
if (r0 !== 0) {
|
|
560
|
+
v0 = getStringFromWasm0(r0, r1).slice();
|
|
561
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
562
|
+
}
|
|
563
|
+
return v0;
|
|
564
|
+
} finally {
|
|
565
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
/**
|
|
569
|
+
* @param {bindings.FleetType} ft
|
|
570
|
+
* @param {string} key
|
|
571
|
+
* @returns {Ship | undefined}
|
|
572
|
+
*/
|
|
573
|
+
get_ship_with_clone(ft, key) {
|
|
574
|
+
var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
575
|
+
var len0 = WASM_VECTOR_LEN;
|
|
576
|
+
var ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), ptr0, len0);
|
|
577
|
+
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
578
|
+
}
|
|
579
|
+
/**
|
|
580
|
+
* @param {bindings.FleetType} ft
|
|
581
|
+
* @param {string} key
|
|
582
|
+
* @returns {string | undefined}
|
|
583
|
+
*/
|
|
584
|
+
get_ship_entity_id(ft, key) {
|
|
585
|
+
try {
|
|
586
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
587
|
+
var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
588
|
+
var len0 = WASM_VECTOR_LEN;
|
|
589
|
+
wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), ptr0, len0);
|
|
590
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
591
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
592
|
+
let v1;
|
|
593
|
+
if (r0 !== 0) {
|
|
594
|
+
v1 = getStringFromWasm0(r0, r1).slice();
|
|
595
|
+
wasm.__wbindgen_free(r0, r1 * 1);
|
|
596
|
+
}
|
|
597
|
+
return v1;
|
|
598
|
+
} finally {
|
|
599
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
/**
|
|
603
|
+
* @param {string} id
|
|
604
|
+
* @returns {Ship | undefined}
|
|
605
|
+
*/
|
|
606
|
+
get_ship_by_eid_with_clone(id) {
|
|
607
|
+
var ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
608
|
+
var len0 = WASM_VECTOR_LEN;
|
|
609
|
+
var ret = wasm.comp_get_ship_by_eid_with_clone(this.ptr, ptr0, len0);
|
|
610
|
+
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
611
|
+
}
|
|
612
|
+
}
|
|
613
|
+
module.exports.Comp = Comp;
|
|
614
|
+
|
|
417
615
|
const FhCoreFinalization = new FinalizationRegistry(ptr => wasm.__wbg_fhcore_free(ptr));
|
|
418
616
|
/**
|
|
419
617
|
*/
|
|
@@ -595,15 +793,15 @@ class FhCore {
|
|
|
595
793
|
return takeObject(ret);
|
|
596
794
|
}
|
|
597
795
|
/**
|
|
598
|
-
* @param {
|
|
599
|
-
* @param {
|
|
796
|
+
* @param {Comp} player
|
|
797
|
+
* @param {Comp} enemy
|
|
600
798
|
* @param {bindings.ShellingSupportSimulatorParams} params
|
|
601
799
|
* @param {number} times
|
|
602
800
|
* @returns {bindings.SimulatorResult}
|
|
603
801
|
*/
|
|
604
802
|
simulate_shelling_support(player, enemy, params, times) {
|
|
605
|
-
_assertClass(player,
|
|
606
|
-
_assertClass(enemy,
|
|
803
|
+
_assertClass(player, Comp);
|
|
804
|
+
_assertClass(enemy, Comp);
|
|
607
805
|
var ret = wasm.fhcore_simulate_shelling_support(this.ptr, player.ptr, enemy.ptr, addHeapObject(params), times);
|
|
608
806
|
return takeObject(ret);
|
|
609
807
|
}
|
|
@@ -679,6 +877,13 @@ class Fleet {
|
|
|
679
877
|
}
|
|
680
878
|
}
|
|
681
879
|
/**
|
|
880
|
+
* @returns {bindings.FleetMeta}
|
|
881
|
+
*/
|
|
882
|
+
meta() {
|
|
883
|
+
var ret = wasm.fleet_meta(this.ptr);
|
|
884
|
+
return takeObject(ret);
|
|
885
|
+
}
|
|
886
|
+
/**
|
|
682
887
|
* @returns {(string)[]}
|
|
683
888
|
*/
|
|
684
889
|
ship_keys() {
|
|
@@ -1630,6 +1835,52 @@ class Org {
|
|
|
1630
1835
|
/**
|
|
1631
1836
|
* @returns {string}
|
|
1632
1837
|
*/
|
|
1838
|
+
get route_sup() {
|
|
1839
|
+
try {
|
|
1840
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1841
|
+
wasm.__wbg_get_org_route_sup(retptr, this.ptr);
|
|
1842
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1843
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1844
|
+
return getStringFromWasm0(r0, r1);
|
|
1845
|
+
} finally {
|
|
1846
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1847
|
+
wasm.__wbindgen_free(r0, r1);
|
|
1848
|
+
}
|
|
1849
|
+
}
|
|
1850
|
+
/**
|
|
1851
|
+
* @param {string} arg0
|
|
1852
|
+
*/
|
|
1853
|
+
set route_sup(arg0) {
|
|
1854
|
+
var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1855
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1856
|
+
wasm.__wbg_set_org_route_sup(this.ptr, ptr0, len0);
|
|
1857
|
+
}
|
|
1858
|
+
/**
|
|
1859
|
+
* @returns {string}
|
|
1860
|
+
*/
|
|
1861
|
+
get boss_sup() {
|
|
1862
|
+
try {
|
|
1863
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1864
|
+
wasm.__wbg_get_org_boss_sup(retptr, this.ptr);
|
|
1865
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1866
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1867
|
+
return getStringFromWasm0(r0, r1);
|
|
1868
|
+
} finally {
|
|
1869
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1870
|
+
wasm.__wbindgen_free(r0, r1);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
/**
|
|
1874
|
+
* @param {string} arg0
|
|
1875
|
+
*/
|
|
1876
|
+
set boss_sup(arg0) {
|
|
1877
|
+
var ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
1878
|
+
var len0 = WASM_VECTOR_LEN;
|
|
1879
|
+
wasm.__wbg_set_org_boss_sup(this.ptr, ptr0, len0);
|
|
1880
|
+
}
|
|
1881
|
+
/**
|
|
1882
|
+
* @returns {string}
|
|
1883
|
+
*/
|
|
1633
1884
|
get xxh3() {
|
|
1634
1885
|
try {
|
|
1635
1886
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
@@ -1822,6 +2073,16 @@ class Org {
|
|
|
1822
2073
|
}
|
|
1823
2074
|
/**
|
|
1824
2075
|
* @param {string} key
|
|
2076
|
+
* @returns {Comp}
|
|
2077
|
+
*/
|
|
2078
|
+
create_comp_by_key(key) {
|
|
2079
|
+
var ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2080
|
+
var len0 = WASM_VECTOR_LEN;
|
|
2081
|
+
var ret = wasm.org_create_comp_by_key(this.ptr, ptr0, len0);
|
|
2082
|
+
return Comp.__wrap(ret);
|
|
2083
|
+
}
|
|
2084
|
+
/**
|
|
2085
|
+
* @param {string} key
|
|
1825
2086
|
* @returns {AirSquadron}
|
|
1826
2087
|
*/
|
|
1827
2088
|
get_air_squadron(key) {
|
|
@@ -2226,6 +2487,13 @@ class Ship {
|
|
|
2226
2487
|
return takeObject(ret);
|
|
2227
2488
|
}
|
|
2228
2489
|
/**
|
|
2490
|
+
* @returns {bindings.ShipMeta}
|
|
2491
|
+
*/
|
|
2492
|
+
meta() {
|
|
2493
|
+
var ret = wasm.ship_meta(this.ptr);
|
|
2494
|
+
return takeObject(ret);
|
|
2495
|
+
}
|
|
2496
|
+
/**
|
|
2229
2497
|
* @returns {string}
|
|
2230
2498
|
*/
|
|
2231
2499
|
get name() {
|
|
@@ -2722,15 +2990,11 @@ class Ship {
|
|
|
2722
2990
|
}
|
|
2723
2991
|
module.exports.Ship = Ship;
|
|
2724
2992
|
|
|
2725
|
-
module.exports.
|
|
2726
|
-
var ret = getStringFromWasm0(arg0, arg1);
|
|
2993
|
+
module.exports.__wbindgen_json_parse = function(arg0, arg1) {
|
|
2994
|
+
var ret = JSON.parse(getStringFromWasm0(arg0, arg1));
|
|
2727
2995
|
return addHeapObject(ret);
|
|
2728
2996
|
};
|
|
2729
2997
|
|
|
2730
|
-
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2731
|
-
takeObject(arg0);
|
|
2732
|
-
};
|
|
2733
|
-
|
|
2734
2998
|
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
2735
2999
|
const obj = getObject(arg1);
|
|
2736
3000
|
var ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -2740,8 +3004,12 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
2740
3004
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
2741
3005
|
};
|
|
2742
3006
|
|
|
2743
|
-
module.exports.
|
|
2744
|
-
|
|
3007
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
3008
|
+
takeObject(arg0);
|
|
3009
|
+
};
|
|
3010
|
+
|
|
3011
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
3012
|
+
var ret = getStringFromWasm0(arg0, arg1);
|
|
2745
3013
|
return addHeapObject(ret);
|
|
2746
3014
|
};
|
|
2747
3015
|
|
|
@@ -2770,14 +3038,14 @@ module.exports.__wbg_error_009e67eab9c16665 = function(arg0) {
|
|
|
2770
3038
|
console.error(getObject(arg0));
|
|
2771
3039
|
};
|
|
2772
3040
|
|
|
2773
|
-
module.exports.__wbg_randomFillSync_64cc7d048f228ca8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
2774
|
-
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
2775
|
-
}, arguments) };
|
|
2776
|
-
|
|
2777
3041
|
module.exports.__wbg_getRandomValues_98117e9a7e993920 = function() { return handleError(function (arg0, arg1) {
|
|
2778
3042
|
getObject(arg0).getRandomValues(getObject(arg1));
|
|
2779
3043
|
}, arguments) };
|
|
2780
3044
|
|
|
3045
|
+
module.exports.__wbg_randomFillSync_64cc7d048f228ca8 = function() { return handleError(function (arg0, arg1, arg2) {
|
|
3046
|
+
getObject(arg0).randomFillSync(getArrayU8FromWasm0(arg1, arg2));
|
|
3047
|
+
}, arguments) };
|
|
3048
|
+
|
|
2781
3049
|
module.exports.__wbg_process_2f24d6544ea7b200 = function(arg0) {
|
|
2782
3050
|
var ret = getObject(arg0).process;
|
|
2783
3051
|
return addHeapObject(ret);
|
package/node/fh_core_bg.wasm
CHANGED
|
Binary file
|