fleethub-core 0.5.0 → 0.5.1
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 +3 -0
- package/node/fh_core.d.ts +68 -83
- package/node/fh_core.js +184 -198
- package/node/fh_core_bg.wasm +0 -0
- package/node/fh_core_bg.wasm.d.ts +120 -119
- package/package.json +1 -1
- package/pkg/fh_core.d.ts +68 -83
- package/pkg/fh_core_bg.js +183 -198
- package/pkg/fh_core_bg.wasm +0 -0
- package/pkg/fh_core_bg.wasm.d.ts +120 -119
package/bindings.d.ts
CHANGED
|
@@ -305,6 +305,8 @@ export type AirState =
|
|
|
305
305
|
| "AirDenial"
|
|
306
306
|
| "AirIncapability";
|
|
307
307
|
|
|
308
|
+
export type AirStateRank = "Rank0" | "Rank1" | "Rank2" | "Rank3";
|
|
309
|
+
|
|
308
310
|
export type Engagement = "GreenT" | "Parallel" | "HeadOn" | "RedT";
|
|
309
311
|
|
|
310
312
|
export type Formation = SingleFormation | CombinedFormation;
|
|
@@ -490,6 +492,7 @@ export interface OrgState {
|
|
|
490
492
|
a3?: AirSquadronState;
|
|
491
493
|
hq_level?: number;
|
|
492
494
|
org_type?: OrgType;
|
|
495
|
+
sortie?: string;
|
|
493
496
|
route_sup?: string;
|
|
494
497
|
boss_sup?: string;
|
|
495
498
|
}
|
package/node/fh_core.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
3
|
/**
|
|
4
|
+
*/
|
|
5
|
+
export function set_panic_hook(): void;
|
|
6
|
+
/**
|
|
4
7
|
* @param {Gear} gear
|
|
5
8
|
* @returns {boolean}
|
|
6
9
|
*/
|
|
7
10
|
export function air_squadron_can_equip(gear: Gear): boolean;
|
|
8
11
|
/**
|
|
9
|
-
*/
|
|
10
|
-
export function set_panic_hook(): void;
|
|
11
|
-
/**
|
|
12
12
|
* @param {bindings.OrgType} org_type
|
|
13
13
|
* @returns {boolean}
|
|
14
14
|
*/
|
|
@@ -83,9 +83,57 @@ export class AirSquadron {
|
|
|
83
83
|
}
|
|
84
84
|
/**
|
|
85
85
|
*/
|
|
86
|
+
export class Analyzer {
|
|
87
|
+
free(): void;
|
|
88
|
+
/**
|
|
89
|
+
* @param {Comp} comp
|
|
90
|
+
* @param {bindings.Formation} formation
|
|
91
|
+
* @param {number | undefined} adjusted_anti_air_resist
|
|
92
|
+
* @param {number | undefined} fleet_anti_air_resist
|
|
93
|
+
* @param {number | undefined} aaci
|
|
94
|
+
* @returns {bindings.CompAntiAirInfo}
|
|
95
|
+
*/
|
|
96
|
+
analyze_anti_air(comp: Comp, formation: bindings.Formation, adjusted_anti_air_resist?: number, fleet_anti_air_resist?: number, aaci?: number): bindings.CompAntiAirInfo;
|
|
97
|
+
/**
|
|
98
|
+
* @param {Comp} comp
|
|
99
|
+
* @returns {bindings.CompDayCutinRateInfo}
|
|
100
|
+
*/
|
|
101
|
+
analyze_day_cutin(comp: Comp): bindings.CompDayCutinRateInfo;
|
|
102
|
+
/**
|
|
103
|
+
* @param {Comp} comp
|
|
104
|
+
* @param {bindings.NightSituation} attacker_situation
|
|
105
|
+
* @param {bindings.NightSituation} target_situation
|
|
106
|
+
* @returns {bindings.FleetNightCutinRateInfo}
|
|
107
|
+
*/
|
|
108
|
+
analyze_night_cutin(comp: Comp, attacker_situation: bindings.NightSituation, target_situation: bindings.NightSituation): bindings.FleetNightCutinRateInfo;
|
|
109
|
+
/**
|
|
110
|
+
* @param {Comp} comp
|
|
111
|
+
* @returns {bindings.CompContactChanceInfo}
|
|
112
|
+
*/
|
|
113
|
+
analyze_contact_chance(comp: Comp): bindings.CompContactChanceInfo;
|
|
114
|
+
/**
|
|
115
|
+
* @param {bindings.WarfareAnalyzerContext} params
|
|
116
|
+
* @param {Ship} attacker
|
|
117
|
+
* @param {Ship} target
|
|
118
|
+
* @returns {bindings.WarfareInfo}
|
|
119
|
+
*/
|
|
120
|
+
analyze_warfare(params: bindings.WarfareAnalyzerContext, attacker: Ship, target: Ship): bindings.WarfareInfo;
|
|
121
|
+
/**
|
|
122
|
+
* @param {Comp} comp
|
|
123
|
+
* @param {bindings.Engagement} engagement
|
|
124
|
+
* @returns {bindings.FleetCutinAnalysis}
|
|
125
|
+
*/
|
|
126
|
+
analyze_fleet_cutin(comp: Comp, engagement: bindings.Engagement): bindings.FleetCutinAnalysis;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
*/
|
|
86
130
|
export class Comp {
|
|
87
131
|
free(): void;
|
|
88
132
|
/**
|
|
133
|
+
* @returns {bindings.Side}
|
|
134
|
+
*/
|
|
135
|
+
side(): bindings.Side;
|
|
136
|
+
/**
|
|
89
137
|
* @returns {boolean}
|
|
90
138
|
*/
|
|
91
139
|
is_combined(): boolean;
|
|
@@ -138,11 +186,10 @@ export class Comp {
|
|
|
138
186
|
fighter_power(anti_combined: boolean, anti_lbas: boolean): number | undefined;
|
|
139
187
|
/**
|
|
140
188
|
* マップ索敵
|
|
141
|
-
* @param {number} hq_level
|
|
142
189
|
* @param {number} node_divaricated_factor
|
|
143
190
|
* @returns {number | undefined}
|
|
144
191
|
*/
|
|
145
|
-
elos(
|
|
192
|
+
elos(node_divaricated_factor: number): number | undefined;
|
|
146
193
|
/**
|
|
147
194
|
* 輸送物資量(TP)
|
|
148
195
|
* @returns {number}
|
|
@@ -155,6 +202,9 @@ export class Comp {
|
|
|
155
202
|
*/
|
|
156
203
|
escort?: Fleet;
|
|
157
204
|
/**
|
|
205
|
+
*/
|
|
206
|
+
hq_level: number;
|
|
207
|
+
/**
|
|
158
208
|
*/
|
|
159
209
|
main: Fleet;
|
|
160
210
|
/**
|
|
@@ -206,50 +256,17 @@ export class FhCore {
|
|
|
206
256
|
/**
|
|
207
257
|
* @param {Uint16Array} main
|
|
208
258
|
* @param {Uint16Array | undefined} escort
|
|
259
|
+
* @returns {Comp}
|
|
209
260
|
*/
|
|
210
|
-
create_comp_by_map_enemy(main: Uint16Array, escort?: Uint16Array):
|
|
261
|
+
create_comp_by_map_enemy(main: Uint16Array, escort?: Uint16Array): Comp;
|
|
211
262
|
/**
|
|
212
263
|
* @returns {Ship}
|
|
213
264
|
*/
|
|
214
265
|
create_default_ship(): Ship;
|
|
215
266
|
/**
|
|
216
|
-
* @
|
|
217
|
-
* @param {bindings.Formation} formation
|
|
218
|
-
* @param {number | undefined} adjusted_anti_air_resist
|
|
219
|
-
* @param {number | undefined} fleet_anti_air_resist
|
|
220
|
-
* @returns {bindings.CompAntiAirInfo}
|
|
221
|
-
*/
|
|
222
|
-
analyze_anti_air(comp: Comp, formation: bindings.Formation, adjusted_anti_air_resist?: number, fleet_anti_air_resist?: number): bindings.CompAntiAirInfo;
|
|
223
|
-
/**
|
|
224
|
-
* @param {Comp} comp
|
|
225
|
-
* @returns {bindings.CompDayCutinRateInfo}
|
|
226
|
-
*/
|
|
227
|
-
analyze_day_cutin(comp: Comp): bindings.CompDayCutinRateInfo;
|
|
228
|
-
/**
|
|
229
|
-
* @param {Comp} comp
|
|
230
|
-
* @param {bindings.NightSituation} attacker_situation
|
|
231
|
-
* @param {bindings.NightSituation} target_situation
|
|
232
|
-
* @returns {bindings.FleetNightCutinRateInfo}
|
|
267
|
+
* @returns {Analyzer}
|
|
233
268
|
*/
|
|
234
|
-
|
|
235
|
-
/**
|
|
236
|
-
* @param {Comp} comp
|
|
237
|
-
* @returns {bindings.CompContactChanceInfo}
|
|
238
|
-
*/
|
|
239
|
-
analyze_contact_chance(comp: Comp): bindings.CompContactChanceInfo;
|
|
240
|
-
/**
|
|
241
|
-
* @param {bindings.WarfareAnalyzerContext} params
|
|
242
|
-
* @param {Ship} attacker
|
|
243
|
-
* @param {Ship} target
|
|
244
|
-
* @returns {bindings.WarfareInfo}
|
|
245
|
-
*/
|
|
246
|
-
analyze_warfare(params: bindings.WarfareAnalyzerContext, attacker: Ship, target: Ship): bindings.WarfareInfo;
|
|
247
|
-
/**
|
|
248
|
-
* @param {Comp} comp
|
|
249
|
-
* @param {bindings.Engagement} engagement
|
|
250
|
-
* @returns {bindings.FleetCutinAnalysis}
|
|
251
|
-
*/
|
|
252
|
-
analyze_fleet_cutin(comp: Comp, engagement: bindings.Engagement): bindings.FleetCutinAnalysis;
|
|
269
|
+
create_analyzer(): Analyzer;
|
|
253
270
|
/**
|
|
254
271
|
* @param {Comp} player
|
|
255
272
|
* @param {Comp} enemy
|
|
@@ -418,10 +435,10 @@ export class Gear {
|
|
|
418
435
|
*/
|
|
419
436
|
is_contact_selection_plane(): boolean;
|
|
420
437
|
/**
|
|
421
|
-
* @param {
|
|
438
|
+
* @param {bindings.AirStateRank} rank
|
|
422
439
|
* @returns {number}
|
|
423
440
|
*/
|
|
424
|
-
contact_selection_rate(
|
|
441
|
+
contact_selection_rate(rank: bindings.AirStateRank): number;
|
|
425
442
|
/**
|
|
426
443
|
* @param {number} level
|
|
427
444
|
* @returns {number}
|
|
@@ -635,16 +652,6 @@ export class Org {
|
|
|
635
652
|
air_squadron_ids(): (string)[];
|
|
636
653
|
/**
|
|
637
654
|
* @param {bindings.Role} role
|
|
638
|
-
* @returns {(string)[]}
|
|
639
|
-
*/
|
|
640
|
-
ship_keys(role: bindings.Role): (string)[];
|
|
641
|
-
/**
|
|
642
|
-
* @param {bindings.Role} role
|
|
643
|
-
* @returns {(string)[] | undefined}
|
|
644
|
-
*/
|
|
645
|
-
sortie_ship_keys(role: bindings.Role): (string)[] | undefined;
|
|
646
|
-
/**
|
|
647
|
-
* @param {bindings.Role} role
|
|
648
655
|
* @returns {number | undefined}
|
|
649
656
|
*/
|
|
650
657
|
fleet_los_mod(role: bindings.Role): number | undefined;
|
|
@@ -678,6 +685,10 @@ export class Org {
|
|
|
678
685
|
*/
|
|
679
686
|
get_fleet_id_by_role(role: bindings.Role): string;
|
|
680
687
|
/**
|
|
688
|
+
* @returns {Comp}
|
|
689
|
+
*/
|
|
690
|
+
create_comp(): Comp;
|
|
691
|
+
/**
|
|
681
692
|
* @param {string} key
|
|
682
693
|
* @returns {Comp}
|
|
683
694
|
*/
|
|
@@ -712,29 +723,6 @@ export class Org {
|
|
|
712
723
|
*/
|
|
713
724
|
is_combined(): boolean;
|
|
714
725
|
/**
|
|
715
|
-
* @returns {bindings.Formation}
|
|
716
|
-
*/
|
|
717
|
-
default_formation(): bindings.Formation;
|
|
718
|
-
/**
|
|
719
|
-
* 艦隊対空値
|
|
720
|
-
* @param {number} formation_mod
|
|
721
|
-
* @returns {number}
|
|
722
|
-
*/
|
|
723
|
-
fleet_anti_air(formation_mod: number): number;
|
|
724
|
-
/**
|
|
725
|
-
* 制空値
|
|
726
|
-
* @param {boolean} anti_combined
|
|
727
|
-
* @param {boolean} anti_lbas
|
|
728
|
-
* @returns {number | undefined}
|
|
729
|
-
*/
|
|
730
|
-
fighter_power(anti_combined: boolean, anti_lbas: boolean): number | undefined;
|
|
731
|
-
/**
|
|
732
|
-
* マップ索敵
|
|
733
|
-
* @param {number} node_divaricated_factor
|
|
734
|
-
* @returns {number | undefined}
|
|
735
|
-
*/
|
|
736
|
-
elos(node_divaricated_factor: number): number | undefined;
|
|
737
|
-
/**
|
|
738
726
|
* 防空時の基地制空値
|
|
739
727
|
* @returns {number}
|
|
740
728
|
*/
|
|
@@ -745,12 +733,6 @@ export class Org {
|
|
|
745
733
|
*/
|
|
746
734
|
high_altitude_interception_power(): number;
|
|
747
735
|
/**
|
|
748
|
-
* 輸送物資量(TP)
|
|
749
|
-
* @param {string} key
|
|
750
|
-
* @returns {number}
|
|
751
|
-
*/
|
|
752
|
-
transport_point(key: string): number;
|
|
753
|
-
/**
|
|
754
736
|
* @param {Ship} ship
|
|
755
737
|
* @param {bindings.Formation} formation
|
|
756
738
|
* @returns {bindings.WarfareShipEnvironment}
|
|
@@ -776,6 +758,9 @@ export class Org {
|
|
|
776
758
|
*/
|
|
777
759
|
route_sup?: string;
|
|
778
760
|
/**
|
|
761
|
+
*/
|
|
762
|
+
sortie: string;
|
|
763
|
+
/**
|
|
779
764
|
* @returns {string}
|
|
780
765
|
*/
|
|
781
766
|
readonly xxh3: string;
|