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.
@@ -83,20 +83,6 @@ function getInt32Memory0() {
83
83
  return cachedInt32Memory0;
84
84
  }
85
85
 
86
- let heap_next = heap.length;
87
-
88
- function dropObject(idx) {
89
- if (idx < 36) return;
90
- heap[idx] = heap_next;
91
- heap_next = idx;
92
- }
93
-
94
- function takeObject(idx) {
95
- const ret = getObject(idx);
96
- dropObject(idx);
97
- return ret;
98
- }
99
-
100
86
  let cachedTextDecoder = new TextDecoder('utf-8', { ignoreBOM: true, fatal: true });
101
87
 
102
88
  cachedTextDecoder.decode();
@@ -105,6 +91,8 @@ function getStringFromWasm0(ptr, len) {
105
91
  return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
106
92
  }
107
93
 
94
+ let heap_next = heap.length;
95
+
108
96
  function addHeapObject(obj) {
109
97
  if (heap_next === heap.length) heap.push(heap.length + 1);
110
98
  const idx = heap_next;
@@ -113,15 +101,33 @@ function addHeapObject(obj) {
113
101
  heap[idx] = obj;
114
102
  return idx;
115
103
  }
104
+
105
+ function dropObject(idx) {
106
+ if (idx < 36) return;
107
+ heap[idx] = heap_next;
108
+ heap_next = idx;
109
+ }
110
+
111
+ function takeObject(idx) {
112
+ const ret = getObject(idx);
113
+ dropObject(idx);
114
+ return ret;
115
+ }
116
116
  /**
117
- * @param {ShipConditions} value
118
- * @returns {ShipConditions}
119
117
  */
120
- module.exports.parse_ship_conditions = function(value) {
121
- const ret = wasm.parse_ship_conditions(addHeapObject(value));
122
- return takeObject(ret);
118
+ module.exports.set_panic_hook = function() {
119
+ wasm.set_panic_hook();
123
120
  };
124
121
 
122
+ let cachedFloat64Memory0 = new Float64Array();
123
+
124
+ function getFloat64Memory0() {
125
+ if (cachedFloat64Memory0.byteLength === 0) {
126
+ cachedFloat64Memory0 = new Float64Array(wasm.memory.buffer);
127
+ }
128
+ return cachedFloat64Memory0;
129
+ }
130
+
125
131
  function isLikeNone(x) {
126
132
  return x === undefined || x === null;
127
133
  }
@@ -146,33 +152,6 @@ const u32CvtShim = new Uint32Array(2);
146
152
 
147
153
  const uint64CvtShim = new BigUint64Array(u32CvtShim.buffer);
148
154
 
149
- function _assertClass(instance, klass) {
150
- if (!(instance instanceof klass)) {
151
- throw new Error(`expected instance of ${klass.name}`);
152
- }
153
- return instance.ptr;
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
- }
175
-
176
155
  let cachedUint32Memory0 = new Uint32Array();
177
156
 
178
157
  function getUint32Memory0() {
@@ -195,12 +174,33 @@ function getArrayJsValueFromWasm0(ptr, len) {
195
174
  function getArrayU16FromWasm0(ptr, len) {
196
175
  return getUint16Memory0().subarray(ptr / 2, ptr / 2 + len);
197
176
  }
177
+
178
+ function _assertClass(instance, klass) {
179
+ if (!(instance instanceof klass)) {
180
+ throw new Error(`expected instance of ${klass.name}`);
181
+ }
182
+ return instance.ptr;
183
+ }
198
184
  /**
185
+ * @param {ShipConditions} value
186
+ * @returns {ShipConditions}
199
187
  */
200
- module.exports.set_panic_hook = function() {
201
- wasm.set_panic_hook();
188
+ module.exports.parse_ship_conditions = function(value) {
189
+ const ret = wasm.parse_ship_conditions(addHeapObject(value));
190
+ return takeObject(ret);
202
191
  };
203
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
+
204
204
  function handleError(f, args) {
205
205
  try {
206
206
  return f.apply(this, args);
@@ -630,34 +630,30 @@ class Comp {
630
630
  }
631
631
  /**
632
632
  * @param {FleetType} ft
633
- * @param {string} key
633
+ * @param {ShipKey} key
634
634
  * @returns {Ship | undefined}
635
635
  */
636
636
  get_ship_with_clone(ft, key) {
637
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
638
- const len0 = WASM_VECTOR_LEN;
639
- const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), ptr0, len0);
637
+ const ret = wasm.comp_get_ship_with_clone(this.ptr, addHeapObject(ft), addHeapObject(key));
640
638
  return ret === 0 ? undefined : Ship.__wrap(ret);
641
639
  }
642
640
  /**
643
641
  * @param {FleetType} ft
644
- * @param {string} key
642
+ * @param {ShipKey} key
645
643
  * @returns {string | undefined}
646
644
  */
647
645
  get_ship_entity_id(ft, key) {
648
646
  try {
649
647
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
650
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
651
- const len0 = WASM_VECTOR_LEN;
652
- wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), ptr0, len0);
648
+ wasm.comp_get_ship_entity_id(retptr, this.ptr, addHeapObject(ft), addHeapObject(key));
653
649
  var r0 = getInt32Memory0()[retptr / 4 + 0];
654
650
  var r1 = getInt32Memory0()[retptr / 4 + 1];
655
- let v1;
651
+ let v0;
656
652
  if (r0 !== 0) {
657
- v1 = getStringFromWasm0(r0, r1).slice();
653
+ v0 = getStringFromWasm0(r0, r1).slice();
658
654
  wasm.__wbindgen_free(r0, r1 * 1);
659
655
  }
660
- return v1;
656
+ return v0;
661
657
  } finally {
662
658
  wasm.__wbindgen_add_to_stack_pointer(16);
663
659
  }
@@ -739,6 +735,21 @@ class Comp {
739
735
  const ret = wasm.comp_get_ship_conditions(this.ptr, ship.ptr, isLikeNone(formation) ? 0 : addHeapObject(formation));
740
736
  return takeObject(ret);
741
737
  }
738
+ /**
739
+ * @param {FleetType} fleet_type
740
+ * @returns {number | undefined}
741
+ */
742
+ fleet_los_mod(fleet_type) {
743
+ try {
744
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
745
+ wasm.comp_fleet_los_mod(retptr, this.ptr, addHeapObject(fleet_type));
746
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
747
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
748
+ return r0 === 0 ? undefined : r2;
749
+ } finally {
750
+ wasm.__wbindgen_add_to_stack_pointer(16);
751
+ }
752
+ }
742
753
  }
743
754
  module.exports.Comp = Comp;
744
755
 
@@ -1052,13 +1063,11 @@ class Fleet {
1052
1063
  return ret >>> 0;
1053
1064
  }
1054
1065
  /**
1055
- * @param {string} key
1066
+ * @param {ShipKey} key
1056
1067
  * @returns {Ship | undefined}
1057
1068
  */
1058
1069
  get_ship(key) {
1059
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1060
- const len0 = WASM_VECTOR_LEN;
1061
- const ret = wasm.fleet_get_ship(this.ptr, ptr0, len0);
1070
+ const ret = wasm.fleet_get_ship(this.ptr, addHeapObject(key));
1062
1071
  return ret === 0 ? undefined : Ship.__wrap(ret);
1063
1072
  }
1064
1073
  /**
@@ -1207,7 +1216,7 @@ class Gear {
1207
1216
  get hash() {
1208
1217
  try {
1209
1218
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1210
- wasm.__wbg_get_gear_hash(retptr, this.ptr);
1219
+ wasm.__wbg_get_airsquadron_hash(retptr, this.ptr);
1211
1220
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1212
1221
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1213
1222
  u32CvtShim[0] = r0;
@@ -1647,233 +1656,6 @@ class Gear {
1647
1656
  }
1648
1657
  module.exports.Gear = Gear;
1649
1658
 
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
1659
  const OrgFinalization = new FinalizationRegistry(ptr => wasm.__wbg_org_free(ptr));
1878
1660
  /**
1879
1661
  */
@@ -1952,35 +1734,33 @@ class Org {
1952
1734
  return takeObject(ret);
1953
1735
  }
1954
1736
  /**
1955
- * @returns {string}
1737
+ * @returns {FleetKey}
1956
1738
  */
1957
1739
  get sortie() {
1958
- try {
1959
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1960
- wasm.__wbg_get_org_sortie(retptr, this.ptr);
1961
- var r0 = getInt32Memory0()[retptr / 4 + 0];
1962
- var r1 = getInt32Memory0()[retptr / 4 + 1];
1963
- return getStringFromWasm0(r0, r1);
1964
- } finally {
1965
- wasm.__wbindgen_add_to_stack_pointer(16);
1966
- wasm.__wbindgen_free(r0, r1);
1967
- }
1740
+ const ret = wasm.__wbg_get_org_sortie(this.ptr);
1741
+ return takeObject(ret);
1968
1742
  }
1969
1743
  /**
1970
- * @param {string} arg0
1744
+ * @returns {FleetKey | undefined}
1971
1745
  */
1972
- set sortie(arg0) {
1973
- const ptr0 = passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
1974
- const len0 = WASM_VECTOR_LEN;
1975
- wasm.__wbg_set_org_sortie(this.ptr, ptr0, len0);
1746
+ get route_sup() {
1747
+ const ret = wasm.__wbg_get_org_route_sup(this.ptr);
1748
+ return takeObject(ret);
1749
+ }
1750
+ /**
1751
+ * @returns {FleetKey | undefined}
1752
+ */
1753
+ get boss_sup() {
1754
+ const ret = wasm.__wbg_get_org_boss_sup(this.ptr);
1755
+ return takeObject(ret);
1976
1756
  }
1977
1757
  /**
1978
1758
  * @returns {string | undefined}
1979
1759
  */
1980
- get route_sup() {
1760
+ first_ship_id() {
1981
1761
  try {
1982
1762
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1983
- wasm.__wbg_get_org_route_sup(retptr, this.ptr);
1763
+ wasm.org_first_ship_id(retptr, this.ptr);
1984
1764
  var r0 = getInt32Memory0()[retptr / 4 + 0];
1985
1765
  var r1 = getInt32Memory0()[retptr / 4 + 1];
1986
1766
  let v0;
@@ -1994,20 +1774,23 @@ class Org {
1994
1774
  }
1995
1775
  }
1996
1776
  /**
1997
- * @param {string | undefined} arg0
1777
+ * @param {FleetKey} fleet_key
1778
+ * @param {ShipKey} ship_key
1779
+ * @returns {number | undefined}
1998
1780
  */
1999
- set route_sup(arg0) {
2000
- var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2001
- var len0 = WASM_VECTOR_LEN;
2002
- wasm.__wbg_set_org_route_sup(this.ptr, ptr0, len0);
1781
+ get_ship_mid(fleet_key, ship_key) {
1782
+ const ret = wasm.org_get_ship_mid(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
1783
+ return ret === 0xFFFFFF ? undefined : ret;
2003
1784
  }
2004
1785
  /**
1786
+ * @param {FleetKey} fleet_key
1787
+ * @param {ShipKey} ship_key
2005
1788
  * @returns {string | undefined}
2006
1789
  */
2007
- get boss_sup() {
1790
+ get_ship_eid(fleet_key, ship_key) {
2008
1791
  try {
2009
1792
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2010
- wasm.__wbg_get_org_boss_sup(retptr, this.ptr);
1793
+ wasm.org_get_ship_eid(retptr, this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
2011
1794
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2012
1795
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2013
1796
  let v0;
@@ -2021,42 +1804,19 @@ class Org {
2021
1804
  }
2022
1805
  }
2023
1806
  /**
2024
- * @param {string | undefined} arg0
2025
- */
2026
- set boss_sup(arg0) {
2027
- var ptr0 = isLikeNone(arg0) ? 0 : passStringToWasm0(arg0, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2028
- var len0 = WASM_VECTOR_LEN;
2029
- wasm.__wbg_set_org_boss_sup(this.ptr, ptr0, len0);
2030
- }
2031
- /**
2032
- * @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
- * @param {string} key
2042
- * @returns {string | undefined}
1807
+ * @param {FleetKey} key
1808
+ * @returns {string}
2043
1809
  */
2044
- get_ship_entity_id(role, key) {
1810
+ get_fleet_id(key) {
2045
1811
  try {
2046
1812
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2047
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2048
- const len0 = WASM_VECTOR_LEN;
2049
- wasm.org_get_ship_entity_id(retptr, this.ptr, addHeapObject(role), ptr0, len0);
1813
+ wasm.org_get_fleet_id(retptr, this.ptr, addHeapObject(key));
2050
1814
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2051
1815
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2052
- let v1;
2053
- if (r0 !== 0) {
2054
- v1 = getStringFromWasm0(r0, r1).slice();
2055
- wasm.__wbindgen_free(r0, r1 * 1);
2056
- }
2057
- return v1;
1816
+ return getStringFromWasm0(r0, r1);
2058
1817
  } finally {
2059
1818
  wasm.__wbindgen_add_to_stack_pointer(16);
1819
+ wasm.__wbindgen_free(r0, r1);
2060
1820
  }
2061
1821
  }
2062
1822
  /**
@@ -2076,21 +1836,6 @@ class Org {
2076
1836
  }
2077
1837
  }
2078
1838
  /**
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
1839
  * @returns {Uint16Array}
2095
1840
  */
2096
1841
  main_ship_ids() {
@@ -2123,24 +1868,20 @@ class Org {
2123
1868
  }
2124
1869
  }
2125
1870
  /**
2126
- * @param {string} key
1871
+ * @param {FleetKey} key
2127
1872
  * @returns {Fleet}
2128
1873
  */
2129
1874
  clone_fleet(key) {
2130
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2131
- const len0 = WASM_VECTOR_LEN;
2132
- const ret = wasm.org_clone_fleet(this.ptr, ptr0, len0);
1875
+ const ret = wasm.org_clone_fleet(this.ptr, addHeapObject(key));
2133
1876
  return Fleet.__wrap(ret);
2134
1877
  }
2135
1878
  /**
2136
- * @param {Role} role
2137
- * @param {string} key
1879
+ * @param {FleetKey} fleet_key
1880
+ * @param {ShipKey} ship_key
2138
1881
  * @returns {Ship | undefined}
2139
1882
  */
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);
1883
+ clone_ship(fleet_key, ship_key) {
1884
+ const ret = wasm.org_clone_ship(this.ptr, addHeapObject(fleet_key), addHeapObject(ship_key));
2144
1885
  return ret === 0 ? undefined : Ship.__wrap(ret);
2145
1886
  }
2146
1887
  /**
@@ -2154,19 +1895,20 @@ class Org {
2154
1895
  return ret === 0 ? undefined : Ship.__wrap(ret);
2155
1896
  }
2156
1897
  /**
2157
- * @param {Role} role
2158
- * @returns {string}
1898
+ * @param {FleetKey} key
1899
+ * @returns {(string)[]}
2159
1900
  */
2160
- get_fleet_id_by_role(role) {
1901
+ ship_keys(key) {
2161
1902
  try {
2162
1903
  const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2163
- wasm.org_get_fleet_id_by_role(retptr, this.ptr, addHeapObject(role));
1904
+ wasm.org_ship_keys(retptr, this.ptr, addHeapObject(key));
2164
1905
  var r0 = getInt32Memory0()[retptr / 4 + 0];
2165
1906
  var r1 = getInt32Memory0()[retptr / 4 + 1];
2166
- return getStringFromWasm0(r0, r1);
1907
+ var v0 = getArrayJsValueFromWasm0(r0, r1).slice();
1908
+ wasm.__wbindgen_free(r0, r1 * 4);
1909
+ return v0;
2167
1910
  } finally {
2168
1911
  wasm.__wbindgen_add_to_stack_pointer(16);
2169
- wasm.__wbindgen_free(r0, r1);
2170
1912
  }
2171
1913
  }
2172
1914
  /**
@@ -2177,13 +1919,11 @@ class Org {
2177
1919
  return Comp.__wrap(ret);
2178
1920
  }
2179
1921
  /**
2180
- * @param {string} key
1922
+ * @param {FleetKey} key
2181
1923
  * @returns {Comp}
2182
1924
  */
2183
1925
  create_comp_by_key(key) {
2184
- const ptr0 = passStringToWasm0(key, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2185
- const len0 = WASM_VECTOR_LEN;
2186
- const ret = wasm.org_create_comp_by_key(this.ptr, ptr0, len0);
1926
+ const ret = wasm.org_create_comp_by_key(this.ptr, addHeapObject(key));
2187
1927
  return Comp.__wrap(ret);
2188
1928
  }
2189
1929
  /**
@@ -2291,11 +2031,24 @@ class Org {
2291
2031
  return ret;
2292
2032
  }
2293
2033
  /**
2294
- * @returns {Org}
2034
+ * @param {string} id
2035
+ * @param {number} x
2036
+ * @param {number} y
2037
+ * @returns {MoveShipPayload | undefined}
2295
2038
  */
2296
- static default() {
2297
- const ret = wasm.org_default();
2298
- return Org.__wrap(ret);
2039
+ create_move_ship_payload(id, x, y) {
2040
+ const ptr0 = passStringToWasm0(id, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
2041
+ const len0 = WASM_VECTOR_LEN;
2042
+ const ret = wasm.org_create_move_ship_payload(this.ptr, ptr0, len0, x, y);
2043
+ return takeObject(ret);
2044
+ }
2045
+ /**
2046
+ * @param {FleetKey} key
2047
+ * @returns {FleetType | undefined}
2048
+ */
2049
+ get_fleet_type(key) {
2050
+ const ret = wasm.org_get_fleet_type(this.ptr, addHeapObject(key));
2051
+ return takeObject(ret);
2299
2052
  }
2300
2053
  }
2301
2054
  module.exports.Org = Org;
@@ -2324,6 +2077,43 @@ class Ship {
2324
2077
  wasm.__wbg_ship_free(ptr);
2325
2078
  }
2326
2079
  /**
2080
+ * @returns {number | undefined}
2081
+ */
2082
+ state_day_gunfit_accuracy() {
2083
+ try {
2084
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2085
+ wasm.ship_state_day_gunfit_accuracy(retptr, this.ptr);
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
+ * @returns {number | undefined}
2095
+ */
2096
+ state_night_gunfit_accuracy() {
2097
+ try {
2098
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
2099
+ wasm.ship_state_night_gunfit_accuracy(retptr, this.ptr);
2100
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
2101
+ var r2 = getFloat64Memory0()[retptr / 8 + 1];
2102
+ return r0 === 0 ? undefined : r2;
2103
+ } finally {
2104
+ wasm.__wbindgen_add_to_stack_pointer(16);
2105
+ }
2106
+ }
2107
+ /**
2108
+ * フィット砲補正
2109
+ * @param {boolean} is_night
2110
+ * @returns {number}
2111
+ */
2112
+ gunfit_accuracy(is_night) {
2113
+ const ret = wasm.ship_gunfit_accuracy(this.ptr, is_night);
2114
+ return ret;
2115
+ }
2116
+ /**
2327
2117
  * @returns {string}
2328
2118
  */
2329
2119
  get id() {
@@ -3079,43 +2869,6 @@ class Ship {
3079
2869
  wasm.__wbindgen_add_to_stack_pointer(16);
3080
2870
  }
3081
2871
  }
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
2872
  }
3120
2873
  module.exports.Ship = Ship;
3121
2874
 
@@ -3128,16 +2881,16 @@ module.exports.__wbindgen_json_serialize = function(arg0, arg1) {
3128
2881
  getInt32Memory0()[arg0 / 4 + 0] = ptr0;
3129
2882
  };
3130
2883
 
3131
- module.exports.__wbindgen_object_drop_ref = function(arg0) {
3132
- takeObject(arg0);
3133
- };
3134
-
3135
2884
  module.exports.__wbindgen_string_new = function(arg0, arg1) {
3136
2885
  const ret = getStringFromWasm0(arg0, arg1);
3137
2886
  return addHeapObject(ret);
3138
2887
  };
3139
2888
 
3140
- module.exports.__wbg_createEquipmentBonuses_970b62943e7f3a74 = function(arg0, arg1) {
2889
+ module.exports.__wbindgen_object_drop_ref = function(arg0) {
2890
+ takeObject(arg0);
2891
+ };
2892
+
2893
+ module.exports.__wbg_createEquipmentBonuses_5c51b37ac8d29697 = function(arg0, arg1) {
3141
2894
  const ret = createEquipmentBonuses(takeObject(arg0), takeObject(arg1));
3142
2895
  return addHeapObject(ret);
3143
2896
  };