fleethub-core 1.8.6 → 1.8.9
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 +511 -1042
- package/node/fleethub_core.js +121 -405
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +71 -109
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +511 -1042
- package/pkg/fleethub_core_bg.js +118 -401
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +71 -109
package/node/fleethub_core.js
CHANGED
|
@@ -2,15 +2,11 @@ let imports = {};
|
|
|
2
2
|
imports['__wbindgen_placeholder__'] = module.exports;
|
|
3
3
|
let wasm;
|
|
4
4
|
const { createEquipmentBonuses } = require(`equipment-bonus`);
|
|
5
|
-
const {
|
|
5
|
+
const { TextDecoder, TextEncoder } = require(`util`);
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
heap.push(undefined, null, true, false);
|
|
10
|
-
|
|
11
|
-
function getObject(idx) { return heap[idx]; }
|
|
7
|
+
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
cachedTextDecoder.decode();
|
|
14
10
|
|
|
15
11
|
let cachedUint8Memory0 = new Uint8Array();
|
|
16
12
|
|
|
@@ -21,6 +17,41 @@ function getUint8Memory0() {
|
|
|
21
17
|
return cachedUint8Memory0;
|
|
22
18
|
}
|
|
23
19
|
|
|
20
|
+
function getStringFromWasm0(ptr, len) {
|
|
21
|
+
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const heap = new Array(32).fill(undefined);
|
|
25
|
+
|
|
26
|
+
heap.push(undefined, null, true, false);
|
|
27
|
+
|
|
28
|
+
let heap_next = heap.length;
|
|
29
|
+
|
|
30
|
+
function addHeapObject(obj) {
|
|
31
|
+
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
32
|
+
const idx = heap_next;
|
|
33
|
+
heap_next = heap[idx];
|
|
34
|
+
|
|
35
|
+
heap[idx] = obj;
|
|
36
|
+
return idx;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function getObject(idx) { return heap[idx]; }
|
|
40
|
+
|
|
41
|
+
function dropObject(idx) {
|
|
42
|
+
if (idx < 36) return;
|
|
43
|
+
heap[idx] = heap_next;
|
|
44
|
+
heap_next = idx;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function takeObject(idx) {
|
|
48
|
+
const ret = getObject(idx);
|
|
49
|
+
dropObject(idx);
|
|
50
|
+
return ret;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
let WASM_VECTOR_LEN = 0;
|
|
54
|
+
|
|
24
55
|
let cachedTextEncoder = new TextEncoder('utf-8');
|
|
25
56
|
|
|
26
57
|
const encodeString = (typeof cachedTextEncoder.encodeInto === 'function'
|
|
@@ -83,45 +114,27 @@ function getInt32Memory0() {
|
|
|
83
114
|
return cachedInt32Memory0;
|
|
84
115
|
}
|
|
85
116
|
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
heap_next = idx;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function takeObject(idx) {
|
|
95
|
-
const ret = getObject(idx);
|
|
96
|
-
dropObject(idx);
|
|
97
|
-
return ret;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
101
|
-
|
|
102
|
-
cachedTextDecoder.decode();
|
|
103
|
-
|
|
104
|
-
function getStringFromWasm0(ptr, len) {
|
|
105
|
-
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
function addHeapObject(obj) {
|
|
109
|
-
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
110
|
-
const idx = heap_next;
|
|
111
|
-
heap_next = heap[idx];
|
|
112
|
-
|
|
113
|
-
heap[idx] = obj;
|
|
114
|
-
return idx;
|
|
117
|
+
function _assertClass(instance, klass) {
|
|
118
|
+
if (!(instance instanceof klass)) {
|
|
119
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
120
|
+
}
|
|
121
|
+
return instance.ptr;
|
|
115
122
|
}
|
|
116
123
|
/**
|
|
117
|
-
* @param {ShipConditions} value
|
|
118
|
-
* @returns {ShipConditions}
|
|
119
124
|
*/
|
|
120
|
-
module.exports.
|
|
121
|
-
|
|
122
|
-
return takeObject(ret);
|
|
125
|
+
module.exports.set_panic_hook = function() {
|
|
126
|
+
wasm.set_panic_hook();
|
|
123
127
|
};
|
|
124
128
|
|
|
129
|
+
let cachedFloat64Memory0 = new Float64Array();
|
|
130
|
+
|
|
131
|
+
function getFloat64Memory0() {
|
|
132
|
+
if (cachedFloat64Memory0.byteLength === 0) {
|
|
133
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
134
|
+
}
|
|
135
|
+
return cachedFloat64Memory0;
|
|
136
|
+
}
|
|
137
|
+
|
|
125
138
|
function isLikeNone(x) {
|
|
126
139
|
return x === undefined || x === null;
|
|
127
140
|
}
|
|
@@ -145,33 +158,14 @@ function passArray16ToWasm0(arg, malloc) {
|
|
|
145
158
|
const u32CvtShim = new Uint32Array(2);
|
|
146
159
|
|
|
147
160
|
const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
let cachedFloat64Memory0 = new Float64Array();
|
|
157
|
-
|
|
158
|
-
function getFloat64Memory0() {
|
|
159
|
-
if (cachedFloat64Memory0.byteLength === 0) {
|
|
160
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
161
|
-
}
|
|
162
|
-
return cachedFloat64Memory0;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
166
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
170
|
-
const ptr = malloc(arg.length * 1);
|
|
171
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
172
|
-
WASM_VECTOR_LEN = arg.length;
|
|
173
|
-
return ptr;
|
|
174
|
-
}
|
|
161
|
+
/**
|
|
162
|
+
* @param {ShipConditions} value
|
|
163
|
+
* @returns {ShipConditions}
|
|
164
|
+
*/
|
|
165
|
+
module.exports.parse_ship_conditions = function(value) {
|
|
166
|
+
const ret = wasm.parse_ship_conditions(addHeapObject(value));
|
|
167
|
+
return takeObject(ret);
|
|
168
|
+
};
|
|
175
169
|
|
|
176
170
|
let cachedUint32Memory0 = new Uint32Array();
|
|
177
171
|
|
|
@@ -195,11 +189,17 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
195
189
|
function getArrayU16FromWasm0(ptr, len) {
|
|
196
190
|
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
197
191
|
}
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
192
|
+
|
|
193
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
194
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
198
|
+
const ptr = malloc(arg.length * 1);
|
|
199
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
200
|
+
WASM_VECTOR_LEN = arg.length;
|
|
201
|
+
return ptr;
|
|
202
|
+
}
|
|
203
203
|
|
|
204
204
|
function handleError(f, args) {
|
|
205
205
|
try {
|
|
@@ -1207,7 +1207,7 @@ class Gear {
|
|
|
1207
1207
|
get hash() {
|
|
1208
1208
|
try {
|
|
1209
1209
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1210
|
-
wasm.
|
|
1210
|
+
wasm.__wbg_get_airsquadron_hash(retptr, this.ptr);
|
|
1211
1211
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1212
1212
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1213
1213
|
u32CvtShim[0] = r0;
|
|
@@ -1647,233 +1647,6 @@ class Gear {
|
|
|
1647
1647
|
}
|
|
1648
1648
|
module.exports.Gear = Gear;
|
|
1649
1649
|
|
|
1650
|
-
const IBonusesFinalization = new FinalizationRegistry(ptr => wasm.__wbg_ibonuses_free(ptr));
|
|
1651
|
-
/**
|
|
1652
|
-
*/
|
|
1653
|
-
class IBonuses {
|
|
1654
|
-
|
|
1655
|
-
__destroy_into_raw() {
|
|
1656
|
-
const ptr = this.ptr;
|
|
1657
|
-
this.ptr = 0;
|
|
1658
|
-
IBonusesFinalization.unregister(this);
|
|
1659
|
-
return ptr;
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
free() {
|
|
1663
|
-
const ptr = this.__destroy_into_raw();
|
|
1664
|
-
wasm.__wbg_ibonuses_free(ptr);
|
|
1665
|
-
}
|
|
1666
|
-
/**
|
|
1667
|
-
* @returns {number}
|
|
1668
|
-
*/
|
|
1669
|
-
get shelling_power() {
|
|
1670
|
-
const ret = wasm.__wbg_get_ibonuses_shelling_power(this.ptr);
|
|
1671
|
-
return ret;
|
|
1672
|
-
}
|
|
1673
|
-
/**
|
|
1674
|
-
* @param {number} arg0
|
|
1675
|
-
*/
|
|
1676
|
-
set shelling_power(arg0) {
|
|
1677
|
-
wasm.__wbg_set_ibonuses_shelling_power(this.ptr, arg0);
|
|
1678
|
-
}
|
|
1679
|
-
/**
|
|
1680
|
-
* @returns {number}
|
|
1681
|
-
*/
|
|
1682
|
-
get carrier_shelling_power() {
|
|
1683
|
-
const ret = wasm.__wbg_get_ibonuses_carrier_shelling_power(this.ptr);
|
|
1684
|
-
return ret;
|
|
1685
|
-
}
|
|
1686
|
-
/**
|
|
1687
|
-
* @param {number} arg0
|
|
1688
|
-
*/
|
|
1689
|
-
set carrier_shelling_power(arg0) {
|
|
1690
|
-
wasm.__wbg_set_ibonuses_carrier_shelling_power(this.ptr, arg0);
|
|
1691
|
-
}
|
|
1692
|
-
/**
|
|
1693
|
-
* @returns {number}
|
|
1694
|
-
*/
|
|
1695
|
-
get shelling_accuracy() {
|
|
1696
|
-
const ret = wasm.__wbg_get_ibonuses_shelling_accuracy(this.ptr);
|
|
1697
|
-
return ret;
|
|
1698
|
-
}
|
|
1699
|
-
/**
|
|
1700
|
-
* @param {number} arg0
|
|
1701
|
-
*/
|
|
1702
|
-
set shelling_accuracy(arg0) {
|
|
1703
|
-
wasm.__wbg_set_ibonuses_shelling_accuracy(this.ptr, arg0);
|
|
1704
|
-
}
|
|
1705
|
-
/**
|
|
1706
|
-
* @returns {number}
|
|
1707
|
-
*/
|
|
1708
|
-
get torpedo_power() {
|
|
1709
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_power(this.ptr);
|
|
1710
|
-
return ret;
|
|
1711
|
-
}
|
|
1712
|
-
/**
|
|
1713
|
-
* @param {number} arg0
|
|
1714
|
-
*/
|
|
1715
|
-
set torpedo_power(arg0) {
|
|
1716
|
-
wasm.__wbg_set_ibonuses_torpedo_power(this.ptr, arg0);
|
|
1717
|
-
}
|
|
1718
|
-
/**
|
|
1719
|
-
* @returns {number}
|
|
1720
|
-
*/
|
|
1721
|
-
get torpedo_accuracy() {
|
|
1722
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_accuracy(this.ptr);
|
|
1723
|
-
return ret;
|
|
1724
|
-
}
|
|
1725
|
-
/**
|
|
1726
|
-
* @param {number} arg0
|
|
1727
|
-
*/
|
|
1728
|
-
set torpedo_accuracy(arg0) {
|
|
1729
|
-
wasm.__wbg_set_ibonuses_torpedo_accuracy(this.ptr, arg0);
|
|
1730
|
-
}
|
|
1731
|
-
/**
|
|
1732
|
-
* @returns {number}
|
|
1733
|
-
*/
|
|
1734
|
-
get torpedo_evasion() {
|
|
1735
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_evasion(this.ptr);
|
|
1736
|
-
return ret;
|
|
1737
|
-
}
|
|
1738
|
-
/**
|
|
1739
|
-
* @param {number} arg0
|
|
1740
|
-
*/
|
|
1741
|
-
set torpedo_evasion(arg0) {
|
|
1742
|
-
wasm.__wbg_set_ibonuses_torpedo_evasion(this.ptr, arg0);
|
|
1743
|
-
}
|
|
1744
|
-
/**
|
|
1745
|
-
* @returns {number}
|
|
1746
|
-
*/
|
|
1747
|
-
get asw_power() {
|
|
1748
|
-
const ret = wasm.__wbg_get_ibonuses_asw_power(this.ptr);
|
|
1749
|
-
return ret;
|
|
1750
|
-
}
|
|
1751
|
-
/**
|
|
1752
|
-
* @param {number} arg0
|
|
1753
|
-
*/
|
|
1754
|
-
set asw_power(arg0) {
|
|
1755
|
-
wasm.__wbg_set_ibonuses_asw_power(this.ptr, arg0);
|
|
1756
|
-
}
|
|
1757
|
-
/**
|
|
1758
|
-
* @returns {number}
|
|
1759
|
-
*/
|
|
1760
|
-
get asw_accuracy() {
|
|
1761
|
-
const ret = wasm.__wbg_get_ibonuses_asw_accuracy(this.ptr);
|
|
1762
|
-
return ret;
|
|
1763
|
-
}
|
|
1764
|
-
/**
|
|
1765
|
-
* @param {number} arg0
|
|
1766
|
-
*/
|
|
1767
|
-
set asw_accuracy(arg0) {
|
|
1768
|
-
wasm.__wbg_set_ibonuses_asw_accuracy(this.ptr, arg0);
|
|
1769
|
-
}
|
|
1770
|
-
/**
|
|
1771
|
-
* @returns {number}
|
|
1772
|
-
*/
|
|
1773
|
-
get night_power() {
|
|
1774
|
-
const ret = wasm.__wbg_get_ibonuses_night_power(this.ptr);
|
|
1775
|
-
return ret;
|
|
1776
|
-
}
|
|
1777
|
-
/**
|
|
1778
|
-
* @param {number} arg0
|
|
1779
|
-
*/
|
|
1780
|
-
set night_power(arg0) {
|
|
1781
|
-
wasm.__wbg_set_ibonuses_night_power(this.ptr, arg0);
|
|
1782
|
-
}
|
|
1783
|
-
/**
|
|
1784
|
-
* @returns {number}
|
|
1785
|
-
*/
|
|
1786
|
-
get night_accuracy() {
|
|
1787
|
-
const ret = wasm.__wbg_get_ibonuses_night_accuracy(this.ptr);
|
|
1788
|
-
return ret;
|
|
1789
|
-
}
|
|
1790
|
-
/**
|
|
1791
|
-
* @param {number} arg0
|
|
1792
|
-
*/
|
|
1793
|
-
set night_accuracy(arg0) {
|
|
1794
|
-
wasm.__wbg_set_ibonuses_night_accuracy(this.ptr, arg0);
|
|
1795
|
-
}
|
|
1796
|
-
/**
|
|
1797
|
-
* @returns {number}
|
|
1798
|
-
*/
|
|
1799
|
-
get defense_power() {
|
|
1800
|
-
const ret = wasm.__wbg_get_ibonuses_defense_power(this.ptr);
|
|
1801
|
-
return ret;
|
|
1802
|
-
}
|
|
1803
|
-
/**
|
|
1804
|
-
* @param {number} arg0
|
|
1805
|
-
*/
|
|
1806
|
-
set defense_power(arg0) {
|
|
1807
|
-
wasm.__wbg_set_ibonuses_defense_power(this.ptr, arg0);
|
|
1808
|
-
}
|
|
1809
|
-
/**
|
|
1810
|
-
* @returns {number}
|
|
1811
|
-
*/
|
|
1812
|
-
get contact_selection() {
|
|
1813
|
-
const ret = wasm.__wbg_get_ibonuses_contact_selection(this.ptr);
|
|
1814
|
-
return ret;
|
|
1815
|
-
}
|
|
1816
|
-
/**
|
|
1817
|
-
* @param {number} arg0
|
|
1818
|
-
*/
|
|
1819
|
-
set contact_selection(arg0) {
|
|
1820
|
-
wasm.__wbg_set_ibonuses_contact_selection(this.ptr, arg0);
|
|
1821
|
-
}
|
|
1822
|
-
/**
|
|
1823
|
-
* @returns {number}
|
|
1824
|
-
*/
|
|
1825
|
-
get fighter_power() {
|
|
1826
|
-
const ret = wasm.__wbg_get_ibonuses_fighter_power(this.ptr);
|
|
1827
|
-
return ret;
|
|
1828
|
-
}
|
|
1829
|
-
/**
|
|
1830
|
-
* @param {number} arg0
|
|
1831
|
-
*/
|
|
1832
|
-
set fighter_power(arg0) {
|
|
1833
|
-
wasm.__wbg_set_ibonuses_fighter_power(this.ptr, arg0);
|
|
1834
|
-
}
|
|
1835
|
-
/**
|
|
1836
|
-
* @returns {number}
|
|
1837
|
-
*/
|
|
1838
|
-
get ship_anti_air() {
|
|
1839
|
-
const ret = wasm.__wbg_get_ibonuses_ship_anti_air(this.ptr);
|
|
1840
|
-
return ret;
|
|
1841
|
-
}
|
|
1842
|
-
/**
|
|
1843
|
-
* @param {number} arg0
|
|
1844
|
-
*/
|
|
1845
|
-
set ship_anti_air(arg0) {
|
|
1846
|
-
wasm.__wbg_set_ibonuses_ship_anti_air(this.ptr, arg0);
|
|
1847
|
-
}
|
|
1848
|
-
/**
|
|
1849
|
-
* @returns {number}
|
|
1850
|
-
*/
|
|
1851
|
-
get fleet_anti_air() {
|
|
1852
|
-
const ret = wasm.__wbg_get_ibonuses_fleet_anti_air(this.ptr);
|
|
1853
|
-
return ret;
|
|
1854
|
-
}
|
|
1855
|
-
/**
|
|
1856
|
-
* @param {number} arg0
|
|
1857
|
-
*/
|
|
1858
|
-
set fleet_anti_air(arg0) {
|
|
1859
|
-
wasm.__wbg_set_ibonuses_fleet_anti_air(this.ptr, arg0);
|
|
1860
|
-
}
|
|
1861
|
-
/**
|
|
1862
|
-
* @returns {number}
|
|
1863
|
-
*/
|
|
1864
|
-
get elos() {
|
|
1865
|
-
const ret = wasm.__wbg_get_ibonuses_elos(this.ptr);
|
|
1866
|
-
return ret;
|
|
1867
|
-
}
|
|
1868
|
-
/**
|
|
1869
|
-
* @param {number} arg0
|
|
1870
|
-
*/
|
|
1871
|
-
set elos(arg0) {
|
|
1872
|
-
wasm.__wbg_set_ibonuses_elos(this.ptr, arg0);
|
|
1873
|
-
}
|
|
1874
|
-
}
|
|
1875
|
-
module.exports.IBonuses = IBonuses;
|
|
1876
|
-
|
|
1877
1650
|
const OrgFinalization = new FinalizationRegistry(ptr => wasm.__wbg_org_free(ptr));
|
|
1878
1651
|
/**
|
|
1879
1652
|
*/
|
|
@@ -2030,14 +1803,6 @@ class Org {
|
|
|
2030
1803
|
}
|
|
2031
1804
|
/**
|
|
2032
1805
|
* @param {Role} role
|
|
2033
|
-
* @returns {number}
|
|
2034
|
-
*/
|
|
2035
|
-
fleet_len(role) {
|
|
2036
|
-
const ret = wasm.org_fleet_len(this.ptr, addHeapObject(role));
|
|
2037
|
-
return ret >>> 0;
|
|
2038
|
-
}
|
|
2039
|
-
/**
|
|
2040
|
-
* @param {Role} role
|
|
2041
1806
|
* @param {string} key
|
|
2042
1807
|
* @returns {string | undefined}
|
|
2043
1808
|
*/
|
|
@@ -2076,21 +1841,6 @@ class Org {
|
|
|
2076
1841
|
}
|
|
2077
1842
|
}
|
|
2078
1843
|
/**
|
|
2079
|
-
* @param {Role} role
|
|
2080
|
-
* @returns {number | undefined}
|
|
2081
|
-
*/
|
|
2082
|
-
fleet_los_mod(role) {
|
|
2083
|
-
try {
|
|
2084
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2085
|
-
wasm.org_fleet_los_mod(retptr, this.ptr, addHeapObject(role));
|
|
2086
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2087
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2088
|
-
return r0 === 0 ? undefined : r2;
|
|
2089
|
-
} finally {
|
|
2090
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2091
|
-
}
|
|
2092
|
-
}
|
|
2093
|
-
/**
|
|
2094
1844
|
* @returns {Uint16Array}
|
|
2095
1845
|
*/
|
|
2096
1846
|
main_ship_ids() {
|
|
@@ -2133,17 +1883,6 @@ class Org {
|
|
|
2133
1883
|
return Fleet.__wrap(ret);
|
|
2134
1884
|
}
|
|
2135
1885
|
/**
|
|
2136
|
-
* @param {Role} role
|
|
2137
|
-
* @param {string} key
|
|
2138
|
-
* @returns {Ship | undefined}
|
|
2139
|
-
*/
|
|
2140
|
-
get_ship(role, key) {
|
|
2141
|
-
const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2142
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2143
|
-
const ret = wasm.org_get_ship(this.ptr, addHeapObject(role), ptr0, len0);
|
|
2144
|
-
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
2145
|
-
}
|
|
2146
|
-
/**
|
|
2147
1886
|
* @param {string} id
|
|
2148
1887
|
* @returns {Ship | undefined}
|
|
2149
1888
|
*/
|
|
@@ -2154,22 +1893,6 @@ class Org {
|
|
|
2154
1893
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
2155
1894
|
}
|
|
2156
1895
|
/**
|
|
2157
|
-
* @param {Role} role
|
|
2158
|
-
* @returns {string}
|
|
2159
|
-
*/
|
|
2160
|
-
get_fleet_id_by_role(role) {
|
|
2161
|
-
try {
|
|
2162
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2163
|
-
wasm.org_get_fleet_id_by_role(retptr, this.ptr, addHeapObject(role));
|
|
2164
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2165
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2166
|
-
return getStringFromWasm0(r0, r1);
|
|
2167
|
-
} finally {
|
|
2168
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2169
|
-
wasm.__wbindgen_free(r0, r1);
|
|
2170
|
-
}
|
|
2171
|
-
}
|
|
2172
|
-
/**
|
|
2173
1896
|
* @returns {Comp}
|
|
2174
1897
|
*/
|
|
2175
1898
|
create_comp() {
|
|
@@ -2290,13 +2013,6 @@ class Org {
|
|
|
2290
2013
|
const ret = wasm.org_high_altitude_interception_power(this.ptr);
|
|
2291
2014
|
return ret;
|
|
2292
2015
|
}
|
|
2293
|
-
/**
|
|
2294
|
-
* @returns {Org}
|
|
2295
|
-
*/
|
|
2296
|
-
static default() {
|
|
2297
|
-
const ret = wasm.org_default();
|
|
2298
|
-
return Org.__wrap(ret);
|
|
2299
|
-
}
|
|
2300
2016
|
}
|
|
2301
2017
|
module.exports.Org = Org;
|
|
2302
2018
|
|
|
@@ -2324,6 +2040,43 @@ class Ship {
|
|
|
2324
2040
|
wasm.__wbg_ship_free(ptr);
|
|
2325
2041
|
}
|
|
2326
2042
|
/**
|
|
2043
|
+
* @returns {number | undefined}
|
|
2044
|
+
*/
|
|
2045
|
+
state_day_gunfit_accuracy() {
|
|
2046
|
+
try {
|
|
2047
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2048
|
+
wasm.ship_state_day_gunfit_accuracy(retptr, this.ptr);
|
|
2049
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2050
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2051
|
+
return r0 === 0 ? undefined : r2;
|
|
2052
|
+
} finally {
|
|
2053
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2054
|
+
}
|
|
2055
|
+
}
|
|
2056
|
+
/**
|
|
2057
|
+
* @returns {number | undefined}
|
|
2058
|
+
*/
|
|
2059
|
+
state_night_gunfit_accuracy() {
|
|
2060
|
+
try {
|
|
2061
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2062
|
+
wasm.ship_state_night_gunfit_accuracy(retptr, this.ptr);
|
|
2063
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2064
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2065
|
+
return r0 === 0 ? undefined : r2;
|
|
2066
|
+
} finally {
|
|
2067
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2068
|
+
}
|
|
2069
|
+
}
|
|
2070
|
+
/**
|
|
2071
|
+
* フィット砲補正
|
|
2072
|
+
* @param {boolean} is_night
|
|
2073
|
+
* @returns {number}
|
|
2074
|
+
*/
|
|
2075
|
+
gunfit_accuracy(is_night) {
|
|
2076
|
+
const ret = wasm.ship_gunfit_accuracy(this.ptr, is_night);
|
|
2077
|
+
return ret;
|
|
2078
|
+
}
|
|
2079
|
+
/**
|
|
2327
2080
|
* @returns {string}
|
|
2328
2081
|
*/
|
|
2329
2082
|
get id() {
|
|
@@ -3079,46 +2832,18 @@ class Ship {
|
|
|
3079
2832
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3080
2833
|
}
|
|
3081
2834
|
}
|
|
3082
|
-
/**
|
|
3083
|
-
* @returns {number | undefined}
|
|
3084
|
-
*/
|
|
3085
|
-
state_day_gunfit_accuracy() {
|
|
3086
|
-
try {
|
|
3087
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3088
|
-
wasm.ship_state_day_gunfit_accuracy(retptr, this.ptr);
|
|
3089
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3090
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3091
|
-
return r0 === 0 ? undefined : r2;
|
|
3092
|
-
} finally {
|
|
3093
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3094
|
-
}
|
|
3095
|
-
}
|
|
3096
|
-
/**
|
|
3097
|
-
* @returns {number | undefined}
|
|
3098
|
-
*/
|
|
3099
|
-
state_night_gunfit_accuracy() {
|
|
3100
|
-
try {
|
|
3101
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3102
|
-
wasm.ship_state_night_gunfit_accuracy(retptr, this.ptr);
|
|
3103
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3104
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3105
|
-
return r0 === 0 ? undefined : r2;
|
|
3106
|
-
} finally {
|
|
3107
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3108
|
-
}
|
|
3109
|
-
}
|
|
3110
|
-
/**
|
|
3111
|
-
* フィット砲補正
|
|
3112
|
-
* @param {boolean} is_night
|
|
3113
|
-
* @returns {number}
|
|
3114
|
-
*/
|
|
3115
|
-
gunfit_accuracy(is_night) {
|
|
3116
|
-
const ret = wasm.ship_gunfit_accuracy(this.ptr, is_night);
|
|
3117
|
-
return ret;
|
|
3118
|
-
}
|
|
3119
2835
|
}
|
|
3120
2836
|
module.exports.Ship = Ship;
|
|
3121
2837
|
|
|
2838
|
+
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
2839
|
+
const ret = getStringFromWasm0(arg0, arg1);
|
|
2840
|
+
return addHeapObject(ret);
|
|
2841
|
+
};
|
|
2842
|
+
|
|
2843
|
+
module.exports.__wbindgen_object_drop_ref = function(arg0) {
|
|
2844
|
+
takeObject(arg0);
|
|
2845
|
+
};
|
|
2846
|
+
|
|
3122
2847
|
module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
3123
2848
|
const obj = getObject(arg1);
|
|
3124
2849
|
const ret = JSON.stringify(obj === undefined ? null : obj);
|
|
@@ -3128,16 +2853,7 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
|
|
|
3128
2853
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
3129
2854
|
};
|
|
3130
2855
|
|
|
3131
|
-
module.exports.
|
|
3132
|
-
takeObject(arg0);
|
|
3133
|
-
};
|
|
3134
|
-
|
|
3135
|
-
module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
3136
|
-
const ret = getStringFromWasm0(arg0, arg1);
|
|
3137
|
-
return addHeapObject(ret);
|
|
3138
|
-
};
|
|
3139
|
-
|
|
3140
|
-
module.exports.__wbg_createEquipmentBonuses_821511525288eda4 = function(arg0, arg1) {
|
|
2856
|
+
module.exports.__wbg_createEquipmentBonuses_c15680c31fad94ad = function(arg0, arg1) {
|
|
3141
2857
|
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
3142
2858
|
return addHeapObject(ret);
|
|
3143
2859
|
};
|
|
Binary file
|