fleethub-core 1.8.7 → 1.8.10
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 +618 -1097
- package/node/fleethub_core.js +179 -426
- package/node/fleethub_core_bg.wasm +0 -0
- package/node/fleethub_core_bg.wasm.d.ts +87 -120
- package/package.json +1 -1
- package/pkg/fleethub_core.d.ts +618 -1097
- package/pkg/fleethub_core_bg.js +179 -425
- package/pkg/fleethub_core_bg.wasm +0 -0
- package/pkg/fleethub_core_bg.wasm.d.ts +87 -120
package/pkg/fleethub_core_bg.js
CHANGED
|
@@ -82,20 +82,6 @@ function getInt32Memory0() {
|
|
|
82
82
|
return cachedInt32Memory0;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
|
-
let heap_next = heap.length;
|
|
86
|
-
|
|
87
|
-
function dropObject(idx) {
|
|
88
|
-
if (idx < 36) return;
|
|
89
|
-
heap[idx] = heap_next;
|
|
90
|
-
heap_next = idx;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function takeObject(idx) {
|
|
94
|
-
const ret = getObject(idx);
|
|
95
|
-
dropObject(idx);
|
|
96
|
-
return ret;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
85
|
const lTextDecoder = typeof TextDecoder === 'undefined' ? (0, module.require)('util').TextDecoder : TextDecoder;
|
|
100
86
|
|
|
101
87
|
let cachedTextDecoder = new lTextDecoder('utf-8', { ignoreBOM: true, fatal: true });
|
|
@@ -106,6 +92,8 @@ function getStringFromWasm0(ptr, len) {
|
|
|
106
92
|
return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
|
|
107
93
|
}
|
|
108
94
|
|
|
95
|
+
let heap_next = heap.length;
|
|
96
|
+
|
|
109
97
|
function addHeapObject(obj) {
|
|
110
98
|
if (heap_next === heap.length) heap.push(heap.length + 1);
|
|
111
99
|
const idx = heap_next;
|
|
@@ -114,13 +102,31 @@ function addHeapObject(obj) {
|
|
|
114
102
|
heap[idx] = obj;
|
|
115
103
|
return idx;
|
|
116
104
|
}
|
|
105
|
+
|
|
106
|
+
function dropObject(idx) {
|
|
107
|
+
if (idx < 36) return;
|
|
108
|
+
heap[idx] = heap_next;
|
|
109
|
+
heap_next = idx;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
function takeObject(idx) {
|
|
113
|
+
const ret = getObject(idx);
|
|
114
|
+
dropObject(idx);
|
|
115
|
+
return ret;
|
|
116
|
+
}
|
|
117
117
|
/**
|
|
118
|
-
* @param {ShipConditions} value
|
|
119
|
-
* @returns {ShipConditions}
|
|
120
118
|
*/
|
|
121
|
-
export function
|
|
122
|
-
|
|
123
|
-
|
|
119
|
+
export function set_panic_hook() {
|
|
120
|
+
wasm.set_panic_hook();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
let cachedFloat64Memory0 = new Float64Array();
|
|
124
|
+
|
|
125
|
+
function getFloat64Memory0() {
|
|
126
|
+
if (cachedFloat64Memory0.byteLength === 0) {
|
|
127
|
+
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
128
|
+
}
|
|
129
|
+
return cachedFloat64Memory0;
|
|
124
130
|
}
|
|
125
131
|
|
|
126
132
|
function isLikeNone(x) {
|
|
@@ -147,33 +153,6 @@ const u32CvtShim = new Uint32Array(2);
|
|
|
147
153
|
|
|
148
154
|
const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
|
|
149
155
|
|
|
150
|
-
function _assertClass(instance, klass) {
|
|
151
|
-
if (!(instance instanceof klass)) {
|
|
152
|
-
throw new Error(`expected instance of ${klass.name}`);
|
|
153
|
-
}
|
|
154
|
-
return instance.ptr;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
let cachedFloat64Memory0 = new Float64Array();
|
|
158
|
-
|
|
159
|
-
function getFloat64Memory0() {
|
|
160
|
-
if (cachedFloat64Memory0.byteLength === 0) {
|
|
161
|
-
cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
|
|
162
|
-
}
|
|
163
|
-
return cachedFloat64Memory0;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
function getArrayU8FromWasm0(ptr, len) {
|
|
167
|
-
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
function passArray8ToWasm0(arg, malloc) {
|
|
171
|
-
const ptr = malloc(arg.length * 1);
|
|
172
|
-
getUint8Memory0().set(arg, ptr / 1);
|
|
173
|
-
WASM_VECTOR_LEN = arg.length;
|
|
174
|
-
return ptr;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
156
|
let cachedUint32Memory0 = new Uint32Array();
|
|
178
157
|
|
|
179
158
|
function getUint32Memory0() {
|
|
@@ -196,10 +175,31 @@ function getArrayJsValueFromWasm0(ptr, len) {
|
|
|
196
175
|
function getArrayU16FromWasm0(ptr, len) {
|
|
197
176
|
return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
|
|
198
177
|
}
|
|
178
|
+
|
|
179
|
+
function _assertClass(instance, klass) {
|
|
180
|
+
if (!(instance instanceof klass)) {
|
|
181
|
+
throw new Error(`expected instance of ${klass.name}`);
|
|
182
|
+
}
|
|
183
|
+
return instance.ptr;
|
|
184
|
+
}
|
|
199
185
|
/**
|
|
186
|
+
* @param {ShipConditions} value
|
|
187
|
+
* @returns {ShipConditions}
|
|
200
188
|
*/
|
|
201
|
-
export function
|
|
202
|
-
wasm.
|
|
189
|
+
export function parse_ship_conditions(value) {
|
|
190
|
+
const ret = wasm.parse_ship_conditions(addHeapObject(value));
|
|
191
|
+
return takeObject(ret);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
function getArrayU8FromWasm0(ptr, len) {
|
|
195
|
+
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function passArray8ToWasm0(arg, malloc) {
|
|
199
|
+
const ptr = malloc(arg.length * 1);
|
|
200
|
+
getUint8Memory0().set(arg, ptr / 1);
|
|
201
|
+
WASM_VECTOR_LEN = arg.length;
|
|
202
|
+
return ptr;
|
|
203
203
|
}
|
|
204
204
|
|
|
205
205
|
function handleError(f, args) {
|
|
@@ -629,34 +629,30 @@ export class Comp {
|
|
|
629
629
|
}
|
|
630
630
|
/**
|
|
631
631
|
* @param {FleetType} ft
|
|
632
|
-
* @param {
|
|
632
|
+
* @param {ShipKey} key
|
|
633
633
|
* @returns {Ship | undefined}
|
|
634
634
|
*/
|
|
635
635
|
get_ship_with_clone(ft, key) {
|
|
636
|
-
const
|
|
637
|
-
const len0 = WASM_VECTOR_LEN;
|
|
638
|
-
const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), ptr0, len0);
|
|
636
|
+
const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), addHeapObject(key));
|
|
639
637
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
640
638
|
}
|
|
641
639
|
/**
|
|
642
640
|
* @param {FleetType} ft
|
|
643
|
-
* @param {
|
|
641
|
+
* @param {ShipKey} key
|
|
644
642
|
* @returns {string | undefined}
|
|
645
643
|
*/
|
|
646
644
|
get_ship_entity_id(ft, key) {
|
|
647
645
|
try {
|
|
648
646
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
649
|
-
|
|
650
|
-
const len0 = WASM_VECTOR_LEN;
|
|
651
|
-
wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), ptr0, len0);
|
|
647
|
+
wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), addHeapObject(key));
|
|
652
648
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
653
649
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
654
|
-
let
|
|
650
|
+
let v0;
|
|
655
651
|
if (r0 !== 0) {
|
|
656
|
-
|
|
652
|
+
v0 = getStringFromWasm0(r0, r1).slice();
|
|
657
653
|
wasm.__wbindgen_free(r0, r1 * 1);
|
|
658
654
|
}
|
|
659
|
-
return
|
|
655
|
+
return v0;
|
|
660
656
|
} finally {
|
|
661
657
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
662
658
|
}
|
|
@@ -738,6 +734,21 @@ export class Comp {
|
|
|
738
734
|
const ret = wasm.comp_get_ship_conditions(this.ptr, ship.ptr, isLikeNone(formation) ? 0 : addHeapObject(formation));
|
|
739
735
|
return takeObject(ret);
|
|
740
736
|
}
|
|
737
|
+
/**
|
|
738
|
+
* @param {FleetType} fleet_type
|
|
739
|
+
* @returns {number | undefined}
|
|
740
|
+
*/
|
|
741
|
+
fleet_los_mod(fleet_type) {
|
|
742
|
+
try {
|
|
743
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
744
|
+
wasm.comp_fleet_los_mod(retptr, this.ptr, addHeapObject(fleet_type));
|
|
745
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
746
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
747
|
+
return r0 === 0 ? undefined : r2;
|
|
748
|
+
} finally {
|
|
749
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
750
|
+
}
|
|
751
|
+
}
|
|
741
752
|
}
|
|
742
753
|
|
|
743
754
|
const FhCoreFinalization = new FinalizationRegistry(ptr => wasm.__wbg_fhcore_free(ptr));
|
|
@@ -1049,13 +1060,11 @@ export class Fleet {
|
|
|
1049
1060
|
return ret >>> 0;
|
|
1050
1061
|
}
|
|
1051
1062
|
/**
|
|
1052
|
-
* @param {
|
|
1063
|
+
* @param {ShipKey} key
|
|
1053
1064
|
* @returns {Ship | undefined}
|
|
1054
1065
|
*/
|
|
1055
1066
|
get_ship(key) {
|
|
1056
|
-
const
|
|
1057
|
-
const len0 = WASM_VECTOR_LEN;
|
|
1058
|
-
const ret = wasm.fleet_get_ship(this.ptr, ptr0, len0);
|
|
1067
|
+
const ret = wasm.fleet_get_ship(this.ptr, addHeapObject(key));
|
|
1059
1068
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
1060
1069
|
}
|
|
1061
1070
|
/**
|
|
@@ -1203,7 +1212,7 @@ export class Gear {
|
|
|
1203
1212
|
get hash() {
|
|
1204
1213
|
try {
|
|
1205
1214
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1206
|
-
wasm.
|
|
1215
|
+
wasm.__wbg_get_airsquadron_hash(retptr, this.ptr);
|
|
1207
1216
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1208
1217
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1209
1218
|
u32CvtShim[0] = r0;
|
|
@@ -1642,232 +1651,6 @@ export class Gear {
|
|
|
1642
1651
|
}
|
|
1643
1652
|
}
|
|
1644
1653
|
|
|
1645
|
-
const IBonusesFinalization = new FinalizationRegistry(ptr => wasm.__wbg_ibonuses_free(ptr));
|
|
1646
|
-
/**
|
|
1647
|
-
*/
|
|
1648
|
-
export class IBonuses {
|
|
1649
|
-
|
|
1650
|
-
__destroy_into_raw() {
|
|
1651
|
-
const ptr = this.ptr;
|
|
1652
|
-
this.ptr = 0;
|
|
1653
|
-
IBonusesFinalization.unregister(this);
|
|
1654
|
-
return ptr;
|
|
1655
|
-
}
|
|
1656
|
-
|
|
1657
|
-
free() {
|
|
1658
|
-
const ptr = this.__destroy_into_raw();
|
|
1659
|
-
wasm.__wbg_ibonuses_free(ptr);
|
|
1660
|
-
}
|
|
1661
|
-
/**
|
|
1662
|
-
* @returns {number}
|
|
1663
|
-
*/
|
|
1664
|
-
get shelling_power() {
|
|
1665
|
-
const ret = wasm.__wbg_get_ibonuses_shelling_power(this.ptr);
|
|
1666
|
-
return ret;
|
|
1667
|
-
}
|
|
1668
|
-
/**
|
|
1669
|
-
* @param {number} arg0
|
|
1670
|
-
*/
|
|
1671
|
-
set shelling_power(arg0) {
|
|
1672
|
-
wasm.__wbg_set_ibonuses_shelling_power(this.ptr, arg0);
|
|
1673
|
-
}
|
|
1674
|
-
/**
|
|
1675
|
-
* @returns {number}
|
|
1676
|
-
*/
|
|
1677
|
-
get carrier_shelling_power() {
|
|
1678
|
-
const ret = wasm.__wbg_get_ibonuses_carrier_shelling_power(this.ptr);
|
|
1679
|
-
return ret;
|
|
1680
|
-
}
|
|
1681
|
-
/**
|
|
1682
|
-
* @param {number} arg0
|
|
1683
|
-
*/
|
|
1684
|
-
set carrier_shelling_power(arg0) {
|
|
1685
|
-
wasm.__wbg_set_ibonuses_carrier_shelling_power(this.ptr, arg0);
|
|
1686
|
-
}
|
|
1687
|
-
/**
|
|
1688
|
-
* @returns {number}
|
|
1689
|
-
*/
|
|
1690
|
-
get shelling_accuracy() {
|
|
1691
|
-
const ret = wasm.__wbg_get_ibonuses_shelling_accuracy(this.ptr);
|
|
1692
|
-
return ret;
|
|
1693
|
-
}
|
|
1694
|
-
/**
|
|
1695
|
-
* @param {number} arg0
|
|
1696
|
-
*/
|
|
1697
|
-
set shelling_accuracy(arg0) {
|
|
1698
|
-
wasm.__wbg_set_ibonuses_shelling_accuracy(this.ptr, arg0);
|
|
1699
|
-
}
|
|
1700
|
-
/**
|
|
1701
|
-
* @returns {number}
|
|
1702
|
-
*/
|
|
1703
|
-
get torpedo_power() {
|
|
1704
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_power(this.ptr);
|
|
1705
|
-
return ret;
|
|
1706
|
-
}
|
|
1707
|
-
/**
|
|
1708
|
-
* @param {number} arg0
|
|
1709
|
-
*/
|
|
1710
|
-
set torpedo_power(arg0) {
|
|
1711
|
-
wasm.__wbg_set_ibonuses_torpedo_power(this.ptr, arg0);
|
|
1712
|
-
}
|
|
1713
|
-
/**
|
|
1714
|
-
* @returns {number}
|
|
1715
|
-
*/
|
|
1716
|
-
get torpedo_accuracy() {
|
|
1717
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_accuracy(this.ptr);
|
|
1718
|
-
return ret;
|
|
1719
|
-
}
|
|
1720
|
-
/**
|
|
1721
|
-
* @param {number} arg0
|
|
1722
|
-
*/
|
|
1723
|
-
set torpedo_accuracy(arg0) {
|
|
1724
|
-
wasm.__wbg_set_ibonuses_torpedo_accuracy(this.ptr, arg0);
|
|
1725
|
-
}
|
|
1726
|
-
/**
|
|
1727
|
-
* @returns {number}
|
|
1728
|
-
*/
|
|
1729
|
-
get torpedo_evasion() {
|
|
1730
|
-
const ret = wasm.__wbg_get_ibonuses_torpedo_evasion(this.ptr);
|
|
1731
|
-
return ret;
|
|
1732
|
-
}
|
|
1733
|
-
/**
|
|
1734
|
-
* @param {number} arg0
|
|
1735
|
-
*/
|
|
1736
|
-
set torpedo_evasion(arg0) {
|
|
1737
|
-
wasm.__wbg_set_ibonuses_torpedo_evasion(this.ptr, arg0);
|
|
1738
|
-
}
|
|
1739
|
-
/**
|
|
1740
|
-
* @returns {number}
|
|
1741
|
-
*/
|
|
1742
|
-
get asw_power() {
|
|
1743
|
-
const ret = wasm.__wbg_get_ibonuses_asw_power(this.ptr);
|
|
1744
|
-
return ret;
|
|
1745
|
-
}
|
|
1746
|
-
/**
|
|
1747
|
-
* @param {number} arg0
|
|
1748
|
-
*/
|
|
1749
|
-
set asw_power(arg0) {
|
|
1750
|
-
wasm.__wbg_set_ibonuses_asw_power(this.ptr, arg0);
|
|
1751
|
-
}
|
|
1752
|
-
/**
|
|
1753
|
-
* @returns {number}
|
|
1754
|
-
*/
|
|
1755
|
-
get asw_accuracy() {
|
|
1756
|
-
const ret = wasm.__wbg_get_ibonuses_asw_accuracy(this.ptr);
|
|
1757
|
-
return ret;
|
|
1758
|
-
}
|
|
1759
|
-
/**
|
|
1760
|
-
* @param {number} arg0
|
|
1761
|
-
*/
|
|
1762
|
-
set asw_accuracy(arg0) {
|
|
1763
|
-
wasm.__wbg_set_ibonuses_asw_accuracy(this.ptr, arg0);
|
|
1764
|
-
}
|
|
1765
|
-
/**
|
|
1766
|
-
* @returns {number}
|
|
1767
|
-
*/
|
|
1768
|
-
get night_power() {
|
|
1769
|
-
const ret = wasm.__wbg_get_ibonuses_night_power(this.ptr);
|
|
1770
|
-
return ret;
|
|
1771
|
-
}
|
|
1772
|
-
/**
|
|
1773
|
-
* @param {number} arg0
|
|
1774
|
-
*/
|
|
1775
|
-
set night_power(arg0) {
|
|
1776
|
-
wasm.__wbg_set_ibonuses_night_power(this.ptr, arg0);
|
|
1777
|
-
}
|
|
1778
|
-
/**
|
|
1779
|
-
* @returns {number}
|
|
1780
|
-
*/
|
|
1781
|
-
get night_accuracy() {
|
|
1782
|
-
const ret = wasm.__wbg_get_ibonuses_night_accuracy(this.ptr);
|
|
1783
|
-
return ret;
|
|
1784
|
-
}
|
|
1785
|
-
/**
|
|
1786
|
-
* @param {number} arg0
|
|
1787
|
-
*/
|
|
1788
|
-
set night_accuracy(arg0) {
|
|
1789
|
-
wasm.__wbg_set_ibonuses_night_accuracy(this.ptr, arg0);
|
|
1790
|
-
}
|
|
1791
|
-
/**
|
|
1792
|
-
* @returns {number}
|
|
1793
|
-
*/
|
|
1794
|
-
get defense_power() {
|
|
1795
|
-
const ret = wasm.__wbg_get_ibonuses_defense_power(this.ptr);
|
|
1796
|
-
return ret;
|
|
1797
|
-
}
|
|
1798
|
-
/**
|
|
1799
|
-
* @param {number} arg0
|
|
1800
|
-
*/
|
|
1801
|
-
set defense_power(arg0) {
|
|
1802
|
-
wasm.__wbg_set_ibonuses_defense_power(this.ptr, arg0);
|
|
1803
|
-
}
|
|
1804
|
-
/**
|
|
1805
|
-
* @returns {number}
|
|
1806
|
-
*/
|
|
1807
|
-
get contact_selection() {
|
|
1808
|
-
const ret = wasm.__wbg_get_ibonuses_contact_selection(this.ptr);
|
|
1809
|
-
return ret;
|
|
1810
|
-
}
|
|
1811
|
-
/**
|
|
1812
|
-
* @param {number} arg0
|
|
1813
|
-
*/
|
|
1814
|
-
set contact_selection(arg0) {
|
|
1815
|
-
wasm.__wbg_set_ibonuses_contact_selection(this.ptr, arg0);
|
|
1816
|
-
}
|
|
1817
|
-
/**
|
|
1818
|
-
* @returns {number}
|
|
1819
|
-
*/
|
|
1820
|
-
get fighter_power() {
|
|
1821
|
-
const ret = wasm.__wbg_get_ibonuses_fighter_power(this.ptr);
|
|
1822
|
-
return ret;
|
|
1823
|
-
}
|
|
1824
|
-
/**
|
|
1825
|
-
* @param {number} arg0
|
|
1826
|
-
*/
|
|
1827
|
-
set fighter_power(arg0) {
|
|
1828
|
-
wasm.__wbg_set_ibonuses_fighter_power(this.ptr, arg0);
|
|
1829
|
-
}
|
|
1830
|
-
/**
|
|
1831
|
-
* @returns {number}
|
|
1832
|
-
*/
|
|
1833
|
-
get ship_anti_air() {
|
|
1834
|
-
const ret = wasm.__wbg_get_ibonuses_ship_anti_air(this.ptr);
|
|
1835
|
-
return ret;
|
|
1836
|
-
}
|
|
1837
|
-
/**
|
|
1838
|
-
* @param {number} arg0
|
|
1839
|
-
*/
|
|
1840
|
-
set ship_anti_air(arg0) {
|
|
1841
|
-
wasm.__wbg_set_ibonuses_ship_anti_air(this.ptr, arg0);
|
|
1842
|
-
}
|
|
1843
|
-
/**
|
|
1844
|
-
* @returns {number}
|
|
1845
|
-
*/
|
|
1846
|
-
get fleet_anti_air() {
|
|
1847
|
-
const ret = wasm.__wbg_get_ibonuses_fleet_anti_air(this.ptr);
|
|
1848
|
-
return ret;
|
|
1849
|
-
}
|
|
1850
|
-
/**
|
|
1851
|
-
* @param {number} arg0
|
|
1852
|
-
*/
|
|
1853
|
-
set fleet_anti_air(arg0) {
|
|
1854
|
-
wasm.__wbg_set_ibonuses_fleet_anti_air(this.ptr, arg0);
|
|
1855
|
-
}
|
|
1856
|
-
/**
|
|
1857
|
-
* @returns {number}
|
|
1858
|
-
*/
|
|
1859
|
-
get elos() {
|
|
1860
|
-
const ret = wasm.__wbg_get_ibonuses_elos(this.ptr);
|
|
1861
|
-
return ret;
|
|
1862
|
-
}
|
|
1863
|
-
/**
|
|
1864
|
-
* @param {number} arg0
|
|
1865
|
-
*/
|
|
1866
|
-
set elos(arg0) {
|
|
1867
|
-
wasm.__wbg_set_ibonuses_elos(this.ptr, arg0);
|
|
1868
|
-
}
|
|
1869
|
-
}
|
|
1870
|
-
|
|
1871
1654
|
const OrgFinalization = new FinalizationRegistry(ptr => wasm.__wbg_org_free(ptr));
|
|
1872
1655
|
/**
|
|
1873
1656
|
*/
|
|
@@ -1946,35 +1729,33 @@ export class Org {
|
|
|
1946
1729
|
return takeObject(ret);
|
|
1947
1730
|
}
|
|
1948
1731
|
/**
|
|
1949
|
-
* @returns {
|
|
1732
|
+
* @returns {FleetKey}
|
|
1950
1733
|
*/
|
|
1951
1734
|
get sortie() {
|
|
1952
|
-
|
|
1953
|
-
|
|
1954
|
-
wasm.__wbg_get_org_sortie(retptr, this.ptr);
|
|
1955
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1956
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1957
|
-
return getStringFromWasm0(r0, r1);
|
|
1958
|
-
} finally {
|
|
1959
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1960
|
-
wasm.__wbindgen_free(r0, r1);
|
|
1961
|
-
}
|
|
1735
|
+
const ret = wasm.__wbg_get_org_sortie(this.ptr);
|
|
1736
|
+
return takeObject(ret);
|
|
1962
1737
|
}
|
|
1963
1738
|
/**
|
|
1964
|
-
* @
|
|
1739
|
+
* @returns {FleetKey | undefined}
|
|
1965
1740
|
*/
|
|
1966
|
-
|
|
1967
|
-
const
|
|
1968
|
-
|
|
1969
|
-
|
|
1741
|
+
get route_sup() {
|
|
1742
|
+
const ret = wasm.__wbg_get_org_route_sup(this.ptr);
|
|
1743
|
+
return takeObject(ret);
|
|
1744
|
+
}
|
|
1745
|
+
/**
|
|
1746
|
+
* @returns {FleetKey | undefined}
|
|
1747
|
+
*/
|
|
1748
|
+
get boss_sup() {
|
|
1749
|
+
const ret = wasm.__wbg_get_org_boss_sup(this.ptr);
|
|
1750
|
+
return takeObject(ret);
|
|
1970
1751
|
}
|
|
1971
1752
|
/**
|
|
1972
1753
|
* @returns {string | undefined}
|
|
1973
1754
|
*/
|
|
1974
|
-
|
|
1755
|
+
first_ship_id() {
|
|
1975
1756
|
try {
|
|
1976
1757
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
1977
|
-
wasm.
|
|
1758
|
+
wasm.org_first_ship_id(retptr, this.ptr);
|
|
1978
1759
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
1979
1760
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
1980
1761
|
let v0;
|
|
@@ -1988,20 +1769,23 @@ export class Org {
|
|
|
1988
1769
|
}
|
|
1989
1770
|
}
|
|
1990
1771
|
/**
|
|
1991
|
-
* @param {
|
|
1772
|
+
* @param {FleetKey} fleet_key
|
|
1773
|
+
* @param {ShipKey} ship_key
|
|
1774
|
+
* @returns {number | undefined}
|
|
1992
1775
|
*/
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
wasm.__wbg_set_org_route_sup(this.ptr, ptr0, len0);
|
|
1776
|
+
get_ship_mid(fleet_key, ship_key) {
|
|
1777
|
+
const ret = wasm.org_get_ship_mid(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
1778
|
+
return ret === 0xFFFFFF ? undefined : ret;
|
|
1997
1779
|
}
|
|
1998
1780
|
/**
|
|
1781
|
+
* @param {FleetKey} fleet_key
|
|
1782
|
+
* @param {ShipKey} ship_key
|
|
1999
1783
|
* @returns {string | undefined}
|
|
2000
1784
|
*/
|
|
2001
|
-
|
|
1785
|
+
get_ship_eid(fleet_key, ship_key) {
|
|
2002
1786
|
try {
|
|
2003
1787
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2004
|
-
wasm.
|
|
1788
|
+
wasm.org_get_ship_eid(retptr, this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
2005
1789
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2006
1790
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2007
1791
|
let v0;
|
|
@@ -2015,42 +1799,19 @@ export class Org {
|
|
|
2015
1799
|
}
|
|
2016
1800
|
}
|
|
2017
1801
|
/**
|
|
2018
|
-
* @param {
|
|
2019
|
-
|
|
2020
|
-
set boss_sup(arg0) {
|
|
2021
|
-
var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2022
|
-
var len0 = WASM_VECTOR_LEN;
|
|
2023
|
-
wasm.__wbg_set_org_boss_sup(this.ptr, ptr0, len0);
|
|
2024
|
-
}
|
|
2025
|
-
/**
|
|
2026
|
-
* @param {Role} role
|
|
2027
|
-
* @returns {number}
|
|
2028
|
-
*/
|
|
2029
|
-
fleet_len(role) {
|
|
2030
|
-
const ret = wasm.org_fleet_len(this.ptr, addHeapObject(role));
|
|
2031
|
-
return ret >>> 0;
|
|
2032
|
-
}
|
|
2033
|
-
/**
|
|
2034
|
-
* @param {Role} role
|
|
2035
|
-
* @param {string} key
|
|
2036
|
-
* @returns {string | undefined}
|
|
1802
|
+
* @param {FleetKey} key
|
|
1803
|
+
* @returns {string}
|
|
2037
1804
|
*/
|
|
2038
|
-
|
|
1805
|
+
get_fleet_id(key) {
|
|
2039
1806
|
try {
|
|
2040
1807
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2041
|
-
|
|
2042
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2043
|
-
wasm.org_get_ship_entity_id(retptr, this.ptr, addHeapObject(role), ptr0, len0);
|
|
1808
|
+
wasm.org_get_fleet_id(retptr, this.ptr, addHeapObject(key));
|
|
2044
1809
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2045
1810
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2046
|
-
|
|
2047
|
-
if (r0 !== 0) {
|
|
2048
|
-
v1 = getStringFromWasm0(r0, r1).slice();
|
|
2049
|
-
wasm.__wbindgen_free(r0, r1 * 1);
|
|
2050
|
-
}
|
|
2051
|
-
return v1;
|
|
1811
|
+
return getStringFromWasm0(r0, r1);
|
|
2052
1812
|
} finally {
|
|
2053
1813
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
1814
|
+
wasm.__wbindgen_free(r0, r1);
|
|
2054
1815
|
}
|
|
2055
1816
|
}
|
|
2056
1817
|
/**
|
|
@@ -2070,21 +1831,6 @@ export class Org {
|
|
|
2070
1831
|
}
|
|
2071
1832
|
}
|
|
2072
1833
|
/**
|
|
2073
|
-
* @param {Role} role
|
|
2074
|
-
* @returns {number | undefined}
|
|
2075
|
-
*/
|
|
2076
|
-
fleet_los_mod(role) {
|
|
2077
|
-
try {
|
|
2078
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2079
|
-
wasm.org_fleet_los_mod(retptr, this.ptr, addHeapObject(role));
|
|
2080
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2081
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2082
|
-
return r0 === 0 ? undefined : r2;
|
|
2083
|
-
} finally {
|
|
2084
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2085
|
-
}
|
|
2086
|
-
}
|
|
2087
|
-
/**
|
|
2088
1834
|
* @returns {Uint16Array}
|
|
2089
1835
|
*/
|
|
2090
1836
|
main_ship_ids() {
|
|
@@ -2117,24 +1863,20 @@ export class Org {
|
|
|
2117
1863
|
}
|
|
2118
1864
|
}
|
|
2119
1865
|
/**
|
|
2120
|
-
* @param {
|
|
1866
|
+
* @param {FleetKey} key
|
|
2121
1867
|
* @returns {Fleet}
|
|
2122
1868
|
*/
|
|
2123
1869
|
clone_fleet(key) {
|
|
2124
|
-
const
|
|
2125
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2126
|
-
const ret = wasm.org_clone_fleet(this.ptr, ptr0, len0);
|
|
1870
|
+
const ret = wasm.org_clone_fleet(this.ptr, addHeapObject(key));
|
|
2127
1871
|
return Fleet.__wrap(ret);
|
|
2128
1872
|
}
|
|
2129
1873
|
/**
|
|
2130
|
-
* @param {
|
|
2131
|
-
* @param {
|
|
1874
|
+
* @param {FleetKey} fleet_key
|
|
1875
|
+
* @param {ShipKey} ship_key
|
|
2132
1876
|
* @returns {Ship | undefined}
|
|
2133
1877
|
*/
|
|
2134
|
-
|
|
2135
|
-
const
|
|
2136
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2137
|
-
const ret = wasm.org_get_ship(this.ptr, addHeapObject(role), ptr0, len0);
|
|
1878
|
+
clone_ship(fleet_key, ship_key) {
|
|
1879
|
+
const ret = wasm.org_clone_ship(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
|
|
2138
1880
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
2139
1881
|
}
|
|
2140
1882
|
/**
|
|
@@ -2148,19 +1890,20 @@ export class Org {
|
|
|
2148
1890
|
return ret === 0 ? undefined : Ship.__wrap(ret);
|
|
2149
1891
|
}
|
|
2150
1892
|
/**
|
|
2151
|
-
* @param {
|
|
2152
|
-
* @returns {string}
|
|
1893
|
+
* @param {FleetKey} key
|
|
1894
|
+
* @returns {(string)[]}
|
|
2153
1895
|
*/
|
|
2154
|
-
|
|
1896
|
+
ship_keys(key) {
|
|
2155
1897
|
try {
|
|
2156
1898
|
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2157
|
-
wasm.
|
|
1899
|
+
wasm.org_ship_keys(retptr, this.ptr, addHeapObject(key));
|
|
2158
1900
|
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2159
1901
|
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
2160
|
-
|
|
1902
|
+
var v0 = getArrayJsValueFromWasm0(r0, r1).slice();
|
|
1903
|
+
wasm.__wbindgen_free(r0, r1 * 4);
|
|
1904
|
+
return v0;
|
|
2161
1905
|
} finally {
|
|
2162
1906
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2163
|
-
wasm.__wbindgen_free(r0, r1);
|
|
2164
1907
|
}
|
|
2165
1908
|
}
|
|
2166
1909
|
/**
|
|
@@ -2171,13 +1914,11 @@ export class Org {
|
|
|
2171
1914
|
return Comp.__wrap(ret);
|
|
2172
1915
|
}
|
|
2173
1916
|
/**
|
|
2174
|
-
* @param {
|
|
1917
|
+
* @param {FleetKey} key
|
|
2175
1918
|
* @returns {Comp}
|
|
2176
1919
|
*/
|
|
2177
1920
|
create_comp_by_key(key) {
|
|
2178
|
-
const
|
|
2179
|
-
const len0 = WASM_VECTOR_LEN;
|
|
2180
|
-
const ret = wasm.org_create_comp_by_key(this.ptr, ptr0, len0);
|
|
1921
|
+
const ret = wasm.org_create_comp_by_key(this.ptr, addHeapObject(key));
|
|
2181
1922
|
return Comp.__wrap(ret);
|
|
2182
1923
|
}
|
|
2183
1924
|
/**
|
|
@@ -2285,11 +2026,24 @@ export class Org {
|
|
|
2285
2026
|
return ret;
|
|
2286
2027
|
}
|
|
2287
2028
|
/**
|
|
2288
|
-
* @
|
|
2029
|
+
* @param {string} id
|
|
2030
|
+
* @param {number} x
|
|
2031
|
+
* @param {number} y
|
|
2032
|
+
* @returns {MoveShipPayload | undefined}
|
|
2289
2033
|
*/
|
|
2290
|
-
|
|
2291
|
-
const
|
|
2292
|
-
|
|
2034
|
+
create_move_ship_payload(id, x, y) {
|
|
2035
|
+
const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
2036
|
+
const len0 = WASM_VECTOR_LEN;
|
|
2037
|
+
const ret = wasm.org_create_move_ship_payload(this.ptr, ptr0, len0, x, y);
|
|
2038
|
+
return takeObject(ret);
|
|
2039
|
+
}
|
|
2040
|
+
/**
|
|
2041
|
+
* @param {FleetKey} key
|
|
2042
|
+
* @returns {FleetType | undefined}
|
|
2043
|
+
*/
|
|
2044
|
+
get_fleet_type(key) {
|
|
2045
|
+
const ret = wasm.org_get_fleet_type(this.ptr, addHeapObject(key));
|
|
2046
|
+
return takeObject(ret);
|
|
2293
2047
|
}
|
|
2294
2048
|
}
|
|
2295
2049
|
|
|
@@ -2317,6 +2071,43 @@ export class Ship {
|
|
|
2317
2071
|
wasm.__wbg_ship_free(ptr);
|
|
2318
2072
|
}
|
|
2319
2073
|
/**
|
|
2074
|
+
* @returns {number | undefined}
|
|
2075
|
+
*/
|
|
2076
|
+
state_day_gunfit_accuracy() {
|
|
2077
|
+
try {
|
|
2078
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2079
|
+
wasm.ship_state_day_gunfit_accuracy(retptr, this.ptr);
|
|
2080
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2081
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2082
|
+
return r0 === 0 ? undefined : r2;
|
|
2083
|
+
} finally {
|
|
2084
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2085
|
+
}
|
|
2086
|
+
}
|
|
2087
|
+
/**
|
|
2088
|
+
* @returns {number | undefined}
|
|
2089
|
+
*/
|
|
2090
|
+
state_night_gunfit_accuracy() {
|
|
2091
|
+
try {
|
|
2092
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
2093
|
+
wasm.ship_state_night_gunfit_accuracy(retptr, this.ptr);
|
|
2094
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
2095
|
+
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
2096
|
+
return r0 === 0 ? undefined : r2;
|
|
2097
|
+
} finally {
|
|
2098
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
2099
|
+
}
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
* フィット砲補正
|
|
2103
|
+
* @param {boolean} is_night
|
|
2104
|
+
* @returns {number}
|
|
2105
|
+
*/
|
|
2106
|
+
gunfit_accuracy(is_night) {
|
|
2107
|
+
const ret = wasm.ship_gunfit_accuracy(this.ptr, is_night);
|
|
2108
|
+
return ret;
|
|
2109
|
+
}
|
|
2110
|
+
/**
|
|
2320
2111
|
* @returns {string}
|
|
2321
2112
|
*/
|
|
2322
2113
|
get id() {
|
|
@@ -3072,43 +2863,6 @@ export class Ship {
|
|
|
3072
2863
|
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3073
2864
|
}
|
|
3074
2865
|
}
|
|
3075
|
-
/**
|
|
3076
|
-
* @returns {number | undefined}
|
|
3077
|
-
*/
|
|
3078
|
-
state_day_gunfit_accuracy() {
|
|
3079
|
-
try {
|
|
3080
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3081
|
-
wasm.ship_state_day_gunfit_accuracy(retptr, this.ptr);
|
|
3082
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3083
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3084
|
-
return r0 === 0 ? undefined : r2;
|
|
3085
|
-
} finally {
|
|
3086
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3087
|
-
}
|
|
3088
|
-
}
|
|
3089
|
-
/**
|
|
3090
|
-
* @returns {number | undefined}
|
|
3091
|
-
*/
|
|
3092
|
-
state_night_gunfit_accuracy() {
|
|
3093
|
-
try {
|
|
3094
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
3095
|
-
wasm.ship_state_night_gunfit_accuracy(retptr, this.ptr);
|
|
3096
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
3097
|
-
var r2 = getFloat64Memory0()[retptr / 8 + 1];
|
|
3098
|
-
return r0 === 0 ? undefined : r2;
|
|
3099
|
-
} finally {
|
|
3100
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
3101
|
-
}
|
|
3102
|
-
}
|
|
3103
|
-
/**
|
|
3104
|
-
* フィット砲補正
|
|
3105
|
-
* @param {boolean} is_night
|
|
3106
|
-
* @returns {number}
|
|
3107
|
-
*/
|
|
3108
|
-
gunfit_accuracy(is_night) {
|
|
3109
|
-
const ret = wasm.ship_gunfit_accuracy(this.ptr, is_night);
|
|
3110
|
-
return ret;
|
|
3111
|
-
}
|
|
3112
2866
|
}
|
|
3113
2867
|
|
|
3114
2868
|
export function __wbindgen_json_serialize(arg0, arg1) {
|
|
@@ -3120,16 +2874,16 @@ export function __wbindgen_json_serialize(arg0, arg1) {
|
|
|
3120
2874
|
getInt32Memory0()[arg0 / 4 + 0] = ptr0;
|
|
3121
2875
|
};
|
|
3122
2876
|
|
|
3123
|
-
export function __wbindgen_object_drop_ref(arg0) {
|
|
3124
|
-
takeObject(arg0);
|
|
3125
|
-
};
|
|
3126
|
-
|
|
3127
2877
|
export function __wbindgen_string_new(arg0, arg1) {
|
|
3128
2878
|
const ret = getStringFromWasm0(arg0, arg1);
|
|
3129
2879
|
return addHeapObject(ret);
|
|
3130
2880
|
};
|
|
3131
2881
|
|
|
3132
|
-
export function
|
|
2882
|
+
export function __wbindgen_object_drop_ref(arg0) {
|
|
2883
|
+
takeObject(arg0);
|
|
2884
|
+
};
|
|
2885
|
+
|
|
2886
|
+
export function __wbg_createEquipmentBonuses_5c51b37ac8d29697(arg0, arg1) {
|
|
3133
2887
|
const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
|
|
3134
2888
|
return addHeapObject(ret);
|
|
3135
2889
|
};
|