fleethub-core 1.11.8 → 1.11.11
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 +159 -159
- package/node/fleethub_core.js +93 -92
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +49 -49
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +159 -159
- package/pkg/fleethub_core_bg.js +95 -94
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +49 -49
package/node/fleethub_core.d.ts
CHANGED
|
@@ -8,11 +8,6 @@ export function parse_ship_conditions(value: ShipConditions): ShipConditions;
|
|
|
8
8
|
/**
|
|
9
9
|
*/
|
|
10
10
|
export function set_panic_hook(): void;
|
|
11
|
-
export interface MoveShipPayload {
|
|
12
|
-
current: [string, string, ShipKey];
|
|
13
|
-
target: [string | null, string, ShipKey];
|
|
14
|
-
}
|
|
15
|
-
|
|
16
11
|
export type GearTypeIdArray = [number, number, number, number, number];
|
|
17
12
|
|
|
18
13
|
export type GearVecInput = GearInput[];
|
|
@@ -55,6 +50,38 @@ export interface EBonuses {
|
|
|
55
50
|
range: number;
|
|
56
51
|
}
|
|
57
52
|
|
|
53
|
+
export interface NodeAttackAnalyzerShipConfig extends NightFleetConditions {
|
|
54
|
+
formation?: Formation;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface NodeAttackAnalyzerConfig {
|
|
58
|
+
air_state?: AirState;
|
|
59
|
+
engagement?: Engagement;
|
|
60
|
+
node_state?: NodeState;
|
|
61
|
+
left?: NodeAttackAnalyzerShipConfig;
|
|
62
|
+
right?: NodeAttackAnalyzerShipConfig;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export interface NodeAttackAnalysis {
|
|
66
|
+
left: AttackAnalysis;
|
|
67
|
+
right: AttackAnalysis;
|
|
68
|
+
shelling_fleet_cutin: FleetCutinReport<ShellingStyle>[];
|
|
69
|
+
night_fleet_cutin: FleetCutinReport<NightAttackStyle>[];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export interface DamageReport {
|
|
73
|
+
miss_damage_min: number;
|
|
74
|
+
miss_damage_max: number;
|
|
75
|
+
normal_damage_min: number;
|
|
76
|
+
normal_damage_max: number;
|
|
77
|
+
critical_damage_min: number;
|
|
78
|
+
critical_damage_max: number;
|
|
79
|
+
normal_scratch_rate: number;
|
|
80
|
+
critical_scratch_rate: number;
|
|
81
|
+
damage_density: Histogram<number, number>;
|
|
82
|
+
damage_state_density: Histogram<DamageState, number>;
|
|
83
|
+
}
|
|
84
|
+
|
|
58
85
|
export interface CompAntiAirAnalysis {
|
|
59
86
|
fleet_adjusted_anti_air: number;
|
|
60
87
|
ships: AntiAirReport[];
|
|
@@ -121,37 +148,103 @@ export interface CompMeta {
|
|
|
121
148
|
|
|
122
149
|
export type Role = "Main" | "Escort";
|
|
123
150
|
|
|
124
|
-
export interface
|
|
125
|
-
|
|
151
|
+
export interface MoveShipPayload {
|
|
152
|
+
current: [string, string, ShipKey];
|
|
153
|
+
target: [string | null, string, ShipKey];
|
|
126
154
|
}
|
|
127
155
|
|
|
128
|
-
export interface
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
156
|
+
export interface SlotSizeVecState {
|
|
157
|
+
ss1?: number;
|
|
158
|
+
ss2?: number;
|
|
159
|
+
ss3?: number;
|
|
160
|
+
ss4?: number;
|
|
161
|
+
ss5?: number;
|
|
134
162
|
}
|
|
135
163
|
|
|
136
|
-
export interface
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
164
|
+
export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
165
|
+
id?: string;
|
|
166
|
+
ship_id: number;
|
|
167
|
+
level?: number;
|
|
168
|
+
current_hp?: number;
|
|
169
|
+
morale?: number;
|
|
170
|
+
ammo?: number;
|
|
171
|
+
fuel?: number;
|
|
172
|
+
max_hp_mod?: number;
|
|
173
|
+
firepower_mod?: number;
|
|
174
|
+
torpedo_mod?: number;
|
|
175
|
+
armor_mod?: number;
|
|
176
|
+
anti_air_mod?: number;
|
|
177
|
+
evasion_mod?: number;
|
|
178
|
+
asw_mod?: number;
|
|
179
|
+
los_mod?: number;
|
|
180
|
+
luck_mod?: number;
|
|
181
|
+
day_gunfit_accuracy?: number;
|
|
182
|
+
night_gunfit_accuracy?: number;
|
|
183
|
+
custom_power_mods?: CustomPowerModifiers;
|
|
141
184
|
}
|
|
142
185
|
|
|
143
|
-
export
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
186
|
+
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
187
|
+
|
|
188
|
+
export type DayCutin =
|
|
189
|
+
| "Zuiun"
|
|
190
|
+
| "AirSea"
|
|
191
|
+
| "MainMain"
|
|
192
|
+
| "MainAp"
|
|
193
|
+
| "MainRadar"
|
|
194
|
+
| "MainSec"
|
|
195
|
+
| "DoubleAttack"
|
|
196
|
+
| "FBA"
|
|
197
|
+
| "BBA"
|
|
198
|
+
| "BA";
|
|
199
|
+
|
|
200
|
+
export type NightCutin =
|
|
201
|
+
| "MainTorpRadar"
|
|
202
|
+
| "TorpLookoutRadar"
|
|
203
|
+
| "TorpTsloTorp"
|
|
204
|
+
| "TorpTsloDrum"
|
|
205
|
+
| "NightZuiun2Radar"
|
|
206
|
+
| "NightZuiun2"
|
|
207
|
+
| "NightZuiunRadar"
|
|
208
|
+
| "NightZuiun"
|
|
209
|
+
| "DoubleAttack"
|
|
210
|
+
| "TorpTorpMain"
|
|
211
|
+
| "TorpTorpTorp"
|
|
212
|
+
| "MainMainSec"
|
|
213
|
+
| "MainMainMain"
|
|
214
|
+
| "SubTorpTorp"
|
|
215
|
+
| "SubRadarTorp"
|
|
216
|
+
| "Cvci1_25"
|
|
217
|
+
| "Cvci1_20"
|
|
218
|
+
| "Cvci1_18"
|
|
219
|
+
| "Photobomber";
|
|
220
|
+
|
|
221
|
+
export type FleetCutin =
|
|
222
|
+
| "NelsonTouch"
|
|
223
|
+
| "NagatoClassCutin"
|
|
224
|
+
| "ColoradoClassCutin"
|
|
225
|
+
| "KongouClassCutin"
|
|
226
|
+
| "Yamato2ShipCutin"
|
|
227
|
+
| "Yamato3ShipCutin";
|
|
228
|
+
|
|
229
|
+
export type DayCutinLike = DayCutin | FleetCutin;
|
|
230
|
+
|
|
231
|
+
export type NightCutinLike = NightCutin | FleetCutin;
|
|
232
|
+
|
|
233
|
+
export type SingleFormation =
|
|
234
|
+
| "LineAhead"
|
|
235
|
+
| "DoubleLine"
|
|
236
|
+
| "Diamond"
|
|
237
|
+
| "Echelon"
|
|
238
|
+
| "LineAbreast"
|
|
239
|
+
| "Vanguard";
|
|
240
|
+
|
|
241
|
+
export type CombinedFormation =
|
|
242
|
+
| "Cruising1"
|
|
243
|
+
| "Cruising2"
|
|
244
|
+
| "Cruising3"
|
|
245
|
+
| "Cruising4";
|
|
246
|
+
|
|
247
|
+
export type Formation = SingleFormation | CombinedFormation;
|
|
155
248
|
|
|
156
249
|
export type GearType =
|
|
157
250
|
| "Unknown"
|
|
@@ -229,85 +322,8 @@ export type GearCategory =
|
|
|
229
322
|
| "LandBased"
|
|
230
323
|
| "Misc";
|
|
231
324
|
|
|
232
|
-
export interface SlotSizeVecState {
|
|
233
|
-
ss1?: number;
|
|
234
|
-
ss2?: number;
|
|
235
|
-
ss3?: number;
|
|
236
|
-
ss4?: number;
|
|
237
|
-
ss5?: number;
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
export interface ShipState extends GearVecState, SlotSizeVecState {
|
|
241
|
-
id?: string;
|
|
242
|
-
ship_id: number;
|
|
243
|
-
level?: number;
|
|
244
|
-
current_hp?: number;
|
|
245
|
-
morale?: number;
|
|
246
|
-
ammo?: number;
|
|
247
|
-
fuel?: number;
|
|
248
|
-
max_hp_mod?: number;
|
|
249
|
-
firepower_mod?: number;
|
|
250
|
-
torpedo_mod?: number;
|
|
251
|
-
armor_mod?: number;
|
|
252
|
-
anti_air_mod?: number;
|
|
253
|
-
evasion_mod?: number;
|
|
254
|
-
asw_mod?: number;
|
|
255
|
-
los_mod?: number;
|
|
256
|
-
luck_mod?: number;
|
|
257
|
-
day_gunfit_accuracy?: number;
|
|
258
|
-
night_gunfit_accuracy?: number;
|
|
259
|
-
custom_power_mods?: CustomPowerModifiers;
|
|
260
|
-
}
|
|
261
|
-
|
|
262
|
-
export type ShipKey = "s1" | "s2" | "s3" | "s4" | "s5" | "s6" | "s7";
|
|
263
|
-
|
|
264
325
|
export type SpeedGroup = "A" | "B1" | "B2" | "C";
|
|
265
326
|
|
|
266
|
-
export type DayCutin =
|
|
267
|
-
| "Zuiun"
|
|
268
|
-
| "AirSea"
|
|
269
|
-
| "MainMain"
|
|
270
|
-
| "MainAp"
|
|
271
|
-
| "MainRadar"
|
|
272
|
-
| "MainSec"
|
|
273
|
-
| "DoubleAttack"
|
|
274
|
-
| "FBA"
|
|
275
|
-
| "BBA"
|
|
276
|
-
| "BA";
|
|
277
|
-
|
|
278
|
-
export type NightCutin =
|
|
279
|
-
| "MainTorpRadar"
|
|
280
|
-
| "TorpLookoutRadar"
|
|
281
|
-
| "TorpTsloTorp"
|
|
282
|
-
| "TorpTsloDrum"
|
|
283
|
-
| "NightZuiun2Radar"
|
|
284
|
-
| "NightZuiun2"
|
|
285
|
-
| "NightZuiunRadar"
|
|
286
|
-
| "NightZuiun"
|
|
287
|
-
| "DoubleAttack"
|
|
288
|
-
| "TorpTorpMain"
|
|
289
|
-
| "TorpTorpTorp"
|
|
290
|
-
| "MainMainSec"
|
|
291
|
-
| "MainMainMain"
|
|
292
|
-
| "SubTorpTorp"
|
|
293
|
-
| "SubRadarTorp"
|
|
294
|
-
| "Cvci1_25"
|
|
295
|
-
| "Cvci1_20"
|
|
296
|
-
| "Cvci1_18"
|
|
297
|
-
| "Photobomber";
|
|
298
|
-
|
|
299
|
-
export type FleetCutin =
|
|
300
|
-
| "NelsonTouch"
|
|
301
|
-
| "NagatoClassCutin"
|
|
302
|
-
| "ColoradoClassCutin"
|
|
303
|
-
| "KongouClassCutin"
|
|
304
|
-
| "Yamato2ShipCutin"
|
|
305
|
-
| "Yamato3ShipCutin";
|
|
306
|
-
|
|
307
|
-
export type DayCutinLike = DayCutin | FleetCutin;
|
|
308
|
-
|
|
309
|
-
export type NightCutinLike = NightCutin | FleetCutin;
|
|
310
|
-
|
|
311
327
|
export interface SupportShellingSimulatorParams {
|
|
312
328
|
attacker_formation?: Formation;
|
|
313
329
|
target_formation?: Formation;
|
|
@@ -415,22 +431,6 @@ export interface AttackAnalysis {
|
|
|
415
431
|
support_shelling: ActionReport<SupportShellingStyle>;
|
|
416
432
|
}
|
|
417
433
|
|
|
418
|
-
export type SingleFormation =
|
|
419
|
-
| "LineAhead"
|
|
420
|
-
| "DoubleLine"
|
|
421
|
-
| "Diamond"
|
|
422
|
-
| "Echelon"
|
|
423
|
-
| "LineAbreast"
|
|
424
|
-
| "Vanguard";
|
|
425
|
-
|
|
426
|
-
export type CombinedFormation =
|
|
427
|
-
| "Cruising1"
|
|
428
|
-
| "Cruising2"
|
|
429
|
-
| "Cruising3"
|
|
430
|
-
| "Cruising4";
|
|
431
|
-
|
|
432
|
-
export type Formation = SingleFormation | CombinedFormation;
|
|
433
|
-
|
|
434
434
|
export interface GearState {
|
|
435
435
|
id?: string;
|
|
436
436
|
gear_id: number;
|
|
@@ -841,8 +841,6 @@ export interface ShipPosition {
|
|
|
841
841
|
index?: number;
|
|
842
842
|
}
|
|
843
843
|
|
|
844
|
-
export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
|
|
845
|
-
|
|
846
844
|
export interface MasterIBonuses {
|
|
847
845
|
shelling_power: MasterIBonusRule[];
|
|
848
846
|
shelling_accuracy: MasterIBonusRule[];
|
|
@@ -888,26 +886,6 @@ export interface FleetCutinAttackReport<T> extends AttackReport<T> {
|
|
|
888
886
|
power_mod: number;
|
|
889
887
|
}
|
|
890
888
|
|
|
891
|
-
export interface CompDayCutinAnalysis {
|
|
892
|
-
rank3_air_state: AirState;
|
|
893
|
-
rank2_air_state: AirState;
|
|
894
|
-
main_fleet_los_mod: number | null;
|
|
895
|
-
escort_fleet_los_mod: number | null;
|
|
896
|
-
ships: ShipDayCutinAnalysis[];
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
export interface ShipDayCutinAnalysis {
|
|
900
|
-
ship_id: number;
|
|
901
|
-
role: Role;
|
|
902
|
-
index: number;
|
|
903
|
-
rank3: DayCutinReport;
|
|
904
|
-
rank2: DayCutinReport;
|
|
905
|
-
}
|
|
906
|
-
|
|
907
|
-
export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
|
|
908
|
-
observation_term: number | null;
|
|
909
|
-
}
|
|
910
|
-
|
|
911
889
|
export interface AttackReport<T> {
|
|
912
890
|
style: T;
|
|
913
891
|
proc_rate: number | null;
|
|
@@ -958,6 +936,8 @@ export interface SupportShellingStyle {
|
|
|
958
936
|
|
|
959
937
|
export type FleetType = "Main" | "Escort" | "RouteSup" | "BossSup";
|
|
960
938
|
|
|
939
|
+
export type Histogram<K extends keyof any, V> = Partial<Record<K, V>>;
|
|
940
|
+
|
|
961
941
|
export interface EquippabilityRule {
|
|
962
942
|
ship: CompiledEvaler;
|
|
963
943
|
keys?: string[];
|
|
@@ -989,6 +969,26 @@ export interface EquipStype {
|
|
|
989
969
|
equip_type: number[];
|
|
990
970
|
}
|
|
991
971
|
|
|
972
|
+
export interface CompDayCutinAnalysis {
|
|
973
|
+
rank3_air_state: AirState;
|
|
974
|
+
rank2_air_state: AirState;
|
|
975
|
+
main_fleet_los_mod: number | null;
|
|
976
|
+
escort_fleet_los_mod: number | null;
|
|
977
|
+
ships: ShipDayCutinAnalysis[];
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
export interface ShipDayCutinAnalysis {
|
|
981
|
+
ship_id: number;
|
|
982
|
+
role: Role;
|
|
983
|
+
index: number;
|
|
984
|
+
rank3: DayCutinReport;
|
|
985
|
+
rank2: DayCutinReport;
|
|
986
|
+
}
|
|
987
|
+
|
|
988
|
+
export interface DayCutinReport extends ActionReport<DayPhaseAttackStyle> {
|
|
989
|
+
observation_term: number | null;
|
|
990
|
+
}
|
|
991
|
+
|
|
992
992
|
export interface CompAnalyzerConfig {
|
|
993
993
|
engagement: Engagement;
|
|
994
994
|
formation: Formation;
|
|
@@ -1769,6 +1769,20 @@ export class Org {
|
|
|
1769
1769
|
*/
|
|
1770
1770
|
export class Ship {
|
|
1771
1771
|
free(): void;
|
|
1772
|
+
/**
|
|
1773
|
+
* @returns {number | undefined}
|
|
1774
|
+
*/
|
|
1775
|
+
state_day_gunfit_accuracy(): number | undefined;
|
|
1776
|
+
/**
|
|
1777
|
+
* @returns {number | undefined}
|
|
1778
|
+
*/
|
|
1779
|
+
state_night_gunfit_accuracy(): number | undefined;
|
|
1780
|
+
/**
|
|
1781
|
+
* フィット砲補正
|
|
1782
|
+
* @param {boolean} is_night
|
|
1783
|
+
* @returns {number}
|
|
1784
|
+
*/
|
|
1785
|
+
gunfit_accuracy(is_night: boolean): number;
|
|
1772
1786
|
/**
|
|
1773
1787
|
* @returns {Ship}
|
|
1774
1788
|
*/
|
|
@@ -1986,20 +2000,6 @@ export class Ship {
|
|
|
1986
2000
|
* @returns {number | undefined}
|
|
1987
2001
|
*/
|
|
1988
2002
|
ohko_power(): number | undefined;
|
|
1989
|
-
/**
|
|
1990
|
-
* @returns {number | undefined}
|
|
1991
|
-
*/
|
|
1992
|
-
state_day_gunfit_accuracy(): number | undefined;
|
|
1993
|
-
/**
|
|
1994
|
-
* @returns {number | undefined}
|
|
1995
|
-
*/
|
|
1996
|
-
state_night_gunfit_accuracy(): number | undefined;
|
|
1997
|
-
/**
|
|
1998
|
-
* フィット砲補正
|
|
1999
|
-
* @param {boolean} is_night
|
|
2000
|
-
* @returns {number}
|
|
2001
|
-
*/
|
|
2002
|
-
gunfit_accuracy(is_night: boolean): number;
|
|
2003
2003
|
/**
|
|
2004
2004
|
*/
|
|
2005
2005
|
readonly accuracy: number;
|
package/node/fleethub_core.js
CHANGED
|
@@ -4,28 +4,12 @@ let wasm;
|
|
|
4
4
|
const { createEquipmentBonuses } = require(`equipment-bonus`);
|
|
5
5
|
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
8
|
-
|
|
9
|
-
cachedTextDecoder.decode();
|
|
10
|
-
|
|
11
|
-
let cachedUint8Memory0 = null;
|
|
12
|
-
|
|
13
|
-
function getUint8Memory0() {
|
|
14
|
-
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
15
|
-
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
16
|
-
}
|
|
17
|
-
return cachedUint8Memory0;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function getStringFromWasm0(ptr, len) {
|
|
21
|
-
ptr = ptr >>> 0;
|
|
22
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
23
|
-
}
|
|
24
|
-
|
|
25
7
|
const heap = new Array(128).fill(undefined);
|
|
26
8
|
|
|
27
9
|
heap.push(undefined, null, true, false);
|
|
28
10
|
|
|
11
|
+
function getObject(idx) { return heap[idx]; }
|
|
12
|
+
|
|
29
13
|
let heap_next = heap.length;
|
|
30
14
|
|
|
31
15
|
function addHeapObject(obj) {
|
|
@@ -37,8 +21,6 @@ function addHeapObject(obj) {
|
|
|
37
21
|
return idx;
|
|
38
22
|
}
|
|
39
23
|
|
|
40
|
-
function getObject(idx) { return heap[idx]; }
|
|
41
|
-
|
|
42
24
|
function dropObject(idx) {
|
|
43
25
|
if (idx < 132) return;
|
|
44
26
|
heap[idx] = heap_next;
|
|
@@ -51,6 +33,24 @@ function takeObject(idx) {
|
|
|
51
33
|
return ret;
|
|
52
34
|
}
|
|
53
35
|
|
|
36
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
37
|
+
|
|
38
|
+
cachedTextDecoder.decode();
|
|
39
|
+
|
|
40
|
+
let cachedUint8Memory0 = null;
|
|
41
|
+
|
|
42
|
+
function getUint8Memory0() {
|
|
43
|
+
if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
|
|
44
|
+
cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
|
|
45
|
+
}
|
|
46
|
+
return cachedUint8Memory0;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function getStringFromWasm0(ptr, len) {
|
|
50
|
+
ptr = ptr >>> 0;
|
|
51
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
54
|
let WASM_VECTOR_LEN = 0;
|
|
55
55
|
|
|
56
56
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
@@ -119,6 +119,34 @@ function getInt32Memory0() {
|
|
|
119
119
|
return cachedInt32Memory0;
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
let cachedFloat64Memory0 = null;
|
|
123
|
+
|
|
124
|
+
function getFloat64Memory0() {
|
|
125
|
+
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
126
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
127
|
+
}
|
|
128
|
+
return cachedFloat64Memory0;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
function _assertClass(instance, klass) {
|
|
132
|
+
if (!(instance instanceof klass)) {
|
|
133
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
134
|
+
}
|
|
135
|
+
return instance.ptr;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
139
|
+
ptr = ptr >>> 0;
|
|
140
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
144
|
+
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
145
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
146
|
+
WASM_VECTOR_LEN = arg.length;
|
|
147
|
+
return ptr;
|
|
148
|
+
}
|
|
149
|
+
|
|
122
150
|
let cachedUint32Memory0 = null;
|
|
123
151
|
|
|
124
152
|
function getUint32Memory0() {
|
|
@@ -153,30 +181,9 @@ function getArrayU16FromWasm0(ptr, len) {
|
|
|
153
181
|
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
154
182
|
}
|
|
155
183
|
|
|
156
|
-
function
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
}
|
|
160
|
-
return instance.ptr;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
let cachedFloat64Memory0 = null;
|
|
164
|
-
|
|
165
|
-
function getFloat64Memory0() {
|
|
166
|
-
if (cachedFloat64Memory0 === null || cachedFloat64Memory0.byteLength === 0) {
|
|
167
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
168
|
-
}
|
|
169
|
-
return cachedFloat64Memory0;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
173
|
-
ptr = ptr >>> 0;
|
|
174
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
178
|
-
const ptr = malloc(arg.length * 1, 1) >>> 0;
|
|
179
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
184
|
+
function passArray16ToWasm0(arg, malloc) {
|
|
185
|
+
const ptr = malloc(arg.length * 2, 2) >>> 0;
|
|
186
|
+
getUint16Memory0().set(arg, ptr / 2);
|
|
180
187
|
WASM_VECTOR_LEN = arg.length;
|
|
181
188
|
return ptr;
|
|
182
189
|
}
|
|
@@ -189,12 +196,6 @@ module.exports.parse_ship_conditions = function(value) {
|
|
|
189
196
|
return takeObject(ret);
|
|
190
197
|
};
|
|
191
198
|
|
|
192
|
-
function passArray16ToWasm0(arg, malloc) {
|
|
193
|
-
const ptr = malloc(arg.length * 2, 2) >>> 0;
|
|
194
|
-
getUint16Memory0().set(arg, ptr / 2);
|
|
195
|
-
WASM_VECTOR_LEN = arg.length;
|
|
196
|
-
return ptr;
|
|
197
|
-
}
|
|
198
199
|
/**
|
|
199
200
|
*/
|
|
200
201
|
module.exports.set_panic_hook = function() {
|
|
@@ -1725,7 +1726,7 @@ class Org {
|
|
|
1725
1726
|
* @returns {bigint}
|
|
1726
1727
|
*/
|
|
1727
1728
|
get hash() {
|
|
1728
|
-
const ret = wasm.
|
|
1729
|
+
const ret = wasm.__wbg_get_gear_hash(this.__wbg_ptr);
|
|
1729
1730
|
return BigInt.asUintN(64, ret);
|
|
1730
1731
|
}
|
|
1731
1732
|
/**
|
|
@@ -2091,6 +2092,43 @@ class Ship {
|
|
|
2091
2092
|
wasm.__wbg_ship_free(ptr);
|
|
2092
2093
|
}
|
|
2093
2094
|
/**
|
|
2095
|
+
* @returns {number | undefined}
|
|
2096
|
+
*/
|
|
2097
|
+
state_day_gunfit_accuracy() {
|
|
2098
|
+
try {
|
|
2099
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2100
|
+
wasm.ship_state_day_gunfit_accuracy(retptr, this.__wbg_ptr);
|
|
2101
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2102
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2103
|
+
return r0 === 0 ? undefined : r2;
|
|
2104
|
+
} finally {
|
|
2105
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
/**
|
|
2109
|
+
* @returns {number | undefined}
|
|
2110
|
+
*/
|
|
2111
|
+
state_night_gunfit_accuracy() {
|
|
2112
|
+
try {
|
|
2113
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2114
|
+
wasm.ship_state_night_gunfit_accuracy(retptr, this.__wbg_ptr);
|
|
2115
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2116
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2117
|
+
return r0 === 0 ? undefined : r2;
|
|
2118
|
+
} finally {
|
|
2119
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
/**
|
|
2123
|
+
* フィット砲補正
|
|
2124
|
+
* @param {boolean} is_night
|
|
2125
|
+
* @returns {number}
|
|
2126
|
+
*/
|
|
2127
|
+
gunfit_accuracy(is_night) {
|
|
2128
|
+
const ret = wasm.ship_gunfit_accuracy(this.__wbg_ptr, is_night);
|
|
2129
|
+
return ret;
|
|
2130
|
+
}
|
|
2131
|
+
/**
|
|
2094
2132
|
* @returns {string}
|
|
2095
2133
|
*/
|
|
2096
2134
|
get id() {
|
|
@@ -2878,48 +2916,11 @@ class Ship {
|
|
|
2878
2916
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2879
2917
|
}
|
|
2880
2918
|
}
|
|
2881
|
-
/**
|
|
2882
|
-
* @returns {number | undefined}
|
|
2883
|
-
*/
|
|
2884
|
-
state_day_gunfit_accuracy() {
|
|
2885
|
-
try {
|
|
2886
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2887
|
-
wasm.ship_state_day_gunfit_accuracy(retptr, this.__wbg_ptr);
|
|
2888
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2889
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2890
|
-
return r0 === 0 ? undefined : r2;
|
|
2891
|
-
} finally {
|
|
2892
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2893
|
-
}
|
|
2894
|
-
}
|
|
2895
|
-
/**
|
|
2896
|
-
* @returns {number | undefined}
|
|
2897
|
-
*/
|
|
2898
|
-
state_night_gunfit_accuracy() {
|
|
2899
|
-
try {
|
|
2900
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2901
|
-
wasm.ship_state_night_gunfit_accuracy(retptr, this.__wbg_ptr);
|
|
2902
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2903
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2904
|
-
return r0 === 0 ? undefined : r2;
|
|
2905
|
-
} finally {
|
|
2906
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2907
|
-
}
|
|
2908
|
-
}
|
|
2909
|
-
/**
|
|
2910
|
-
* フィット砲補正
|
|
2911
|
-
* @param {boolean} is_night
|
|
2912
|
-
* @returns {number}
|
|
2913
|
-
*/
|
|
2914
|
-
gunfit_accuracy(is_night) {
|
|
2915
|
-
const ret = wasm.ship_gunfit_accuracy(this.__wbg_ptr, is_night);
|
|
2916
|
-
return ret;
|
|
2917
|
-
}
|
|
2918
2919
|
}
|
|
2919
2920
|
module.exports.Ship = Ship;
|
|
2920
2921
|
|
|
2921
|
-
module.exports.
|
|
2922
|
-
const ret =
|
|
2922
|
+
module.exports.__wbg_createEquipmentBonuses_9be552907b7467d1 = function(arg0, arg1) {
|
|
2923
|
+
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
2923
2924
|
return addHeapObject(ret);
|
|
2924
2925
|
};
|
|
2925
2926
|
|
|
@@ -2932,8 +2933,8 @@ module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
|
2932
2933
|
takeObject(arg0);
|
|
2933
2934
|
};
|
|
2934
2935
|
|
|
2935
|
-
module.exports.
|
|
2936
|
-
const ret =
|
|
2936
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2937
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2937
2938
|
return addHeapObject(ret);
|
|
2938
2939
|
};
|
|
2939
2940
|
|
|
Binary file
|