fleethub-core 1.12.1 → 1.12.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/node/fleethub_core.d.ts +149 -149
- package/node/fleethub_core.js +9 -10
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +2 -2
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +0 -2156
- package/pkg/fleethub_core.js +0 -5
- package/pkg/fleethub_core_bg.js +0 -3150
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +0 -285
package/node/fleethub_core.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/* tslint:disable */
|
|
2
2
|
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
*/
|
|
5
|
+
export function set_panic_hook(): void;
|
|
3
6
|
/**
|
|
4
7
|
* @param {ShipConditions} value
|
|
5
8
|
* @returns {ShipConditions}
|
|
6
9
|
*/
|
|
7
10
|
export function parse_ship_conditions(value: ShipConditions): ShipConditions;
|
|
8
|
-
/**
|
|
9
|
-
*/
|
|
10
|
-
export function set_panic_hook(): void;
|
|
11
11
|
export interface MasterShip {
|
|
12
12
|
ship_id: number;
|
|
13
13
|
name: string;
|
|
@@ -277,26 +277,6 @@ export type GearCategory =
|
|
|
277
277
|
| "LandBased"
|
|
278
278
|
| "Misc";
|
|
279
279
|
|
|
280
|
-
export type NodeId = string;
|
|
281
|
-
|
|
282
|
-
export interface NodeState {
|
|
283
|
-
map?: number;
|
|
284
|
-
node?: NodeId;
|
|
285
|
-
phase?: number;
|
|
286
|
-
debuff?: boolean;
|
|
287
|
-
disable_historical_mod?: boolean;
|
|
288
|
-
landing_battle?: boolean;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export type GearTypeIdArray = [number, number, number, number, number];
|
|
292
|
-
|
|
293
|
-
export interface SupportShellingSimulatorParams {
|
|
294
|
-
attacker_formation?: Formation;
|
|
295
|
-
target_formation?: Formation;
|
|
296
|
-
engagement: Engagement;
|
|
297
|
-
node_state: NodeState;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
280
|
export type ContactRank = "Rank1" | "Rank2" | "Rank3";
|
|
301
281
|
|
|
302
282
|
export type DayCutin =
|
|
@@ -344,20 +324,19 @@ export type DayCutinLike = DayCutin | FleetCutin;
|
|
|
344
324
|
|
|
345
325
|
export type NightCutinLike = NightCutin | FleetCutin;
|
|
346
326
|
|
|
347
|
-
export interface FleetState {
|
|
348
|
-
id?: string;
|
|
349
|
-
len?: number;
|
|
350
|
-
s1?: ShipState;
|
|
351
|
-
s2?: ShipState;
|
|
352
|
-
s3?: ShipState;
|
|
353
|
-
s4?: ShipState;
|
|
354
|
-
s5?: ShipState;
|
|
355
|
-
s6?: ShipState;
|
|
356
|
-
s7?: ShipState;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
327
|
export type MoraleState = "Sparkle" | "Normal" | "Orange" | "Red";
|
|
360
328
|
|
|
329
|
+
export type NodeId = string;
|
|
330
|
+
|
|
331
|
+
export interface NodeState {
|
|
332
|
+
map?: number;
|
|
333
|
+
node?: NodeId;
|
|
334
|
+
phase?: number;
|
|
335
|
+
debuff?: boolean;
|
|
336
|
+
disable_historical_mod?: boolean;
|
|
337
|
+
landing_battle?: boolean;
|
|
338
|
+
}
|
|
339
|
+
|
|
361
340
|
export type Role = "Main" | "Escort";
|
|
362
341
|
|
|
363
342
|
export type SpecialEnemyType =
|
|
@@ -376,6 +355,27 @@ export type SpecialEnemyType =
|
|
|
376
355
|
| "DockPrincess"
|
|
377
356
|
| "SummerAircraftCarrierDemon";
|
|
378
357
|
|
|
358
|
+
export type GearTypeIdArray = [number, number, number, number, number];
|
|
359
|
+
|
|
360
|
+
export interface SupportShellingSimulatorParams {
|
|
361
|
+
attacker_formation?: Formation;
|
|
362
|
+
target_formation?: Formation;
|
|
363
|
+
engagement: Engagement;
|
|
364
|
+
node_state: NodeState;
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
export interface FleetState {
|
|
368
|
+
id?: string;
|
|
369
|
+
len?: number;
|
|
370
|
+
s1?: ShipState;
|
|
371
|
+
s2?: ShipState;
|
|
372
|
+
s3?: ShipState;
|
|
373
|
+
s4?: ShipState;
|
|
374
|
+
s5?: ShipState;
|
|
375
|
+
s6?: ShipState;
|
|
376
|
+
s7?: ShipState;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
379
|
export interface SimulatorResult {
|
|
380
380
|
items: SimulatorResultItem[];
|
|
381
381
|
sunk_vec: [number, number, number][];
|
|
@@ -467,111 +467,6 @@ export interface CompMeta {
|
|
|
467
467
|
fleets: Record<FleetType, FleetMeta>;
|
|
468
468
|
}
|
|
469
469
|
|
|
470
|
-
export interface MasterData extends MasterBattleDefinitions {
|
|
471
|
-
created_at: number;
|
|
472
|
-
gears: MasterGear[];
|
|
473
|
-
gear_attrs: MasterAttrRule<GearAttr>[];
|
|
474
|
-
ships: MasterShip[];
|
|
475
|
-
ship_attrs: MasterAttrRule<ShipAttr>[];
|
|
476
|
-
ibonuses: MasterIBonuses;
|
|
477
|
-
equippability: MasterEquippability;
|
|
478
|
-
}
|
|
479
|
-
|
|
480
|
-
export interface NationalityDef {
|
|
481
|
-
id: number;
|
|
482
|
-
ctypes: number[];
|
|
483
|
-
}
|
|
484
|
-
|
|
485
|
-
export interface MasterAttrRule<T> {
|
|
486
|
-
tag: T;
|
|
487
|
-
name: string;
|
|
488
|
-
expr: CompiledEvaler;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
export interface BattleConditions {
|
|
492
|
-
org_type: OrgType;
|
|
493
|
-
role: Role;
|
|
494
|
-
ship_index: number;
|
|
495
|
-
fleet_len: number;
|
|
496
|
-
formation: Formation;
|
|
497
|
-
fleet_los_mod: number | null;
|
|
498
|
-
night_conditions: NightFleetConditions;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
export interface NightConditions {
|
|
502
|
-
player?: NightFleetConditions;
|
|
503
|
-
enemy?: NightFleetConditions;
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
export interface NightFleetConditions {
|
|
507
|
-
night_contact_rank?: ContactRank | null;
|
|
508
|
-
starshell_index?: number | null;
|
|
509
|
-
searchlight_index?: number | null;
|
|
510
|
-
activates_large_searchlight?: boolean;
|
|
511
|
-
}
|
|
512
|
-
|
|
513
|
-
export type GearAttr =
|
|
514
|
-
| "Unknown"
|
|
515
|
-
| "HighAngleMount"
|
|
516
|
-
| "NightFighter"
|
|
517
|
-
| "NightAttacker"
|
|
518
|
-
| "HeavyBomber"
|
|
519
|
-
| "NightRecon"
|
|
520
|
-
| "MainGun"
|
|
521
|
-
| "Radar"
|
|
522
|
-
| "SurfaceRadar"
|
|
523
|
-
| "AirRadar"
|
|
524
|
-
| "DepthChargeProjector"
|
|
525
|
-
| "SynergisticDepthCharge"
|
|
526
|
-
| "AntiSubMortar"
|
|
527
|
-
| "AntiSubWeapon"
|
|
528
|
-
| "ApDepthCharge"
|
|
529
|
-
| "AntiSubAircraft"
|
|
530
|
-
| "LateModelBowTorpedo"
|
|
531
|
-
| "Seaplane"
|
|
532
|
-
| "CbAircraft"
|
|
533
|
-
| "LbAircraft"
|
|
534
|
-
| "JetAircraft"
|
|
535
|
-
| "Fighter"
|
|
536
|
-
| "Recon"
|
|
537
|
-
| "ObservationSeaplane"
|
|
538
|
-
| "CbFighterBomber"
|
|
539
|
-
| "AntiInstDiveBomber"
|
|
540
|
-
| "CbSwordfish"
|
|
541
|
-
| "SemiNightPlane"
|
|
542
|
-
| "HighAltitudeInterceptor";
|
|
543
|
-
|
|
544
|
-
export type ShipAttr =
|
|
545
|
-
| "Unknown"
|
|
546
|
-
| "NightCarrier"
|
|
547
|
-
| "Installation"
|
|
548
|
-
| "RoyalNavy"
|
|
549
|
-
| "Kai2"
|
|
550
|
-
| "TurbineSpeedBonus"
|
|
551
|
-
| "NewModelBoilerSpeedBonus"
|
|
552
|
-
| "Pillbox"
|
|
553
|
-
| "IsolatedIsland"
|
|
554
|
-
| "HarbourSummerPrincess"
|
|
555
|
-
| "SupplyDepot"
|
|
556
|
-
| "NewSupplyDepot"
|
|
557
|
-
| "PtImp"
|
|
558
|
-
| "BattleshipSummerPrincess"
|
|
559
|
-
| "HeavyCruiserSummerPrincess"
|
|
560
|
-
| "AnchorageWaterDemonVacationMode"
|
|
561
|
-
| "FrenchBattleshipPrincess"
|
|
562
|
-
| "DockPrincess"
|
|
563
|
-
| "SummerAircraftCarrierDemon";
|
|
564
|
-
|
|
565
|
-
export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
|
|
566
|
-
|
|
567
|
-
export interface MasterBattleDefinitions {
|
|
568
|
-
formation: NestedFormationDef[];
|
|
569
|
-
anti_air_cutin: AntiAirCutinDef[];
|
|
570
|
-
day_cutin: DayCutinDef[];
|
|
571
|
-
night_cutin: NightCutinDef[];
|
|
572
|
-
historical_bonuses?: HistoricalBonusDef[];
|
|
573
|
-
}
|
|
574
|
-
|
|
575
470
|
export interface MoveShipPayload {
|
|
576
471
|
current: [string, string, ShipKey];
|
|
577
472
|
target: [string | null, string, ShipKey];
|
|
@@ -617,8 +512,6 @@ export interface EBonuses {
|
|
|
617
512
|
range: number;
|
|
618
513
|
}
|
|
619
514
|
|
|
620
|
-
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
621
|
-
|
|
622
515
|
export interface MasterIBonuses {
|
|
623
516
|
shelling_power: MasterIBonusRule[];
|
|
624
517
|
shelling_accuracy: MasterIBonusRule[];
|
|
@@ -670,13 +563,6 @@ export interface MasterGear {
|
|
|
670
563
|
historical_aircraft_group?: number;
|
|
671
564
|
}
|
|
672
565
|
|
|
673
|
-
export interface ShipAnalyzerConfig {
|
|
674
|
-
air_state?: AirState;
|
|
675
|
-
engagement?: Engagement;
|
|
676
|
-
left?: AttackAnalyzerShipConfig;
|
|
677
|
-
right?: AttackAnalyzerShipConfig;
|
|
678
|
-
}
|
|
679
|
-
|
|
680
566
|
export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
681
567
|
formation?: Formation;
|
|
682
568
|
}
|
|
@@ -778,6 +664,110 @@ export interface ShipConditions extends ShipPosition {
|
|
|
778
664
|
amagiri_index?: number | null;
|
|
779
665
|
}
|
|
780
666
|
|
|
667
|
+
export interface MasterData extends MasterBattleDefinitions {
|
|
668
|
+
created_at: number;
|
|
669
|
+
gears: MasterGear[];
|
|
670
|
+
gear_attrs: MasterAttrRule<GearAttr>[];
|
|
671
|
+
ships: MasterShip[];
|
|
672
|
+
ship_attrs: MasterAttrRule<ShipAttr>[];
|
|
673
|
+
ibonuses: MasterIBonuses;
|
|
674
|
+
equippability: MasterEquippability;
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export interface NationalityDef {
|
|
678
|
+
id: number;
|
|
679
|
+
ctypes: number[];
|
|
680
|
+
}
|
|
681
|
+
|
|
682
|
+
export interface MasterAttrRule<T> {
|
|
683
|
+
tag: T;
|
|
684
|
+
name: string;
|
|
685
|
+
expr: CompiledEvaler;
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
export interface ShipAnalyzerConfig {
|
|
689
|
+
air_state?: AirState;
|
|
690
|
+
engagement?: Engagement;
|
|
691
|
+
left?: AttackAnalyzerShipConfig;
|
|
692
|
+
right?: AttackAnalyzerShipConfig;
|
|
693
|
+
}
|
|
694
|
+
|
|
695
|
+
export interface BattleConditions {
|
|
696
|
+
org_type: OrgType;
|
|
697
|
+
role: Role;
|
|
698
|
+
ship_index: number;
|
|
699
|
+
fleet_len: number;
|
|
700
|
+
formation: Formation;
|
|
701
|
+
fleet_los_mod: number | null;
|
|
702
|
+
night_conditions: NightFleetConditions;
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface NightConditions {
|
|
706
|
+
player?: NightFleetConditions;
|
|
707
|
+
enemy?: NightFleetConditions;
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
export interface NightFleetConditions {
|
|
711
|
+
night_contact_rank?: ContactRank | null;
|
|
712
|
+
starshell_index?: number | null;
|
|
713
|
+
searchlight_index?: number | null;
|
|
714
|
+
activates_large_searchlight?: boolean;
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
export type GearAttr =
|
|
718
|
+
| "Unknown"
|
|
719
|
+
| "HighAngleMount"
|
|
720
|
+
| "NightFighter"
|
|
721
|
+
| "NightAttacker"
|
|
722
|
+
| "HeavyBomber"
|
|
723
|
+
| "NightRecon"
|
|
724
|
+
| "MainGun"
|
|
725
|
+
| "Radar"
|
|
726
|
+
| "SurfaceRadar"
|
|
727
|
+
| "AirRadar"
|
|
728
|
+
| "DepthChargeProjector"
|
|
729
|
+
| "SynergisticDepthCharge"
|
|
730
|
+
| "AntiSubMortar"
|
|
731
|
+
| "AntiSubWeapon"
|
|
732
|
+
| "ApDepthCharge"
|
|
733
|
+
| "AntiSubAircraft"
|
|
734
|
+
| "LateModelBowTorpedo"
|
|
735
|
+
| "Seaplane"
|
|
736
|
+
| "CbAircraft"
|
|
737
|
+
| "LbAircraft"
|
|
738
|
+
| "JetAircraft"
|
|
739
|
+
| "Fighter"
|
|
740
|
+
| "Recon"
|
|
741
|
+
| "ObservationSeaplane"
|
|
742
|
+
| "CbFighterBomber"
|
|
743
|
+
| "AntiInstDiveBomber"
|
|
744
|
+
| "CbSwordfish"
|
|
745
|
+
| "SemiNightPlane"
|
|
746
|
+
| "HighAltitudeInterceptor";
|
|
747
|
+
|
|
748
|
+
export type ShipAttr =
|
|
749
|
+
| "Unknown"
|
|
750
|
+
| "NightCarrier"
|
|
751
|
+
| "Installation"
|
|
752
|
+
| "RoyalNavy"
|
|
753
|
+
| "Kai2"
|
|
754
|
+
| "TurbineSpeedBonus"
|
|
755
|
+
| "NewModelBoilerSpeedBonus"
|
|
756
|
+
| "Pillbox"
|
|
757
|
+
| "IsolatedIsland"
|
|
758
|
+
| "HarbourSummerPrincess"
|
|
759
|
+
| "SupplyDepot"
|
|
760
|
+
| "NewSupplyDepot"
|
|
761
|
+
| "PtImp"
|
|
762
|
+
| "BattleshipSummerPrincess"
|
|
763
|
+
| "HeavyCruiserSummerPrincess"
|
|
764
|
+
| "AnchorageWaterDemonVacationMode"
|
|
765
|
+
| "FrenchBattleshipPrincess"
|
|
766
|
+
| "DockPrincess"
|
|
767
|
+
| "SummerAircraftCarrierDemon";
|
|
768
|
+
|
|
769
|
+
export type FhResult<T> = { Ok: T } | { Err: string };
|
|
770
|
+
|
|
781
771
|
export interface ContactAnalysis {
|
|
782
772
|
single: DayContactChance[] | null;
|
|
783
773
|
combined: DayContactChance[] | null;
|
|
@@ -870,6 +860,16 @@ export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
|
870
860
|
|
|
871
861
|
export type SlotSizeVec = (number | null)[];
|
|
872
862
|
|
|
863
|
+
export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
|
|
864
|
+
|
|
865
|
+
export interface MasterBattleDefinitions {
|
|
866
|
+
formation: NestedFormationDef[];
|
|
867
|
+
anti_air_cutin: AntiAirCutinDef[];
|
|
868
|
+
day_cutin: DayCutinDef[];
|
|
869
|
+
night_cutin: NightCutinDef[];
|
|
870
|
+
historical_bonuses?: HistoricalBonusDef[];
|
|
871
|
+
}
|
|
872
|
+
|
|
873
873
|
export type CompiledEvaler = string;
|
|
874
874
|
|
|
875
875
|
export interface EquippabilityRule {
|
package/node/fleethub_core.js
CHANGED
|
@@ -137,15 +137,6 @@ function _assertClass(instance, klass) {
|
|
|
137
137
|
}
|
|
138
138
|
return instance.ptr;
|
|
139
139
|
}
|
|
140
|
-
/**
|
|
141
|
-
* @param {ShipConditions} value
|
|
142
|
-
* @returns {ShipConditions}
|
|
143
|
-
*/
|
|
144
|
-
module.exports.parse_ship_conditions = function(value) {
|
|
145
|
-
const ret = wasm.parse_ship_conditions(addHeapObject(value));
|
|
146
|
-
return takeObject(ret);
|
|
147
|
-
};
|
|
148
|
-
|
|
149
140
|
/**
|
|
150
141
|
*/
|
|
151
142
|
module.exports.set_panic_hook = function() {
|
|
@@ -184,6 +175,14 @@ function passArray16ToWasm0(arg, malloc) {
|
|
|
184
175
|
WASM_VECTOR_LEN = arg.length;
|
|
185
176
|
return ptr;
|
|
186
177
|
}
|
|
178
|
+
/**
|
|
179
|
+
* @param {ShipConditions} value
|
|
180
|
+
* @returns {ShipConditions}
|
|
181
|
+
*/
|
|
182
|
+
module.exports.parse_ship_conditions = function(value) {
|
|
183
|
+
const ret = wasm.parse_ship_conditions(addHeapObject(value));
|
|
184
|
+
return takeObject(ret);
|
|
185
|
+
};
|
|
187
186
|
|
|
188
187
|
function handleError(f, args) {
|
|
189
188
|
try {
|
|
@@ -2960,7 +2959,7 @@ module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
|
2960
2959
|
return addHeapObject(ret);
|
|
2961
2960
|
};
|
|
2962
2961
|
|
|
2963
|
-
module.exports.
|
|
2962
|
+
module.exports.__wbg_createEquipmentBonuses_031a77b32ed94c4c = function(arg0, arg1) {
|
|
2964
2963
|
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
2965
2964
|
return addHeapObject(ret);
|
|
2966
2965
|
};
|
|
Binary file
|
|
@@ -141,8 +141,6 @@ export function comp_transport_point(a: number): number;
|
|
|
141
141
|
export function comp_get_ship_conditions(a: number, b: number, c: number): number;
|
|
142
142
|
export function comp_fleet_los_mod(a: number, b: number, c: number): void;
|
|
143
143
|
export function comp_balloons(a: number): number;
|
|
144
|
-
export function parse_ship_conditions(a: number): number;
|
|
145
|
-
export function set_panic_hook(): void;
|
|
146
144
|
export function __wbg_fleet_free(a: number, b: number): void;
|
|
147
145
|
export function __wbg_get_fleet_id(a: number, b: number): void;
|
|
148
146
|
export function __wbg_set_fleet_id(a: number, b: number, c: number): void;
|
|
@@ -278,6 +276,8 @@ export function fhcore_create_comp_by_map_enemy(a: number, b: number, c: number,
|
|
|
278
276
|
export function fhcore_create_default_ship(a: number): number;
|
|
279
277
|
export function fhcore_create_analyzer(a: number): number;
|
|
280
278
|
export function __wbg_get_org_hash(a: number): number;
|
|
279
|
+
export function set_panic_hook(): void;
|
|
280
|
+
export function parse_ship_conditions(a: number): number;
|
|
281
281
|
export function __wbindgen_malloc(a: number, b: number): number;
|
|
282
282
|
export function __wbindgen_realloc(a: number, b: number, c: number, d: number): number;
|
|
283
283
|
export function __wbindgen_add_to_stack_pointer(a: number): number;
|