fleethub-core 0.7.3 → 0.9.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/README.md ADDED
@@ -0,0 +1,69 @@
1
+ <div align="center">
2
+
3
+ <h1><code>wasm-pack-template</code></h1>
4
+
5
+ <strong>A template for kick starting a Rust and WebAssembly project using <a href="https://github.com/rustwasm/wasm-pack">wasm-pack</a>.</strong>
6
+
7
+ <p>
8
+ <a href="https://travis-ci.org/rustwasm/wasm-pack-template"><img src="https://img.shields.io/travis/rustwasm/wasm-pack-template.svg?style=flat-square" alt="Build Status" /></a>
9
+ </p>
10
+
11
+ <h3>
12
+ <a href="https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html">Tutorial</a>
13
+ <span> | </span>
14
+ <a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
15
+ </h3>
16
+
17
+ <sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
18
+ </div>
19
+
20
+ ## About
21
+
22
+ [**📚 Read this template tutorial! 📚**][template-docs]
23
+
24
+ This template is designed for compiling Rust libraries into WebAssembly and
25
+ publishing the resulting package to NPM.
26
+
27
+ Be sure to check out [other `wasm-pack` tutorials online][tutorials] for other
28
+ templates and usages of `wasm-pack`.
29
+
30
+ [tutorials]: https://rustwasm.github.io/docs/wasm-pack/tutorials/index.html
31
+ [template-docs]: https://rustwasm.github.io/docs/wasm-pack/tutorials/npm-browser-packages/index.html
32
+
33
+ ## 🚴 Usage
34
+
35
+ ### 🐑 Use `cargo generate` to Clone this Template
36
+
37
+ [Learn more about `cargo generate` here.](https://github.com/ashleygwilliams/cargo-generate)
38
+
39
+ ```
40
+ cargo generate --git https://github.com/rustwasm/wasm-pack-template.git --name my-project
41
+ cd my-project
42
+ ```
43
+
44
+ ### 🛠️ Build with `wasm-pack build`
45
+
46
+ ```
47
+ wasm-pack build
48
+ ```
49
+
50
+ ### 🔬 Test in Headless Browsers with `wasm-pack test`
51
+
52
+ ```
53
+ wasm-pack test --headless --firefox
54
+ ```
55
+
56
+ ### 🎁 Publish to NPM with `wasm-pack publish`
57
+
58
+ ```
59
+ wasm-pack publish
60
+ ```
61
+
62
+ ## 🔋 Batteries Included
63
+
64
+ * [`wasm-bindgen`](https://github.com/rustwasm/wasm-bindgen) for communicating
65
+ between WebAssembly and JavaScript.
66
+ * [`console_error_panic_hook`](https://github.com/rustwasm/console_error_panic_hook)
67
+ for logging panic messages to the developer console.
68
+ * [`wee_alloc`](https://github.com/rustwasm/wee_alloc), an allocator optimized
69
+ for small code size.
package/bindings.d.ts CHANGED
@@ -348,15 +348,15 @@ export type DayCutin =
348
348
  export type NightAttackType = "Normal" | "ArkRoyal" | "Carrier";
349
349
 
350
350
  export type NightCutin =
351
+ | "MainTorpRadar"
352
+ | "TorpLookoutRadar"
353
+ | "TorpTsloTorp"
354
+ | "TorpTsloDrum"
351
355
  | "DoubleAttack"
352
356
  | "TorpTorpMain"
353
357
  | "TorpTorpTorp"
354
358
  | "MainMainSec"
355
359
  | "MainMainMain"
356
- | "MainTorpRadar"
357
- | "TorpLookoutRadar"
358
- | "TorpTsloTorp"
359
- | "TorpTsloDrum"
360
360
  | "SubTorpTorp"
361
361
  | "SubRadarTorp"
362
362
  | "Cvci1_25"
@@ -585,7 +585,7 @@ export interface MasterShip {
585
585
  next_id?: number;
586
586
  next_level?: number;
587
587
  slotnum: number;
588
- slots: Array;
588
+ slots: Array<number | null>;
589
589
  stock: Array<GearState>;
590
590
  speed_group?: SpeedGroup;
591
591
  useful?: boolean;
@@ -647,34 +647,39 @@ export interface MasterData {
647
647
  config: BattleConfig;
648
648
  }
649
649
 
650
- export interface AttackPowerModifiers {
651
- a5: number;
652
- b5: number;
653
- a6: number;
654
- b6: number;
655
- a7: number;
656
- b7: number;
657
- a11: number;
658
- b11: number;
659
- a12: number;
660
- b12: number;
661
- a13: number;
662
- b13: number;
663
- a13_2: number;
664
- b13_2: number;
665
- a14: number;
666
- b14: number;
650
+ export interface AttackPowerModifier {
651
+ a: number;
652
+ b: number;
653
+ }
654
+
655
+ export interface SpecialEnemyModifiers {
656
+ precap_general_mod: AttackPowerModifier;
657
+ stype_mod: AttackPowerModifier;
658
+ landing_craft_synergy_mod: AttackPowerModifier;
659
+ toku_daihatsu_tank_mod: AttackPowerModifier;
660
+ m4a1dd_mod: AttackPowerModifier;
661
+ honi_mod: AttackPowerModifier;
662
+ postcap_general_mod: AttackPowerModifier;
663
+ pt_mod: AttackPowerModifier;
664
+ }
665
+
666
+ export interface ExternalPowerModifiers {
667
+ precap_mod: AttackPowerModifier;
668
+ postcap_mod: AttackPowerModifier;
667
669
  }
668
670
 
669
671
  export interface AttackPowerParams {
670
672
  basic: number;
671
673
  cap: number;
672
- mods: AttackPowerModifiers;
674
+ precap_mod: AttackPowerModifier;
675
+ postcap_mod: AttackPowerModifier;
673
676
  ap_shell_mod: number | null;
674
677
  carrier_power: number | null;
675
678
  proficiency_critical_mod: number | null;
676
679
  armor_penetration: number;
677
680
  remaining_ammo_mod: number;
681
+ special_enemy_mods: SpecialEnemyModifiers;
682
+ external_power_mods: ExternalPowerModifiers;
678
683
  }
679
684
 
680
685
  export interface AttackPower {
@@ -716,7 +721,7 @@ export interface WarfareContext {
716
721
  target_env: WarfareShipEnvironment;
717
722
  engagement: Engagement;
718
723
  air_state: AirState;
719
- external_power_mods: AttackPowerModifiers;
724
+ external_power_mods: ExternalPowerModifiers;
720
725
  }
721
726
 
722
727
  export interface NightSituation {
@@ -856,7 +861,7 @@ export interface WarfareAnalyzerShipEnvironment {
856
861
  formation: Formation;
857
862
  fleet_los_mod: number | null;
858
863
  night_situation: NightSituation;
859
- external_power_mods: AttackPowerModifiers;
864
+ external_power_mods: ExternalPowerModifiers;
860
865
  }
861
866
 
862
867
  export interface WarfareAnalyzerContext {
@@ -896,7 +901,7 @@ export interface ShellingSupportSimulatorParams {
896
901
  attacker_formation: Formation;
897
902
  target_formation: Formation;
898
903
  engagement: Engagement;
899
- external_power_mods: AttackPowerModifiers;
904
+ external_power_mods: ExternalPowerModifiers;
900
905
  }
901
906
 
902
907
  export interface SimulatorResultItem {
@@ -77,9 +77,8 @@ export class AirSquadron {
77
77
  */
78
78
  mode: bindings.AirSquadronMode;
79
79
  /**
80
- * @returns {string}
81
80
  */
82
- readonly xxh3: string;
81
+ xxh3: BigInt;
83
82
  }
84
83
  /**
85
84
  */
@@ -88,12 +87,12 @@ export class Analyzer {
88
87
  /**
89
88
  * @param {Comp} comp
90
89
  * @param {bindings.Formation} formation
91
- * @param {number | undefined} adjusted_anti_air_resist
92
- * @param {number | undefined} fleet_anti_air_resist
90
+ * @param {number} adjusted_anti_air_resist
91
+ * @param {number} fleet_anti_air_resist
93
92
  * @param {number | undefined} aaci
94
93
  * @returns {bindings.CompAntiAirInfo}
95
94
  */
96
- analyze_anti_air(comp: Comp, formation: bindings.Formation, adjusted_anti_air_resist?: number, fleet_anti_air_resist?: number, aaci?: number): bindings.CompAntiAirInfo;
95
+ analyze_anti_air(comp: Comp, formation: bindings.Formation, adjusted_anti_air_resist: number, fleet_anti_air_resist: number, aaci?: number): bindings.CompAntiAirInfo;
97
96
  /**
98
97
  * @param {Comp} comp
99
98
  * @returns {bindings.CompDayCutinRateInfo}
@@ -179,11 +178,11 @@ export class Comp {
179
178
  fleet_anti_air(formation_mod: number): number;
180
179
  /**
181
180
  * 制空値
182
- * @param {boolean} anti_combined
183
- * @param {boolean} anti_lbas
181
+ * @param {boolean} escort_participates
182
+ * @param {boolean} recon_participates
184
183
  * @returns {number | undefined}
185
184
  */
186
- fighter_power(anti_combined: boolean, anti_lbas: boolean): number | undefined;
185
+ fighter_power(escort_participates: boolean, recon_participates: boolean): number | undefined;
187
186
  /**
188
187
  * マップ索敵
189
188
  * @param {number} node_divaricated_factor
@@ -330,10 +329,10 @@ export class Fleet {
330
329
  */
331
330
  get_ship(key: string): Ship | undefined;
332
331
  /**
333
- * @param {boolean} anti_lbas
332
+ * @param {boolean} recon_participates
334
333
  * @returns {number | undefined}
335
334
  */
336
- fighter_power(anti_lbas: boolean): number | undefined;
335
+ fighter_power(recon_participates: boolean): number | undefined;
337
336
  /**
338
337
  * マップ索敵
339
338
  * @param {number} hq_level
@@ -370,9 +369,8 @@ export class Fleet {
370
369
  */
371
370
  len: number;
372
371
  /**
373
- * @returns {string}
374
372
  */
375
- readonly xxh3: string;
373
+ xxh3: BigInt;
376
374
  }
377
375
  /**
378
376
  */
@@ -431,10 +429,6 @@ export class Gear {
431
429
  */
432
430
  calc_contact_trigger_factor(slot_size: number): number;
433
431
  /**
434
- * @returns {boolean}
435
- */
436
- is_contact_selection_plane(): boolean;
437
- /**
438
432
  * @param {bindings.AirStateRank} rank
439
433
  * @returns {number}
440
434
  */
@@ -578,9 +572,8 @@ export class Gear {
578
572
  */
579
573
  readonly types: any;
580
574
  /**
581
- * @returns {string}
582
575
  */
583
- readonly xxh3: string;
576
+ xxh3: BigInt;
584
577
  }
585
578
  /**
586
579
  */
@@ -765,9 +758,8 @@ export class Org {
765
758
  */
766
759
  sortie: string;
767
760
  /**
768
- * @returns {string}
769
761
  */
770
- readonly xxh3: string;
762
+ xxh3: BigInt;
771
763
  }
772
764
  /**
773
765
  */
@@ -909,10 +901,10 @@ export class Ship {
909
901
  */
910
902
  remaining_fuel_mod(): number;
911
903
  /**
912
- * @param {boolean} anti_lbas
904
+ * @param {boolean} recon_participates
913
905
  * @returns {number | undefined}
914
906
  */
915
- fighter_power(anti_lbas: boolean): number | undefined;
907
+ fighter_power(recon_participates: boolean): number | undefined;
916
908
  /**
917
909
  * @returns {number | undefined}
918
910
  */
@@ -926,6 +918,11 @@ export class Ship {
926
918
  */
927
919
  cruiser_fit_bonus(): number;
928
920
  /**
921
+ * @param {boolean} is_night
922
+ * @returns {number}
923
+ */
924
+ fit_gun_bonus(is_night: boolean): number;
925
+ /**
929
926
  * @returns {number | undefined}
930
927
  */
931
928
  basic_accuracy_term(): number | undefined;
@@ -1110,9 +1107,8 @@ export class Ship {
1110
1107
  */
1111
1108
  readonly useful: boolean;
1112
1109
  /**
1113
- * @returns {string}
1114
1110
  */
1115
- readonly xxh3: string;
1111
+ xxh3: BigInt;
1116
1112
  /**
1117
1113
  * @returns {string}
1118
1114
  */