1#![allow(clippy::all, clippy::pedantic)]
8
9use std::{
10 cmp::Ordering,
11 fmt::{Display, Formatter, Result as FmtResult},
12};
13
14use crate::{Acronym, GameMode};
15
16mod all_structs {
17 #[derive(Clone, Debug, Default, PartialEq)]
19 #[cfg_attr(
20 feature = "rkyv",
21 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
22 )]
23 pub struct EasyOsu {
24 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
26 pub retries: Option<f64>,
27 }
28 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
30 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
31 pub struct NoFailOsu {}
32 #[derive(Clone, Debug, Default, PartialEq)]
34 #[cfg_attr(
35 feature = "rkyv",
36 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
37 )]
38 pub struct HalfTimeOsu {
39 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
41 pub speed_change: Option<f64>,
42 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
44 pub adjust_pitch: Option<bool>,
45 }
46 #[derive(Clone, Debug, Default, PartialEq)]
48 #[cfg_attr(
49 feature = "rkyv",
50 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
51 )]
52 pub struct DaycoreOsu {
53 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
55 pub speed_change: Option<f64>,
56 }
57 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
59 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
60 pub struct HardRockOsu {}
61 #[derive(Clone, Debug, Default, PartialEq)]
63 #[cfg_attr(
64 feature = "rkyv",
65 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
66 )]
67 pub struct SuddenDeathOsu {
68 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
70 pub fail_on_slider_tail: Option<bool>,
71 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
73 pub restart: Option<bool>,
74 }
75 #[derive(Clone, Debug, Default, PartialEq)]
77 #[cfg_attr(
78 feature = "rkyv",
79 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
80 )]
81 pub struct PerfectOsu {
82 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
84 pub restart: Option<bool>,
85 }
86 #[derive(Clone, Debug, Default, PartialEq)]
88 #[cfg_attr(
89 feature = "rkyv",
90 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
91 )]
92 pub struct DoubleTimeOsu {
93 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
95 pub speed_change: Option<f64>,
96 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
98 pub adjust_pitch: Option<bool>,
99 }
100 #[derive(Clone, Debug, Default, PartialEq)]
102 #[cfg_attr(
103 feature = "rkyv",
104 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
105 )]
106 pub struct NightcoreOsu {
107 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
109 pub speed_change: Option<f64>,
110 }
111 #[derive(Clone, Debug, Default, PartialEq)]
113 #[cfg_attr(
114 feature = "rkyv",
115 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
116 )]
117 pub struct HiddenOsu {
118 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
120 pub only_fade_approach_circles: Option<bool>,
121 }
122 #[derive(Clone, Debug, Default, PartialEq)]
124 #[cfg_attr(
125 feature = "rkyv",
126 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
127 )]
128 pub struct FlashlightOsu {
129 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
131 pub follow_delay: Option<f64>,
132 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
134 pub size_multiplier: Option<f64>,
135 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
137 pub combo_based_size: Option<bool>,
138 }
139 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
141 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
142 pub struct BlindsOsu {}
143 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
145 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
146 pub struct StrictTrackingOsu {}
147 #[derive(Clone, Debug, Default, PartialEq)]
149 #[cfg_attr(
150 feature = "rkyv",
151 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
152 )]
153 pub struct AccuracyChallengeOsu {
154 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
156 pub minimum_accuracy: Option<f64>,
157 pub accuracy_judge_mode: Option<String>,
159 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
161 pub restart: Option<bool>,
162 }
163 #[derive(Clone, Debug, Default, PartialEq)]
165 #[cfg_attr(
166 feature = "rkyv",
167 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
168 )]
169 pub struct TargetPracticeOsu {
170 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
172 pub seed: Option<f64>,
173 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
175 pub metronome: Option<bool>,
176 }
177 #[derive(Clone, Debug, Default, PartialEq)]
179 #[cfg_attr(
180 feature = "rkyv",
181 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
182 )]
183 pub struct DifficultyAdjustOsu {
184 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
186 pub circle_size: Option<f64>,
187 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
189 pub approach_rate: Option<f64>,
190 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
192 pub drain_rate: Option<f64>,
193 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
195 pub overall_difficulty: Option<f64>,
196 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
198 pub extended_limits: Option<bool>,
199 }
200 #[derive(Clone, Debug, Default, PartialEq)]
202 #[cfg_attr(
203 feature = "rkyv",
204 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
205 )]
206 pub struct ClassicOsu {
207 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
209 pub no_slider_head_accuracy: Option<bool>,
210 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
212 pub classic_note_lock: Option<bool>,
213 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
215 pub always_play_tail_sample: Option<bool>,
216 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
218 pub fade_hit_circle_early: Option<bool>,
219 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
221 pub classic_health: Option<bool>,
222 }
223 #[derive(Clone, Debug, Default, PartialEq)]
225 #[cfg_attr(
226 feature = "rkyv",
227 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
228 )]
229 pub struct RandomOsu {
230 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
232 pub angle_sharpness: Option<f64>,
233 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
235 pub seed: Option<f64>,
236 }
237 #[derive(Clone, Debug, Default, PartialEq)]
239 #[cfg_attr(
240 feature = "rkyv",
241 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
242 )]
243 pub struct MirrorOsu {
244 pub reflection: Option<String>,
246 }
247 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
249 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
250 pub struct AlternateOsu {}
251 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
253 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
254 pub struct SingleTapOsu {}
255 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
257 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
258 pub struct AutoplayOsu {}
259 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
261 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
262 pub struct CinemaOsu {}
263 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
265 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
266 pub struct RelaxOsu {}
267 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
269 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
270 pub struct AutopilotOsu {}
271 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
273 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
274 pub struct SpunOutOsu {}
275 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
277 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
278 pub struct TransformOsu {}
279 #[derive(Clone, Debug, Default, PartialEq)]
281 #[cfg_attr(
282 feature = "rkyv",
283 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
284 )]
285 pub struct WiggleOsu {
286 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
288 pub strength: Option<f64>,
289 }
290 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
292 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
293 pub struct SpinInOsu {}
294 #[derive(Clone, Debug, Default, PartialEq)]
296 #[cfg_attr(
297 feature = "rkyv",
298 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
299 )]
300 pub struct GrowOsu {
301 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
303 pub start_scale: Option<f64>,
304 }
305 #[derive(Clone, Debug, Default, PartialEq)]
307 #[cfg_attr(
308 feature = "rkyv",
309 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
310 )]
311 pub struct DeflateOsu {
312 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
314 pub start_scale: Option<f64>,
315 }
316 #[derive(Clone, Debug, Default, PartialEq)]
318 #[cfg_attr(
319 feature = "rkyv",
320 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
321 )]
322 pub struct WindUpOsu {
323 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
325 pub initial_rate: Option<f64>,
326 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
328 pub final_rate: Option<f64>,
329 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
331 pub adjust_pitch: Option<bool>,
332 }
333 #[derive(Clone, Debug, Default, PartialEq)]
335 #[cfg_attr(
336 feature = "rkyv",
337 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
338 )]
339 pub struct WindDownOsu {
340 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
342 pub initial_rate: Option<f64>,
343 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
345 pub final_rate: Option<f64>,
346 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
348 pub adjust_pitch: Option<bool>,
349 }
350 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
352 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
353 pub struct TraceableOsu {}
354 #[derive(Clone, Debug, Default, PartialEq)]
356 #[cfg_attr(
357 feature = "rkyv",
358 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
359 )]
360 pub struct BarrelRollOsu {
361 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
363 pub spin_speed: Option<f64>,
364 pub direction: Option<String>,
366 }
367 #[derive(Clone, Debug, Default, PartialEq)]
369 #[cfg_attr(
370 feature = "rkyv",
371 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
372 )]
373 pub struct ApproachDifferentOsu {
374 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
376 pub scale: Option<f64>,
377 pub style: Option<String>,
379 }
380 #[derive(Clone, Debug, Default, PartialEq)]
382 #[cfg_attr(
383 feature = "rkyv",
384 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
385 )]
386 pub struct MutedOsu {
387 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
389 pub inverse_muting: Option<bool>,
390 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
392 pub enable_metronome: Option<bool>,
393 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
395 pub mute_combo_count: Option<f64>,
396 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
398 pub affects_hit_sounds: Option<bool>,
399 }
400 #[derive(Clone, Debug, Default, PartialEq)]
402 #[cfg_attr(
403 feature = "rkyv",
404 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
405 )]
406 pub struct NoScopeOsu {
407 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
409 pub hidden_combo_count: Option<f64>,
410 }
411 #[derive(Clone, Debug, Default, PartialEq)]
413 #[cfg_attr(
414 feature = "rkyv",
415 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
416 )]
417 pub struct MagnetisedOsu {
418 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
420 pub attraction_strength: Option<f64>,
421 }
422 #[derive(Clone, Debug, Default, PartialEq)]
424 #[cfg_attr(
425 feature = "rkyv",
426 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
427 )]
428 pub struct RepelOsu {
429 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
431 pub repulsion_strength: Option<f64>,
432 }
433 #[derive(Clone, Debug, Default, PartialEq)]
435 #[cfg_attr(
436 feature = "rkyv",
437 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
438 )]
439 pub struct AdaptiveSpeedOsu {
440 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
442 pub initial_rate: Option<f64>,
443 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
445 pub adjust_pitch: Option<bool>,
446 }
447 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
449 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
450 pub struct FreezeFrameOsu {}
451 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
453 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
454 pub struct BubblesOsu {}
455 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
457 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
458 pub struct SynesthesiaOsu {}
459 #[derive(Clone, Debug, Default, PartialEq)]
461 #[cfg_attr(
462 feature = "rkyv",
463 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
464 )]
465 pub struct DepthOsu {
466 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
468 pub max_depth: Option<f64>,
469 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
471 pub show_approach_circles: Option<bool>,
472 }
473 #[derive(Clone, Debug, Default, PartialEq)]
475 #[cfg_attr(
476 feature = "rkyv",
477 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
478 )]
479 pub struct BloomOsu {
480 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
482 pub max_size_combo_count: Option<f64>,
483 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
485 pub max_cursor_size: Option<f64>,
486 }
487 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
489 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
490 pub struct TouchDeviceOsu {}
491 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
493 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
494 pub struct ScoreV2Osu {}
495 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
497 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
498 pub struct EasyTaiko {}
499 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
501 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
502 pub struct NoFailTaiko {}
503 #[derive(Clone, Debug, Default, PartialEq)]
505 #[cfg_attr(
506 feature = "rkyv",
507 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
508 )]
509 pub struct HalfTimeTaiko {
510 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
512 pub speed_change: Option<f64>,
513 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
515 pub adjust_pitch: Option<bool>,
516 }
517 #[derive(Clone, Debug, Default, PartialEq)]
519 #[cfg_attr(
520 feature = "rkyv",
521 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
522 )]
523 pub struct DaycoreTaiko {
524 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
526 pub speed_change: Option<f64>,
527 }
528 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
530 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
531 pub struct HardRockTaiko {}
532 #[derive(Clone, Debug, Default, PartialEq)]
534 #[cfg_attr(
535 feature = "rkyv",
536 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
537 )]
538 pub struct SuddenDeathTaiko {
539 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
541 pub restart: Option<bool>,
542 }
543 #[derive(Clone, Debug, Default, PartialEq)]
545 #[cfg_attr(
546 feature = "rkyv",
547 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
548 )]
549 pub struct PerfectTaiko {
550 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
552 pub restart: Option<bool>,
553 }
554 #[derive(Clone, Debug, Default, PartialEq)]
556 #[cfg_attr(
557 feature = "rkyv",
558 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
559 )]
560 pub struct DoubleTimeTaiko {
561 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
563 pub speed_change: Option<f64>,
564 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
566 pub adjust_pitch: Option<bool>,
567 }
568 #[derive(Clone, Debug, Default, PartialEq)]
570 #[cfg_attr(
571 feature = "rkyv",
572 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
573 )]
574 pub struct NightcoreTaiko {
575 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
577 pub speed_change: Option<f64>,
578 }
579 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
581 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
582 pub struct HiddenTaiko {}
583 #[derive(Clone, Debug, Default, PartialEq)]
585 #[cfg_attr(
586 feature = "rkyv",
587 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
588 )]
589 pub struct FlashlightTaiko {
590 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
592 pub size_multiplier: Option<f64>,
593 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
595 pub combo_based_size: Option<bool>,
596 }
597 #[derive(Clone, Debug, Default, PartialEq)]
599 #[cfg_attr(
600 feature = "rkyv",
601 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
602 )]
603 pub struct AccuracyChallengeTaiko {
604 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
606 pub minimum_accuracy: Option<f64>,
607 pub accuracy_judge_mode: Option<String>,
609 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
611 pub restart: Option<bool>,
612 }
613 #[derive(Clone, Debug, Default, PartialEq)]
615 #[cfg_attr(
616 feature = "rkyv",
617 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
618 )]
619 pub struct RandomTaiko {
620 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
622 pub seed: Option<f64>,
623 }
624 #[derive(Clone, Debug, Default, PartialEq)]
626 #[cfg_attr(
627 feature = "rkyv",
628 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
629 )]
630 pub struct DifficultyAdjustTaiko {
631 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
633 pub scroll_speed: Option<f64>,
634 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
636 pub drain_rate: Option<f64>,
637 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
639 pub overall_difficulty: Option<f64>,
640 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
642 pub extended_limits: Option<bool>,
643 }
644 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
646 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
647 pub struct ClassicTaiko {}
648 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
650 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
651 pub struct SwapTaiko {}
652 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
654 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
655 pub struct SingleTapTaiko {}
656 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
658 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
659 pub struct ConstantSpeedTaiko {}
660 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
662 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
663 pub struct AutoplayTaiko {}
664 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
666 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
667 pub struct CinemaTaiko {}
668 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
670 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
671 pub struct RelaxTaiko {}
672 #[derive(Clone, Debug, Default, PartialEq)]
674 #[cfg_attr(
675 feature = "rkyv",
676 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
677 )]
678 pub struct WindUpTaiko {
679 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
681 pub initial_rate: Option<f64>,
682 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
684 pub final_rate: Option<f64>,
685 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
687 pub adjust_pitch: Option<bool>,
688 }
689 #[derive(Clone, Debug, Default, PartialEq)]
691 #[cfg_attr(
692 feature = "rkyv",
693 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
694 )]
695 pub struct WindDownTaiko {
696 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
698 pub initial_rate: Option<f64>,
699 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
701 pub final_rate: Option<f64>,
702 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
704 pub adjust_pitch: Option<bool>,
705 }
706 #[derive(Clone, Debug, Default, PartialEq)]
708 #[cfg_attr(
709 feature = "rkyv",
710 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
711 )]
712 pub struct MutedTaiko {
713 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
715 pub inverse_muting: Option<bool>,
716 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
718 pub enable_metronome: Option<bool>,
719 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
721 pub mute_combo_count: Option<f64>,
722 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
724 pub affects_hit_sounds: Option<bool>,
725 }
726 #[derive(Clone, Debug, Default, PartialEq)]
728 #[cfg_attr(
729 feature = "rkyv",
730 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
731 )]
732 pub struct AdaptiveSpeedTaiko {
733 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
735 pub initial_rate: Option<f64>,
736 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
738 pub adjust_pitch: Option<bool>,
739 }
740 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
742 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
743 pub struct ScoreV2Taiko {}
744 #[derive(Clone, Debug, Default, PartialEq)]
746 #[cfg_attr(
747 feature = "rkyv",
748 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
749 )]
750 pub struct EasyCatch {
751 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
753 pub retries: Option<f64>,
754 }
755 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
757 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
758 pub struct NoFailCatch {}
759 #[derive(Clone, Debug, Default, PartialEq)]
761 #[cfg_attr(
762 feature = "rkyv",
763 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
764 )]
765 pub struct HalfTimeCatch {
766 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
768 pub speed_change: Option<f64>,
769 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
771 pub adjust_pitch: Option<bool>,
772 }
773 #[derive(Clone, Debug, Default, PartialEq)]
775 #[cfg_attr(
776 feature = "rkyv",
777 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
778 )]
779 pub struct DaycoreCatch {
780 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
782 pub speed_change: Option<f64>,
783 }
784 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
786 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
787 pub struct HardRockCatch {}
788 #[derive(Clone, Debug, Default, PartialEq)]
790 #[cfg_attr(
791 feature = "rkyv",
792 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
793 )]
794 pub struct SuddenDeathCatch {
795 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
797 pub restart: Option<bool>,
798 }
799 #[derive(Clone, Debug, Default, PartialEq)]
801 #[cfg_attr(
802 feature = "rkyv",
803 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
804 )]
805 pub struct PerfectCatch {
806 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
808 pub restart: Option<bool>,
809 }
810 #[derive(Clone, Debug, Default, PartialEq)]
812 #[cfg_attr(
813 feature = "rkyv",
814 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
815 )]
816 pub struct DoubleTimeCatch {
817 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
819 pub speed_change: Option<f64>,
820 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
822 pub adjust_pitch: Option<bool>,
823 }
824 #[derive(Clone, Debug, Default, PartialEq)]
826 #[cfg_attr(
827 feature = "rkyv",
828 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
829 )]
830 pub struct NightcoreCatch {
831 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
833 pub speed_change: Option<f64>,
834 }
835 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
837 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
838 pub struct HiddenCatch {}
839 #[derive(Clone, Debug, Default, PartialEq)]
841 #[cfg_attr(
842 feature = "rkyv",
843 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
844 )]
845 pub struct FlashlightCatch {
846 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
848 pub size_multiplier: Option<f64>,
849 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
851 pub combo_based_size: Option<bool>,
852 }
853 #[derive(Clone, Debug, Default, PartialEq)]
855 #[cfg_attr(
856 feature = "rkyv",
857 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
858 )]
859 pub struct AccuracyChallengeCatch {
860 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
862 pub minimum_accuracy: Option<f64>,
863 pub accuracy_judge_mode: Option<String>,
865 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
867 pub restart: Option<bool>,
868 }
869 #[derive(Clone, Debug, Default, PartialEq)]
871 #[cfg_attr(
872 feature = "rkyv",
873 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
874 )]
875 pub struct DifficultyAdjustCatch {
876 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
878 pub circle_size: Option<f64>,
879 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
881 pub approach_rate: Option<f64>,
882 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
884 pub hard_rock_offsets: Option<bool>,
885 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
887 pub drain_rate: Option<f64>,
888 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
890 pub overall_difficulty: Option<f64>,
891 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
893 pub extended_limits: Option<bool>,
894 }
895 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
897 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
898 pub struct ClassicCatch {}
899 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
901 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
902 pub struct MirrorCatch {}
903 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
905 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
906 pub struct AutoplayCatch {}
907 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
909 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
910 pub struct CinemaCatch {}
911 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
913 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
914 pub struct RelaxCatch {}
915 #[derive(Clone, Debug, Default, PartialEq)]
917 #[cfg_attr(
918 feature = "rkyv",
919 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
920 )]
921 pub struct WindUpCatch {
922 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
924 pub initial_rate: Option<f64>,
925 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
927 pub final_rate: Option<f64>,
928 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
930 pub adjust_pitch: Option<bool>,
931 }
932 #[derive(Clone, Debug, Default, PartialEq)]
934 #[cfg_attr(
935 feature = "rkyv",
936 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
937 )]
938 pub struct WindDownCatch {
939 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
941 pub initial_rate: Option<f64>,
942 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
944 pub final_rate: Option<f64>,
945 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
947 pub adjust_pitch: Option<bool>,
948 }
949 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
951 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
952 pub struct FloatingFruitsCatch {}
953 #[derive(Clone, Debug, Default, PartialEq)]
955 #[cfg_attr(
956 feature = "rkyv",
957 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
958 )]
959 pub struct MutedCatch {
960 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
962 pub inverse_muting: Option<bool>,
963 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
965 pub enable_metronome: Option<bool>,
966 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
968 pub mute_combo_count: Option<f64>,
969 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
971 pub affects_hit_sounds: Option<bool>,
972 }
973 #[derive(Clone, Debug, Default, PartialEq)]
975 #[cfg_attr(
976 feature = "rkyv",
977 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
978 )]
979 pub struct NoScopeCatch {
980 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
982 pub hidden_combo_count: Option<f64>,
983 }
984 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
986 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
987 pub struct ScoreV2Catch {}
988 #[derive(Clone, Debug, Default, PartialEq)]
990 #[cfg_attr(
991 feature = "rkyv",
992 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
993 )]
994 pub struct EasyMania {
995 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
997 pub retries: Option<f64>,
998 }
999 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1001 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1002 pub struct NoFailMania {}
1003 #[derive(Clone, Debug, Default, PartialEq)]
1005 #[cfg_attr(
1006 feature = "rkyv",
1007 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1008 )]
1009 pub struct HalfTimeMania {
1010 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1012 pub speed_change: Option<f64>,
1013 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1015 pub adjust_pitch: Option<bool>,
1016 }
1017 #[derive(Clone, Debug, Default, PartialEq)]
1019 #[cfg_attr(
1020 feature = "rkyv",
1021 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1022 )]
1023 pub struct DaycoreMania {
1024 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1026 pub speed_change: Option<f64>,
1027 }
1028 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1030 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1031 pub struct NoReleaseMania {}
1032 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1034 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1035 pub struct HardRockMania {}
1036 #[derive(Clone, Debug, Default, PartialEq)]
1038 #[cfg_attr(
1039 feature = "rkyv",
1040 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1041 )]
1042 pub struct SuddenDeathMania {
1043 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1045 pub restart: Option<bool>,
1046 }
1047 #[derive(Clone, Debug, Default, PartialEq)]
1049 #[cfg_attr(
1050 feature = "rkyv",
1051 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1052 )]
1053 pub struct PerfectMania {
1054 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1056 pub restart: Option<bool>,
1057 }
1058 #[derive(Clone, Debug, Default, PartialEq)]
1060 #[cfg_attr(
1061 feature = "rkyv",
1062 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1063 )]
1064 pub struct DoubleTimeMania {
1065 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1067 pub speed_change: Option<f64>,
1068 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1070 pub adjust_pitch: Option<bool>,
1071 }
1072 #[derive(Clone, Debug, Default, PartialEq)]
1074 #[cfg_attr(
1075 feature = "rkyv",
1076 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1077 )]
1078 pub struct NightcoreMania {
1079 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1081 pub speed_change: Option<f64>,
1082 }
1083 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1085 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1086 pub struct FadeInMania {}
1087 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1089 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1090 pub struct HiddenMania {}
1091 #[derive(Clone, Debug, Default, PartialEq)]
1093 #[cfg_attr(
1094 feature = "rkyv",
1095 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1096 )]
1097 pub struct CoverMania {
1098 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1100 pub coverage: Option<f64>,
1101 pub direction: Option<String>,
1103 }
1104 #[derive(Clone, Debug, Default, PartialEq)]
1106 #[cfg_attr(
1107 feature = "rkyv",
1108 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1109 )]
1110 pub struct FlashlightMania {
1111 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1113 pub size_multiplier: Option<f64>,
1114 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1116 pub combo_based_size: Option<bool>,
1117 }
1118 #[derive(Clone, Debug, Default, PartialEq)]
1120 #[cfg_attr(
1121 feature = "rkyv",
1122 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1123 )]
1124 pub struct AccuracyChallengeMania {
1125 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1127 pub minimum_accuracy: Option<f64>,
1128 pub accuracy_judge_mode: Option<String>,
1130 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1132 pub restart: Option<bool>,
1133 }
1134 #[derive(Clone, Debug, Default, PartialEq)]
1136 #[cfg_attr(
1137 feature = "rkyv",
1138 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1139 )]
1140 pub struct RandomMania {
1141 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1143 pub seed: Option<f64>,
1144 }
1145 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1147 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1148 pub struct DualStagesMania {}
1149 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1151 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1152 pub struct MirrorMania {}
1153 #[derive(Clone, Debug, Default, PartialEq)]
1155 #[cfg_attr(
1156 feature = "rkyv",
1157 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1158 )]
1159 pub struct DifficultyAdjustMania {
1160 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1162 pub drain_rate: Option<f64>,
1163 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1165 pub overall_difficulty: Option<f64>,
1166 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1168 pub extended_limits: Option<bool>,
1169 }
1170 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1172 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1173 pub struct ClassicMania {}
1174 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1176 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1177 pub struct InvertMania {}
1178 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1180 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1181 pub struct ConstantSpeedMania {}
1182 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1184 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1185 pub struct HoldOffMania {}
1186 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1188 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1189 pub struct OneKeyMania {}
1190 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1192 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1193 pub struct TwoKeysMania {}
1194 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1196 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1197 pub struct ThreeKeysMania {}
1198 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1200 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1201 pub struct FourKeysMania {}
1202 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1204 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1205 pub struct FiveKeysMania {}
1206 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1208 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1209 pub struct SixKeysMania {}
1210 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1212 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1213 pub struct SevenKeysMania {}
1214 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1216 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1217 pub struct EightKeysMania {}
1218 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1220 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1221 pub struct NineKeysMania {}
1222 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1224 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1225 pub struct TenKeysMania {}
1226 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1228 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1229 pub struct AutoplayMania {}
1230 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1232 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1233 pub struct CinemaMania {}
1234 #[derive(Clone, Debug, Default, PartialEq)]
1236 #[cfg_attr(
1237 feature = "rkyv",
1238 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1239 )]
1240 pub struct WindUpMania {
1241 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1243 pub initial_rate: Option<f64>,
1244 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1246 pub final_rate: Option<f64>,
1247 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1249 pub adjust_pitch: Option<bool>,
1250 }
1251 #[derive(Clone, Debug, Default, PartialEq)]
1253 #[cfg_attr(
1254 feature = "rkyv",
1255 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1256 )]
1257 pub struct WindDownMania {
1258 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1260 pub initial_rate: Option<f64>,
1261 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1263 pub final_rate: Option<f64>,
1264 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1266 pub adjust_pitch: Option<bool>,
1267 }
1268 #[derive(Clone, Debug, Default, PartialEq)]
1270 #[cfg_attr(
1271 feature = "rkyv",
1272 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1273 )]
1274 pub struct MutedMania {
1275 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1277 pub inverse_muting: Option<bool>,
1278 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1280 pub enable_metronome: Option<bool>,
1281 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1283 pub mute_combo_count: Option<f64>,
1284 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1286 pub affects_hit_sounds: Option<bool>,
1287 }
1288 #[derive(Clone, Debug, Default, PartialEq)]
1290 #[cfg_attr(
1291 feature = "rkyv",
1292 derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize)
1293 )]
1294 pub struct AdaptiveSpeedMania {
1295 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::NaN>))]
1297 pub initial_rate: Option<f64>,
1298 #[cfg_attr(feature = "rkyv", rkyv(with = rkyv::with::NicheInto<rkyv::niche::niching::Bool>))]
1300 pub adjust_pitch: Option<bool>,
1301 }
1302 #[derive(Copy, Eq, Clone, Debug, Default, PartialEq)]
1304 #[cfg_attr(feature = "rkyv", derive(rkyv::Archive, rkyv::Serialize, rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self), repr(transparent))]
1305 pub struct ScoreV2Mania {}
1306 #[derive(Copy, Eq, Clone, Debug, PartialEq, PartialOrd, Ord, Hash)]
1308 #[cfg_attr(feature = "rkyv",derive(rkyv::Archive,rkyv::Serialize,rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),bytecheck(crate = rkyv::bytecheck),rkyv(as = Self),repr(transparent),)]
1309 pub struct UnknownMod {
1310 pub acronym: crate::Acronym,
1311 }
1312}
1313use crate::GameModKind;
1314pub use all_structs::{
1315 AccuracyChallengeCatch, AccuracyChallengeMania, AccuracyChallengeOsu, AccuracyChallengeTaiko,
1316 AdaptiveSpeedMania, AdaptiveSpeedOsu, AdaptiveSpeedTaiko, AlternateOsu, ApproachDifferentOsu,
1317 AutopilotOsu, AutoplayCatch, AutoplayMania, AutoplayOsu, AutoplayTaiko, BarrelRollOsu,
1318 BlindsOsu, BloomOsu, BubblesOsu, CinemaCatch, CinemaMania, CinemaOsu, CinemaTaiko,
1319 ClassicCatch, ClassicMania, ClassicOsu, ClassicTaiko, ConstantSpeedMania, ConstantSpeedTaiko,
1320 CoverMania, DaycoreCatch, DaycoreMania, DaycoreOsu, DaycoreTaiko, DeflateOsu, DepthOsu,
1321 DifficultyAdjustCatch, DifficultyAdjustMania, DifficultyAdjustOsu, DifficultyAdjustTaiko,
1322 DoubleTimeCatch, DoubleTimeMania, DoubleTimeOsu, DoubleTimeTaiko, DualStagesMania, EasyCatch,
1323 EasyMania, EasyOsu, EasyTaiko, EightKeysMania, FadeInMania, FiveKeysMania, FlashlightCatch,
1324 FlashlightMania, FlashlightOsu, FlashlightTaiko, FloatingFruitsCatch, FourKeysMania,
1325 FreezeFrameOsu, GrowOsu, HalfTimeCatch, HalfTimeMania, HalfTimeOsu, HalfTimeTaiko,
1326 HardRockCatch, HardRockMania, HardRockOsu, HardRockTaiko, HiddenCatch, HiddenMania, HiddenOsu,
1327 HiddenTaiko, HoldOffMania, InvertMania, MagnetisedOsu, MirrorCatch, MirrorMania, MirrorOsu,
1328 MutedCatch, MutedMania, MutedOsu, MutedTaiko, NightcoreCatch, NightcoreMania, NightcoreOsu,
1329 NightcoreTaiko, NineKeysMania, NoFailCatch, NoFailMania, NoFailOsu, NoFailTaiko,
1330 NoReleaseMania, NoScopeCatch, NoScopeOsu, OneKeyMania, PerfectCatch, PerfectMania, PerfectOsu,
1331 PerfectTaiko, RandomMania, RandomOsu, RandomTaiko, RelaxCatch, RelaxOsu, RelaxTaiko, RepelOsu,
1332 ScoreV2Catch, ScoreV2Mania, ScoreV2Osu, ScoreV2Taiko, SevenKeysMania, SingleTapOsu,
1333 SingleTapTaiko, SixKeysMania, SpinInOsu, SpunOutOsu, StrictTrackingOsu, SuddenDeathCatch,
1334 SuddenDeathMania, SuddenDeathOsu, SuddenDeathTaiko, SwapTaiko, SynesthesiaOsu,
1335 TargetPracticeOsu, TenKeysMania, ThreeKeysMania, TouchDeviceOsu, TraceableOsu, TransformOsu,
1336 TwoKeysMania, UnknownMod, WiggleOsu, WindDownCatch, WindDownMania, WindDownOsu, WindDownTaiko,
1337 WindUpCatch, WindUpMania, WindUpOsu, WindUpTaiko,
1338};
1339pub use gamemod::GameMod;
1340pub use intermode::GameModIntermode;
1341#[cfg(feature = "rkyv")]
1343#[cfg_attr(all(docsrs, not(doctest)), doc(cfg(feature = "rkyv")))]
1344#[doc(hidden)]
1345pub mod rkyv {
1346 pub use super::all_structs::{
1347 AccuracyChallengeCatchResolver, AccuracyChallengeManiaResolver,
1348 AccuracyChallengeOsuResolver, AccuracyChallengeTaikoResolver, AdaptiveSpeedManiaResolver,
1349 AdaptiveSpeedOsuResolver, AdaptiveSpeedTaikoResolver, AlternateOsuResolver,
1350 ApproachDifferentOsuResolver, ArchivedAccuracyChallengeCatch,
1351 ArchivedAccuracyChallengeMania, ArchivedAccuracyChallengeOsu,
1352 ArchivedAccuracyChallengeTaiko, ArchivedAdaptiveSpeedMania, ArchivedAdaptiveSpeedOsu,
1353 ArchivedAdaptiveSpeedTaiko, ArchivedApproachDifferentOsu, ArchivedBarrelRollOsu,
1354 ArchivedBloomOsu, ArchivedClassicOsu, ArchivedCoverMania, ArchivedDaycoreCatch,
1355 ArchivedDaycoreMania, ArchivedDaycoreOsu, ArchivedDaycoreTaiko, ArchivedDeflateOsu,
1356 ArchivedDepthOsu, ArchivedDifficultyAdjustCatch, ArchivedDifficultyAdjustMania,
1357 ArchivedDifficultyAdjustOsu, ArchivedDifficultyAdjustTaiko, ArchivedDoubleTimeCatch,
1358 ArchivedDoubleTimeMania, ArchivedDoubleTimeOsu, ArchivedDoubleTimeTaiko, ArchivedEasyCatch,
1359 ArchivedEasyMania, ArchivedEasyOsu, ArchivedFlashlightCatch, ArchivedFlashlightMania,
1360 ArchivedFlashlightOsu, ArchivedFlashlightTaiko, ArchivedGrowOsu, ArchivedHalfTimeCatch,
1361 ArchivedHalfTimeMania, ArchivedHalfTimeOsu, ArchivedHalfTimeTaiko, ArchivedHiddenOsu,
1362 ArchivedMagnetisedOsu, ArchivedMirrorOsu, ArchivedMutedCatch, ArchivedMutedMania,
1363 ArchivedMutedOsu, ArchivedMutedTaiko, ArchivedNightcoreCatch, ArchivedNightcoreMania,
1364 ArchivedNightcoreOsu, ArchivedNightcoreTaiko, ArchivedNoScopeCatch, ArchivedNoScopeOsu,
1365 ArchivedPerfectCatch, ArchivedPerfectMania, ArchivedPerfectOsu, ArchivedPerfectTaiko,
1366 ArchivedRandomMania, ArchivedRandomOsu, ArchivedRandomTaiko, ArchivedRepelOsu,
1367 ArchivedSuddenDeathCatch, ArchivedSuddenDeathMania, ArchivedSuddenDeathOsu,
1368 ArchivedSuddenDeathTaiko, ArchivedTargetPracticeOsu, ArchivedWiggleOsu,
1369 ArchivedWindDownCatch, ArchivedWindDownMania, ArchivedWindDownOsu, ArchivedWindDownTaiko,
1370 ArchivedWindUpCatch, ArchivedWindUpMania, ArchivedWindUpOsu, ArchivedWindUpTaiko,
1371 AutopilotOsuResolver, AutoplayCatchResolver, AutoplayManiaResolver, AutoplayOsuResolver,
1372 AutoplayTaikoResolver, BarrelRollOsuResolver, BlindsOsuResolver, BloomOsuResolver,
1373 BubblesOsuResolver, CinemaCatchResolver, CinemaManiaResolver, CinemaOsuResolver,
1374 CinemaTaikoResolver, ClassicCatchResolver, ClassicManiaResolver, ClassicOsuResolver,
1375 ClassicTaikoResolver, ConstantSpeedManiaResolver, ConstantSpeedTaikoResolver,
1376 CoverManiaResolver, DaycoreCatchResolver, DaycoreManiaResolver, DaycoreOsuResolver,
1377 DaycoreTaikoResolver, DeflateOsuResolver, DepthOsuResolver, DifficultyAdjustCatchResolver,
1378 DifficultyAdjustManiaResolver, DifficultyAdjustOsuResolver, DifficultyAdjustTaikoResolver,
1379 DoubleTimeCatchResolver, DoubleTimeManiaResolver, DoubleTimeOsuResolver,
1380 DoubleTimeTaikoResolver, DualStagesManiaResolver, EasyCatchResolver, EasyManiaResolver,
1381 EasyOsuResolver, EasyTaikoResolver, EightKeysManiaResolver, FadeInManiaResolver,
1382 FiveKeysManiaResolver, FlashlightCatchResolver, FlashlightManiaResolver,
1383 FlashlightOsuResolver, FlashlightTaikoResolver, FloatingFruitsCatchResolver,
1384 FourKeysManiaResolver, FreezeFrameOsuResolver, GrowOsuResolver, HalfTimeCatchResolver,
1385 HalfTimeManiaResolver, HalfTimeOsuResolver, HalfTimeTaikoResolver, HardRockCatchResolver,
1386 HardRockManiaResolver, HardRockOsuResolver, HardRockTaikoResolver, HiddenCatchResolver,
1387 HiddenManiaResolver, HiddenOsuResolver, HiddenTaikoResolver, HoldOffManiaResolver,
1388 InvertManiaResolver, MagnetisedOsuResolver, MirrorCatchResolver, MirrorManiaResolver,
1389 MirrorOsuResolver, MutedCatchResolver, MutedManiaResolver, MutedOsuResolver,
1390 MutedTaikoResolver, NightcoreCatchResolver, NightcoreManiaResolver, NightcoreOsuResolver,
1391 NightcoreTaikoResolver, NineKeysManiaResolver, NoFailCatchResolver, NoFailManiaResolver,
1392 NoFailOsuResolver, NoFailTaikoResolver, NoReleaseManiaResolver, NoScopeCatchResolver,
1393 NoScopeOsuResolver, OneKeyManiaResolver, PerfectCatchResolver, PerfectManiaResolver,
1394 PerfectOsuResolver, PerfectTaikoResolver, RandomManiaResolver, RandomOsuResolver,
1395 RandomTaikoResolver, RelaxCatchResolver, RelaxOsuResolver, RelaxTaikoResolver,
1396 RepelOsuResolver, ScoreV2CatchResolver, ScoreV2ManiaResolver, ScoreV2OsuResolver,
1397 ScoreV2TaikoResolver, SevenKeysManiaResolver, SingleTapOsuResolver, SingleTapTaikoResolver,
1398 SixKeysManiaResolver, SpinInOsuResolver, SpunOutOsuResolver, StrictTrackingOsuResolver,
1399 SuddenDeathCatchResolver, SuddenDeathManiaResolver, SuddenDeathOsuResolver,
1400 SuddenDeathTaikoResolver, SwapTaikoResolver, SynesthesiaOsuResolver,
1401 TargetPracticeOsuResolver, TenKeysManiaResolver, ThreeKeysManiaResolver,
1402 TouchDeviceOsuResolver, TraceableOsuResolver, TransformOsuResolver, TwoKeysManiaResolver,
1403 UnknownModResolver, WiggleOsuResolver, WindDownCatchResolver, WindDownManiaResolver,
1404 WindDownOsuResolver, WindDownTaikoResolver, WindUpCatchResolver, WindUpManiaResolver,
1405 WindUpOsuResolver, WindUpTaikoResolver,
1406 };
1407 pub use super::gamemod::{ArchivedGameMod, GameModResolver};
1408 pub use super::intermode::GameModIntermodeResolver;
1409 pub use crate::kind::GameModKindResolver;
1410}
1411impl EasyOsu {
1412 pub const fn acronym() -> Acronym {
1414 unsafe { Acronym::from_str_unchecked("EZ") }
1415 }
1416 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1418 unsafe {
1419 [
1420 Acronym::from_str_unchecked("HR"),
1421 Acronym::from_str_unchecked("AC"),
1422 Acronym::from_str_unchecked("DA"),
1423 ]
1424 }
1425 .into_iter()
1426 }
1427 pub const fn description() -> &'static str {
1429 "Larger circles, more forgiving HP drain, less accuracy required, and three lives!"
1430 }
1431 pub const fn kind() -> GameModKind {
1433 GameModKind::DifficultyReduction
1434 }
1435 pub const fn bits() -> u32 {
1439 2
1440 }
1441}
1442impl NoFailOsu {
1443 pub const fn acronym() -> Acronym {
1445 unsafe { Acronym::from_str_unchecked("NF") }
1446 }
1447 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1449 unsafe {
1450 [
1451 Acronym::from_str_unchecked("SD"),
1452 Acronym::from_str_unchecked("PF"),
1453 Acronym::from_str_unchecked("AC"),
1454 Acronym::from_str_unchecked("CN"),
1455 ]
1456 }
1457 .into_iter()
1458 }
1459 pub const fn description() -> &'static str {
1461 "You can't fail, no matter what."
1462 }
1463 pub const fn kind() -> GameModKind {
1465 GameModKind::DifficultyReduction
1466 }
1467 pub const fn bits() -> u32 {
1471 1
1472 }
1473}
1474impl HalfTimeOsu {
1475 pub const fn acronym() -> Acronym {
1477 unsafe { Acronym::from_str_unchecked("HT") }
1478 }
1479 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1481 unsafe {
1482 [
1483 Acronym::from_str_unchecked("DC"),
1484 Acronym::from_str_unchecked("DT"),
1485 Acronym::from_str_unchecked("NC"),
1486 Acronym::from_str_unchecked("WU"),
1487 Acronym::from_str_unchecked("WD"),
1488 Acronym::from_str_unchecked("AS"),
1489 ]
1490 }
1491 .into_iter()
1492 }
1493 pub const fn description() -> &'static str {
1495 "Less zoom..."
1496 }
1497 pub const fn kind() -> GameModKind {
1499 GameModKind::DifficultyReduction
1500 }
1501 pub const fn bits() -> u32 {
1505 256
1506 }
1507}
1508impl DaycoreOsu {
1509 pub const fn acronym() -> Acronym {
1511 unsafe { Acronym::from_str_unchecked("DC") }
1512 }
1513 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1515 unsafe {
1516 [
1517 Acronym::from_str_unchecked("HT"),
1518 Acronym::from_str_unchecked("DT"),
1519 Acronym::from_str_unchecked("NC"),
1520 Acronym::from_str_unchecked("WU"),
1521 Acronym::from_str_unchecked("WD"),
1522 Acronym::from_str_unchecked("AS"),
1523 ]
1524 }
1525 .into_iter()
1526 }
1527 pub const fn description() -> &'static str {
1529 "Whoaaaaa..."
1530 }
1531 pub const fn kind() -> GameModKind {
1533 GameModKind::DifficultyReduction
1534 }
1535}
1536impl HardRockOsu {
1537 pub const fn acronym() -> Acronym {
1539 unsafe { Acronym::from_str_unchecked("HR") }
1540 }
1541 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1543 unsafe {
1544 [
1545 Acronym::from_str_unchecked("EZ"),
1546 Acronym::from_str_unchecked("DA"),
1547 Acronym::from_str_unchecked("MR"),
1548 ]
1549 }
1550 .into_iter()
1551 }
1552 pub const fn description() -> &'static str {
1554 "Everything just got a bit harder..."
1555 }
1556 pub const fn kind() -> GameModKind {
1558 GameModKind::DifficultyIncrease
1559 }
1560 pub const fn bits() -> u32 {
1564 16
1565 }
1566}
1567impl SuddenDeathOsu {
1568 pub const fn acronym() -> Acronym {
1570 unsafe { Acronym::from_str_unchecked("SD") }
1571 }
1572 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1574 unsafe {
1575 [
1576 Acronym::from_str_unchecked("NF"),
1577 Acronym::from_str_unchecked("PF"),
1578 Acronym::from_str_unchecked("TP"),
1579 Acronym::from_str_unchecked("CN"),
1580 ]
1581 }
1582 .into_iter()
1583 }
1584 pub const fn description() -> &'static str {
1586 "Miss and fail."
1587 }
1588 pub const fn kind() -> GameModKind {
1590 GameModKind::DifficultyIncrease
1591 }
1592 pub const fn bits() -> u32 {
1596 32
1597 }
1598}
1599impl PerfectOsu {
1600 pub const fn acronym() -> Acronym {
1602 unsafe { Acronym::from_str_unchecked("PF") }
1603 }
1604 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1606 unsafe {
1607 [
1608 Acronym::from_str_unchecked("NF"),
1609 Acronym::from_str_unchecked("SD"),
1610 Acronym::from_str_unchecked("AC"),
1611 Acronym::from_str_unchecked("CN"),
1612 ]
1613 }
1614 .into_iter()
1615 }
1616 pub const fn description() -> &'static str {
1618 "SS or quit."
1619 }
1620 pub const fn kind() -> GameModKind {
1622 GameModKind::DifficultyIncrease
1623 }
1624 pub const fn bits() -> u32 {
1628 16416
1629 }
1630}
1631impl DoubleTimeOsu {
1632 pub const fn acronym() -> Acronym {
1634 unsafe { Acronym::from_str_unchecked("DT") }
1635 }
1636 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1638 unsafe {
1639 [
1640 Acronym::from_str_unchecked("HT"),
1641 Acronym::from_str_unchecked("DC"),
1642 Acronym::from_str_unchecked("NC"),
1643 Acronym::from_str_unchecked("WU"),
1644 Acronym::from_str_unchecked("WD"),
1645 Acronym::from_str_unchecked("AS"),
1646 ]
1647 }
1648 .into_iter()
1649 }
1650 pub const fn description() -> &'static str {
1652 "Zoooooooooom..."
1653 }
1654 pub const fn kind() -> GameModKind {
1656 GameModKind::DifficultyIncrease
1657 }
1658 pub const fn bits() -> u32 {
1662 64
1663 }
1664}
1665impl NightcoreOsu {
1666 pub const fn acronym() -> Acronym {
1668 unsafe { Acronym::from_str_unchecked("NC") }
1669 }
1670 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1672 unsafe {
1673 [
1674 Acronym::from_str_unchecked("HT"),
1675 Acronym::from_str_unchecked("DC"),
1676 Acronym::from_str_unchecked("DT"),
1677 Acronym::from_str_unchecked("WU"),
1678 Acronym::from_str_unchecked("WD"),
1679 Acronym::from_str_unchecked("AS"),
1680 ]
1681 }
1682 .into_iter()
1683 }
1684 pub const fn description() -> &'static str {
1686 "Uguuuuuuuu..."
1687 }
1688 pub const fn kind() -> GameModKind {
1690 GameModKind::DifficultyIncrease
1691 }
1692 pub const fn bits() -> u32 {
1696 576
1697 }
1698}
1699impl HiddenOsu {
1700 pub const fn acronym() -> Acronym {
1702 unsafe { Acronym::from_str_unchecked("HD") }
1703 }
1704 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1706 unsafe {
1707 [
1708 Acronym::from_str_unchecked("SI"),
1709 Acronym::from_str_unchecked("TC"),
1710 Acronym::from_str_unchecked("AD"),
1711 Acronym::from_str_unchecked("DP"),
1712 ]
1713 }
1714 .into_iter()
1715 }
1716 pub const fn description() -> &'static str {
1718 "Play with no approach circles and fading circles/sliders."
1719 }
1720 pub const fn kind() -> GameModKind {
1722 GameModKind::DifficultyIncrease
1723 }
1724 pub const fn bits() -> u32 {
1728 8
1729 }
1730}
1731impl FlashlightOsu {
1732 pub const fn acronym() -> Acronym {
1734 unsafe { Acronym::from_str_unchecked("FL") }
1735 }
1736 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1738 unsafe {
1739 [
1740 Acronym::from_str_unchecked("BL"),
1741 Acronym::from_str_unchecked("BM"),
1742 ]
1743 }
1744 .into_iter()
1745 }
1746 pub const fn description() -> &'static str {
1748 "Restricted view area."
1749 }
1750 pub const fn kind() -> GameModKind {
1752 GameModKind::DifficultyIncrease
1753 }
1754 pub const fn bits() -> u32 {
1758 1024
1759 }
1760}
1761impl BlindsOsu {
1762 pub const fn acronym() -> Acronym {
1764 unsafe { Acronym::from_str_unchecked("BL") }
1765 }
1766 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1768 unsafe { [Acronym::from_str_unchecked("FL")] }.into_iter()
1769 }
1770 pub const fn description() -> &'static str {
1772 "Play with blinds on your screen."
1773 }
1774 pub const fn kind() -> GameModKind {
1776 GameModKind::DifficultyIncrease
1777 }
1778}
1779impl StrictTrackingOsu {
1780 pub const fn acronym() -> Acronym {
1782 unsafe { Acronym::from_str_unchecked("ST") }
1783 }
1784 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1786 unsafe {
1787 [
1788 Acronym::from_str_unchecked("TP"),
1789 Acronym::from_str_unchecked("CL"),
1790 ]
1791 }
1792 .into_iter()
1793 }
1794 pub const fn description() -> &'static str {
1796 "Once you start a slider, follow precisely or get a miss."
1797 }
1798 pub const fn kind() -> GameModKind {
1800 GameModKind::DifficultyIncrease
1801 }
1802}
1803impl AccuracyChallengeOsu {
1804 pub const fn acronym() -> Acronym {
1806 unsafe { Acronym::from_str_unchecked("AC") }
1807 }
1808 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1810 unsafe {
1811 [
1812 Acronym::from_str_unchecked("EZ"),
1813 Acronym::from_str_unchecked("NF"),
1814 Acronym::from_str_unchecked("PF"),
1815 Acronym::from_str_unchecked("CN"),
1816 ]
1817 }
1818 .into_iter()
1819 }
1820 pub const fn description() -> &'static str {
1822 "Fail if your accuracy drops too low!"
1823 }
1824 pub const fn kind() -> GameModKind {
1826 GameModKind::DifficultyIncrease
1827 }
1828}
1829impl TargetPracticeOsu {
1830 pub const fn acronym() -> Acronym {
1832 unsafe { Acronym::from_str_unchecked("TP") }
1833 }
1834 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1836 unsafe {
1837 [
1838 Acronym::from_str_unchecked("SD"),
1839 Acronym::from_str_unchecked("ST"),
1840 Acronym::from_str_unchecked("RD"),
1841 Acronym::from_str_unchecked("SO"),
1842 Acronym::from_str_unchecked("TC"),
1843 Acronym::from_str_unchecked("AD"),
1844 Acronym::from_str_unchecked("DP"),
1845 ]
1846 }
1847 .into_iter()
1848 }
1849 pub const fn description() -> &'static str {
1851 "Practice keeping up with the beat of the song."
1852 }
1853 pub const fn kind() -> GameModKind {
1855 GameModKind::Conversion
1856 }
1857 pub const fn bits() -> u32 {
1861 8388608
1862 }
1863}
1864impl DifficultyAdjustOsu {
1865 pub const fn acronym() -> Acronym {
1867 unsafe { Acronym::from_str_unchecked("DA") }
1868 }
1869 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1871 unsafe {
1872 [
1873 Acronym::from_str_unchecked("EZ"),
1874 Acronym::from_str_unchecked("HR"),
1875 ]
1876 }
1877 .into_iter()
1878 }
1879 pub const fn description() -> &'static str {
1881 "Override a beatmap's difficulty settings."
1882 }
1883 pub const fn kind() -> GameModKind {
1885 GameModKind::Conversion
1886 }
1887}
1888impl ClassicOsu {
1889 pub const fn acronym() -> Acronym {
1891 unsafe { Acronym::from_str_unchecked("CL") }
1892 }
1893 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1895 unsafe { [Acronym::from_str_unchecked("ST")] }.into_iter()
1896 }
1897 pub const fn description() -> &'static str {
1899 "Feeling nostalgic?"
1900 }
1901 pub const fn kind() -> GameModKind {
1903 GameModKind::Conversion
1904 }
1905}
1906impl RandomOsu {
1907 pub const fn acronym() -> Acronym {
1909 unsafe { Acronym::from_str_unchecked("RD") }
1910 }
1911 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1913 unsafe { [Acronym::from_str_unchecked("TP")] }.into_iter()
1914 }
1915 pub const fn description() -> &'static str {
1917 "It never gets boring!"
1918 }
1919 pub const fn kind() -> GameModKind {
1921 GameModKind::Conversion
1922 }
1923 pub const fn bits() -> u32 {
1927 2097152
1928 }
1929}
1930impl MirrorOsu {
1931 pub const fn acronym() -> Acronym {
1933 unsafe { Acronym::from_str_unchecked("MR") }
1934 }
1935 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1937 unsafe { [Acronym::from_str_unchecked("HR")] }.into_iter()
1938 }
1939 pub const fn description() -> &'static str {
1941 "Flip objects on the chosen axes."
1942 }
1943 pub const fn kind() -> GameModKind {
1945 GameModKind::Conversion
1946 }
1947 pub const fn bits() -> u32 {
1951 1073741824
1952 }
1953}
1954impl AlternateOsu {
1955 pub const fn acronym() -> Acronym {
1957 unsafe { Acronym::from_str_unchecked("AL") }
1958 }
1959 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1961 unsafe {
1962 [
1963 Acronym::from_str_unchecked("SG"),
1964 Acronym::from_str_unchecked("AT"),
1965 Acronym::from_str_unchecked("CN"),
1966 Acronym::from_str_unchecked("RX"),
1967 ]
1968 }
1969 .into_iter()
1970 }
1971 pub const fn description() -> &'static str {
1973 "Don't use the same key twice in a row!"
1974 }
1975 pub const fn kind() -> GameModKind {
1977 GameModKind::Conversion
1978 }
1979}
1980impl SingleTapOsu {
1981 pub const fn acronym() -> Acronym {
1983 unsafe { Acronym::from_str_unchecked("SG") }
1984 }
1985 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
1987 unsafe {
1988 [
1989 Acronym::from_str_unchecked("AL"),
1990 Acronym::from_str_unchecked("AT"),
1991 Acronym::from_str_unchecked("CN"),
1992 Acronym::from_str_unchecked("RX"),
1993 ]
1994 }
1995 .into_iter()
1996 }
1997 pub const fn description() -> &'static str {
1999 "You must only use one key!"
2000 }
2001 pub const fn kind() -> GameModKind {
2003 GameModKind::Conversion
2004 }
2005}
2006impl AutoplayOsu {
2007 pub const fn acronym() -> Acronym {
2009 unsafe { Acronym::from_str_unchecked("AT") }
2010 }
2011 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2013 unsafe {
2014 [
2015 Acronym::from_str_unchecked("AL"),
2016 Acronym::from_str_unchecked("SG"),
2017 Acronym::from_str_unchecked("CN"),
2018 Acronym::from_str_unchecked("RX"),
2019 Acronym::from_str_unchecked("AP"),
2020 Acronym::from_str_unchecked("SO"),
2021 Acronym::from_str_unchecked("MG"),
2022 Acronym::from_str_unchecked("RP"),
2023 Acronym::from_str_unchecked("AS"),
2024 Acronym::from_str_unchecked("TD"),
2025 ]
2026 }
2027 .into_iter()
2028 }
2029 pub const fn description() -> &'static str {
2031 "Watch a perfect automated play through the song."
2032 }
2033 pub const fn kind() -> GameModKind {
2035 GameModKind::Automation
2036 }
2037 pub const fn bits() -> u32 {
2041 2048
2042 }
2043}
2044impl CinemaOsu {
2045 pub const fn acronym() -> Acronym {
2047 unsafe { Acronym::from_str_unchecked("CN") }
2048 }
2049 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2051 unsafe {
2052 [
2053 Acronym::from_str_unchecked("NF"),
2054 Acronym::from_str_unchecked("SD"),
2055 Acronym::from_str_unchecked("PF"),
2056 Acronym::from_str_unchecked("AC"),
2057 Acronym::from_str_unchecked("AL"),
2058 Acronym::from_str_unchecked("SG"),
2059 Acronym::from_str_unchecked("AT"),
2060 Acronym::from_str_unchecked("RX"),
2061 Acronym::from_str_unchecked("AP"),
2062 Acronym::from_str_unchecked("SO"),
2063 Acronym::from_str_unchecked("MG"),
2064 Acronym::from_str_unchecked("RP"),
2065 Acronym::from_str_unchecked("AS"),
2066 Acronym::from_str_unchecked("TD"),
2067 ]
2068 }
2069 .into_iter()
2070 }
2071 pub const fn description() -> &'static str {
2073 "Watch the video without visual distractions."
2074 }
2075 pub const fn kind() -> GameModKind {
2077 GameModKind::Automation
2078 }
2079 pub const fn bits() -> u32 {
2083 4194304
2084 }
2085}
2086impl RelaxOsu {
2087 pub const fn acronym() -> Acronym {
2089 unsafe { Acronym::from_str_unchecked("RX") }
2090 }
2091 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2093 unsafe {
2094 [
2095 Acronym::from_str_unchecked("AL"),
2096 Acronym::from_str_unchecked("SG"),
2097 Acronym::from_str_unchecked("AT"),
2098 Acronym::from_str_unchecked("CN"),
2099 Acronym::from_str_unchecked("AP"),
2100 Acronym::from_str_unchecked("MG"),
2101 ]
2102 }
2103 .into_iter()
2104 }
2105 pub const fn description() -> &'static str {
2107 "You don't need to click. Give your clicking/tapping fingers a break from the heat of things."
2108 }
2109 pub const fn kind() -> GameModKind {
2111 GameModKind::Automation
2112 }
2113 pub const fn bits() -> u32 {
2117 128
2118 }
2119}
2120impl AutopilotOsu {
2121 pub const fn acronym() -> Acronym {
2123 unsafe { Acronym::from_str_unchecked("AP") }
2124 }
2125 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2127 unsafe {
2128 [
2129 Acronym::from_str_unchecked("AT"),
2130 Acronym::from_str_unchecked("CN"),
2131 Acronym::from_str_unchecked("RX"),
2132 Acronym::from_str_unchecked("SO"),
2133 Acronym::from_str_unchecked("MG"),
2134 Acronym::from_str_unchecked("RP"),
2135 Acronym::from_str_unchecked("TD"),
2136 ]
2137 }
2138 .into_iter()
2139 }
2140 pub const fn description() -> &'static str {
2142 "Automatic cursor movement - just follow the rhythm."
2143 }
2144 pub const fn kind() -> GameModKind {
2146 GameModKind::Automation
2147 }
2148 pub const fn bits() -> u32 {
2152 8192
2153 }
2154}
2155impl SpunOutOsu {
2156 pub const fn acronym() -> Acronym {
2158 unsafe { Acronym::from_str_unchecked("SO") }
2159 }
2160 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2162 unsafe {
2163 [
2164 Acronym::from_str_unchecked("TP"),
2165 Acronym::from_str_unchecked("AT"),
2166 Acronym::from_str_unchecked("CN"),
2167 Acronym::from_str_unchecked("AP"),
2168 ]
2169 }
2170 .into_iter()
2171 }
2172 pub const fn description() -> &'static str {
2174 "Spinners will be automatically completed."
2175 }
2176 pub const fn kind() -> GameModKind {
2178 GameModKind::Automation
2179 }
2180 pub const fn bits() -> u32 {
2184 4096
2185 }
2186}
2187impl TransformOsu {
2188 pub const fn acronym() -> Acronym {
2190 unsafe { Acronym::from_str_unchecked("TR") }
2191 }
2192 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2194 unsafe {
2195 [
2196 Acronym::from_str_unchecked("WG"),
2197 Acronym::from_str_unchecked("MG"),
2198 Acronym::from_str_unchecked("RP"),
2199 Acronym::from_str_unchecked("FR"),
2200 Acronym::from_str_unchecked("DP"),
2201 ]
2202 }
2203 .into_iter()
2204 }
2205 pub const fn description() -> &'static str {
2207 "Everything rotates. EVERYTHING."
2208 }
2209 pub const fn kind() -> GameModKind {
2211 GameModKind::Fun
2212 }
2213}
2214impl WiggleOsu {
2215 pub const fn acronym() -> Acronym {
2217 unsafe { Acronym::from_str_unchecked("WG") }
2218 }
2219 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2221 unsafe {
2222 [
2223 Acronym::from_str_unchecked("TR"),
2224 Acronym::from_str_unchecked("MG"),
2225 Acronym::from_str_unchecked("RP"),
2226 Acronym::from_str_unchecked("DP"),
2227 ]
2228 }
2229 .into_iter()
2230 }
2231 pub const fn description() -> &'static str {
2233 "They just won't stay still..."
2234 }
2235 pub const fn kind() -> GameModKind {
2237 GameModKind::Fun
2238 }
2239}
2240impl SpinInOsu {
2241 pub const fn acronym() -> Acronym {
2243 unsafe { Acronym::from_str_unchecked("SI") }
2244 }
2245 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2247 unsafe {
2248 [
2249 Acronym::from_str_unchecked("HD"),
2250 Acronym::from_str_unchecked("GR"),
2251 Acronym::from_str_unchecked("DF"),
2252 Acronym::from_str_unchecked("TC"),
2253 Acronym::from_str_unchecked("AD"),
2254 Acronym::from_str_unchecked("DP"),
2255 ]
2256 }
2257 .into_iter()
2258 }
2259 pub const fn description() -> &'static str {
2261 "Circles spin in. No approach circles."
2262 }
2263 pub const fn kind() -> GameModKind {
2265 GameModKind::Fun
2266 }
2267}
2268impl GrowOsu {
2269 pub const fn acronym() -> Acronym {
2271 unsafe { Acronym::from_str_unchecked("GR") }
2272 }
2273 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2275 unsafe {
2276 [
2277 Acronym::from_str_unchecked("SI"),
2278 Acronym::from_str_unchecked("DF"),
2279 Acronym::from_str_unchecked("TC"),
2280 Acronym::from_str_unchecked("AD"),
2281 Acronym::from_str_unchecked("DP"),
2282 ]
2283 }
2284 .into_iter()
2285 }
2286 pub const fn description() -> &'static str {
2288 "Hit them at the right size!"
2289 }
2290 pub const fn kind() -> GameModKind {
2292 GameModKind::Fun
2293 }
2294}
2295impl DeflateOsu {
2296 pub const fn acronym() -> Acronym {
2298 unsafe { Acronym::from_str_unchecked("DF") }
2299 }
2300 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2302 unsafe {
2303 [
2304 Acronym::from_str_unchecked("SI"),
2305 Acronym::from_str_unchecked("GR"),
2306 Acronym::from_str_unchecked("TC"),
2307 Acronym::from_str_unchecked("AD"),
2308 Acronym::from_str_unchecked("DP"),
2309 ]
2310 }
2311 .into_iter()
2312 }
2313 pub const fn description() -> &'static str {
2315 "Hit them at the right size!"
2316 }
2317 pub const fn kind() -> GameModKind {
2319 GameModKind::Fun
2320 }
2321}
2322impl WindUpOsu {
2323 pub const fn acronym() -> Acronym {
2325 unsafe { Acronym::from_str_unchecked("WU") }
2326 }
2327 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2329 unsafe {
2330 [
2331 Acronym::from_str_unchecked("HT"),
2332 Acronym::from_str_unchecked("DC"),
2333 Acronym::from_str_unchecked("DT"),
2334 Acronym::from_str_unchecked("NC"),
2335 Acronym::from_str_unchecked("WD"),
2336 Acronym::from_str_unchecked("AS"),
2337 ]
2338 }
2339 .into_iter()
2340 }
2341 pub const fn description() -> &'static str {
2343 "Can you keep up?"
2344 }
2345 pub const fn kind() -> GameModKind {
2347 GameModKind::Fun
2348 }
2349}
2350impl WindDownOsu {
2351 pub const fn acronym() -> Acronym {
2353 unsafe { Acronym::from_str_unchecked("WD") }
2354 }
2355 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2357 unsafe {
2358 [
2359 Acronym::from_str_unchecked("HT"),
2360 Acronym::from_str_unchecked("DC"),
2361 Acronym::from_str_unchecked("DT"),
2362 Acronym::from_str_unchecked("NC"),
2363 Acronym::from_str_unchecked("WU"),
2364 Acronym::from_str_unchecked("AS"),
2365 ]
2366 }
2367 .into_iter()
2368 }
2369 pub const fn description() -> &'static str {
2371 "Sloooow doooown..."
2372 }
2373 pub const fn kind() -> GameModKind {
2375 GameModKind::Fun
2376 }
2377}
2378impl TraceableOsu {
2379 pub const fn acronym() -> Acronym {
2381 unsafe { Acronym::from_str_unchecked("TC") }
2382 }
2383 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2385 unsafe {
2386 [
2387 Acronym::from_str_unchecked("HD"),
2388 Acronym::from_str_unchecked("TP"),
2389 Acronym::from_str_unchecked("SI"),
2390 Acronym::from_str_unchecked("GR"),
2391 Acronym::from_str_unchecked("DF"),
2392 Acronym::from_str_unchecked("DP"),
2393 ]
2394 }
2395 .into_iter()
2396 }
2397 pub const fn description() -> &'static str {
2399 "Put your faith in the approach circles..."
2400 }
2401 pub const fn kind() -> GameModKind {
2403 GameModKind::Fun
2404 }
2405}
2406impl BarrelRollOsu {
2407 pub const fn acronym() -> Acronym {
2409 unsafe { Acronym::from_str_unchecked("BR") }
2410 }
2411 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2413 unsafe { [Acronym::from_str_unchecked("BU")] }.into_iter()
2414 }
2415 pub const fn description() -> &'static str {
2417 "The whole playfield is on a wheel!"
2418 }
2419 pub const fn kind() -> GameModKind {
2421 GameModKind::Fun
2422 }
2423}
2424impl ApproachDifferentOsu {
2425 pub const fn acronym() -> Acronym {
2427 unsafe { Acronym::from_str_unchecked("AD") }
2428 }
2429 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2431 unsafe {
2432 [
2433 Acronym::from_str_unchecked("HD"),
2434 Acronym::from_str_unchecked("TP"),
2435 Acronym::from_str_unchecked("SI"),
2436 Acronym::from_str_unchecked("GR"),
2437 Acronym::from_str_unchecked("DF"),
2438 Acronym::from_str_unchecked("FR"),
2439 ]
2440 }
2441 .into_iter()
2442 }
2443 pub const fn description() -> &'static str {
2445 "Never trust the approach circles..."
2446 }
2447 pub const fn kind() -> GameModKind {
2449 GameModKind::Fun
2450 }
2451}
2452impl MutedOsu {
2453 pub const fn acronym() -> Acronym {
2455 unsafe { Acronym::from_str_unchecked("MU") }
2456 }
2457 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2459 [].into_iter()
2460 }
2461 pub const fn description() -> &'static str {
2463 "Can you still feel the rhythm without music?"
2464 }
2465 pub const fn kind() -> GameModKind {
2467 GameModKind::Fun
2468 }
2469}
2470impl NoScopeOsu {
2471 pub const fn acronym() -> Acronym {
2473 unsafe { Acronym::from_str_unchecked("NS") }
2474 }
2475 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2477 unsafe { [Acronym::from_str_unchecked("BM")] }.into_iter()
2478 }
2479 pub const fn description() -> &'static str {
2481 "Where's the cursor?"
2482 }
2483 pub const fn kind() -> GameModKind {
2485 GameModKind::Fun
2486 }
2487}
2488impl MagnetisedOsu {
2489 pub const fn acronym() -> Acronym {
2491 unsafe { Acronym::from_str_unchecked("MG") }
2492 }
2493 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2495 unsafe {
2496 [
2497 Acronym::from_str_unchecked("AT"),
2498 Acronym::from_str_unchecked("CN"),
2499 Acronym::from_str_unchecked("RX"),
2500 Acronym::from_str_unchecked("AP"),
2501 Acronym::from_str_unchecked("TR"),
2502 Acronym::from_str_unchecked("WG"),
2503 Acronym::from_str_unchecked("RP"),
2504 Acronym::from_str_unchecked("BU"),
2505 Acronym::from_str_unchecked("DP"),
2506 ]
2507 }
2508 .into_iter()
2509 }
2510 pub const fn description() -> &'static str {
2512 "No need to chase the circles – your cursor is a magnet!"
2513 }
2514 pub const fn kind() -> GameModKind {
2516 GameModKind::Fun
2517 }
2518}
2519impl RepelOsu {
2520 pub const fn acronym() -> Acronym {
2522 unsafe { Acronym::from_str_unchecked("RP") }
2523 }
2524 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2526 unsafe {
2527 [
2528 Acronym::from_str_unchecked("AT"),
2529 Acronym::from_str_unchecked("CN"),
2530 Acronym::from_str_unchecked("AP"),
2531 Acronym::from_str_unchecked("TR"),
2532 Acronym::from_str_unchecked("WG"),
2533 Acronym::from_str_unchecked("MG"),
2534 Acronym::from_str_unchecked("BU"),
2535 Acronym::from_str_unchecked("DP"),
2536 ]
2537 }
2538 .into_iter()
2539 }
2540 pub const fn description() -> &'static str {
2542 "Hit objects run away!"
2543 }
2544 pub const fn kind() -> GameModKind {
2546 GameModKind::Fun
2547 }
2548}
2549impl AdaptiveSpeedOsu {
2550 pub const fn acronym() -> Acronym {
2552 unsafe { Acronym::from_str_unchecked("AS") }
2553 }
2554 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2556 unsafe {
2557 [
2558 Acronym::from_str_unchecked("HT"),
2559 Acronym::from_str_unchecked("DC"),
2560 Acronym::from_str_unchecked("DT"),
2561 Acronym::from_str_unchecked("NC"),
2562 Acronym::from_str_unchecked("AT"),
2563 Acronym::from_str_unchecked("CN"),
2564 Acronym::from_str_unchecked("WU"),
2565 Acronym::from_str_unchecked("WD"),
2566 ]
2567 }
2568 .into_iter()
2569 }
2570 pub const fn description() -> &'static str {
2572 "Let track speed adapt to you."
2573 }
2574 pub const fn kind() -> GameModKind {
2576 GameModKind::Fun
2577 }
2578}
2579impl FreezeFrameOsu {
2580 pub const fn acronym() -> Acronym {
2582 unsafe { Acronym::from_str_unchecked("FR") }
2583 }
2584 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2586 unsafe {
2587 [
2588 Acronym::from_str_unchecked("TR"),
2589 Acronym::from_str_unchecked("AD"),
2590 Acronym::from_str_unchecked("DP"),
2591 ]
2592 }
2593 .into_iter()
2594 }
2595 pub const fn description() -> &'static str {
2597 "Burn the notes into your memory."
2598 }
2599 pub const fn kind() -> GameModKind {
2601 GameModKind::Fun
2602 }
2603}
2604impl BubblesOsu {
2605 pub const fn acronym() -> Acronym {
2607 unsafe { Acronym::from_str_unchecked("BU") }
2608 }
2609 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2611 unsafe {
2612 [
2613 Acronym::from_str_unchecked("BR"),
2614 Acronym::from_str_unchecked("MG"),
2615 Acronym::from_str_unchecked("RP"),
2616 ]
2617 }
2618 .into_iter()
2619 }
2620 pub const fn description() -> &'static str {
2622 "Don't let their popping distract you!"
2623 }
2624 pub const fn kind() -> GameModKind {
2626 GameModKind::Fun
2627 }
2628}
2629impl SynesthesiaOsu {
2630 pub const fn acronym() -> Acronym {
2632 unsafe { Acronym::from_str_unchecked("SY") }
2633 }
2634 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2636 [].into_iter()
2637 }
2638 pub const fn description() -> &'static str {
2640 "Colours hit objects based on the rhythm."
2641 }
2642 pub const fn kind() -> GameModKind {
2644 GameModKind::Fun
2645 }
2646}
2647impl DepthOsu {
2648 pub const fn acronym() -> Acronym {
2650 unsafe { Acronym::from_str_unchecked("DP") }
2651 }
2652 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2654 unsafe {
2655 [
2656 Acronym::from_str_unchecked("HD"),
2657 Acronym::from_str_unchecked("TP"),
2658 Acronym::from_str_unchecked("TR"),
2659 Acronym::from_str_unchecked("WG"),
2660 Acronym::from_str_unchecked("SI"),
2661 Acronym::from_str_unchecked("GR"),
2662 Acronym::from_str_unchecked("DF"),
2663 Acronym::from_str_unchecked("TC"),
2664 Acronym::from_str_unchecked("MG"),
2665 Acronym::from_str_unchecked("RP"),
2666 Acronym::from_str_unchecked("FR"),
2667 ]
2668 }
2669 .into_iter()
2670 }
2671 pub const fn description() -> &'static str {
2673 "3D. Almost."
2674 }
2675 pub const fn kind() -> GameModKind {
2677 GameModKind::Fun
2678 }
2679}
2680impl BloomOsu {
2681 pub const fn acronym() -> Acronym {
2683 unsafe { Acronym::from_str_unchecked("BM") }
2684 }
2685 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2687 unsafe {
2688 [
2689 Acronym::from_str_unchecked("FL"),
2690 Acronym::from_str_unchecked("NS"),
2691 Acronym::from_str_unchecked("TD"),
2692 ]
2693 }
2694 .into_iter()
2695 }
2696 pub const fn description() -> &'static str {
2698 "The cursor blooms into.. a larger cursor!"
2699 }
2700 pub const fn kind() -> GameModKind {
2702 GameModKind::Fun
2703 }
2704}
2705impl TouchDeviceOsu {
2706 pub const fn acronym() -> Acronym {
2708 unsafe { Acronym::from_str_unchecked("TD") }
2709 }
2710 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2712 unsafe {
2713 [
2714 Acronym::from_str_unchecked("AT"),
2715 Acronym::from_str_unchecked("CN"),
2716 Acronym::from_str_unchecked("AP"),
2717 Acronym::from_str_unchecked("BM"),
2718 ]
2719 }
2720 .into_iter()
2721 }
2722 pub const fn description() -> &'static str {
2724 "Automatically applied to plays on devices with a touchscreen."
2725 }
2726 pub const fn kind() -> GameModKind {
2728 GameModKind::System
2729 }
2730 pub const fn bits() -> u32 {
2734 4
2735 }
2736}
2737impl ScoreV2Osu {
2738 pub const fn acronym() -> Acronym {
2740 unsafe { Acronym::from_str_unchecked("SV2") }
2741 }
2742 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2744 [].into_iter()
2745 }
2746 pub const fn description() -> &'static str {
2748 "Score set on earlier osu! versions with the V2 scoring algorithm active."
2749 }
2750 pub const fn kind() -> GameModKind {
2752 GameModKind::System
2753 }
2754 pub const fn bits() -> u32 {
2758 536870912
2759 }
2760}
2761impl EasyTaiko {
2762 pub const fn acronym() -> Acronym {
2764 unsafe { Acronym::from_str_unchecked("EZ") }
2765 }
2766 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2768 unsafe {
2769 [
2770 Acronym::from_str_unchecked("HR"),
2771 Acronym::from_str_unchecked("DA"),
2772 ]
2773 }
2774 .into_iter()
2775 }
2776 pub const fn description() -> &'static str {
2778 "Beats move slower, and less accuracy required!"
2779 }
2780 pub const fn kind() -> GameModKind {
2782 GameModKind::DifficultyReduction
2783 }
2784 pub const fn bits() -> u32 {
2788 2
2789 }
2790}
2791impl NoFailTaiko {
2792 pub const fn acronym() -> Acronym {
2794 unsafe { Acronym::from_str_unchecked("NF") }
2795 }
2796 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2798 unsafe {
2799 [
2800 Acronym::from_str_unchecked("SD"),
2801 Acronym::from_str_unchecked("PF"),
2802 Acronym::from_str_unchecked("AC"),
2803 Acronym::from_str_unchecked("CN"),
2804 ]
2805 }
2806 .into_iter()
2807 }
2808 pub const fn description() -> &'static str {
2810 "You can't fail, no matter what."
2811 }
2812 pub const fn kind() -> GameModKind {
2814 GameModKind::DifficultyReduction
2815 }
2816 pub const fn bits() -> u32 {
2820 1
2821 }
2822}
2823impl HalfTimeTaiko {
2824 pub const fn acronym() -> Acronym {
2826 unsafe { Acronym::from_str_unchecked("HT") }
2827 }
2828 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2830 unsafe {
2831 [
2832 Acronym::from_str_unchecked("DC"),
2833 Acronym::from_str_unchecked("DT"),
2834 Acronym::from_str_unchecked("NC"),
2835 Acronym::from_str_unchecked("WU"),
2836 Acronym::from_str_unchecked("WD"),
2837 Acronym::from_str_unchecked("AS"),
2838 ]
2839 }
2840 .into_iter()
2841 }
2842 pub const fn description() -> &'static str {
2844 "Less zoom..."
2845 }
2846 pub const fn kind() -> GameModKind {
2848 GameModKind::DifficultyReduction
2849 }
2850 pub const fn bits() -> u32 {
2854 256
2855 }
2856}
2857impl DaycoreTaiko {
2858 pub const fn acronym() -> Acronym {
2860 unsafe { Acronym::from_str_unchecked("DC") }
2861 }
2862 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2864 unsafe {
2865 [
2866 Acronym::from_str_unchecked("HT"),
2867 Acronym::from_str_unchecked("DT"),
2868 Acronym::from_str_unchecked("NC"),
2869 Acronym::from_str_unchecked("WU"),
2870 Acronym::from_str_unchecked("WD"),
2871 Acronym::from_str_unchecked("AS"),
2872 ]
2873 }
2874 .into_iter()
2875 }
2876 pub const fn description() -> &'static str {
2878 "Whoaaaaa..."
2879 }
2880 pub const fn kind() -> GameModKind {
2882 GameModKind::DifficultyReduction
2883 }
2884}
2885impl HardRockTaiko {
2886 pub const fn acronym() -> Acronym {
2888 unsafe { Acronym::from_str_unchecked("HR") }
2889 }
2890 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2892 unsafe {
2893 [
2894 Acronym::from_str_unchecked("EZ"),
2895 Acronym::from_str_unchecked("DA"),
2896 ]
2897 }
2898 .into_iter()
2899 }
2900 pub const fn description() -> &'static str {
2902 "Everything just got a bit harder..."
2903 }
2904 pub const fn kind() -> GameModKind {
2906 GameModKind::DifficultyIncrease
2907 }
2908 pub const fn bits() -> u32 {
2912 16
2913 }
2914}
2915impl SuddenDeathTaiko {
2916 pub const fn acronym() -> Acronym {
2918 unsafe { Acronym::from_str_unchecked("SD") }
2919 }
2920 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2922 unsafe {
2923 [
2924 Acronym::from_str_unchecked("NF"),
2925 Acronym::from_str_unchecked("PF"),
2926 Acronym::from_str_unchecked("CN"),
2927 ]
2928 }
2929 .into_iter()
2930 }
2931 pub const fn description() -> &'static str {
2933 "Miss and fail."
2934 }
2935 pub const fn kind() -> GameModKind {
2937 GameModKind::DifficultyIncrease
2938 }
2939 pub const fn bits() -> u32 {
2943 32
2944 }
2945}
2946impl PerfectTaiko {
2947 pub const fn acronym() -> Acronym {
2949 unsafe { Acronym::from_str_unchecked("PF") }
2950 }
2951 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2953 unsafe {
2954 [
2955 Acronym::from_str_unchecked("NF"),
2956 Acronym::from_str_unchecked("SD"),
2957 Acronym::from_str_unchecked("AC"),
2958 Acronym::from_str_unchecked("CN"),
2959 ]
2960 }
2961 .into_iter()
2962 }
2963 pub const fn description() -> &'static str {
2965 "SS or quit."
2966 }
2967 pub const fn kind() -> GameModKind {
2969 GameModKind::DifficultyIncrease
2970 }
2971 pub const fn bits() -> u32 {
2975 16416
2976 }
2977}
2978impl DoubleTimeTaiko {
2979 pub const fn acronym() -> Acronym {
2981 unsafe { Acronym::from_str_unchecked("DT") }
2982 }
2983 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
2985 unsafe {
2986 [
2987 Acronym::from_str_unchecked("HT"),
2988 Acronym::from_str_unchecked("DC"),
2989 Acronym::from_str_unchecked("NC"),
2990 Acronym::from_str_unchecked("WU"),
2991 Acronym::from_str_unchecked("WD"),
2992 Acronym::from_str_unchecked("AS"),
2993 ]
2994 }
2995 .into_iter()
2996 }
2997 pub const fn description() -> &'static str {
2999 "Zoooooooooom..."
3000 }
3001 pub const fn kind() -> GameModKind {
3003 GameModKind::DifficultyIncrease
3004 }
3005 pub const fn bits() -> u32 {
3009 64
3010 }
3011}
3012impl NightcoreTaiko {
3013 pub const fn acronym() -> Acronym {
3015 unsafe { Acronym::from_str_unchecked("NC") }
3016 }
3017 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3019 unsafe {
3020 [
3021 Acronym::from_str_unchecked("HT"),
3022 Acronym::from_str_unchecked("DC"),
3023 Acronym::from_str_unchecked("DT"),
3024 Acronym::from_str_unchecked("WU"),
3025 Acronym::from_str_unchecked("WD"),
3026 Acronym::from_str_unchecked("AS"),
3027 ]
3028 }
3029 .into_iter()
3030 }
3031 pub const fn description() -> &'static str {
3033 "Uguuuuuuuu..."
3034 }
3035 pub const fn kind() -> GameModKind {
3037 GameModKind::DifficultyIncrease
3038 }
3039 pub const fn bits() -> u32 {
3043 576
3044 }
3045}
3046impl HiddenTaiko {
3047 pub const fn acronym() -> Acronym {
3049 unsafe { Acronym::from_str_unchecked("HD") }
3050 }
3051 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3053 [].into_iter()
3054 }
3055 pub const fn description() -> &'static str {
3057 "Beats fade out before you hit them!"
3058 }
3059 pub const fn kind() -> GameModKind {
3061 GameModKind::DifficultyIncrease
3062 }
3063 pub const fn bits() -> u32 {
3067 8
3068 }
3069}
3070impl FlashlightTaiko {
3071 pub const fn acronym() -> Acronym {
3073 unsafe { Acronym::from_str_unchecked("FL") }
3074 }
3075 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3077 [].into_iter()
3078 }
3079 pub const fn description() -> &'static str {
3081 "Restricted view area."
3082 }
3083 pub const fn kind() -> GameModKind {
3085 GameModKind::DifficultyIncrease
3086 }
3087 pub const fn bits() -> u32 {
3091 1024
3092 }
3093}
3094impl AccuracyChallengeTaiko {
3095 pub const fn acronym() -> Acronym {
3097 unsafe { Acronym::from_str_unchecked("AC") }
3098 }
3099 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3101 unsafe {
3102 [
3103 Acronym::from_str_unchecked("NF"),
3104 Acronym::from_str_unchecked("PF"),
3105 Acronym::from_str_unchecked("CN"),
3106 ]
3107 }
3108 .into_iter()
3109 }
3110 pub const fn description() -> &'static str {
3112 "Fail if your accuracy drops too low!"
3113 }
3114 pub const fn kind() -> GameModKind {
3116 GameModKind::DifficultyIncrease
3117 }
3118}
3119impl RandomTaiko {
3120 pub const fn acronym() -> Acronym {
3122 unsafe { Acronym::from_str_unchecked("RD") }
3123 }
3124 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3126 unsafe { [Acronym::from_str_unchecked("SW")] }.into_iter()
3127 }
3128 pub const fn description() -> &'static str {
3130 "Shuffle around the colours!"
3131 }
3132 pub const fn kind() -> GameModKind {
3134 GameModKind::Conversion
3135 }
3136 pub const fn bits() -> u32 {
3140 2097152
3141 }
3142}
3143impl DifficultyAdjustTaiko {
3144 pub const fn acronym() -> Acronym {
3146 unsafe { Acronym::from_str_unchecked("DA") }
3147 }
3148 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3150 unsafe {
3151 [
3152 Acronym::from_str_unchecked("EZ"),
3153 Acronym::from_str_unchecked("HR"),
3154 ]
3155 }
3156 .into_iter()
3157 }
3158 pub const fn description() -> &'static str {
3160 "Override a beatmap's difficulty settings."
3161 }
3162 pub const fn kind() -> GameModKind {
3164 GameModKind::Conversion
3165 }
3166}
3167impl ClassicTaiko {
3168 pub const fn acronym() -> Acronym {
3170 unsafe { Acronym::from_str_unchecked("CL") }
3171 }
3172 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3174 [].into_iter()
3175 }
3176 pub const fn description() -> &'static str {
3178 "Feeling nostalgic?"
3179 }
3180 pub const fn kind() -> GameModKind {
3182 GameModKind::Conversion
3183 }
3184}
3185impl SwapTaiko {
3186 pub const fn acronym() -> Acronym {
3188 unsafe { Acronym::from_str_unchecked("SW") }
3189 }
3190 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3192 unsafe { [Acronym::from_str_unchecked("RD")] }.into_iter()
3193 }
3194 pub const fn description() -> &'static str {
3196 "Dons become kats, kats become dons"
3197 }
3198 pub const fn kind() -> GameModKind {
3200 GameModKind::Conversion
3201 }
3202}
3203impl SingleTapTaiko {
3204 pub const fn acronym() -> Acronym {
3206 unsafe { Acronym::from_str_unchecked("SG") }
3207 }
3208 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3210 unsafe {
3211 [
3212 Acronym::from_str_unchecked("AT"),
3213 Acronym::from_str_unchecked("CN"),
3214 Acronym::from_str_unchecked("RX"),
3215 ]
3216 }
3217 .into_iter()
3218 }
3219 pub const fn description() -> &'static str {
3221 "One key for dons, one key for kats."
3222 }
3223 pub const fn kind() -> GameModKind {
3225 GameModKind::Conversion
3226 }
3227}
3228impl ConstantSpeedTaiko {
3229 pub const fn acronym() -> Acronym {
3231 unsafe { Acronym::from_str_unchecked("CS") }
3232 }
3233 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3235 [].into_iter()
3236 }
3237 pub const fn description() -> &'static str {
3239 "No more tricky speed changes!"
3240 }
3241 pub const fn kind() -> GameModKind {
3243 GameModKind::Conversion
3244 }
3245}
3246impl AutoplayTaiko {
3247 pub const fn acronym() -> Acronym {
3249 unsafe { Acronym::from_str_unchecked("AT") }
3250 }
3251 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3253 unsafe {
3254 [
3255 Acronym::from_str_unchecked("SG"),
3256 Acronym::from_str_unchecked("CN"),
3257 Acronym::from_str_unchecked("RX"),
3258 Acronym::from_str_unchecked("AS"),
3259 ]
3260 }
3261 .into_iter()
3262 }
3263 pub const fn description() -> &'static str {
3265 "Watch a perfect automated play through the song."
3266 }
3267 pub const fn kind() -> GameModKind {
3269 GameModKind::Automation
3270 }
3271 pub const fn bits() -> u32 {
3275 2048
3276 }
3277}
3278impl CinemaTaiko {
3279 pub const fn acronym() -> Acronym {
3281 unsafe { Acronym::from_str_unchecked("CN") }
3282 }
3283 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3285 unsafe {
3286 [
3287 Acronym::from_str_unchecked("NF"),
3288 Acronym::from_str_unchecked("SD"),
3289 Acronym::from_str_unchecked("PF"),
3290 Acronym::from_str_unchecked("AC"),
3291 Acronym::from_str_unchecked("SG"),
3292 Acronym::from_str_unchecked("AT"),
3293 Acronym::from_str_unchecked("RX"),
3294 Acronym::from_str_unchecked("AS"),
3295 ]
3296 }
3297 .into_iter()
3298 }
3299 pub const fn description() -> &'static str {
3301 "Watch the video without visual distractions."
3302 }
3303 pub const fn kind() -> GameModKind {
3305 GameModKind::Automation
3306 }
3307 pub const fn bits() -> u32 {
3311 4194304
3312 }
3313}
3314impl RelaxTaiko {
3315 pub const fn acronym() -> Acronym {
3317 unsafe { Acronym::from_str_unchecked("RX") }
3318 }
3319 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3321 unsafe {
3322 [
3323 Acronym::from_str_unchecked("SG"),
3324 Acronym::from_str_unchecked("AT"),
3325 Acronym::from_str_unchecked("CN"),
3326 ]
3327 }
3328 .into_iter()
3329 }
3330 pub const fn description() -> &'static str {
3332 "No need to remember which key is correct anymore!"
3333 }
3334 pub const fn kind() -> GameModKind {
3336 GameModKind::Automation
3337 }
3338 pub const fn bits() -> u32 {
3342 128
3343 }
3344}
3345impl WindUpTaiko {
3346 pub const fn acronym() -> Acronym {
3348 unsafe { Acronym::from_str_unchecked("WU") }
3349 }
3350 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3352 unsafe {
3353 [
3354 Acronym::from_str_unchecked("HT"),
3355 Acronym::from_str_unchecked("DC"),
3356 Acronym::from_str_unchecked("DT"),
3357 Acronym::from_str_unchecked("NC"),
3358 Acronym::from_str_unchecked("WD"),
3359 Acronym::from_str_unchecked("AS"),
3360 ]
3361 }
3362 .into_iter()
3363 }
3364 pub const fn description() -> &'static str {
3366 "Can you keep up?"
3367 }
3368 pub const fn kind() -> GameModKind {
3370 GameModKind::Fun
3371 }
3372}
3373impl WindDownTaiko {
3374 pub const fn acronym() -> Acronym {
3376 unsafe { Acronym::from_str_unchecked("WD") }
3377 }
3378 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3380 unsafe {
3381 [
3382 Acronym::from_str_unchecked("HT"),
3383 Acronym::from_str_unchecked("DC"),
3384 Acronym::from_str_unchecked("DT"),
3385 Acronym::from_str_unchecked("NC"),
3386 Acronym::from_str_unchecked("WU"),
3387 Acronym::from_str_unchecked("AS"),
3388 ]
3389 }
3390 .into_iter()
3391 }
3392 pub const fn description() -> &'static str {
3394 "Sloooow doooown..."
3395 }
3396 pub const fn kind() -> GameModKind {
3398 GameModKind::Fun
3399 }
3400}
3401impl MutedTaiko {
3402 pub const fn acronym() -> Acronym {
3404 unsafe { Acronym::from_str_unchecked("MU") }
3405 }
3406 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3408 [].into_iter()
3409 }
3410 pub const fn description() -> &'static str {
3412 "Can you still feel the rhythm without music?"
3413 }
3414 pub const fn kind() -> GameModKind {
3416 GameModKind::Fun
3417 }
3418}
3419impl AdaptiveSpeedTaiko {
3420 pub const fn acronym() -> Acronym {
3422 unsafe { Acronym::from_str_unchecked("AS") }
3423 }
3424 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3426 unsafe {
3427 [
3428 Acronym::from_str_unchecked("HT"),
3429 Acronym::from_str_unchecked("DC"),
3430 Acronym::from_str_unchecked("DT"),
3431 Acronym::from_str_unchecked("NC"),
3432 Acronym::from_str_unchecked("AT"),
3433 Acronym::from_str_unchecked("CN"),
3434 Acronym::from_str_unchecked("WU"),
3435 Acronym::from_str_unchecked("WD"),
3436 ]
3437 }
3438 .into_iter()
3439 }
3440 pub const fn description() -> &'static str {
3442 "Let track speed adapt to you."
3443 }
3444 pub const fn kind() -> GameModKind {
3446 GameModKind::Fun
3447 }
3448}
3449impl ScoreV2Taiko {
3450 pub const fn acronym() -> Acronym {
3452 unsafe { Acronym::from_str_unchecked("SV2") }
3453 }
3454 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3456 [].into_iter()
3457 }
3458 pub const fn description() -> &'static str {
3460 "Score set on earlier osu! versions with the V2 scoring algorithm active."
3461 }
3462 pub const fn kind() -> GameModKind {
3464 GameModKind::System
3465 }
3466 pub const fn bits() -> u32 {
3470 536870912
3471 }
3472}
3473impl EasyCatch {
3474 pub const fn acronym() -> Acronym {
3476 unsafe { Acronym::from_str_unchecked("EZ") }
3477 }
3478 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3480 unsafe {
3481 [
3482 Acronym::from_str_unchecked("HR"),
3483 Acronym::from_str_unchecked("AC"),
3484 Acronym::from_str_unchecked("DA"),
3485 ]
3486 }
3487 .into_iter()
3488 }
3489 pub const fn description() -> &'static str {
3491 "Larger fruits, more forgiving HP drain, less accuracy required, and three lives!"
3492 }
3493 pub const fn kind() -> GameModKind {
3495 GameModKind::DifficultyReduction
3496 }
3497 pub const fn bits() -> u32 {
3501 2
3502 }
3503}
3504impl NoFailCatch {
3505 pub const fn acronym() -> Acronym {
3507 unsafe { Acronym::from_str_unchecked("NF") }
3508 }
3509 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3511 unsafe {
3512 [
3513 Acronym::from_str_unchecked("SD"),
3514 Acronym::from_str_unchecked("PF"),
3515 Acronym::from_str_unchecked("AC"),
3516 Acronym::from_str_unchecked("CN"),
3517 ]
3518 }
3519 .into_iter()
3520 }
3521 pub const fn description() -> &'static str {
3523 "You can't fail, no matter what."
3524 }
3525 pub const fn kind() -> GameModKind {
3527 GameModKind::DifficultyReduction
3528 }
3529 pub const fn bits() -> u32 {
3533 1
3534 }
3535}
3536impl HalfTimeCatch {
3537 pub const fn acronym() -> Acronym {
3539 unsafe { Acronym::from_str_unchecked("HT") }
3540 }
3541 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3543 unsafe {
3544 [
3545 Acronym::from_str_unchecked("DC"),
3546 Acronym::from_str_unchecked("DT"),
3547 Acronym::from_str_unchecked("NC"),
3548 Acronym::from_str_unchecked("WU"),
3549 Acronym::from_str_unchecked("WD"),
3550 ]
3551 }
3552 .into_iter()
3553 }
3554 pub const fn description() -> &'static str {
3556 "Less zoom..."
3557 }
3558 pub const fn kind() -> GameModKind {
3560 GameModKind::DifficultyReduction
3561 }
3562 pub const fn bits() -> u32 {
3566 256
3567 }
3568}
3569impl DaycoreCatch {
3570 pub const fn acronym() -> Acronym {
3572 unsafe { Acronym::from_str_unchecked("DC") }
3573 }
3574 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3576 unsafe {
3577 [
3578 Acronym::from_str_unchecked("HT"),
3579 Acronym::from_str_unchecked("DT"),
3580 Acronym::from_str_unchecked("NC"),
3581 Acronym::from_str_unchecked("WU"),
3582 Acronym::from_str_unchecked("WD"),
3583 ]
3584 }
3585 .into_iter()
3586 }
3587 pub const fn description() -> &'static str {
3589 "Whoaaaaa..."
3590 }
3591 pub const fn kind() -> GameModKind {
3593 GameModKind::DifficultyReduction
3594 }
3595}
3596impl HardRockCatch {
3597 pub const fn acronym() -> Acronym {
3599 unsafe { Acronym::from_str_unchecked("HR") }
3600 }
3601 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3603 unsafe {
3604 [
3605 Acronym::from_str_unchecked("EZ"),
3606 Acronym::from_str_unchecked("DA"),
3607 ]
3608 }
3609 .into_iter()
3610 }
3611 pub const fn description() -> &'static str {
3613 "Everything just got a bit harder..."
3614 }
3615 pub const fn kind() -> GameModKind {
3617 GameModKind::DifficultyIncrease
3618 }
3619 pub const fn bits() -> u32 {
3623 16
3624 }
3625}
3626impl SuddenDeathCatch {
3627 pub const fn acronym() -> Acronym {
3629 unsafe { Acronym::from_str_unchecked("SD") }
3630 }
3631 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3633 unsafe {
3634 [
3635 Acronym::from_str_unchecked("NF"),
3636 Acronym::from_str_unchecked("PF"),
3637 Acronym::from_str_unchecked("CN"),
3638 ]
3639 }
3640 .into_iter()
3641 }
3642 pub const fn description() -> &'static str {
3644 "Miss and fail."
3645 }
3646 pub const fn kind() -> GameModKind {
3648 GameModKind::DifficultyIncrease
3649 }
3650 pub const fn bits() -> u32 {
3654 32
3655 }
3656}
3657impl PerfectCatch {
3658 pub const fn acronym() -> Acronym {
3660 unsafe { Acronym::from_str_unchecked("PF") }
3661 }
3662 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3664 unsafe {
3665 [
3666 Acronym::from_str_unchecked("NF"),
3667 Acronym::from_str_unchecked("SD"),
3668 Acronym::from_str_unchecked("AC"),
3669 Acronym::from_str_unchecked("CN"),
3670 ]
3671 }
3672 .into_iter()
3673 }
3674 pub const fn description() -> &'static str {
3676 "SS or quit."
3677 }
3678 pub const fn kind() -> GameModKind {
3680 GameModKind::DifficultyIncrease
3681 }
3682 pub const fn bits() -> u32 {
3686 16416
3687 }
3688}
3689impl DoubleTimeCatch {
3690 pub const fn acronym() -> Acronym {
3692 unsafe { Acronym::from_str_unchecked("DT") }
3693 }
3694 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3696 unsafe {
3697 [
3698 Acronym::from_str_unchecked("HT"),
3699 Acronym::from_str_unchecked("DC"),
3700 Acronym::from_str_unchecked("NC"),
3701 Acronym::from_str_unchecked("WU"),
3702 Acronym::from_str_unchecked("WD"),
3703 ]
3704 }
3705 .into_iter()
3706 }
3707 pub const fn description() -> &'static str {
3709 "Zoooooooooom..."
3710 }
3711 pub const fn kind() -> GameModKind {
3713 GameModKind::DifficultyIncrease
3714 }
3715 pub const fn bits() -> u32 {
3719 64
3720 }
3721}
3722impl NightcoreCatch {
3723 pub const fn acronym() -> Acronym {
3725 unsafe { Acronym::from_str_unchecked("NC") }
3726 }
3727 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3729 unsafe {
3730 [
3731 Acronym::from_str_unchecked("HT"),
3732 Acronym::from_str_unchecked("DC"),
3733 Acronym::from_str_unchecked("DT"),
3734 Acronym::from_str_unchecked("WU"),
3735 Acronym::from_str_unchecked("WD"),
3736 ]
3737 }
3738 .into_iter()
3739 }
3740 pub const fn description() -> &'static str {
3742 "Uguuuuuuuu..."
3743 }
3744 pub const fn kind() -> GameModKind {
3746 GameModKind::DifficultyIncrease
3747 }
3748 pub const fn bits() -> u32 {
3752 576
3753 }
3754}
3755impl HiddenCatch {
3756 pub const fn acronym() -> Acronym {
3758 unsafe { Acronym::from_str_unchecked("HD") }
3759 }
3760 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3762 [].into_iter()
3763 }
3764 pub const fn description() -> &'static str {
3766 "Play with fading fruits."
3767 }
3768 pub const fn kind() -> GameModKind {
3770 GameModKind::DifficultyIncrease
3771 }
3772 pub const fn bits() -> u32 {
3776 8
3777 }
3778}
3779impl FlashlightCatch {
3780 pub const fn acronym() -> Acronym {
3782 unsafe { Acronym::from_str_unchecked("FL") }
3783 }
3784 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3786 [].into_iter()
3787 }
3788 pub const fn description() -> &'static str {
3790 "Restricted view area."
3791 }
3792 pub const fn kind() -> GameModKind {
3794 GameModKind::DifficultyIncrease
3795 }
3796 pub const fn bits() -> u32 {
3800 1024
3801 }
3802}
3803impl AccuracyChallengeCatch {
3804 pub const fn acronym() -> Acronym {
3806 unsafe { Acronym::from_str_unchecked("AC") }
3807 }
3808 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3810 unsafe {
3811 [
3812 Acronym::from_str_unchecked("EZ"),
3813 Acronym::from_str_unchecked("NF"),
3814 Acronym::from_str_unchecked("PF"),
3815 Acronym::from_str_unchecked("CN"),
3816 ]
3817 }
3818 .into_iter()
3819 }
3820 pub const fn description() -> &'static str {
3822 "Fail if your accuracy drops too low!"
3823 }
3824 pub const fn kind() -> GameModKind {
3826 GameModKind::DifficultyIncrease
3827 }
3828}
3829impl DifficultyAdjustCatch {
3830 pub const fn acronym() -> Acronym {
3832 unsafe { Acronym::from_str_unchecked("DA") }
3833 }
3834 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3836 unsafe {
3837 [
3838 Acronym::from_str_unchecked("EZ"),
3839 Acronym::from_str_unchecked("HR"),
3840 ]
3841 }
3842 .into_iter()
3843 }
3844 pub const fn description() -> &'static str {
3846 "Override a beatmap's difficulty settings."
3847 }
3848 pub const fn kind() -> GameModKind {
3850 GameModKind::Conversion
3851 }
3852}
3853impl ClassicCatch {
3854 pub const fn acronym() -> Acronym {
3856 unsafe { Acronym::from_str_unchecked("CL") }
3857 }
3858 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3860 [].into_iter()
3861 }
3862 pub const fn description() -> &'static str {
3864 "Feeling nostalgic?"
3865 }
3866 pub const fn kind() -> GameModKind {
3868 GameModKind::Conversion
3869 }
3870}
3871impl MirrorCatch {
3872 pub const fn acronym() -> Acronym {
3874 unsafe { Acronym::from_str_unchecked("MR") }
3875 }
3876 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3878 [].into_iter()
3879 }
3880 pub const fn description() -> &'static str {
3882 "Fruits are flipped horizontally."
3883 }
3884 pub const fn kind() -> GameModKind {
3886 GameModKind::Conversion
3887 }
3888 pub const fn bits() -> u32 {
3892 1073741824
3893 }
3894}
3895impl AutoplayCatch {
3896 pub const fn acronym() -> Acronym {
3898 unsafe { Acronym::from_str_unchecked("AT") }
3899 }
3900 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3902 unsafe {
3903 [
3904 Acronym::from_str_unchecked("CN"),
3905 Acronym::from_str_unchecked("RX"),
3906 ]
3907 }
3908 .into_iter()
3909 }
3910 pub const fn description() -> &'static str {
3912 "Watch a perfect automated play through the song."
3913 }
3914 pub const fn kind() -> GameModKind {
3916 GameModKind::Automation
3917 }
3918 pub const fn bits() -> u32 {
3922 2048
3923 }
3924}
3925impl CinemaCatch {
3926 pub const fn acronym() -> Acronym {
3928 unsafe { Acronym::from_str_unchecked("CN") }
3929 }
3930 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3932 unsafe {
3933 [
3934 Acronym::from_str_unchecked("NF"),
3935 Acronym::from_str_unchecked("SD"),
3936 Acronym::from_str_unchecked("PF"),
3937 Acronym::from_str_unchecked("AC"),
3938 Acronym::from_str_unchecked("AT"),
3939 Acronym::from_str_unchecked("RX"),
3940 ]
3941 }
3942 .into_iter()
3943 }
3944 pub const fn description() -> &'static str {
3946 "Watch the video without visual distractions."
3947 }
3948 pub const fn kind() -> GameModKind {
3950 GameModKind::Automation
3951 }
3952 pub const fn bits() -> u32 {
3956 4194304
3957 }
3958}
3959impl RelaxCatch {
3960 pub const fn acronym() -> Acronym {
3962 unsafe { Acronym::from_str_unchecked("RX") }
3963 }
3964 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3966 unsafe {
3967 [
3968 Acronym::from_str_unchecked("AT"),
3969 Acronym::from_str_unchecked("CN"),
3970 ]
3971 }
3972 .into_iter()
3973 }
3974 pub const fn description() -> &'static str {
3976 "Use the mouse to control the catcher."
3977 }
3978 pub const fn kind() -> GameModKind {
3980 GameModKind::Automation
3981 }
3982 pub const fn bits() -> u32 {
3986 128
3987 }
3988}
3989impl WindUpCatch {
3990 pub const fn acronym() -> Acronym {
3992 unsafe { Acronym::from_str_unchecked("WU") }
3993 }
3994 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
3996 unsafe {
3997 [
3998 Acronym::from_str_unchecked("HT"),
3999 Acronym::from_str_unchecked("DC"),
4000 Acronym::from_str_unchecked("DT"),
4001 Acronym::from_str_unchecked("NC"),
4002 Acronym::from_str_unchecked("WD"),
4003 ]
4004 }
4005 .into_iter()
4006 }
4007 pub const fn description() -> &'static str {
4009 "Can you keep up?"
4010 }
4011 pub const fn kind() -> GameModKind {
4013 GameModKind::Fun
4014 }
4015}
4016impl WindDownCatch {
4017 pub const fn acronym() -> Acronym {
4019 unsafe { Acronym::from_str_unchecked("WD") }
4020 }
4021 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4023 unsafe {
4024 [
4025 Acronym::from_str_unchecked("HT"),
4026 Acronym::from_str_unchecked("DC"),
4027 Acronym::from_str_unchecked("DT"),
4028 Acronym::from_str_unchecked("NC"),
4029 Acronym::from_str_unchecked("WU"),
4030 ]
4031 }
4032 .into_iter()
4033 }
4034 pub const fn description() -> &'static str {
4036 "Sloooow doooown..."
4037 }
4038 pub const fn kind() -> GameModKind {
4040 GameModKind::Fun
4041 }
4042}
4043impl FloatingFruitsCatch {
4044 pub const fn acronym() -> Acronym {
4046 unsafe { Acronym::from_str_unchecked("FF") }
4047 }
4048 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4050 [].into_iter()
4051 }
4052 pub const fn description() -> &'static str {
4054 "The fruits are... floating?"
4055 }
4056 pub const fn kind() -> GameModKind {
4058 GameModKind::Fun
4059 }
4060}
4061impl MutedCatch {
4062 pub const fn acronym() -> Acronym {
4064 unsafe { Acronym::from_str_unchecked("MU") }
4065 }
4066 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4068 [].into_iter()
4069 }
4070 pub const fn description() -> &'static str {
4072 "Can you still feel the rhythm without music?"
4073 }
4074 pub const fn kind() -> GameModKind {
4076 GameModKind::Fun
4077 }
4078}
4079impl NoScopeCatch {
4080 pub const fn acronym() -> Acronym {
4082 unsafe { Acronym::from_str_unchecked("NS") }
4083 }
4084 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4086 [].into_iter()
4087 }
4088 pub const fn description() -> &'static str {
4090 "Where's the catcher?"
4091 }
4092 pub const fn kind() -> GameModKind {
4094 GameModKind::Fun
4095 }
4096}
4097impl ScoreV2Catch {
4098 pub const fn acronym() -> Acronym {
4100 unsafe { Acronym::from_str_unchecked("SV2") }
4101 }
4102 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4104 [].into_iter()
4105 }
4106 pub const fn description() -> &'static str {
4108 "Score set on earlier osu! versions with the V2 scoring algorithm active."
4109 }
4110 pub const fn kind() -> GameModKind {
4112 GameModKind::System
4113 }
4114 pub const fn bits() -> u32 {
4118 536870912
4119 }
4120}
4121impl EasyMania {
4122 pub const fn acronym() -> Acronym {
4124 unsafe { Acronym::from_str_unchecked("EZ") }
4125 }
4126 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4128 unsafe {
4129 [
4130 Acronym::from_str_unchecked("HR"),
4131 Acronym::from_str_unchecked("AC"),
4132 Acronym::from_str_unchecked("DA"),
4133 ]
4134 }
4135 .into_iter()
4136 }
4137 pub const fn description() -> &'static str {
4139 "More forgiving HP drain, less accuracy required, and three lives!"
4140 }
4141 pub const fn kind() -> GameModKind {
4143 GameModKind::DifficultyReduction
4144 }
4145 pub const fn bits() -> u32 {
4149 2
4150 }
4151}
4152impl NoFailMania {
4153 pub const fn acronym() -> Acronym {
4155 unsafe { Acronym::from_str_unchecked("NF") }
4156 }
4157 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4159 unsafe {
4160 [
4161 Acronym::from_str_unchecked("SD"),
4162 Acronym::from_str_unchecked("PF"),
4163 Acronym::from_str_unchecked("AC"),
4164 Acronym::from_str_unchecked("CN"),
4165 ]
4166 }
4167 .into_iter()
4168 }
4169 pub const fn description() -> &'static str {
4171 "You can't fail, no matter what."
4172 }
4173 pub const fn kind() -> GameModKind {
4175 GameModKind::DifficultyReduction
4176 }
4177 pub const fn bits() -> u32 {
4181 1
4182 }
4183}
4184impl HalfTimeMania {
4185 pub const fn acronym() -> Acronym {
4187 unsafe { Acronym::from_str_unchecked("HT") }
4188 }
4189 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4191 unsafe {
4192 [
4193 Acronym::from_str_unchecked("DC"),
4194 Acronym::from_str_unchecked("DT"),
4195 Acronym::from_str_unchecked("NC"),
4196 Acronym::from_str_unchecked("WU"),
4197 Acronym::from_str_unchecked("WD"),
4198 Acronym::from_str_unchecked("AS"),
4199 ]
4200 }
4201 .into_iter()
4202 }
4203 pub const fn description() -> &'static str {
4205 "Less zoom..."
4206 }
4207 pub const fn kind() -> GameModKind {
4209 GameModKind::DifficultyReduction
4210 }
4211 pub const fn bits() -> u32 {
4215 256
4216 }
4217}
4218impl DaycoreMania {
4219 pub const fn acronym() -> Acronym {
4221 unsafe { Acronym::from_str_unchecked("DC") }
4222 }
4223 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4225 unsafe {
4226 [
4227 Acronym::from_str_unchecked("HT"),
4228 Acronym::from_str_unchecked("DT"),
4229 Acronym::from_str_unchecked("NC"),
4230 Acronym::from_str_unchecked("WU"),
4231 Acronym::from_str_unchecked("WD"),
4232 Acronym::from_str_unchecked("AS"),
4233 ]
4234 }
4235 .into_iter()
4236 }
4237 pub const fn description() -> &'static str {
4239 "Whoaaaaa..."
4240 }
4241 pub const fn kind() -> GameModKind {
4243 GameModKind::DifficultyReduction
4244 }
4245}
4246impl NoReleaseMania {
4247 pub const fn acronym() -> Acronym {
4249 unsafe { Acronym::from_str_unchecked("NR") }
4250 }
4251 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4253 unsafe { [Acronym::from_str_unchecked("HO")] }.into_iter()
4254 }
4255 pub const fn description() -> &'static str {
4257 "No more timing the end of hold notes."
4258 }
4259 pub const fn kind() -> GameModKind {
4261 GameModKind::DifficultyReduction
4262 }
4263}
4264impl HardRockMania {
4265 pub const fn acronym() -> Acronym {
4267 unsafe { Acronym::from_str_unchecked("HR") }
4268 }
4269 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4271 unsafe {
4272 [
4273 Acronym::from_str_unchecked("EZ"),
4274 Acronym::from_str_unchecked("DA"),
4275 ]
4276 }
4277 .into_iter()
4278 }
4279 pub const fn description() -> &'static str {
4281 "Everything just got a bit harder..."
4282 }
4283 pub const fn kind() -> GameModKind {
4285 GameModKind::DifficultyIncrease
4286 }
4287 pub const fn bits() -> u32 {
4291 16
4292 }
4293}
4294impl SuddenDeathMania {
4295 pub const fn acronym() -> Acronym {
4297 unsafe { Acronym::from_str_unchecked("SD") }
4298 }
4299 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4301 unsafe {
4302 [
4303 Acronym::from_str_unchecked("NF"),
4304 Acronym::from_str_unchecked("PF"),
4305 Acronym::from_str_unchecked("CN"),
4306 ]
4307 }
4308 .into_iter()
4309 }
4310 pub const fn description() -> &'static str {
4312 "Miss and fail."
4313 }
4314 pub const fn kind() -> GameModKind {
4316 GameModKind::DifficultyIncrease
4317 }
4318 pub const fn bits() -> u32 {
4322 32
4323 }
4324}
4325impl PerfectMania {
4326 pub const fn acronym() -> Acronym {
4328 unsafe { Acronym::from_str_unchecked("PF") }
4329 }
4330 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4332 unsafe {
4333 [
4334 Acronym::from_str_unchecked("NF"),
4335 Acronym::from_str_unchecked("SD"),
4336 Acronym::from_str_unchecked("AC"),
4337 Acronym::from_str_unchecked("CN"),
4338 ]
4339 }
4340 .into_iter()
4341 }
4342 pub const fn description() -> &'static str {
4344 "SS or quit."
4345 }
4346 pub const fn kind() -> GameModKind {
4348 GameModKind::DifficultyIncrease
4349 }
4350 pub const fn bits() -> u32 {
4354 16416
4355 }
4356}
4357impl DoubleTimeMania {
4358 pub const fn acronym() -> Acronym {
4360 unsafe { Acronym::from_str_unchecked("DT") }
4361 }
4362 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4364 unsafe {
4365 [
4366 Acronym::from_str_unchecked("HT"),
4367 Acronym::from_str_unchecked("DC"),
4368 Acronym::from_str_unchecked("NC"),
4369 Acronym::from_str_unchecked("WU"),
4370 Acronym::from_str_unchecked("WD"),
4371 Acronym::from_str_unchecked("AS"),
4372 ]
4373 }
4374 .into_iter()
4375 }
4376 pub const fn description() -> &'static str {
4378 "Zoooooooooom..."
4379 }
4380 pub const fn kind() -> GameModKind {
4382 GameModKind::DifficultyIncrease
4383 }
4384 pub const fn bits() -> u32 {
4388 64
4389 }
4390}
4391impl NightcoreMania {
4392 pub const fn acronym() -> Acronym {
4394 unsafe { Acronym::from_str_unchecked("NC") }
4395 }
4396 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4398 unsafe {
4399 [
4400 Acronym::from_str_unchecked("HT"),
4401 Acronym::from_str_unchecked("DC"),
4402 Acronym::from_str_unchecked("DT"),
4403 Acronym::from_str_unchecked("WU"),
4404 Acronym::from_str_unchecked("WD"),
4405 Acronym::from_str_unchecked("AS"),
4406 ]
4407 }
4408 .into_iter()
4409 }
4410 pub const fn description() -> &'static str {
4412 "Uguuuuuuuu..."
4413 }
4414 pub const fn kind() -> GameModKind {
4416 GameModKind::DifficultyIncrease
4417 }
4418 pub const fn bits() -> u32 {
4422 576
4423 }
4424}
4425impl FadeInMania {
4426 pub const fn acronym() -> Acronym {
4428 unsafe { Acronym::from_str_unchecked("FI") }
4429 }
4430 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4432 unsafe {
4433 [
4434 Acronym::from_str_unchecked("HD"),
4435 Acronym::from_str_unchecked("CO"),
4436 Acronym::from_str_unchecked("FL"),
4437 ]
4438 }
4439 .into_iter()
4440 }
4441 pub const fn description() -> &'static str {
4443 "Keys appear out of nowhere!"
4444 }
4445 pub const fn kind() -> GameModKind {
4447 GameModKind::DifficultyIncrease
4448 }
4449 pub const fn bits() -> u32 {
4453 1048576
4454 }
4455}
4456impl HiddenMania {
4457 pub const fn acronym() -> Acronym {
4459 unsafe { Acronym::from_str_unchecked("HD") }
4460 }
4461 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4463 unsafe {
4464 [
4465 Acronym::from_str_unchecked("FI"),
4466 Acronym::from_str_unchecked("CO"),
4467 Acronym::from_str_unchecked("FL"),
4468 ]
4469 }
4470 .into_iter()
4471 }
4472 pub const fn description() -> &'static str {
4474 "Keys fade out before you hit them!"
4475 }
4476 pub const fn kind() -> GameModKind {
4478 GameModKind::DifficultyIncrease
4479 }
4480 pub const fn bits() -> u32 {
4484 8
4485 }
4486}
4487impl CoverMania {
4488 pub const fn acronym() -> Acronym {
4490 unsafe { Acronym::from_str_unchecked("CO") }
4491 }
4492 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4494 unsafe {
4495 [
4496 Acronym::from_str_unchecked("FI"),
4497 Acronym::from_str_unchecked("HD"),
4498 Acronym::from_str_unchecked("FL"),
4499 ]
4500 }
4501 .into_iter()
4502 }
4503 pub const fn description() -> &'static str {
4505 "Decrease the playfield's viewing area."
4506 }
4507 pub const fn kind() -> GameModKind {
4509 GameModKind::DifficultyIncrease
4510 }
4511}
4512impl FlashlightMania {
4513 pub const fn acronym() -> Acronym {
4515 unsafe { Acronym::from_str_unchecked("FL") }
4516 }
4517 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4519 unsafe {
4520 [
4521 Acronym::from_str_unchecked("FI"),
4522 Acronym::from_str_unchecked("HD"),
4523 Acronym::from_str_unchecked("CO"),
4524 ]
4525 }
4526 .into_iter()
4527 }
4528 pub const fn description() -> &'static str {
4530 "Restricted view area."
4531 }
4532 pub const fn kind() -> GameModKind {
4534 GameModKind::DifficultyIncrease
4535 }
4536 pub const fn bits() -> u32 {
4540 1024
4541 }
4542}
4543impl AccuracyChallengeMania {
4544 pub const fn acronym() -> Acronym {
4546 unsafe { Acronym::from_str_unchecked("AC") }
4547 }
4548 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4550 unsafe {
4551 [
4552 Acronym::from_str_unchecked("EZ"),
4553 Acronym::from_str_unchecked("NF"),
4554 Acronym::from_str_unchecked("PF"),
4555 Acronym::from_str_unchecked("CN"),
4556 ]
4557 }
4558 .into_iter()
4559 }
4560 pub const fn description() -> &'static str {
4562 "Fail if your accuracy drops too low!"
4563 }
4564 pub const fn kind() -> GameModKind {
4566 GameModKind::DifficultyIncrease
4567 }
4568}
4569impl RandomMania {
4570 pub const fn acronym() -> Acronym {
4572 unsafe { Acronym::from_str_unchecked("RD") }
4573 }
4574 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4576 [].into_iter()
4577 }
4578 pub const fn description() -> &'static str {
4580 "Shuffle around the keys!"
4581 }
4582 pub const fn kind() -> GameModKind {
4584 GameModKind::Conversion
4585 }
4586 pub const fn bits() -> u32 {
4590 2097152
4591 }
4592}
4593impl DualStagesMania {
4594 pub const fn acronym() -> Acronym {
4596 unsafe { Acronym::from_str_unchecked("DS") }
4597 }
4598 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4600 [].into_iter()
4601 }
4602 pub const fn description() -> &'static str {
4604 "Double the stages, double the fun!"
4605 }
4606 pub const fn kind() -> GameModKind {
4608 GameModKind::Conversion
4609 }
4610 pub const fn bits() -> u32 {
4614 33554432
4615 }
4616}
4617impl MirrorMania {
4618 pub const fn acronym() -> Acronym {
4620 unsafe { Acronym::from_str_unchecked("MR") }
4621 }
4622 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4624 [].into_iter()
4625 }
4626 pub const fn description() -> &'static str {
4628 "Notes are flipped horizontally."
4629 }
4630 pub const fn kind() -> GameModKind {
4632 GameModKind::Conversion
4633 }
4634 pub const fn bits() -> u32 {
4638 1073741824
4639 }
4640}
4641impl DifficultyAdjustMania {
4642 pub const fn acronym() -> Acronym {
4644 unsafe { Acronym::from_str_unchecked("DA") }
4645 }
4646 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4648 unsafe {
4649 [
4650 Acronym::from_str_unchecked("EZ"),
4651 Acronym::from_str_unchecked("HR"),
4652 ]
4653 }
4654 .into_iter()
4655 }
4656 pub const fn description() -> &'static str {
4658 "Override a beatmap's difficulty settings."
4659 }
4660 pub const fn kind() -> GameModKind {
4662 GameModKind::Conversion
4663 }
4664}
4665impl ClassicMania {
4666 pub const fn acronym() -> Acronym {
4668 unsafe { Acronym::from_str_unchecked("CL") }
4669 }
4670 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4672 [].into_iter()
4673 }
4674 pub const fn description() -> &'static str {
4676 "Feeling nostalgic?"
4677 }
4678 pub const fn kind() -> GameModKind {
4680 GameModKind::Conversion
4681 }
4682}
4683impl InvertMania {
4684 pub const fn acronym() -> Acronym {
4686 unsafe { Acronym::from_str_unchecked("IN") }
4687 }
4688 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4690 unsafe { [Acronym::from_str_unchecked("HO")] }.into_iter()
4691 }
4692 pub const fn description() -> &'static str {
4694 "Hold the keys. To the beat."
4695 }
4696 pub const fn kind() -> GameModKind {
4698 GameModKind::Conversion
4699 }
4700}
4701impl ConstantSpeedMania {
4702 pub const fn acronym() -> Acronym {
4704 unsafe { Acronym::from_str_unchecked("CS") }
4705 }
4706 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4708 [].into_iter()
4709 }
4710 pub const fn description() -> &'static str {
4712 "No more tricky speed changes!"
4713 }
4714 pub const fn kind() -> GameModKind {
4716 GameModKind::Conversion
4717 }
4718}
4719impl HoldOffMania {
4720 pub const fn acronym() -> Acronym {
4722 unsafe { Acronym::from_str_unchecked("HO") }
4723 }
4724 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4726 unsafe {
4727 [
4728 Acronym::from_str_unchecked("NR"),
4729 Acronym::from_str_unchecked("IN"),
4730 ]
4731 }
4732 .into_iter()
4733 }
4734 pub const fn description() -> &'static str {
4736 "Replaces all hold notes with normal notes."
4737 }
4738 pub const fn kind() -> GameModKind {
4740 GameModKind::Conversion
4741 }
4742}
4743impl OneKeyMania {
4744 pub const fn acronym() -> Acronym {
4746 unsafe { Acronym::from_str_unchecked("1K") }
4747 }
4748 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4750 unsafe {
4751 [
4752 Acronym::from_str_unchecked("2K"),
4753 Acronym::from_str_unchecked("3K"),
4754 Acronym::from_str_unchecked("4K"),
4755 Acronym::from_str_unchecked("5K"),
4756 Acronym::from_str_unchecked("6K"),
4757 Acronym::from_str_unchecked("7K"),
4758 Acronym::from_str_unchecked("8K"),
4759 Acronym::from_str_unchecked("9K"),
4760 Acronym::from_str_unchecked("10K"),
4761 ]
4762 }
4763 .into_iter()
4764 }
4765 pub const fn description() -> &'static str {
4767 "Play with one key."
4768 }
4769 pub const fn kind() -> GameModKind {
4771 GameModKind::Conversion
4772 }
4773 pub const fn bits() -> u32 {
4777 67108864
4778 }
4779}
4780impl TwoKeysMania {
4781 pub const fn acronym() -> Acronym {
4783 unsafe { Acronym::from_str_unchecked("2K") }
4784 }
4785 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4787 unsafe {
4788 [
4789 Acronym::from_str_unchecked("1K"),
4790 Acronym::from_str_unchecked("3K"),
4791 Acronym::from_str_unchecked("4K"),
4792 Acronym::from_str_unchecked("5K"),
4793 Acronym::from_str_unchecked("6K"),
4794 Acronym::from_str_unchecked("7K"),
4795 Acronym::from_str_unchecked("8K"),
4796 Acronym::from_str_unchecked("9K"),
4797 Acronym::from_str_unchecked("10K"),
4798 ]
4799 }
4800 .into_iter()
4801 }
4802 pub const fn description() -> &'static str {
4804 "Play with two keys."
4805 }
4806 pub const fn kind() -> GameModKind {
4808 GameModKind::Conversion
4809 }
4810 pub const fn bits() -> u32 {
4814 268435456
4815 }
4816}
4817impl ThreeKeysMania {
4818 pub const fn acronym() -> Acronym {
4820 unsafe { Acronym::from_str_unchecked("3K") }
4821 }
4822 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4824 unsafe {
4825 [
4826 Acronym::from_str_unchecked("1K"),
4827 Acronym::from_str_unchecked("2K"),
4828 Acronym::from_str_unchecked("4K"),
4829 Acronym::from_str_unchecked("5K"),
4830 Acronym::from_str_unchecked("6K"),
4831 Acronym::from_str_unchecked("7K"),
4832 Acronym::from_str_unchecked("8K"),
4833 Acronym::from_str_unchecked("9K"),
4834 Acronym::from_str_unchecked("10K"),
4835 ]
4836 }
4837 .into_iter()
4838 }
4839 pub const fn description() -> &'static str {
4841 "Play with three keys."
4842 }
4843 pub const fn kind() -> GameModKind {
4845 GameModKind::Conversion
4846 }
4847 pub const fn bits() -> u32 {
4851 134217728
4852 }
4853}
4854impl FourKeysMania {
4855 pub const fn acronym() -> Acronym {
4857 unsafe { Acronym::from_str_unchecked("4K") }
4858 }
4859 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4861 unsafe {
4862 [
4863 Acronym::from_str_unchecked("1K"),
4864 Acronym::from_str_unchecked("2K"),
4865 Acronym::from_str_unchecked("3K"),
4866 Acronym::from_str_unchecked("5K"),
4867 Acronym::from_str_unchecked("6K"),
4868 Acronym::from_str_unchecked("7K"),
4869 Acronym::from_str_unchecked("8K"),
4870 Acronym::from_str_unchecked("9K"),
4871 Acronym::from_str_unchecked("10K"),
4872 ]
4873 }
4874 .into_iter()
4875 }
4876 pub const fn description() -> &'static str {
4878 "Play with four keys."
4879 }
4880 pub const fn kind() -> GameModKind {
4882 GameModKind::Conversion
4883 }
4884 pub const fn bits() -> u32 {
4888 32768
4889 }
4890}
4891impl FiveKeysMania {
4892 pub const fn acronym() -> Acronym {
4894 unsafe { Acronym::from_str_unchecked("5K") }
4895 }
4896 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4898 unsafe {
4899 [
4900 Acronym::from_str_unchecked("1K"),
4901 Acronym::from_str_unchecked("2K"),
4902 Acronym::from_str_unchecked("3K"),
4903 Acronym::from_str_unchecked("4K"),
4904 Acronym::from_str_unchecked("6K"),
4905 Acronym::from_str_unchecked("7K"),
4906 Acronym::from_str_unchecked("8K"),
4907 Acronym::from_str_unchecked("9K"),
4908 Acronym::from_str_unchecked("10K"),
4909 ]
4910 }
4911 .into_iter()
4912 }
4913 pub const fn description() -> &'static str {
4915 "Play with five keys."
4916 }
4917 pub const fn kind() -> GameModKind {
4919 GameModKind::Conversion
4920 }
4921 pub const fn bits() -> u32 {
4925 65536
4926 }
4927}
4928impl SixKeysMania {
4929 pub const fn acronym() -> Acronym {
4931 unsafe { Acronym::from_str_unchecked("6K") }
4932 }
4933 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4935 unsafe {
4936 [
4937 Acronym::from_str_unchecked("1K"),
4938 Acronym::from_str_unchecked("2K"),
4939 Acronym::from_str_unchecked("3K"),
4940 Acronym::from_str_unchecked("4K"),
4941 Acronym::from_str_unchecked("5K"),
4942 Acronym::from_str_unchecked("7K"),
4943 Acronym::from_str_unchecked("8K"),
4944 Acronym::from_str_unchecked("9K"),
4945 Acronym::from_str_unchecked("10K"),
4946 ]
4947 }
4948 .into_iter()
4949 }
4950 pub const fn description() -> &'static str {
4952 "Play with six keys."
4953 }
4954 pub const fn kind() -> GameModKind {
4956 GameModKind::Conversion
4957 }
4958 pub const fn bits() -> u32 {
4962 131072
4963 }
4964}
4965impl SevenKeysMania {
4966 pub const fn acronym() -> Acronym {
4968 unsafe { Acronym::from_str_unchecked("7K") }
4969 }
4970 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
4972 unsafe {
4973 [
4974 Acronym::from_str_unchecked("1K"),
4975 Acronym::from_str_unchecked("2K"),
4976 Acronym::from_str_unchecked("3K"),
4977 Acronym::from_str_unchecked("4K"),
4978 Acronym::from_str_unchecked("5K"),
4979 Acronym::from_str_unchecked("6K"),
4980 Acronym::from_str_unchecked("8K"),
4981 Acronym::from_str_unchecked("9K"),
4982 Acronym::from_str_unchecked("10K"),
4983 ]
4984 }
4985 .into_iter()
4986 }
4987 pub const fn description() -> &'static str {
4989 "Play with seven keys."
4990 }
4991 pub const fn kind() -> GameModKind {
4993 GameModKind::Conversion
4994 }
4995 pub const fn bits() -> u32 {
4999 262144
5000 }
5001}
5002impl EightKeysMania {
5003 pub const fn acronym() -> Acronym {
5005 unsafe { Acronym::from_str_unchecked("8K") }
5006 }
5007 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5009 unsafe {
5010 [
5011 Acronym::from_str_unchecked("1K"),
5012 Acronym::from_str_unchecked("2K"),
5013 Acronym::from_str_unchecked("3K"),
5014 Acronym::from_str_unchecked("4K"),
5015 Acronym::from_str_unchecked("5K"),
5016 Acronym::from_str_unchecked("6K"),
5017 Acronym::from_str_unchecked("7K"),
5018 Acronym::from_str_unchecked("9K"),
5019 Acronym::from_str_unchecked("10K"),
5020 ]
5021 }
5022 .into_iter()
5023 }
5024 pub const fn description() -> &'static str {
5026 "Play with eight keys."
5027 }
5028 pub const fn kind() -> GameModKind {
5030 GameModKind::Conversion
5031 }
5032 pub const fn bits() -> u32 {
5036 524288
5037 }
5038}
5039impl NineKeysMania {
5040 pub const fn acronym() -> Acronym {
5042 unsafe { Acronym::from_str_unchecked("9K") }
5043 }
5044 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5046 unsafe {
5047 [
5048 Acronym::from_str_unchecked("1K"),
5049 Acronym::from_str_unchecked("2K"),
5050 Acronym::from_str_unchecked("3K"),
5051 Acronym::from_str_unchecked("4K"),
5052 Acronym::from_str_unchecked("5K"),
5053 Acronym::from_str_unchecked("6K"),
5054 Acronym::from_str_unchecked("7K"),
5055 Acronym::from_str_unchecked("8K"),
5056 Acronym::from_str_unchecked("10K"),
5057 ]
5058 }
5059 .into_iter()
5060 }
5061 pub const fn description() -> &'static str {
5063 "Play with nine keys."
5064 }
5065 pub const fn kind() -> GameModKind {
5067 GameModKind::Conversion
5068 }
5069 pub const fn bits() -> u32 {
5073 16777216
5074 }
5075}
5076impl TenKeysMania {
5077 pub const fn acronym() -> Acronym {
5079 unsafe { Acronym::from_str_unchecked("10K") }
5080 }
5081 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5083 unsafe {
5084 [
5085 Acronym::from_str_unchecked("1K"),
5086 Acronym::from_str_unchecked("2K"),
5087 Acronym::from_str_unchecked("3K"),
5088 Acronym::from_str_unchecked("4K"),
5089 Acronym::from_str_unchecked("5K"),
5090 Acronym::from_str_unchecked("6K"),
5091 Acronym::from_str_unchecked("7K"),
5092 Acronym::from_str_unchecked("8K"),
5093 Acronym::from_str_unchecked("9K"),
5094 ]
5095 }
5096 .into_iter()
5097 }
5098 pub const fn description() -> &'static str {
5100 "Play with ten keys."
5101 }
5102 pub const fn kind() -> GameModKind {
5104 GameModKind::Conversion
5105 }
5106}
5107impl AutoplayMania {
5108 pub const fn acronym() -> Acronym {
5110 unsafe { Acronym::from_str_unchecked("AT") }
5111 }
5112 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5114 unsafe {
5115 [
5116 Acronym::from_str_unchecked("CN"),
5117 Acronym::from_str_unchecked("AS"),
5118 ]
5119 }
5120 .into_iter()
5121 }
5122 pub const fn description() -> &'static str {
5124 "Watch a perfect automated play through the song."
5125 }
5126 pub const fn kind() -> GameModKind {
5128 GameModKind::Automation
5129 }
5130 pub const fn bits() -> u32 {
5134 2048
5135 }
5136}
5137impl CinemaMania {
5138 pub const fn acronym() -> Acronym {
5140 unsafe { Acronym::from_str_unchecked("CN") }
5141 }
5142 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5144 unsafe {
5145 [
5146 Acronym::from_str_unchecked("NF"),
5147 Acronym::from_str_unchecked("SD"),
5148 Acronym::from_str_unchecked("PF"),
5149 Acronym::from_str_unchecked("AC"),
5150 Acronym::from_str_unchecked("AT"),
5151 Acronym::from_str_unchecked("AS"),
5152 ]
5153 }
5154 .into_iter()
5155 }
5156 pub const fn description() -> &'static str {
5158 "Watch the video without visual distractions."
5159 }
5160 pub const fn kind() -> GameModKind {
5162 GameModKind::Automation
5163 }
5164 pub const fn bits() -> u32 {
5168 4194304
5169 }
5170}
5171impl WindUpMania {
5172 pub const fn acronym() -> Acronym {
5174 unsafe { Acronym::from_str_unchecked("WU") }
5175 }
5176 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5178 unsafe {
5179 [
5180 Acronym::from_str_unchecked("HT"),
5181 Acronym::from_str_unchecked("DC"),
5182 Acronym::from_str_unchecked("DT"),
5183 Acronym::from_str_unchecked("NC"),
5184 Acronym::from_str_unchecked("WD"),
5185 Acronym::from_str_unchecked("AS"),
5186 ]
5187 }
5188 .into_iter()
5189 }
5190 pub const fn description() -> &'static str {
5192 "Can you keep up?"
5193 }
5194 pub const fn kind() -> GameModKind {
5196 GameModKind::Fun
5197 }
5198}
5199impl WindDownMania {
5200 pub const fn acronym() -> Acronym {
5202 unsafe { Acronym::from_str_unchecked("WD") }
5203 }
5204 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5206 unsafe {
5207 [
5208 Acronym::from_str_unchecked("HT"),
5209 Acronym::from_str_unchecked("DC"),
5210 Acronym::from_str_unchecked("DT"),
5211 Acronym::from_str_unchecked("NC"),
5212 Acronym::from_str_unchecked("WU"),
5213 Acronym::from_str_unchecked("AS"),
5214 ]
5215 }
5216 .into_iter()
5217 }
5218 pub const fn description() -> &'static str {
5220 "Sloooow doooown..."
5221 }
5222 pub const fn kind() -> GameModKind {
5224 GameModKind::Fun
5225 }
5226}
5227impl MutedMania {
5228 pub const fn acronym() -> Acronym {
5230 unsafe { Acronym::from_str_unchecked("MU") }
5231 }
5232 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5234 [].into_iter()
5235 }
5236 pub const fn description() -> &'static str {
5238 "Can you still feel the rhythm without music?"
5239 }
5240 pub const fn kind() -> GameModKind {
5242 GameModKind::Fun
5243 }
5244}
5245impl AdaptiveSpeedMania {
5246 pub const fn acronym() -> Acronym {
5248 unsafe { Acronym::from_str_unchecked("AS") }
5249 }
5250 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5252 unsafe {
5253 [
5254 Acronym::from_str_unchecked("HT"),
5255 Acronym::from_str_unchecked("DC"),
5256 Acronym::from_str_unchecked("DT"),
5257 Acronym::from_str_unchecked("NC"),
5258 Acronym::from_str_unchecked("AT"),
5259 Acronym::from_str_unchecked("CN"),
5260 Acronym::from_str_unchecked("WU"),
5261 Acronym::from_str_unchecked("WD"),
5262 ]
5263 }
5264 .into_iter()
5265 }
5266 pub const fn description() -> &'static str {
5268 "Let track speed adapt to you."
5269 }
5270 pub const fn kind() -> GameModKind {
5272 GameModKind::Fun
5273 }
5274}
5275impl ScoreV2Mania {
5276 pub const fn acronym() -> Acronym {
5278 unsafe { Acronym::from_str_unchecked("SV2") }
5279 }
5280 pub fn incompatible_mods() -> impl Iterator<Item = Acronym> {
5282 [].into_iter()
5283 }
5284 pub const fn description() -> &'static str {
5286 "Score set on earlier osu! versions with the V2 scoring algorithm active."
5287 }
5288 pub const fn kind() -> GameModKind {
5290 GameModKind::System
5291 }
5292 pub const fn bits() -> u32 {
5296 536870912
5297 }
5298}
5299impl UnknownMod {
5300 pub const UNKNOWN_ACRONYM: Acronym = unsafe { Acronym::from_str_unchecked("??") };
5303 pub const fn acronym(self) -> Acronym {
5305 self.acronym
5306 }
5307 pub const fn incompatible_mods() -> std::iter::Empty<Acronym> {
5309 std::iter::empty()
5310 }
5311 pub const fn description() -> &'static str {
5313 "Some unknown mod"
5314 }
5315 pub const fn kind() -> GameModKind {
5317 GameModKind::System
5318 }
5319}
5320impl Default for UnknownMod {
5321 fn default() -> Self {
5322 Self {
5323 acronym: Self::UNKNOWN_ACRONYM,
5324 }
5325 }
5326}
5327pub(crate) mod intermode {
5328 #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)]
5330 #[cfg_attr(feature = "rkyv",derive(rkyv::Archive,rkyv::Serialize,rkyv::Deserialize,rkyv::Portable,rkyv::bytecheck::CheckBytes,),rkyv(as = Self),bytecheck(crate = rkyv::bytecheck),repr(u8),)]
5331 #[non_exhaustive]
5332 pub enum GameModIntermode {
5333 AccuracyChallenge,
5334 AdaptiveSpeed,
5335 Alternate,
5336 ApproachDifferent,
5337 Autopilot,
5338 Autoplay,
5339 BarrelRoll,
5340 Blinds,
5341 Bloom,
5342 Bubbles,
5343 Cinema,
5344 Classic,
5345 ConstantSpeed,
5346 Cover,
5347 Daycore,
5348 Deflate,
5349 Depth,
5350 DifficultyAdjust,
5351 DoubleTime,
5352 DualStages,
5353 Easy,
5354 EightKeys,
5355 FadeIn,
5356 FiveKeys,
5357 Flashlight,
5358 FloatingFruits,
5359 FourKeys,
5360 FreezeFrame,
5361 Grow,
5362 HalfTime,
5363 HardRock,
5364 Hidden,
5365 HoldOff,
5366 Invert,
5367 Magnetised,
5368 Mirror,
5369 Muted,
5370 Nightcore,
5371 NineKeys,
5372 NoFail,
5373 NoRelease,
5374 NoScope,
5375 OneKey,
5376 Perfect,
5377 Random,
5378 Relax,
5379 Repel,
5380 ScoreV2,
5381 SevenKeys,
5382 SingleTap,
5383 SixKeys,
5384 SpinIn,
5385 SpunOut,
5386 StrictTracking,
5387 SuddenDeath,
5388 Swap,
5389 Synesthesia,
5390 TargetPractice,
5391 TenKeys,
5392 ThreeKeys,
5393 TouchDevice,
5394 Traceable,
5395 Transform,
5396 TwoKeys,
5397 Wiggle,
5398 WindDown,
5399 WindUp,
5400 Unknown(super::UnknownMod),
5401 }
5402}
5403impl GameModIntermode {
5404 pub const fn acronym(&self) -> Acronym {
5406 unsafe {
5407 match self {
5408 Self::AccuracyChallenge => Acronym::from_str_unchecked("AC"),
5409 Self::AdaptiveSpeed => Acronym::from_str_unchecked("AS"),
5410 Self::Alternate => Acronym::from_str_unchecked("AL"),
5411 Self::ApproachDifferent => Acronym::from_str_unchecked("AD"),
5412 Self::Autopilot => Acronym::from_str_unchecked("AP"),
5413 Self::Autoplay => Acronym::from_str_unchecked("AT"),
5414 Self::BarrelRoll => Acronym::from_str_unchecked("BR"),
5415 Self::Blinds => Acronym::from_str_unchecked("BL"),
5416 Self::Bloom => Acronym::from_str_unchecked("BM"),
5417 Self::Bubbles => Acronym::from_str_unchecked("BU"),
5418 Self::Cinema => Acronym::from_str_unchecked("CN"),
5419 Self::Classic => Acronym::from_str_unchecked("CL"),
5420 Self::ConstantSpeed => Acronym::from_str_unchecked("CS"),
5421 Self::Cover => Acronym::from_str_unchecked("CO"),
5422 Self::Daycore => Acronym::from_str_unchecked("DC"),
5423 Self::Deflate => Acronym::from_str_unchecked("DF"),
5424 Self::Depth => Acronym::from_str_unchecked("DP"),
5425 Self::DifficultyAdjust => Acronym::from_str_unchecked("DA"),
5426 Self::DoubleTime => Acronym::from_str_unchecked("DT"),
5427 Self::DualStages => Acronym::from_str_unchecked("DS"),
5428 Self::Easy => Acronym::from_str_unchecked("EZ"),
5429 Self::EightKeys => Acronym::from_str_unchecked("8K"),
5430 Self::FadeIn => Acronym::from_str_unchecked("FI"),
5431 Self::FiveKeys => Acronym::from_str_unchecked("5K"),
5432 Self::Flashlight => Acronym::from_str_unchecked("FL"),
5433 Self::FloatingFruits => Acronym::from_str_unchecked("FF"),
5434 Self::FourKeys => Acronym::from_str_unchecked("4K"),
5435 Self::FreezeFrame => Acronym::from_str_unchecked("FR"),
5436 Self::Grow => Acronym::from_str_unchecked("GR"),
5437 Self::HalfTime => Acronym::from_str_unchecked("HT"),
5438 Self::HardRock => Acronym::from_str_unchecked("HR"),
5439 Self::Hidden => Acronym::from_str_unchecked("HD"),
5440 Self::HoldOff => Acronym::from_str_unchecked("HO"),
5441 Self::Invert => Acronym::from_str_unchecked("IN"),
5442 Self::Magnetised => Acronym::from_str_unchecked("MG"),
5443 Self::Mirror => Acronym::from_str_unchecked("MR"),
5444 Self::Muted => Acronym::from_str_unchecked("MU"),
5445 Self::Nightcore => Acronym::from_str_unchecked("NC"),
5446 Self::NineKeys => Acronym::from_str_unchecked("9K"),
5447 Self::NoFail => Acronym::from_str_unchecked("NF"),
5448 Self::NoRelease => Acronym::from_str_unchecked("NR"),
5449 Self::NoScope => Acronym::from_str_unchecked("NS"),
5450 Self::OneKey => Acronym::from_str_unchecked("1K"),
5451 Self::Perfect => Acronym::from_str_unchecked("PF"),
5452 Self::Random => Acronym::from_str_unchecked("RD"),
5453 Self::Relax => Acronym::from_str_unchecked("RX"),
5454 Self::Repel => Acronym::from_str_unchecked("RP"),
5455 Self::ScoreV2 => Acronym::from_str_unchecked("SV2"),
5456 Self::SevenKeys => Acronym::from_str_unchecked("7K"),
5457 Self::SingleTap => Acronym::from_str_unchecked("SG"),
5458 Self::SixKeys => Acronym::from_str_unchecked("6K"),
5459 Self::SpinIn => Acronym::from_str_unchecked("SI"),
5460 Self::SpunOut => Acronym::from_str_unchecked("SO"),
5461 Self::StrictTracking => Acronym::from_str_unchecked("ST"),
5462 Self::SuddenDeath => Acronym::from_str_unchecked("SD"),
5463 Self::Swap => Acronym::from_str_unchecked("SW"),
5464 Self::Synesthesia => Acronym::from_str_unchecked("SY"),
5465 Self::TargetPractice => Acronym::from_str_unchecked("TP"),
5466 Self::TenKeys => Acronym::from_str_unchecked("10K"),
5467 Self::ThreeKeys => Acronym::from_str_unchecked("3K"),
5468 Self::TouchDevice => Acronym::from_str_unchecked("TD"),
5469 Self::Traceable => Acronym::from_str_unchecked("TC"),
5470 Self::Transform => Acronym::from_str_unchecked("TR"),
5471 Self::TwoKeys => Acronym::from_str_unchecked("2K"),
5472 Self::Wiggle => Acronym::from_str_unchecked("WG"),
5473 Self::WindDown => Acronym::from_str_unchecked("WD"),
5474 Self::WindUp => Acronym::from_str_unchecked("WU"),
5475 Self::Unknown(m) => m.acronym(),
5476 }
5477 }
5478 }
5479 pub const fn bits(self) -> Option<u32> {
5483 match self {
5484 Self::AccuracyChallenge => None,
5485 Self::AdaptiveSpeed => None,
5486 Self::Alternate => None,
5487 Self::ApproachDifferent => None,
5488 Self::Autopilot => Some(8192),
5489 Self::Autoplay => Some(2048),
5490 Self::BarrelRoll => None,
5491 Self::Blinds => None,
5492 Self::Bloom => None,
5493 Self::Bubbles => None,
5494 Self::Cinema => Some(4194304),
5495 Self::Classic => None,
5496 Self::ConstantSpeed => None,
5497 Self::Cover => None,
5498 Self::Daycore => None,
5499 Self::Deflate => None,
5500 Self::Depth => None,
5501 Self::DifficultyAdjust => None,
5502 Self::DoubleTime => Some(64),
5503 Self::DualStages => Some(33554432),
5504 Self::Easy => Some(2),
5505 Self::EightKeys => Some(524288),
5506 Self::FadeIn => Some(1048576),
5507 Self::FiveKeys => Some(65536),
5508 Self::Flashlight => Some(1024),
5509 Self::FloatingFruits => None,
5510 Self::FourKeys => Some(32768),
5511 Self::FreezeFrame => None,
5512 Self::Grow => None,
5513 Self::HalfTime => Some(256),
5514 Self::HardRock => Some(16),
5515 Self::Hidden => Some(8),
5516 Self::HoldOff => None,
5517 Self::Invert => None,
5518 Self::Magnetised => None,
5519 Self::Mirror => Some(1073741824),
5520 Self::Muted => None,
5521 Self::Nightcore => Some(576),
5522 Self::NineKeys => Some(16777216),
5523 Self::NoFail => Some(1),
5524 Self::NoRelease => None,
5525 Self::NoScope => None,
5526 Self::OneKey => Some(67108864),
5527 Self::Perfect => Some(16416),
5528 Self::Random => Some(2097152),
5529 Self::Relax => Some(128),
5530 Self::Repel => None,
5531 Self::ScoreV2 => Some(536870912),
5532 Self::SevenKeys => Some(262144),
5533 Self::SingleTap => None,
5534 Self::SixKeys => Some(131072),
5535 Self::SpinIn => None,
5536 Self::SpunOut => Some(4096),
5537 Self::StrictTracking => None,
5538 Self::SuddenDeath => Some(32),
5539 Self::Swap => None,
5540 Self::Synesthesia => None,
5541 Self::TargetPractice => Some(8388608),
5542 Self::TenKeys => None,
5543 Self::ThreeKeys => Some(134217728),
5544 Self::TouchDevice => Some(4),
5545 Self::Traceable => None,
5546 Self::Transform => None,
5547 Self::TwoKeys => Some(268435456),
5548 Self::Wiggle => None,
5549 Self::WindDown => None,
5550 Self::WindUp => None,
5551 Self::Unknown(_) => None,
5552 }
5553 }
5554 pub const fn kind(&self) -> GameModKind {
5556 match self {
5557 Self::AccuracyChallenge => GameModKind::DifficultyIncrease,
5558 Self::AdaptiveSpeed => GameModKind::Fun,
5559 Self::Alternate => GameModKind::Conversion,
5560 Self::ApproachDifferent => GameModKind::Fun,
5561 Self::Autopilot => GameModKind::Automation,
5562 Self::Autoplay => GameModKind::Automation,
5563 Self::BarrelRoll => GameModKind::Fun,
5564 Self::Blinds => GameModKind::DifficultyIncrease,
5565 Self::Bloom => GameModKind::Fun,
5566 Self::Bubbles => GameModKind::Fun,
5567 Self::Cinema => GameModKind::Automation,
5568 Self::Classic => GameModKind::Conversion,
5569 Self::ConstantSpeed => GameModKind::Conversion,
5570 Self::Cover => GameModKind::DifficultyIncrease,
5571 Self::Daycore => GameModKind::DifficultyReduction,
5572 Self::Deflate => GameModKind::Fun,
5573 Self::Depth => GameModKind::Fun,
5574 Self::DifficultyAdjust => GameModKind::Conversion,
5575 Self::DoubleTime => GameModKind::DifficultyIncrease,
5576 Self::DualStages => GameModKind::Conversion,
5577 Self::Easy => GameModKind::DifficultyReduction,
5578 Self::EightKeys => GameModKind::Conversion,
5579 Self::FadeIn => GameModKind::DifficultyIncrease,
5580 Self::FiveKeys => GameModKind::Conversion,
5581 Self::Flashlight => GameModKind::DifficultyIncrease,
5582 Self::FloatingFruits => GameModKind::Fun,
5583 Self::FourKeys => GameModKind::Conversion,
5584 Self::FreezeFrame => GameModKind::Fun,
5585 Self::Grow => GameModKind::Fun,
5586 Self::HalfTime => GameModKind::DifficultyReduction,
5587 Self::HardRock => GameModKind::DifficultyIncrease,
5588 Self::Hidden => GameModKind::DifficultyIncrease,
5589 Self::HoldOff => GameModKind::Conversion,
5590 Self::Invert => GameModKind::Conversion,
5591 Self::Magnetised => GameModKind::Fun,
5592 Self::Mirror => GameModKind::Conversion,
5593 Self::Muted => GameModKind::Fun,
5594 Self::Nightcore => GameModKind::DifficultyIncrease,
5595 Self::NineKeys => GameModKind::Conversion,
5596 Self::NoFail => GameModKind::DifficultyReduction,
5597 Self::NoRelease => GameModKind::DifficultyReduction,
5598 Self::NoScope => GameModKind::Fun,
5599 Self::OneKey => GameModKind::Conversion,
5600 Self::Perfect => GameModKind::DifficultyIncrease,
5601 Self::Random => GameModKind::Conversion,
5602 Self::Relax => GameModKind::Automation,
5603 Self::Repel => GameModKind::Fun,
5604 Self::ScoreV2 => GameModKind::System,
5605 Self::SevenKeys => GameModKind::Conversion,
5606 Self::SingleTap => GameModKind::Conversion,
5607 Self::SixKeys => GameModKind::Conversion,
5608 Self::SpinIn => GameModKind::Fun,
5609 Self::SpunOut => GameModKind::Automation,
5610 Self::StrictTracking => GameModKind::DifficultyIncrease,
5611 Self::SuddenDeath => GameModKind::DifficultyIncrease,
5612 Self::Swap => GameModKind::Conversion,
5613 Self::Synesthesia => GameModKind::Fun,
5614 Self::TargetPractice => GameModKind::Conversion,
5615 Self::TenKeys => GameModKind::Conversion,
5616 Self::ThreeKeys => GameModKind::Conversion,
5617 Self::TouchDevice => GameModKind::System,
5618 Self::Traceable => GameModKind::Fun,
5619 Self::Transform => GameModKind::Fun,
5620 Self::TwoKeys => GameModKind::Conversion,
5621 Self::Wiggle => GameModKind::Fun,
5622 Self::WindDown => GameModKind::Fun,
5623 Self::WindUp => GameModKind::Fun,
5624 Self::Unknown(_) => GameModKind::System,
5625 }
5626 }
5627 pub fn from_acronym(acronym: Acronym) -> Self {
5629 match acronym.as_str() {
5630 "AC" => Self::AccuracyChallenge,
5631 "AS" => Self::AdaptiveSpeed,
5632 "AL" => Self::Alternate,
5633 "AD" => Self::ApproachDifferent,
5634 "AP" => Self::Autopilot,
5635 "AT" => Self::Autoplay,
5636 "BR" => Self::BarrelRoll,
5637 "BL" => Self::Blinds,
5638 "BM" => Self::Bloom,
5639 "BU" => Self::Bubbles,
5640 "CN" => Self::Cinema,
5641 "CL" => Self::Classic,
5642 "CS" => Self::ConstantSpeed,
5643 "CO" => Self::Cover,
5644 "DC" => Self::Daycore,
5645 "DF" => Self::Deflate,
5646 "DP" => Self::Depth,
5647 "DA" => Self::DifficultyAdjust,
5648 "DT" => Self::DoubleTime,
5649 "DS" => Self::DualStages,
5650 "EZ" => Self::Easy,
5651 "8K" => Self::EightKeys,
5652 "FI" => Self::FadeIn,
5653 "5K" => Self::FiveKeys,
5654 "FL" => Self::Flashlight,
5655 "FF" => Self::FloatingFruits,
5656 "4K" => Self::FourKeys,
5657 "FR" => Self::FreezeFrame,
5658 "GR" => Self::Grow,
5659 "HT" => Self::HalfTime,
5660 "HR" => Self::HardRock,
5661 "HD" => Self::Hidden,
5662 "HO" => Self::HoldOff,
5663 "IN" => Self::Invert,
5664 "MG" => Self::Magnetised,
5665 "MR" => Self::Mirror,
5666 "MU" => Self::Muted,
5667 "NC" => Self::Nightcore,
5668 "9K" => Self::NineKeys,
5669 "NF" => Self::NoFail,
5670 "NR" => Self::NoRelease,
5671 "NS" => Self::NoScope,
5672 "1K" => Self::OneKey,
5673 "PF" => Self::Perfect,
5674 "RD" => Self::Random,
5675 "RX" => Self::Relax,
5676 "RP" => Self::Repel,
5677 "SV2" => Self::ScoreV2,
5678 "7K" => Self::SevenKeys,
5679 "SG" => Self::SingleTap,
5680 "6K" => Self::SixKeys,
5681 "SI" => Self::SpinIn,
5682 "SO" => Self::SpunOut,
5683 "ST" => Self::StrictTracking,
5684 "SD" => Self::SuddenDeath,
5685 "SW" => Self::Swap,
5686 "SY" => Self::Synesthesia,
5687 "TP" => Self::TargetPractice,
5688 "10K" => Self::TenKeys,
5689 "3K" => Self::ThreeKeys,
5690 "TD" => Self::TouchDevice,
5691 "TC" => Self::Traceable,
5692 "TR" => Self::Transform,
5693 "2K" => Self::TwoKeys,
5694 "WG" => Self::Wiggle,
5695 "WD" => Self::WindDown,
5696 "WU" => Self::WindUp,
5697 _ => Self::Unknown(UnknownMod { acronym }),
5698 }
5699 }
5700 pub const fn try_from_bits(bits: u32) -> Option<Self> {
5702 match bits {
5703 8192 => Some(Self::Autopilot),
5704 2048 => Some(Self::Autoplay),
5705 4194304 => Some(Self::Cinema),
5706 64 => Some(Self::DoubleTime),
5707 33554432 => Some(Self::DualStages),
5708 2 => Some(Self::Easy),
5709 524288 => Some(Self::EightKeys),
5710 1048576 => Some(Self::FadeIn),
5711 65536 => Some(Self::FiveKeys),
5712 1024 => Some(Self::Flashlight),
5713 32768 => Some(Self::FourKeys),
5714 256 => Some(Self::HalfTime),
5715 16 => Some(Self::HardRock),
5716 8 => Some(Self::Hidden),
5717 1073741824 => Some(Self::Mirror),
5718 576 => Some(Self::Nightcore),
5719 16777216 => Some(Self::NineKeys),
5720 1 => Some(Self::NoFail),
5721 67108864 => Some(Self::OneKey),
5722 16416 => Some(Self::Perfect),
5723 2097152 => Some(Self::Random),
5724 128 => Some(Self::Relax),
5725 536870912 => Some(Self::ScoreV2),
5726 262144 => Some(Self::SevenKeys),
5727 131072 => Some(Self::SixKeys),
5728 4096 => Some(Self::SpunOut),
5729 32 => Some(Self::SuddenDeath),
5730 8388608 => Some(Self::TargetPractice),
5731 134217728 => Some(Self::ThreeKeys),
5732 4 => Some(Self::TouchDevice),
5733 268435456 => Some(Self::TwoKeys),
5734 _ => None,
5735 }
5736 }
5737}
5738impl PartialOrd for GameModIntermode {
5739 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
5740 Some(self.cmp(other))
5741 }
5742}
5743impl Ord for GameModIntermode {
5744 fn cmp(&self, other: &Self) -> Ordering {
5745 self.kind()
5747 .cmp(&other.kind())
5748 .then_with(|| self.acronym().as_str().cmp(&other.acronym().as_str()))
5749 }
5750}
5751impl Display for GameModIntermode {
5752 fn fmt(&self, f: &mut Formatter<'_>) -> FmtResult {
5753 f.write_str(self.acronym().as_str())
5754 }
5755}
5756impl From<&GameModIntermode> for GameModIntermode {
5757 fn from(gamemod: &GameModIntermode) -> Self {
5758 *gamemod
5759 }
5760}
5761impl From<GameMod> for GameModIntermode {
5762 fn from(gamemod: GameMod) -> Self {
5763 gamemod.intermode()
5764 }
5765}
5766pub(crate) mod gamemod {
5767 use super::*;
5768 #[derive(Clone, Debug, PartialEq)]
5770 #[cfg_attr(
5771 feature = "rkyv",
5772 derive(::rkyv::Archive, ::rkyv::Serialize, ::rkyv::Deserialize)
5773 )]
5774 #[non_exhaustive]
5775 pub enum GameMod {
5776 EasyOsu(EasyOsu),
5777 NoFailOsu(NoFailOsu),
5778 HalfTimeOsu(HalfTimeOsu),
5779 DaycoreOsu(DaycoreOsu),
5780 HardRockOsu(HardRockOsu),
5781 SuddenDeathOsu(SuddenDeathOsu),
5782 PerfectOsu(PerfectOsu),
5783 DoubleTimeOsu(DoubleTimeOsu),
5784 NightcoreOsu(NightcoreOsu),
5785 HiddenOsu(HiddenOsu),
5786 FlashlightOsu(FlashlightOsu),
5787 BlindsOsu(BlindsOsu),
5788 StrictTrackingOsu(StrictTrackingOsu),
5789 AccuracyChallengeOsu(AccuracyChallengeOsu),
5790 TargetPracticeOsu(TargetPracticeOsu),
5791 DifficultyAdjustOsu(DifficultyAdjustOsu),
5792 ClassicOsu(ClassicOsu),
5793 RandomOsu(RandomOsu),
5794 MirrorOsu(MirrorOsu),
5795 AlternateOsu(AlternateOsu),
5796 SingleTapOsu(SingleTapOsu),
5797 AutoplayOsu(AutoplayOsu),
5798 CinemaOsu(CinemaOsu),
5799 RelaxOsu(RelaxOsu),
5800 AutopilotOsu(AutopilotOsu),
5801 SpunOutOsu(SpunOutOsu),
5802 TransformOsu(TransformOsu),
5803 WiggleOsu(WiggleOsu),
5804 SpinInOsu(SpinInOsu),
5805 GrowOsu(GrowOsu),
5806 DeflateOsu(DeflateOsu),
5807 WindUpOsu(WindUpOsu),
5808 WindDownOsu(WindDownOsu),
5809 TraceableOsu(TraceableOsu),
5810 BarrelRollOsu(BarrelRollOsu),
5811 ApproachDifferentOsu(ApproachDifferentOsu),
5812 MutedOsu(MutedOsu),
5813 NoScopeOsu(NoScopeOsu),
5814 MagnetisedOsu(MagnetisedOsu),
5815 RepelOsu(RepelOsu),
5816 AdaptiveSpeedOsu(AdaptiveSpeedOsu),
5817 FreezeFrameOsu(FreezeFrameOsu),
5818 BubblesOsu(BubblesOsu),
5819 SynesthesiaOsu(SynesthesiaOsu),
5820 DepthOsu(DepthOsu),
5821 BloomOsu(BloomOsu),
5822 TouchDeviceOsu(TouchDeviceOsu),
5823 ScoreV2Osu(ScoreV2Osu),
5824 UnknownOsu(UnknownMod),
5825 EasyTaiko(EasyTaiko),
5826 NoFailTaiko(NoFailTaiko),
5827 HalfTimeTaiko(HalfTimeTaiko),
5828 DaycoreTaiko(DaycoreTaiko),
5829 HardRockTaiko(HardRockTaiko),
5830 SuddenDeathTaiko(SuddenDeathTaiko),
5831 PerfectTaiko(PerfectTaiko),
5832 DoubleTimeTaiko(DoubleTimeTaiko),
5833 NightcoreTaiko(NightcoreTaiko),
5834 HiddenTaiko(HiddenTaiko),
5835 FlashlightTaiko(FlashlightTaiko),
5836 AccuracyChallengeTaiko(AccuracyChallengeTaiko),
5837 RandomTaiko(RandomTaiko),
5838 DifficultyAdjustTaiko(DifficultyAdjustTaiko),
5839 ClassicTaiko(ClassicTaiko),
5840 SwapTaiko(SwapTaiko),
5841 SingleTapTaiko(SingleTapTaiko),
5842 ConstantSpeedTaiko(ConstantSpeedTaiko),
5843 AutoplayTaiko(AutoplayTaiko),
5844 CinemaTaiko(CinemaTaiko),
5845 RelaxTaiko(RelaxTaiko),
5846 WindUpTaiko(WindUpTaiko),
5847 WindDownTaiko(WindDownTaiko),
5848 MutedTaiko(MutedTaiko),
5849 AdaptiveSpeedTaiko(AdaptiveSpeedTaiko),
5850 ScoreV2Taiko(ScoreV2Taiko),
5851 UnknownTaiko(UnknownMod),
5852 EasyCatch(EasyCatch),
5853 NoFailCatch(NoFailCatch),
5854 HalfTimeCatch(HalfTimeCatch),
5855 DaycoreCatch(DaycoreCatch),
5856 HardRockCatch(HardRockCatch),
5857 SuddenDeathCatch(SuddenDeathCatch),
5858 PerfectCatch(PerfectCatch),
5859 DoubleTimeCatch(DoubleTimeCatch),
5860 NightcoreCatch(NightcoreCatch),
5861 HiddenCatch(HiddenCatch),
5862 FlashlightCatch(FlashlightCatch),
5863 AccuracyChallengeCatch(AccuracyChallengeCatch),
5864 DifficultyAdjustCatch(DifficultyAdjustCatch),
5865 ClassicCatch(ClassicCatch),
5866 MirrorCatch(MirrorCatch),
5867 AutoplayCatch(AutoplayCatch),
5868 CinemaCatch(CinemaCatch),
5869 RelaxCatch(RelaxCatch),
5870 WindUpCatch(WindUpCatch),
5871 WindDownCatch(WindDownCatch),
5872 FloatingFruitsCatch(FloatingFruitsCatch),
5873 MutedCatch(MutedCatch),
5874 NoScopeCatch(NoScopeCatch),
5875 ScoreV2Catch(ScoreV2Catch),
5876 UnknownCatch(UnknownMod),
5877 EasyMania(EasyMania),
5878 NoFailMania(NoFailMania),
5879 HalfTimeMania(HalfTimeMania),
5880 DaycoreMania(DaycoreMania),
5881 NoReleaseMania(NoReleaseMania),
5882 HardRockMania(HardRockMania),
5883 SuddenDeathMania(SuddenDeathMania),
5884 PerfectMania(PerfectMania),
5885 DoubleTimeMania(DoubleTimeMania),
5886 NightcoreMania(NightcoreMania),
5887 FadeInMania(FadeInMania),
5888 HiddenMania(HiddenMania),
5889 CoverMania(CoverMania),
5890 FlashlightMania(FlashlightMania),
5891 AccuracyChallengeMania(AccuracyChallengeMania),
5892 RandomMania(RandomMania),
5893 DualStagesMania(DualStagesMania),
5894 MirrorMania(MirrorMania),
5895 DifficultyAdjustMania(DifficultyAdjustMania),
5896 ClassicMania(ClassicMania),
5897 InvertMania(InvertMania),
5898 ConstantSpeedMania(ConstantSpeedMania),
5899 HoldOffMania(HoldOffMania),
5900 OneKeyMania(OneKeyMania),
5901 TwoKeysMania(TwoKeysMania),
5902 ThreeKeysMania(ThreeKeysMania),
5903 FourKeysMania(FourKeysMania),
5904 FiveKeysMania(FiveKeysMania),
5905 SixKeysMania(SixKeysMania),
5906 SevenKeysMania(SevenKeysMania),
5907 EightKeysMania(EightKeysMania),
5908 NineKeysMania(NineKeysMania),
5909 TenKeysMania(TenKeysMania),
5910 AutoplayMania(AutoplayMania),
5911 CinemaMania(CinemaMania),
5912 WindUpMania(WindUpMania),
5913 WindDownMania(WindDownMania),
5914 MutedMania(MutedMania),
5915 AdaptiveSpeedMania(AdaptiveSpeedMania),
5916 ScoreV2Mania(ScoreV2Mania),
5917 UnknownMania(UnknownMod),
5918 }
5919}
5920impl GameMod {
5921 pub fn new(acronym: &str, mode: GameMode) -> Self {
5923 match (acronym, mode) {
5924 ("EZ", GameMode::Osu) => Self::EasyOsu(Default::default()),
5925 ("NF", GameMode::Osu) => Self::NoFailOsu(Default::default()),
5926 ("HT", GameMode::Osu) => Self::HalfTimeOsu(Default::default()),
5927 ("DC", GameMode::Osu) => Self::DaycoreOsu(Default::default()),
5928 ("HR", GameMode::Osu) => Self::HardRockOsu(Default::default()),
5929 ("SD", GameMode::Osu) => Self::SuddenDeathOsu(Default::default()),
5930 ("PF", GameMode::Osu) => Self::PerfectOsu(Default::default()),
5931 ("DT", GameMode::Osu) => Self::DoubleTimeOsu(Default::default()),
5932 ("NC", GameMode::Osu) => Self::NightcoreOsu(Default::default()),
5933 ("HD", GameMode::Osu) => Self::HiddenOsu(Default::default()),
5934 ("FL", GameMode::Osu) => Self::FlashlightOsu(Default::default()),
5935 ("BL", GameMode::Osu) => Self::BlindsOsu(Default::default()),
5936 ("ST", GameMode::Osu) => Self::StrictTrackingOsu(Default::default()),
5937 ("AC", GameMode::Osu) => Self::AccuracyChallengeOsu(Default::default()),
5938 ("TP", GameMode::Osu) => Self::TargetPracticeOsu(Default::default()),
5939 ("DA", GameMode::Osu) => Self::DifficultyAdjustOsu(Default::default()),
5940 ("CL", GameMode::Osu) => Self::ClassicOsu(Default::default()),
5941 ("RD", GameMode::Osu) => Self::RandomOsu(Default::default()),
5942 ("MR", GameMode::Osu) => Self::MirrorOsu(Default::default()),
5943 ("AL", GameMode::Osu) => Self::AlternateOsu(Default::default()),
5944 ("SG", GameMode::Osu) => Self::SingleTapOsu(Default::default()),
5945 ("AT", GameMode::Osu) => Self::AutoplayOsu(Default::default()),
5946 ("CN", GameMode::Osu) => Self::CinemaOsu(Default::default()),
5947 ("RX", GameMode::Osu) => Self::RelaxOsu(Default::default()),
5948 ("AP", GameMode::Osu) => Self::AutopilotOsu(Default::default()),
5949 ("SO", GameMode::Osu) => Self::SpunOutOsu(Default::default()),
5950 ("TR", GameMode::Osu) => Self::TransformOsu(Default::default()),
5951 ("WG", GameMode::Osu) => Self::WiggleOsu(Default::default()),
5952 ("SI", GameMode::Osu) => Self::SpinInOsu(Default::default()),
5953 ("GR", GameMode::Osu) => Self::GrowOsu(Default::default()),
5954 ("DF", GameMode::Osu) => Self::DeflateOsu(Default::default()),
5955 ("WU", GameMode::Osu) => Self::WindUpOsu(Default::default()),
5956 ("WD", GameMode::Osu) => Self::WindDownOsu(Default::default()),
5957 ("TC", GameMode::Osu) => Self::TraceableOsu(Default::default()),
5958 ("BR", GameMode::Osu) => Self::BarrelRollOsu(Default::default()),
5959 ("AD", GameMode::Osu) => Self::ApproachDifferentOsu(Default::default()),
5960 ("MU", GameMode::Osu) => Self::MutedOsu(Default::default()),
5961 ("NS", GameMode::Osu) => Self::NoScopeOsu(Default::default()),
5962 ("MG", GameMode::Osu) => Self::MagnetisedOsu(Default::default()),
5963 ("RP", GameMode::Osu) => Self::RepelOsu(Default::default()),
5964 ("AS", GameMode::Osu) => Self::AdaptiveSpeedOsu(Default::default()),
5965 ("FR", GameMode::Osu) => Self::FreezeFrameOsu(Default::default()),
5966 ("BU", GameMode::Osu) => Self::BubblesOsu(Default::default()),
5967 ("SY", GameMode::Osu) => Self::SynesthesiaOsu(Default::default()),
5968 ("DP", GameMode::Osu) => Self::DepthOsu(Default::default()),
5969 ("BM", GameMode::Osu) => Self::BloomOsu(Default::default()),
5970 ("TD", GameMode::Osu) => Self::TouchDeviceOsu(Default::default()),
5971 ("SV2", GameMode::Osu) => Self::ScoreV2Osu(Default::default()),
5972 ("EZ", GameMode::Taiko) => Self::EasyTaiko(Default::default()),
5973 ("NF", GameMode::Taiko) => Self::NoFailTaiko(Default::default()),
5974 ("HT", GameMode::Taiko) => Self::HalfTimeTaiko(Default::default()),
5975 ("DC", GameMode::Taiko) => Self::DaycoreTaiko(Default::default()),
5976 ("HR", GameMode::Taiko) => Self::HardRockTaiko(Default::default()),
5977 ("SD", GameMode::Taiko) => Self::SuddenDeathTaiko(Default::default()),
5978 ("PF", GameMode::Taiko) => Self::PerfectTaiko(Default::default()),
5979 ("DT", GameMode::Taiko) => Self::DoubleTimeTaiko(Default::default()),
5980 ("NC", GameMode::Taiko) => Self::NightcoreTaiko(Default::default()),
5981 ("HD", GameMode::Taiko) => Self::HiddenTaiko(Default::default()),
5982 ("FL", GameMode::Taiko) => Self::FlashlightTaiko(Default::default()),
5983 ("AC", GameMode::Taiko) => Self::AccuracyChallengeTaiko(Default::default()),
5984 ("RD", GameMode::Taiko) => Self::RandomTaiko(Default::default()),
5985 ("DA", GameMode::Taiko) => Self::DifficultyAdjustTaiko(Default::default()),
5986 ("CL", GameMode::Taiko) => Self::ClassicTaiko(Default::default()),
5987 ("SW", GameMode::Taiko) => Self::SwapTaiko(Default::default()),
5988 ("SG", GameMode::Taiko) => Self::SingleTapTaiko(Default::default()),
5989 ("CS", GameMode::Taiko) => Self::ConstantSpeedTaiko(Default::default()),
5990 ("AT", GameMode::Taiko) => Self::AutoplayTaiko(Default::default()),
5991 ("CN", GameMode::Taiko) => Self::CinemaTaiko(Default::default()),
5992 ("RX", GameMode::Taiko) => Self::RelaxTaiko(Default::default()),
5993 ("WU", GameMode::Taiko) => Self::WindUpTaiko(Default::default()),
5994 ("WD", GameMode::Taiko) => Self::WindDownTaiko(Default::default()),
5995 ("MU", GameMode::Taiko) => Self::MutedTaiko(Default::default()),
5996 ("AS", GameMode::Taiko) => Self::AdaptiveSpeedTaiko(Default::default()),
5997 ("SV2", GameMode::Taiko) => Self::ScoreV2Taiko(Default::default()),
5998 ("EZ", GameMode::Catch) => Self::EasyCatch(Default::default()),
5999 ("NF", GameMode::Catch) => Self::NoFailCatch(Default::default()),
6000 ("HT", GameMode::Catch) => Self::HalfTimeCatch(Default::default()),
6001 ("DC", GameMode::Catch) => Self::DaycoreCatch(Default::default()),
6002 ("HR", GameMode::Catch) => Self::HardRockCatch(Default::default()),
6003 ("SD", GameMode::Catch) => Self::SuddenDeathCatch(Default::default()),
6004 ("PF", GameMode::Catch) => Self::PerfectCatch(Default::default()),
6005 ("DT", GameMode::Catch) => Self::DoubleTimeCatch(Default::default()),
6006 ("NC", GameMode::Catch) => Self::NightcoreCatch(Default::default()),
6007 ("HD", GameMode::Catch) => Self::HiddenCatch(Default::default()),
6008 ("FL", GameMode::Catch) => Self::FlashlightCatch(Default::default()),
6009 ("AC", GameMode::Catch) => Self::AccuracyChallengeCatch(Default::default()),
6010 ("DA", GameMode::Catch) => Self::DifficultyAdjustCatch(Default::default()),
6011 ("CL", GameMode::Catch) => Self::ClassicCatch(Default::default()),
6012 ("MR", GameMode::Catch) => Self::MirrorCatch(Default::default()),
6013 ("AT", GameMode::Catch) => Self::AutoplayCatch(Default::default()),
6014 ("CN", GameMode::Catch) => Self::CinemaCatch(Default::default()),
6015 ("RX", GameMode::Catch) => Self::RelaxCatch(Default::default()),
6016 ("WU", GameMode::Catch) => Self::WindUpCatch(Default::default()),
6017 ("WD", GameMode::Catch) => Self::WindDownCatch(Default::default()),
6018 ("FF", GameMode::Catch) => Self::FloatingFruitsCatch(Default::default()),
6019 ("MU", GameMode::Catch) => Self::MutedCatch(Default::default()),
6020 ("NS", GameMode::Catch) => Self::NoScopeCatch(Default::default()),
6021 ("SV2", GameMode::Catch) => Self::ScoreV2Catch(Default::default()),
6022 ("EZ", GameMode::Mania) => Self::EasyMania(Default::default()),
6023 ("NF", GameMode::Mania) => Self::NoFailMania(Default::default()),
6024 ("HT", GameMode::Mania) => Self::HalfTimeMania(Default::default()),
6025 ("DC", GameMode::Mania) => Self::DaycoreMania(Default::default()),
6026 ("NR", GameMode::Mania) => Self::NoReleaseMania(Default::default()),
6027 ("HR", GameMode::Mania) => Self::HardRockMania(Default::default()),
6028 ("SD", GameMode::Mania) => Self::SuddenDeathMania(Default::default()),
6029 ("PF", GameMode::Mania) => Self::PerfectMania(Default::default()),
6030 ("DT", GameMode::Mania) => Self::DoubleTimeMania(Default::default()),
6031 ("NC", GameMode::Mania) => Self::NightcoreMania(Default::default()),
6032 ("FI", GameMode::Mania) => Self::FadeInMania(Default::default()),
6033 ("HD", GameMode::Mania) => Self::HiddenMania(Default::default()),
6034 ("CO", GameMode::Mania) => Self::CoverMania(Default::default()),
6035 ("FL", GameMode::Mania) => Self::FlashlightMania(Default::default()),
6036 ("AC", GameMode::Mania) => Self::AccuracyChallengeMania(Default::default()),
6037 ("RD", GameMode::Mania) => Self::RandomMania(Default::default()),
6038 ("DS", GameMode::Mania) => Self::DualStagesMania(Default::default()),
6039 ("MR", GameMode::Mania) => Self::MirrorMania(Default::default()),
6040 ("DA", GameMode::Mania) => Self::DifficultyAdjustMania(Default::default()),
6041 ("CL", GameMode::Mania) => Self::ClassicMania(Default::default()),
6042 ("IN", GameMode::Mania) => Self::InvertMania(Default::default()),
6043 ("CS", GameMode::Mania) => Self::ConstantSpeedMania(Default::default()),
6044 ("HO", GameMode::Mania) => Self::HoldOffMania(Default::default()),
6045 ("1K", GameMode::Mania) => Self::OneKeyMania(Default::default()),
6046 ("2K", GameMode::Mania) => Self::TwoKeysMania(Default::default()),
6047 ("3K", GameMode::Mania) => Self::ThreeKeysMania(Default::default()),
6048 ("4K", GameMode::Mania) => Self::FourKeysMania(Default::default()),
6049 ("5K", GameMode::Mania) => Self::FiveKeysMania(Default::default()),
6050 ("6K", GameMode::Mania) => Self::SixKeysMania(Default::default()),
6051 ("7K", GameMode::Mania) => Self::SevenKeysMania(Default::default()),
6052 ("8K", GameMode::Mania) => Self::EightKeysMania(Default::default()),
6053 ("9K", GameMode::Mania) => Self::NineKeysMania(Default::default()),
6054 ("10K", GameMode::Mania) => Self::TenKeysMania(Default::default()),
6055 ("AT", GameMode::Mania) => Self::AutoplayMania(Default::default()),
6056 ("CN", GameMode::Mania) => Self::CinemaMania(Default::default()),
6057 ("WU", GameMode::Mania) => Self::WindUpMania(Default::default()),
6058 ("WD", GameMode::Mania) => Self::WindDownMania(Default::default()),
6059 ("MU", GameMode::Mania) => Self::MutedMania(Default::default()),
6060 ("AS", GameMode::Mania) => Self::AdaptiveSpeedMania(Default::default()),
6061 ("SV2", GameMode::Mania) => Self::ScoreV2Mania(Default::default()),
6062 _ => {
6063 let acronym = <Acronym as std::str::FromStr>::from_str(acronym)
6064 .unwrap_or(UnknownMod::UNKNOWN_ACRONYM);
6065 let unknown = UnknownMod { acronym };
6066 match mode {
6067 GameMode::Osu => GameMod::UnknownOsu(unknown),
6068 GameMode::Taiko => GameMod::UnknownTaiko(unknown),
6069 GameMode::Catch => GameMod::UnknownCatch(unknown),
6070 GameMode::Mania => GameMod::UnknownMania(unknown),
6071 }
6072 }
6073 }
6074 }
6075 pub const fn acronym(&self) -> Acronym {
6077 match self {
6078 Self::EasyOsu(_) => EasyOsu::acronym(),
6079 Self::NoFailOsu(_) => NoFailOsu::acronym(),
6080 Self::HalfTimeOsu(_) => HalfTimeOsu::acronym(),
6081 Self::DaycoreOsu(_) => DaycoreOsu::acronym(),
6082 Self::HardRockOsu(_) => HardRockOsu::acronym(),
6083 Self::SuddenDeathOsu(_) => SuddenDeathOsu::acronym(),
6084 Self::PerfectOsu(_) => PerfectOsu::acronym(),
6085 Self::DoubleTimeOsu(_) => DoubleTimeOsu::acronym(),
6086 Self::NightcoreOsu(_) => NightcoreOsu::acronym(),
6087 Self::HiddenOsu(_) => HiddenOsu::acronym(),
6088 Self::FlashlightOsu(_) => FlashlightOsu::acronym(),
6089 Self::BlindsOsu(_) => BlindsOsu::acronym(),
6090 Self::StrictTrackingOsu(_) => StrictTrackingOsu::acronym(),
6091 Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::acronym(),
6092 Self::TargetPracticeOsu(_) => TargetPracticeOsu::acronym(),
6093 Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::acronym(),
6094 Self::ClassicOsu(_) => ClassicOsu::acronym(),
6095 Self::RandomOsu(_) => RandomOsu::acronym(),
6096 Self::MirrorOsu(_) => MirrorOsu::acronym(),
6097 Self::AlternateOsu(_) => AlternateOsu::acronym(),
6098 Self::SingleTapOsu(_) => SingleTapOsu::acronym(),
6099 Self::AutoplayOsu(_) => AutoplayOsu::acronym(),
6100 Self::CinemaOsu(_) => CinemaOsu::acronym(),
6101 Self::RelaxOsu(_) => RelaxOsu::acronym(),
6102 Self::AutopilotOsu(_) => AutopilotOsu::acronym(),
6103 Self::SpunOutOsu(_) => SpunOutOsu::acronym(),
6104 Self::TransformOsu(_) => TransformOsu::acronym(),
6105 Self::WiggleOsu(_) => WiggleOsu::acronym(),
6106 Self::SpinInOsu(_) => SpinInOsu::acronym(),
6107 Self::GrowOsu(_) => GrowOsu::acronym(),
6108 Self::DeflateOsu(_) => DeflateOsu::acronym(),
6109 Self::WindUpOsu(_) => WindUpOsu::acronym(),
6110 Self::WindDownOsu(_) => WindDownOsu::acronym(),
6111 Self::TraceableOsu(_) => TraceableOsu::acronym(),
6112 Self::BarrelRollOsu(_) => BarrelRollOsu::acronym(),
6113 Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::acronym(),
6114 Self::MutedOsu(_) => MutedOsu::acronym(),
6115 Self::NoScopeOsu(_) => NoScopeOsu::acronym(),
6116 Self::MagnetisedOsu(_) => MagnetisedOsu::acronym(),
6117 Self::RepelOsu(_) => RepelOsu::acronym(),
6118 Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::acronym(),
6119 Self::FreezeFrameOsu(_) => FreezeFrameOsu::acronym(),
6120 Self::BubblesOsu(_) => BubblesOsu::acronym(),
6121 Self::SynesthesiaOsu(_) => SynesthesiaOsu::acronym(),
6122 Self::DepthOsu(_) => DepthOsu::acronym(),
6123 Self::BloomOsu(_) => BloomOsu::acronym(),
6124 Self::TouchDeviceOsu(_) => TouchDeviceOsu::acronym(),
6125 Self::ScoreV2Osu(_) => ScoreV2Osu::acronym(),
6126 Self::EasyTaiko(_) => EasyTaiko::acronym(),
6127 Self::NoFailTaiko(_) => NoFailTaiko::acronym(),
6128 Self::HalfTimeTaiko(_) => HalfTimeTaiko::acronym(),
6129 Self::DaycoreTaiko(_) => DaycoreTaiko::acronym(),
6130 Self::HardRockTaiko(_) => HardRockTaiko::acronym(),
6131 Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::acronym(),
6132 Self::PerfectTaiko(_) => PerfectTaiko::acronym(),
6133 Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::acronym(),
6134 Self::NightcoreTaiko(_) => NightcoreTaiko::acronym(),
6135 Self::HiddenTaiko(_) => HiddenTaiko::acronym(),
6136 Self::FlashlightTaiko(_) => FlashlightTaiko::acronym(),
6137 Self::AccuracyChallengeTaiko(_) => AccuracyChallengeTaiko::acronym(),
6138 Self::RandomTaiko(_) => RandomTaiko::acronym(),
6139 Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::acronym(),
6140 Self::ClassicTaiko(_) => ClassicTaiko::acronym(),
6141 Self::SwapTaiko(_) => SwapTaiko::acronym(),
6142 Self::SingleTapTaiko(_) => SingleTapTaiko::acronym(),
6143 Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::acronym(),
6144 Self::AutoplayTaiko(_) => AutoplayTaiko::acronym(),
6145 Self::CinemaTaiko(_) => CinemaTaiko::acronym(),
6146 Self::RelaxTaiko(_) => RelaxTaiko::acronym(),
6147 Self::WindUpTaiko(_) => WindUpTaiko::acronym(),
6148 Self::WindDownTaiko(_) => WindDownTaiko::acronym(),
6149 Self::MutedTaiko(_) => MutedTaiko::acronym(),
6150 Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::acronym(),
6151 Self::ScoreV2Taiko(_) => ScoreV2Taiko::acronym(),
6152 Self::EasyCatch(_) => EasyCatch::acronym(),
6153 Self::NoFailCatch(_) => NoFailCatch::acronym(),
6154 Self::HalfTimeCatch(_) => HalfTimeCatch::acronym(),
6155 Self::DaycoreCatch(_) => DaycoreCatch::acronym(),
6156 Self::HardRockCatch(_) => HardRockCatch::acronym(),
6157 Self::SuddenDeathCatch(_) => SuddenDeathCatch::acronym(),
6158 Self::PerfectCatch(_) => PerfectCatch::acronym(),
6159 Self::DoubleTimeCatch(_) => DoubleTimeCatch::acronym(),
6160 Self::NightcoreCatch(_) => NightcoreCatch::acronym(),
6161 Self::HiddenCatch(_) => HiddenCatch::acronym(),
6162 Self::FlashlightCatch(_) => FlashlightCatch::acronym(),
6163 Self::AccuracyChallengeCatch(_) => AccuracyChallengeCatch::acronym(),
6164 Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::acronym(),
6165 Self::ClassicCatch(_) => ClassicCatch::acronym(),
6166 Self::MirrorCatch(_) => MirrorCatch::acronym(),
6167 Self::AutoplayCatch(_) => AutoplayCatch::acronym(),
6168 Self::CinemaCatch(_) => CinemaCatch::acronym(),
6169 Self::RelaxCatch(_) => RelaxCatch::acronym(),
6170 Self::WindUpCatch(_) => WindUpCatch::acronym(),
6171 Self::WindDownCatch(_) => WindDownCatch::acronym(),
6172 Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::acronym(),
6173 Self::MutedCatch(_) => MutedCatch::acronym(),
6174 Self::NoScopeCatch(_) => NoScopeCatch::acronym(),
6175 Self::ScoreV2Catch(_) => ScoreV2Catch::acronym(),
6176 Self::EasyMania(_) => EasyMania::acronym(),
6177 Self::NoFailMania(_) => NoFailMania::acronym(),
6178 Self::HalfTimeMania(_) => HalfTimeMania::acronym(),
6179 Self::DaycoreMania(_) => DaycoreMania::acronym(),
6180 Self::NoReleaseMania(_) => NoReleaseMania::acronym(),
6181 Self::HardRockMania(_) => HardRockMania::acronym(),
6182 Self::SuddenDeathMania(_) => SuddenDeathMania::acronym(),
6183 Self::PerfectMania(_) => PerfectMania::acronym(),
6184 Self::DoubleTimeMania(_) => DoubleTimeMania::acronym(),
6185 Self::NightcoreMania(_) => NightcoreMania::acronym(),
6186 Self::FadeInMania(_) => FadeInMania::acronym(),
6187 Self::HiddenMania(_) => HiddenMania::acronym(),
6188 Self::CoverMania(_) => CoverMania::acronym(),
6189 Self::FlashlightMania(_) => FlashlightMania::acronym(),
6190 Self::AccuracyChallengeMania(_) => AccuracyChallengeMania::acronym(),
6191 Self::RandomMania(_) => RandomMania::acronym(),
6192 Self::DualStagesMania(_) => DualStagesMania::acronym(),
6193 Self::MirrorMania(_) => MirrorMania::acronym(),
6194 Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::acronym(),
6195 Self::ClassicMania(_) => ClassicMania::acronym(),
6196 Self::InvertMania(_) => InvertMania::acronym(),
6197 Self::ConstantSpeedMania(_) => ConstantSpeedMania::acronym(),
6198 Self::HoldOffMania(_) => HoldOffMania::acronym(),
6199 Self::OneKeyMania(_) => OneKeyMania::acronym(),
6200 Self::TwoKeysMania(_) => TwoKeysMania::acronym(),
6201 Self::ThreeKeysMania(_) => ThreeKeysMania::acronym(),
6202 Self::FourKeysMania(_) => FourKeysMania::acronym(),
6203 Self::FiveKeysMania(_) => FiveKeysMania::acronym(),
6204 Self::SixKeysMania(_) => SixKeysMania::acronym(),
6205 Self::SevenKeysMania(_) => SevenKeysMania::acronym(),
6206 Self::EightKeysMania(_) => EightKeysMania::acronym(),
6207 Self::NineKeysMania(_) => NineKeysMania::acronym(),
6208 Self::TenKeysMania(_) => TenKeysMania::acronym(),
6209 Self::AutoplayMania(_) => AutoplayMania::acronym(),
6210 Self::CinemaMania(_) => CinemaMania::acronym(),
6211 Self::WindUpMania(_) => WindUpMania::acronym(),
6212 Self::WindDownMania(_) => WindDownMania::acronym(),
6213 Self::MutedMania(_) => MutedMania::acronym(),
6214 Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::acronym(),
6215 Self::ScoreV2Mania(_) => ScoreV2Mania::acronym(),
6216 Self::UnknownOsu(m)
6217 | Self::UnknownTaiko(m)
6218 | Self::UnknownCatch(m)
6219 | Self::UnknownMania(m) => m.acronym(),
6220 }
6221 }
6222 pub fn incompatible_mods(&self) -> Box<[Acronym]> {
6224 match self {
6225 Self::EasyOsu(_) => EasyOsu::incompatible_mods().collect(),
6226 Self::NoFailOsu(_) => NoFailOsu::incompatible_mods().collect(),
6227 Self::HalfTimeOsu(_) => HalfTimeOsu::incompatible_mods().collect(),
6228 Self::DaycoreOsu(_) => DaycoreOsu::incompatible_mods().collect(),
6229 Self::HardRockOsu(_) => HardRockOsu::incompatible_mods().collect(),
6230 Self::SuddenDeathOsu(_) => SuddenDeathOsu::incompatible_mods().collect(),
6231 Self::PerfectOsu(_) => PerfectOsu::incompatible_mods().collect(),
6232 Self::DoubleTimeOsu(_) => DoubleTimeOsu::incompatible_mods().collect(),
6233 Self::NightcoreOsu(_) => NightcoreOsu::incompatible_mods().collect(),
6234 Self::HiddenOsu(_) => HiddenOsu::incompatible_mods().collect(),
6235 Self::FlashlightOsu(_) => FlashlightOsu::incompatible_mods().collect(),
6236 Self::BlindsOsu(_) => BlindsOsu::incompatible_mods().collect(),
6237 Self::StrictTrackingOsu(_) => StrictTrackingOsu::incompatible_mods().collect(),
6238 Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::incompatible_mods().collect(),
6239 Self::TargetPracticeOsu(_) => TargetPracticeOsu::incompatible_mods().collect(),
6240 Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::incompatible_mods().collect(),
6241 Self::ClassicOsu(_) => ClassicOsu::incompatible_mods().collect(),
6242 Self::RandomOsu(_) => RandomOsu::incompatible_mods().collect(),
6243 Self::MirrorOsu(_) => MirrorOsu::incompatible_mods().collect(),
6244 Self::AlternateOsu(_) => AlternateOsu::incompatible_mods().collect(),
6245 Self::SingleTapOsu(_) => SingleTapOsu::incompatible_mods().collect(),
6246 Self::AutoplayOsu(_) => AutoplayOsu::incompatible_mods().collect(),
6247 Self::CinemaOsu(_) => CinemaOsu::incompatible_mods().collect(),
6248 Self::RelaxOsu(_) => RelaxOsu::incompatible_mods().collect(),
6249 Self::AutopilotOsu(_) => AutopilotOsu::incompatible_mods().collect(),
6250 Self::SpunOutOsu(_) => SpunOutOsu::incompatible_mods().collect(),
6251 Self::TransformOsu(_) => TransformOsu::incompatible_mods().collect(),
6252 Self::WiggleOsu(_) => WiggleOsu::incompatible_mods().collect(),
6253 Self::SpinInOsu(_) => SpinInOsu::incompatible_mods().collect(),
6254 Self::GrowOsu(_) => GrowOsu::incompatible_mods().collect(),
6255 Self::DeflateOsu(_) => DeflateOsu::incompatible_mods().collect(),
6256 Self::WindUpOsu(_) => WindUpOsu::incompatible_mods().collect(),
6257 Self::WindDownOsu(_) => WindDownOsu::incompatible_mods().collect(),
6258 Self::TraceableOsu(_) => TraceableOsu::incompatible_mods().collect(),
6259 Self::BarrelRollOsu(_) => BarrelRollOsu::incompatible_mods().collect(),
6260 Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::incompatible_mods().collect(),
6261 Self::MutedOsu(_) => MutedOsu::incompatible_mods().collect(),
6262 Self::NoScopeOsu(_) => NoScopeOsu::incompatible_mods().collect(),
6263 Self::MagnetisedOsu(_) => MagnetisedOsu::incompatible_mods().collect(),
6264 Self::RepelOsu(_) => RepelOsu::incompatible_mods().collect(),
6265 Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::incompatible_mods().collect(),
6266 Self::FreezeFrameOsu(_) => FreezeFrameOsu::incompatible_mods().collect(),
6267 Self::BubblesOsu(_) => BubblesOsu::incompatible_mods().collect(),
6268 Self::SynesthesiaOsu(_) => SynesthesiaOsu::incompatible_mods().collect(),
6269 Self::DepthOsu(_) => DepthOsu::incompatible_mods().collect(),
6270 Self::BloomOsu(_) => BloomOsu::incompatible_mods().collect(),
6271 Self::TouchDeviceOsu(_) => TouchDeviceOsu::incompatible_mods().collect(),
6272 Self::ScoreV2Osu(_) => ScoreV2Osu::incompatible_mods().collect(),
6273 Self::EasyTaiko(_) => EasyTaiko::incompatible_mods().collect(),
6274 Self::NoFailTaiko(_) => NoFailTaiko::incompatible_mods().collect(),
6275 Self::HalfTimeTaiko(_) => HalfTimeTaiko::incompatible_mods().collect(),
6276 Self::DaycoreTaiko(_) => DaycoreTaiko::incompatible_mods().collect(),
6277 Self::HardRockTaiko(_) => HardRockTaiko::incompatible_mods().collect(),
6278 Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::incompatible_mods().collect(),
6279 Self::PerfectTaiko(_) => PerfectTaiko::incompatible_mods().collect(),
6280 Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::incompatible_mods().collect(),
6281 Self::NightcoreTaiko(_) => NightcoreTaiko::incompatible_mods().collect(),
6282 Self::HiddenTaiko(_) => HiddenTaiko::incompatible_mods().collect(),
6283 Self::FlashlightTaiko(_) => FlashlightTaiko::incompatible_mods().collect(),
6284 Self::AccuracyChallengeTaiko(_) => {
6285 AccuracyChallengeTaiko::incompatible_mods().collect()
6286 }
6287 Self::RandomTaiko(_) => RandomTaiko::incompatible_mods().collect(),
6288 Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::incompatible_mods().collect(),
6289 Self::ClassicTaiko(_) => ClassicTaiko::incompatible_mods().collect(),
6290 Self::SwapTaiko(_) => SwapTaiko::incompatible_mods().collect(),
6291 Self::SingleTapTaiko(_) => SingleTapTaiko::incompatible_mods().collect(),
6292 Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::incompatible_mods().collect(),
6293 Self::AutoplayTaiko(_) => AutoplayTaiko::incompatible_mods().collect(),
6294 Self::CinemaTaiko(_) => CinemaTaiko::incompatible_mods().collect(),
6295 Self::RelaxTaiko(_) => RelaxTaiko::incompatible_mods().collect(),
6296 Self::WindUpTaiko(_) => WindUpTaiko::incompatible_mods().collect(),
6297 Self::WindDownTaiko(_) => WindDownTaiko::incompatible_mods().collect(),
6298 Self::MutedTaiko(_) => MutedTaiko::incompatible_mods().collect(),
6299 Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::incompatible_mods().collect(),
6300 Self::ScoreV2Taiko(_) => ScoreV2Taiko::incompatible_mods().collect(),
6301 Self::EasyCatch(_) => EasyCatch::incompatible_mods().collect(),
6302 Self::NoFailCatch(_) => NoFailCatch::incompatible_mods().collect(),
6303 Self::HalfTimeCatch(_) => HalfTimeCatch::incompatible_mods().collect(),
6304 Self::DaycoreCatch(_) => DaycoreCatch::incompatible_mods().collect(),
6305 Self::HardRockCatch(_) => HardRockCatch::incompatible_mods().collect(),
6306 Self::SuddenDeathCatch(_) => SuddenDeathCatch::incompatible_mods().collect(),
6307 Self::PerfectCatch(_) => PerfectCatch::incompatible_mods().collect(),
6308 Self::DoubleTimeCatch(_) => DoubleTimeCatch::incompatible_mods().collect(),
6309 Self::NightcoreCatch(_) => NightcoreCatch::incompatible_mods().collect(),
6310 Self::HiddenCatch(_) => HiddenCatch::incompatible_mods().collect(),
6311 Self::FlashlightCatch(_) => FlashlightCatch::incompatible_mods().collect(),
6312 Self::AccuracyChallengeCatch(_) => {
6313 AccuracyChallengeCatch::incompatible_mods().collect()
6314 }
6315 Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::incompatible_mods().collect(),
6316 Self::ClassicCatch(_) => ClassicCatch::incompatible_mods().collect(),
6317 Self::MirrorCatch(_) => MirrorCatch::incompatible_mods().collect(),
6318 Self::AutoplayCatch(_) => AutoplayCatch::incompatible_mods().collect(),
6319 Self::CinemaCatch(_) => CinemaCatch::incompatible_mods().collect(),
6320 Self::RelaxCatch(_) => RelaxCatch::incompatible_mods().collect(),
6321 Self::WindUpCatch(_) => WindUpCatch::incompatible_mods().collect(),
6322 Self::WindDownCatch(_) => WindDownCatch::incompatible_mods().collect(),
6323 Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::incompatible_mods().collect(),
6324 Self::MutedCatch(_) => MutedCatch::incompatible_mods().collect(),
6325 Self::NoScopeCatch(_) => NoScopeCatch::incompatible_mods().collect(),
6326 Self::ScoreV2Catch(_) => ScoreV2Catch::incompatible_mods().collect(),
6327 Self::EasyMania(_) => EasyMania::incompatible_mods().collect(),
6328 Self::NoFailMania(_) => NoFailMania::incompatible_mods().collect(),
6329 Self::HalfTimeMania(_) => HalfTimeMania::incompatible_mods().collect(),
6330 Self::DaycoreMania(_) => DaycoreMania::incompatible_mods().collect(),
6331 Self::NoReleaseMania(_) => NoReleaseMania::incompatible_mods().collect(),
6332 Self::HardRockMania(_) => HardRockMania::incompatible_mods().collect(),
6333 Self::SuddenDeathMania(_) => SuddenDeathMania::incompatible_mods().collect(),
6334 Self::PerfectMania(_) => PerfectMania::incompatible_mods().collect(),
6335 Self::DoubleTimeMania(_) => DoubleTimeMania::incompatible_mods().collect(),
6336 Self::NightcoreMania(_) => NightcoreMania::incompatible_mods().collect(),
6337 Self::FadeInMania(_) => FadeInMania::incompatible_mods().collect(),
6338 Self::HiddenMania(_) => HiddenMania::incompatible_mods().collect(),
6339 Self::CoverMania(_) => CoverMania::incompatible_mods().collect(),
6340 Self::FlashlightMania(_) => FlashlightMania::incompatible_mods().collect(),
6341 Self::AccuracyChallengeMania(_) => {
6342 AccuracyChallengeMania::incompatible_mods().collect()
6343 }
6344 Self::RandomMania(_) => RandomMania::incompatible_mods().collect(),
6345 Self::DualStagesMania(_) => DualStagesMania::incompatible_mods().collect(),
6346 Self::MirrorMania(_) => MirrorMania::incompatible_mods().collect(),
6347 Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::incompatible_mods().collect(),
6348 Self::ClassicMania(_) => ClassicMania::incompatible_mods().collect(),
6349 Self::InvertMania(_) => InvertMania::incompatible_mods().collect(),
6350 Self::ConstantSpeedMania(_) => ConstantSpeedMania::incompatible_mods().collect(),
6351 Self::HoldOffMania(_) => HoldOffMania::incompatible_mods().collect(),
6352 Self::OneKeyMania(_) => OneKeyMania::incompatible_mods().collect(),
6353 Self::TwoKeysMania(_) => TwoKeysMania::incompatible_mods().collect(),
6354 Self::ThreeKeysMania(_) => ThreeKeysMania::incompatible_mods().collect(),
6355 Self::FourKeysMania(_) => FourKeysMania::incompatible_mods().collect(),
6356 Self::FiveKeysMania(_) => FiveKeysMania::incompatible_mods().collect(),
6357 Self::SixKeysMania(_) => SixKeysMania::incompatible_mods().collect(),
6358 Self::SevenKeysMania(_) => SevenKeysMania::incompatible_mods().collect(),
6359 Self::EightKeysMania(_) => EightKeysMania::incompatible_mods().collect(),
6360 Self::NineKeysMania(_) => NineKeysMania::incompatible_mods().collect(),
6361 Self::TenKeysMania(_) => TenKeysMania::incompatible_mods().collect(),
6362 Self::AutoplayMania(_) => AutoplayMania::incompatible_mods().collect(),
6363 Self::CinemaMania(_) => CinemaMania::incompatible_mods().collect(),
6364 Self::WindUpMania(_) => WindUpMania::incompatible_mods().collect(),
6365 Self::WindDownMania(_) => WindDownMania::incompatible_mods().collect(),
6366 Self::MutedMania(_) => MutedMania::incompatible_mods().collect(),
6367 Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::incompatible_mods().collect(),
6368 Self::ScoreV2Mania(_) => ScoreV2Mania::incompatible_mods().collect(),
6369 _ => UnknownMod::incompatible_mods().collect(),
6370 }
6371 }
6372 pub const fn description(&self) -> &'static str {
6374 match self {
6375 Self::EasyOsu(_) => EasyOsu::description(),
6376 Self::NoFailOsu(_) => NoFailOsu::description(),
6377 Self::HalfTimeOsu(_) => HalfTimeOsu::description(),
6378 Self::DaycoreOsu(_) => DaycoreOsu::description(),
6379 Self::HardRockOsu(_) => HardRockOsu::description(),
6380 Self::SuddenDeathOsu(_) => SuddenDeathOsu::description(),
6381 Self::PerfectOsu(_) => PerfectOsu::description(),
6382 Self::DoubleTimeOsu(_) => DoubleTimeOsu::description(),
6383 Self::NightcoreOsu(_) => NightcoreOsu::description(),
6384 Self::HiddenOsu(_) => HiddenOsu::description(),
6385 Self::FlashlightOsu(_) => FlashlightOsu::description(),
6386 Self::BlindsOsu(_) => BlindsOsu::description(),
6387 Self::StrictTrackingOsu(_) => StrictTrackingOsu::description(),
6388 Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::description(),
6389 Self::TargetPracticeOsu(_) => TargetPracticeOsu::description(),
6390 Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::description(),
6391 Self::ClassicOsu(_) => ClassicOsu::description(),
6392 Self::RandomOsu(_) => RandomOsu::description(),
6393 Self::MirrorOsu(_) => MirrorOsu::description(),
6394 Self::AlternateOsu(_) => AlternateOsu::description(),
6395 Self::SingleTapOsu(_) => SingleTapOsu::description(),
6396 Self::AutoplayOsu(_) => AutoplayOsu::description(),
6397 Self::CinemaOsu(_) => CinemaOsu::description(),
6398 Self::RelaxOsu(_) => RelaxOsu::description(),
6399 Self::AutopilotOsu(_) => AutopilotOsu::description(),
6400 Self::SpunOutOsu(_) => SpunOutOsu::description(),
6401 Self::TransformOsu(_) => TransformOsu::description(),
6402 Self::WiggleOsu(_) => WiggleOsu::description(),
6403 Self::SpinInOsu(_) => SpinInOsu::description(),
6404 Self::GrowOsu(_) => GrowOsu::description(),
6405 Self::DeflateOsu(_) => DeflateOsu::description(),
6406 Self::WindUpOsu(_) => WindUpOsu::description(),
6407 Self::WindDownOsu(_) => WindDownOsu::description(),
6408 Self::TraceableOsu(_) => TraceableOsu::description(),
6409 Self::BarrelRollOsu(_) => BarrelRollOsu::description(),
6410 Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::description(),
6411 Self::MutedOsu(_) => MutedOsu::description(),
6412 Self::NoScopeOsu(_) => NoScopeOsu::description(),
6413 Self::MagnetisedOsu(_) => MagnetisedOsu::description(),
6414 Self::RepelOsu(_) => RepelOsu::description(),
6415 Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::description(),
6416 Self::FreezeFrameOsu(_) => FreezeFrameOsu::description(),
6417 Self::BubblesOsu(_) => BubblesOsu::description(),
6418 Self::SynesthesiaOsu(_) => SynesthesiaOsu::description(),
6419 Self::DepthOsu(_) => DepthOsu::description(),
6420 Self::BloomOsu(_) => BloomOsu::description(),
6421 Self::TouchDeviceOsu(_) => TouchDeviceOsu::description(),
6422 Self::ScoreV2Osu(_) => ScoreV2Osu::description(),
6423 Self::EasyTaiko(_) => EasyTaiko::description(),
6424 Self::NoFailTaiko(_) => NoFailTaiko::description(),
6425 Self::HalfTimeTaiko(_) => HalfTimeTaiko::description(),
6426 Self::DaycoreTaiko(_) => DaycoreTaiko::description(),
6427 Self::HardRockTaiko(_) => HardRockTaiko::description(),
6428 Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::description(),
6429 Self::PerfectTaiko(_) => PerfectTaiko::description(),
6430 Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::description(),
6431 Self::NightcoreTaiko(_) => NightcoreTaiko::description(),
6432 Self::HiddenTaiko(_) => HiddenTaiko::description(),
6433 Self::FlashlightTaiko(_) => FlashlightTaiko::description(),
6434 Self::AccuracyChallengeTaiko(_) => AccuracyChallengeTaiko::description(),
6435 Self::RandomTaiko(_) => RandomTaiko::description(),
6436 Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::description(),
6437 Self::ClassicTaiko(_) => ClassicTaiko::description(),
6438 Self::SwapTaiko(_) => SwapTaiko::description(),
6439 Self::SingleTapTaiko(_) => SingleTapTaiko::description(),
6440 Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::description(),
6441 Self::AutoplayTaiko(_) => AutoplayTaiko::description(),
6442 Self::CinemaTaiko(_) => CinemaTaiko::description(),
6443 Self::RelaxTaiko(_) => RelaxTaiko::description(),
6444 Self::WindUpTaiko(_) => WindUpTaiko::description(),
6445 Self::WindDownTaiko(_) => WindDownTaiko::description(),
6446 Self::MutedTaiko(_) => MutedTaiko::description(),
6447 Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::description(),
6448 Self::ScoreV2Taiko(_) => ScoreV2Taiko::description(),
6449 Self::EasyCatch(_) => EasyCatch::description(),
6450 Self::NoFailCatch(_) => NoFailCatch::description(),
6451 Self::HalfTimeCatch(_) => HalfTimeCatch::description(),
6452 Self::DaycoreCatch(_) => DaycoreCatch::description(),
6453 Self::HardRockCatch(_) => HardRockCatch::description(),
6454 Self::SuddenDeathCatch(_) => SuddenDeathCatch::description(),
6455 Self::PerfectCatch(_) => PerfectCatch::description(),
6456 Self::DoubleTimeCatch(_) => DoubleTimeCatch::description(),
6457 Self::NightcoreCatch(_) => NightcoreCatch::description(),
6458 Self::HiddenCatch(_) => HiddenCatch::description(),
6459 Self::FlashlightCatch(_) => FlashlightCatch::description(),
6460 Self::AccuracyChallengeCatch(_) => AccuracyChallengeCatch::description(),
6461 Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::description(),
6462 Self::ClassicCatch(_) => ClassicCatch::description(),
6463 Self::MirrorCatch(_) => MirrorCatch::description(),
6464 Self::AutoplayCatch(_) => AutoplayCatch::description(),
6465 Self::CinemaCatch(_) => CinemaCatch::description(),
6466 Self::RelaxCatch(_) => RelaxCatch::description(),
6467 Self::WindUpCatch(_) => WindUpCatch::description(),
6468 Self::WindDownCatch(_) => WindDownCatch::description(),
6469 Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::description(),
6470 Self::MutedCatch(_) => MutedCatch::description(),
6471 Self::NoScopeCatch(_) => NoScopeCatch::description(),
6472 Self::ScoreV2Catch(_) => ScoreV2Catch::description(),
6473 Self::EasyMania(_) => EasyMania::description(),
6474 Self::NoFailMania(_) => NoFailMania::description(),
6475 Self::HalfTimeMania(_) => HalfTimeMania::description(),
6476 Self::DaycoreMania(_) => DaycoreMania::description(),
6477 Self::NoReleaseMania(_) => NoReleaseMania::description(),
6478 Self::HardRockMania(_) => HardRockMania::description(),
6479 Self::SuddenDeathMania(_) => SuddenDeathMania::description(),
6480 Self::PerfectMania(_) => PerfectMania::description(),
6481 Self::DoubleTimeMania(_) => DoubleTimeMania::description(),
6482 Self::NightcoreMania(_) => NightcoreMania::description(),
6483 Self::FadeInMania(_) => FadeInMania::description(),
6484 Self::HiddenMania(_) => HiddenMania::description(),
6485 Self::CoverMania(_) => CoverMania::description(),
6486 Self::FlashlightMania(_) => FlashlightMania::description(),
6487 Self::AccuracyChallengeMania(_) => AccuracyChallengeMania::description(),
6488 Self::RandomMania(_) => RandomMania::description(),
6489 Self::DualStagesMania(_) => DualStagesMania::description(),
6490 Self::MirrorMania(_) => MirrorMania::description(),
6491 Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::description(),
6492 Self::ClassicMania(_) => ClassicMania::description(),
6493 Self::InvertMania(_) => InvertMania::description(),
6494 Self::ConstantSpeedMania(_) => ConstantSpeedMania::description(),
6495 Self::HoldOffMania(_) => HoldOffMania::description(),
6496 Self::OneKeyMania(_) => OneKeyMania::description(),
6497 Self::TwoKeysMania(_) => TwoKeysMania::description(),
6498 Self::ThreeKeysMania(_) => ThreeKeysMania::description(),
6499 Self::FourKeysMania(_) => FourKeysMania::description(),
6500 Self::FiveKeysMania(_) => FiveKeysMania::description(),
6501 Self::SixKeysMania(_) => SixKeysMania::description(),
6502 Self::SevenKeysMania(_) => SevenKeysMania::description(),
6503 Self::EightKeysMania(_) => EightKeysMania::description(),
6504 Self::NineKeysMania(_) => NineKeysMania::description(),
6505 Self::TenKeysMania(_) => TenKeysMania::description(),
6506 Self::AutoplayMania(_) => AutoplayMania::description(),
6507 Self::CinemaMania(_) => CinemaMania::description(),
6508 Self::WindUpMania(_) => WindUpMania::description(),
6509 Self::WindDownMania(_) => WindDownMania::description(),
6510 Self::MutedMania(_) => MutedMania::description(),
6511 Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::description(),
6512 Self::ScoreV2Mania(_) => ScoreV2Mania::description(),
6513 _ => UnknownMod::description(),
6514 }
6515 }
6516 pub const fn kind(&self) -> GameModKind {
6518 match self {
6519 Self::EasyOsu(_) => EasyOsu::kind(),
6520 Self::NoFailOsu(_) => NoFailOsu::kind(),
6521 Self::HalfTimeOsu(_) => HalfTimeOsu::kind(),
6522 Self::DaycoreOsu(_) => DaycoreOsu::kind(),
6523 Self::HardRockOsu(_) => HardRockOsu::kind(),
6524 Self::SuddenDeathOsu(_) => SuddenDeathOsu::kind(),
6525 Self::PerfectOsu(_) => PerfectOsu::kind(),
6526 Self::DoubleTimeOsu(_) => DoubleTimeOsu::kind(),
6527 Self::NightcoreOsu(_) => NightcoreOsu::kind(),
6528 Self::HiddenOsu(_) => HiddenOsu::kind(),
6529 Self::FlashlightOsu(_) => FlashlightOsu::kind(),
6530 Self::BlindsOsu(_) => BlindsOsu::kind(),
6531 Self::StrictTrackingOsu(_) => StrictTrackingOsu::kind(),
6532 Self::AccuracyChallengeOsu(_) => AccuracyChallengeOsu::kind(),
6533 Self::TargetPracticeOsu(_) => TargetPracticeOsu::kind(),
6534 Self::DifficultyAdjustOsu(_) => DifficultyAdjustOsu::kind(),
6535 Self::ClassicOsu(_) => ClassicOsu::kind(),
6536 Self::RandomOsu(_) => RandomOsu::kind(),
6537 Self::MirrorOsu(_) => MirrorOsu::kind(),
6538 Self::AlternateOsu(_) => AlternateOsu::kind(),
6539 Self::SingleTapOsu(_) => SingleTapOsu::kind(),
6540 Self::AutoplayOsu(_) => AutoplayOsu::kind(),
6541 Self::CinemaOsu(_) => CinemaOsu::kind(),
6542 Self::RelaxOsu(_) => RelaxOsu::kind(),
6543 Self::AutopilotOsu(_) => AutopilotOsu::kind(),
6544 Self::SpunOutOsu(_) => SpunOutOsu::kind(),
6545 Self::TransformOsu(_) => TransformOsu::kind(),
6546 Self::WiggleOsu(_) => WiggleOsu::kind(),
6547 Self::SpinInOsu(_) => SpinInOsu::kind(),
6548 Self::GrowOsu(_) => GrowOsu::kind(),
6549 Self::DeflateOsu(_) => DeflateOsu::kind(),
6550 Self::WindUpOsu(_) => WindUpOsu::kind(),
6551 Self::WindDownOsu(_) => WindDownOsu::kind(),
6552 Self::TraceableOsu(_) => TraceableOsu::kind(),
6553 Self::BarrelRollOsu(_) => BarrelRollOsu::kind(),
6554 Self::ApproachDifferentOsu(_) => ApproachDifferentOsu::kind(),
6555 Self::MutedOsu(_) => MutedOsu::kind(),
6556 Self::NoScopeOsu(_) => NoScopeOsu::kind(),
6557 Self::MagnetisedOsu(_) => MagnetisedOsu::kind(),
6558 Self::RepelOsu(_) => RepelOsu::kind(),
6559 Self::AdaptiveSpeedOsu(_) => AdaptiveSpeedOsu::kind(),
6560 Self::FreezeFrameOsu(_) => FreezeFrameOsu::kind(),
6561 Self::BubblesOsu(_) => BubblesOsu::kind(),
6562 Self::SynesthesiaOsu(_) => SynesthesiaOsu::kind(),
6563 Self::DepthOsu(_) => DepthOsu::kind(),
6564 Self::BloomOsu(_) => BloomOsu::kind(),
6565 Self::TouchDeviceOsu(_) => TouchDeviceOsu::kind(),
6566 Self::ScoreV2Osu(_) => ScoreV2Osu::kind(),
6567 Self::EasyTaiko(_) => EasyTaiko::kind(),
6568 Self::NoFailTaiko(_) => NoFailTaiko::kind(),
6569 Self::HalfTimeTaiko(_) => HalfTimeTaiko::kind(),
6570 Self::DaycoreTaiko(_) => DaycoreTaiko::kind(),
6571 Self::HardRockTaiko(_) => HardRockTaiko::kind(),
6572 Self::SuddenDeathTaiko(_) => SuddenDeathTaiko::kind(),
6573 Self::PerfectTaiko(_) => PerfectTaiko::kind(),
6574 Self::DoubleTimeTaiko(_) => DoubleTimeTaiko::kind(),
6575 Self::NightcoreTaiko(_) => NightcoreTaiko::kind(),
6576 Self::HiddenTaiko(_) => HiddenTaiko::kind(),
6577 Self::FlashlightTaiko(_) => FlashlightTaiko::kind(),
6578 Self::AccuracyChallengeTaiko(_) => AccuracyChallengeTaiko::kind(),
6579 Self::RandomTaiko(_) => RandomTaiko::kind(),
6580 Self::DifficultyAdjustTaiko(_) => DifficultyAdjustTaiko::kind(),
6581 Self::ClassicTaiko(_) => ClassicTaiko::kind(),
6582 Self::SwapTaiko(_) => SwapTaiko::kind(),
6583 Self::SingleTapTaiko(_) => SingleTapTaiko::kind(),
6584 Self::ConstantSpeedTaiko(_) => ConstantSpeedTaiko::kind(),
6585 Self::AutoplayTaiko(_) => AutoplayTaiko::kind(),
6586 Self::CinemaTaiko(_) => CinemaTaiko::kind(),
6587 Self::RelaxTaiko(_) => RelaxTaiko::kind(),
6588 Self::WindUpTaiko(_) => WindUpTaiko::kind(),
6589 Self::WindDownTaiko(_) => WindDownTaiko::kind(),
6590 Self::MutedTaiko(_) => MutedTaiko::kind(),
6591 Self::AdaptiveSpeedTaiko(_) => AdaptiveSpeedTaiko::kind(),
6592 Self::ScoreV2Taiko(_) => ScoreV2Taiko::kind(),
6593 Self::EasyCatch(_) => EasyCatch::kind(),
6594 Self::NoFailCatch(_) => NoFailCatch::kind(),
6595 Self::HalfTimeCatch(_) => HalfTimeCatch::kind(),
6596 Self::DaycoreCatch(_) => DaycoreCatch::kind(),
6597 Self::HardRockCatch(_) => HardRockCatch::kind(),
6598 Self::SuddenDeathCatch(_) => SuddenDeathCatch::kind(),
6599 Self::PerfectCatch(_) => PerfectCatch::kind(),
6600 Self::DoubleTimeCatch(_) => DoubleTimeCatch::kind(),
6601 Self::NightcoreCatch(_) => NightcoreCatch::kind(),
6602 Self::HiddenCatch(_) => HiddenCatch::kind(),
6603 Self::FlashlightCatch(_) => FlashlightCatch::kind(),
6604 Self::AccuracyChallengeCatch(_) => AccuracyChallengeCatch::kind(),
6605 Self::DifficultyAdjustCatch(_) => DifficultyAdjustCatch::kind(),
6606 Self::ClassicCatch(_) => ClassicCatch::kind(),
6607 Self::MirrorCatch(_) => MirrorCatch::kind(),
6608 Self::AutoplayCatch(_) => AutoplayCatch::kind(),
6609 Self::CinemaCatch(_) => CinemaCatch::kind(),
6610 Self::RelaxCatch(_) => RelaxCatch::kind(),
6611 Self::WindUpCatch(_) => WindUpCatch::kind(),
6612 Self::WindDownCatch(_) => WindDownCatch::kind(),
6613 Self::FloatingFruitsCatch(_) => FloatingFruitsCatch::kind(),
6614 Self::MutedCatch(_) => MutedCatch::kind(),
6615 Self::NoScopeCatch(_) => NoScopeCatch::kind(),
6616 Self::ScoreV2Catch(_) => ScoreV2Catch::kind(),
6617 Self::EasyMania(_) => EasyMania::kind(),
6618 Self::NoFailMania(_) => NoFailMania::kind(),
6619 Self::HalfTimeMania(_) => HalfTimeMania::kind(),
6620 Self::DaycoreMania(_) => DaycoreMania::kind(),
6621 Self::NoReleaseMania(_) => NoReleaseMania::kind(),
6622 Self::HardRockMania(_) => HardRockMania::kind(),
6623 Self::SuddenDeathMania(_) => SuddenDeathMania::kind(),
6624 Self::PerfectMania(_) => PerfectMania::kind(),
6625 Self::DoubleTimeMania(_) => DoubleTimeMania::kind(),
6626 Self::NightcoreMania(_) => NightcoreMania::kind(),
6627 Self::FadeInMania(_) => FadeInMania::kind(),
6628 Self::HiddenMania(_) => HiddenMania::kind(),
6629 Self::CoverMania(_) => CoverMania::kind(),
6630 Self::FlashlightMania(_) => FlashlightMania::kind(),
6631 Self::AccuracyChallengeMania(_) => AccuracyChallengeMania::kind(),
6632 Self::RandomMania(_) => RandomMania::kind(),
6633 Self::DualStagesMania(_) => DualStagesMania::kind(),
6634 Self::MirrorMania(_) => MirrorMania::kind(),
6635 Self::DifficultyAdjustMania(_) => DifficultyAdjustMania::kind(),
6636 Self::ClassicMania(_) => ClassicMania::kind(),
6637 Self::InvertMania(_) => InvertMania::kind(),
6638 Self::ConstantSpeedMania(_) => ConstantSpeedMania::kind(),
6639 Self::HoldOffMania(_) => HoldOffMania::kind(),
6640 Self::OneKeyMania(_) => OneKeyMania::kind(),
6641 Self::TwoKeysMania(_) => TwoKeysMania::kind(),
6642 Self::ThreeKeysMania(_) => ThreeKeysMania::kind(),
6643 Self::FourKeysMania(_) => FourKeysMania::kind(),
6644 Self::FiveKeysMania(_) => FiveKeysMania::kind(),
6645 Self::SixKeysMania(_) => SixKeysMania::kind(),
6646 Self::SevenKeysMania(_) => SevenKeysMania::kind(),
6647 Self::EightKeysMania(_) => EightKeysMania::kind(),
6648 Self::NineKeysMania(_) => NineKeysMania::kind(),
6649 Self::TenKeysMania(_) => TenKeysMania::kind(),
6650 Self::AutoplayMania(_) => AutoplayMania::kind(),
6651 Self::CinemaMania(_) => CinemaMania::kind(),
6652 Self::WindUpMania(_) => WindUpMania::kind(),
6653 Self::WindDownMania(_) => WindDownMania::kind(),
6654 Self::MutedMania(_) => MutedMania::kind(),
6655 Self::AdaptiveSpeedMania(_) => AdaptiveSpeedMania::kind(),
6656 Self::ScoreV2Mania(_) => ScoreV2Mania::kind(),
6657 _ => UnknownMod::kind(),
6658 }
6659 }
6660 pub const fn bits(&self) -> Option<u32> {
6664 match self {
6665 Self::EasyOsu(_) => Some(EasyOsu::bits()),
6666 Self::NoFailOsu(_) => Some(NoFailOsu::bits()),
6667 Self::HalfTimeOsu(_) => Some(HalfTimeOsu::bits()),
6668 Self::HardRockOsu(_) => Some(HardRockOsu::bits()),
6669 Self::SuddenDeathOsu(_) => Some(SuddenDeathOsu::bits()),
6670 Self::PerfectOsu(_) => Some(PerfectOsu::bits()),
6671 Self::DoubleTimeOsu(_) => Some(DoubleTimeOsu::bits()),
6672 Self::NightcoreOsu(_) => Some(NightcoreOsu::bits()),
6673 Self::HiddenOsu(_) => Some(HiddenOsu::bits()),
6674 Self::FlashlightOsu(_) => Some(FlashlightOsu::bits()),
6675 Self::TargetPracticeOsu(_) => Some(TargetPracticeOsu::bits()),
6676 Self::RandomOsu(_) => Some(RandomOsu::bits()),
6677 Self::MirrorOsu(_) => Some(MirrorOsu::bits()),
6678 Self::AutoplayOsu(_) => Some(AutoplayOsu::bits()),
6679 Self::CinemaOsu(_) => Some(CinemaOsu::bits()),
6680 Self::RelaxOsu(_) => Some(RelaxOsu::bits()),
6681 Self::AutopilotOsu(_) => Some(AutopilotOsu::bits()),
6682 Self::SpunOutOsu(_) => Some(SpunOutOsu::bits()),
6683 Self::TouchDeviceOsu(_) => Some(TouchDeviceOsu::bits()),
6684 Self::ScoreV2Osu(_) => Some(ScoreV2Osu::bits()),
6685 Self::EasyTaiko(_) => Some(EasyTaiko::bits()),
6686 Self::NoFailTaiko(_) => Some(NoFailTaiko::bits()),
6687 Self::HalfTimeTaiko(_) => Some(HalfTimeTaiko::bits()),
6688 Self::HardRockTaiko(_) => Some(HardRockTaiko::bits()),
6689 Self::SuddenDeathTaiko(_) => Some(SuddenDeathTaiko::bits()),
6690 Self::PerfectTaiko(_) => Some(PerfectTaiko::bits()),
6691 Self::DoubleTimeTaiko(_) => Some(DoubleTimeTaiko::bits()),
6692 Self::NightcoreTaiko(_) => Some(NightcoreTaiko::bits()),
6693 Self::HiddenTaiko(_) => Some(HiddenTaiko::bits()),
6694 Self::FlashlightTaiko(_) => Some(FlashlightTaiko::bits()),
6695 Self::RandomTaiko(_) => Some(RandomTaiko::bits()),
6696 Self::AutoplayTaiko(_) => Some(AutoplayTaiko::bits()),
6697 Self::CinemaTaiko(_) => Some(CinemaTaiko::bits()),
6698 Self::RelaxTaiko(_) => Some(RelaxTaiko::bits()),
6699 Self::ScoreV2Taiko(_) => Some(ScoreV2Taiko::bits()),
6700 Self::EasyCatch(_) => Some(EasyCatch::bits()),
6701 Self::NoFailCatch(_) => Some(NoFailCatch::bits()),
6702 Self::HalfTimeCatch(_) => Some(HalfTimeCatch::bits()),
6703 Self::HardRockCatch(_) => Some(HardRockCatch::bits()),
6704 Self::SuddenDeathCatch(_) => Some(SuddenDeathCatch::bits()),
6705 Self::PerfectCatch(_) => Some(PerfectCatch::bits()),
6706 Self::DoubleTimeCatch(_) => Some(DoubleTimeCatch::bits()),
6707 Self::NightcoreCatch(_) => Some(NightcoreCatch::bits()),
6708 Self::HiddenCatch(_) => Some(HiddenCatch::bits()),
6709 Self::FlashlightCatch(_) => Some(FlashlightCatch::bits()),
6710 Self::MirrorCatch(_) => Some(MirrorCatch::bits()),
6711 Self::AutoplayCatch(_) => Some(AutoplayCatch::bits()),
6712 Self::CinemaCatch(_) => Some(CinemaCatch::bits()),
6713 Self::RelaxCatch(_) => Some(RelaxCatch::bits()),
6714 Self::ScoreV2Catch(_) => Some(ScoreV2Catch::bits()),
6715 Self::EasyMania(_) => Some(EasyMania::bits()),
6716 Self::NoFailMania(_) => Some(NoFailMania::bits()),
6717 Self::HalfTimeMania(_) => Some(HalfTimeMania::bits()),
6718 Self::HardRockMania(_) => Some(HardRockMania::bits()),
6719 Self::SuddenDeathMania(_) => Some(SuddenDeathMania::bits()),
6720 Self::PerfectMania(_) => Some(PerfectMania::bits()),
6721 Self::DoubleTimeMania(_) => Some(DoubleTimeMania::bits()),
6722 Self::NightcoreMania(_) => Some(NightcoreMania::bits()),
6723 Self::FadeInMania(_) => Some(FadeInMania::bits()),
6724 Self::HiddenMania(_) => Some(HiddenMania::bits()),
6725 Self::FlashlightMania(_) => Some(FlashlightMania::bits()),
6726 Self::RandomMania(_) => Some(RandomMania::bits()),
6727 Self::DualStagesMania(_) => Some(DualStagesMania::bits()),
6728 Self::MirrorMania(_) => Some(MirrorMania::bits()),
6729 Self::OneKeyMania(_) => Some(OneKeyMania::bits()),
6730 Self::TwoKeysMania(_) => Some(TwoKeysMania::bits()),
6731 Self::ThreeKeysMania(_) => Some(ThreeKeysMania::bits()),
6732 Self::FourKeysMania(_) => Some(FourKeysMania::bits()),
6733 Self::FiveKeysMania(_) => Some(FiveKeysMania::bits()),
6734 Self::SixKeysMania(_) => Some(SixKeysMania::bits()),
6735 Self::SevenKeysMania(_) => Some(SevenKeysMania::bits()),
6736 Self::EightKeysMania(_) => Some(EightKeysMania::bits()),
6737 Self::NineKeysMania(_) => Some(NineKeysMania::bits()),
6738 Self::AutoplayMania(_) => Some(AutoplayMania::bits()),
6739 Self::CinemaMania(_) => Some(CinemaMania::bits()),
6740 Self::ScoreV2Mania(_) => Some(ScoreV2Mania::bits()),
6741 _ => None,
6742 }
6743 }
6744 pub const fn mode(&self) -> GameMode {
6746 match self {
6747 Self::EasyOsu(_)
6748 | Self::NoFailOsu(_)
6749 | Self::HalfTimeOsu(_)
6750 | Self::DaycoreOsu(_)
6751 | Self::HardRockOsu(_)
6752 | Self::SuddenDeathOsu(_)
6753 | Self::PerfectOsu(_)
6754 | Self::DoubleTimeOsu(_)
6755 | Self::NightcoreOsu(_)
6756 | Self::HiddenOsu(_)
6757 | Self::FlashlightOsu(_)
6758 | Self::BlindsOsu(_)
6759 | Self::StrictTrackingOsu(_)
6760 | Self::AccuracyChallengeOsu(_)
6761 | Self::TargetPracticeOsu(_)
6762 | Self::DifficultyAdjustOsu(_)
6763 | Self::ClassicOsu(_)
6764 | Self::RandomOsu(_)
6765 | Self::MirrorOsu(_)
6766 | Self::AlternateOsu(_)
6767 | Self::SingleTapOsu(_)
6768 | Self::AutoplayOsu(_)
6769 | Self::CinemaOsu(_)
6770 | Self::RelaxOsu(_)
6771 | Self::AutopilotOsu(_)
6772 | Self::SpunOutOsu(_)
6773 | Self::TransformOsu(_)
6774 | Self::WiggleOsu(_)
6775 | Self::SpinInOsu(_)
6776 | Self::GrowOsu(_)
6777 | Self::DeflateOsu(_)
6778 | Self::WindUpOsu(_)
6779 | Self::WindDownOsu(_)
6780 | Self::TraceableOsu(_)
6781 | Self::BarrelRollOsu(_)
6782 | Self::ApproachDifferentOsu(_)
6783 | Self::MutedOsu(_)
6784 | Self::NoScopeOsu(_)
6785 | Self::MagnetisedOsu(_)
6786 | Self::RepelOsu(_)
6787 | Self::AdaptiveSpeedOsu(_)
6788 | Self::FreezeFrameOsu(_)
6789 | Self::BubblesOsu(_)
6790 | Self::SynesthesiaOsu(_)
6791 | Self::DepthOsu(_)
6792 | Self::BloomOsu(_)
6793 | Self::TouchDeviceOsu(_)
6794 | Self::ScoreV2Osu(_)
6795 | Self::UnknownOsu(_) => GameMode::Osu,
6796 Self::EasyTaiko(_)
6797 | Self::NoFailTaiko(_)
6798 | Self::HalfTimeTaiko(_)
6799 | Self::DaycoreTaiko(_)
6800 | Self::HardRockTaiko(_)
6801 | Self::SuddenDeathTaiko(_)
6802 | Self::PerfectTaiko(_)
6803 | Self::DoubleTimeTaiko(_)
6804 | Self::NightcoreTaiko(_)
6805 | Self::HiddenTaiko(_)
6806 | Self::FlashlightTaiko(_)
6807 | Self::AccuracyChallengeTaiko(_)
6808 | Self::RandomTaiko(_)
6809 | Self::DifficultyAdjustTaiko(_)
6810 | Self::ClassicTaiko(_)
6811 | Self::SwapTaiko(_)
6812 | Self::SingleTapTaiko(_)
6813 | Self::ConstantSpeedTaiko(_)
6814 | Self::AutoplayTaiko(_)
6815 | Self::CinemaTaiko(_)
6816 | Self::RelaxTaiko(_)
6817 | Self::WindUpTaiko(_)
6818 | Self::WindDownTaiko(_)
6819 | Self::MutedTaiko(_)
6820 | Self::AdaptiveSpeedTaiko(_)
6821 | Self::ScoreV2Taiko(_)
6822 | Self::UnknownTaiko(_) => GameMode::Taiko,
6823 Self::EasyCatch(_)
6824 | Self::NoFailCatch(_)
6825 | Self::HalfTimeCatch(_)
6826 | Self::DaycoreCatch(_)
6827 | Self::HardRockCatch(_)
6828 | Self::SuddenDeathCatch(_)
6829 | Self::PerfectCatch(_)
6830 | Self::DoubleTimeCatch(_)
6831 | Self::NightcoreCatch(_)
6832 | Self::HiddenCatch(_)
6833 | Self::FlashlightCatch(_)
6834 | Self::AccuracyChallengeCatch(_)
6835 | Self::DifficultyAdjustCatch(_)
6836 | Self::ClassicCatch(_)
6837 | Self::MirrorCatch(_)
6838 | Self::AutoplayCatch(_)
6839 | Self::CinemaCatch(_)
6840 | Self::RelaxCatch(_)
6841 | Self::WindUpCatch(_)
6842 | Self::WindDownCatch(_)
6843 | Self::FloatingFruitsCatch(_)
6844 | Self::MutedCatch(_)
6845 | Self::NoScopeCatch(_)
6846 | Self::ScoreV2Catch(_)
6847 | Self::UnknownCatch(_) => GameMode::Catch,
6848 Self::EasyMania(_)
6849 | Self::NoFailMania(_)
6850 | Self::HalfTimeMania(_)
6851 | Self::DaycoreMania(_)
6852 | Self::NoReleaseMania(_)
6853 | Self::HardRockMania(_)
6854 | Self::SuddenDeathMania(_)
6855 | Self::PerfectMania(_)
6856 | Self::DoubleTimeMania(_)
6857 | Self::NightcoreMania(_)
6858 | Self::FadeInMania(_)
6859 | Self::HiddenMania(_)
6860 | Self::CoverMania(_)
6861 | Self::FlashlightMania(_)
6862 | Self::AccuracyChallengeMania(_)
6863 | Self::RandomMania(_)
6864 | Self::DualStagesMania(_)
6865 | Self::MirrorMania(_)
6866 | Self::DifficultyAdjustMania(_)
6867 | Self::ClassicMania(_)
6868 | Self::InvertMania(_)
6869 | Self::ConstantSpeedMania(_)
6870 | Self::HoldOffMania(_)
6871 | Self::OneKeyMania(_)
6872 | Self::TwoKeysMania(_)
6873 | Self::ThreeKeysMania(_)
6874 | Self::FourKeysMania(_)
6875 | Self::FiveKeysMania(_)
6876 | Self::SixKeysMania(_)
6877 | Self::SevenKeysMania(_)
6878 | Self::EightKeysMania(_)
6879 | Self::NineKeysMania(_)
6880 | Self::TenKeysMania(_)
6881 | Self::AutoplayMania(_)
6882 | Self::CinemaMania(_)
6883 | Self::WindUpMania(_)
6884 | Self::WindDownMania(_)
6885 | Self::MutedMania(_)
6886 | Self::AdaptiveSpeedMania(_)
6887 | Self::ScoreV2Mania(_)
6888 | Self::UnknownMania(_) => GameMode::Mania,
6889 }
6890 }
6891 pub const fn intermode(&self) -> GameModIntermode {
6893 match self {
6894 Self::EasyOsu(_) => GameModIntermode::Easy,
6895 Self::NoFailOsu(_) => GameModIntermode::NoFail,
6896 Self::HalfTimeOsu(_) => GameModIntermode::HalfTime,
6897 Self::DaycoreOsu(_) => GameModIntermode::Daycore,
6898 Self::HardRockOsu(_) => GameModIntermode::HardRock,
6899 Self::SuddenDeathOsu(_) => GameModIntermode::SuddenDeath,
6900 Self::PerfectOsu(_) => GameModIntermode::Perfect,
6901 Self::DoubleTimeOsu(_) => GameModIntermode::DoubleTime,
6902 Self::NightcoreOsu(_) => GameModIntermode::Nightcore,
6903 Self::HiddenOsu(_) => GameModIntermode::Hidden,
6904 Self::FlashlightOsu(_) => GameModIntermode::Flashlight,
6905 Self::BlindsOsu(_) => GameModIntermode::Blinds,
6906 Self::StrictTrackingOsu(_) => GameModIntermode::StrictTracking,
6907 Self::AccuracyChallengeOsu(_) => GameModIntermode::AccuracyChallenge,
6908 Self::TargetPracticeOsu(_) => GameModIntermode::TargetPractice,
6909 Self::DifficultyAdjustOsu(_) => GameModIntermode::DifficultyAdjust,
6910 Self::ClassicOsu(_) => GameModIntermode::Classic,
6911 Self::RandomOsu(_) => GameModIntermode::Random,
6912 Self::MirrorOsu(_) => GameModIntermode::Mirror,
6913 Self::AlternateOsu(_) => GameModIntermode::Alternate,
6914 Self::SingleTapOsu(_) => GameModIntermode::SingleTap,
6915 Self::AutoplayOsu(_) => GameModIntermode::Autoplay,
6916 Self::CinemaOsu(_) => GameModIntermode::Cinema,
6917 Self::RelaxOsu(_) => GameModIntermode::Relax,
6918 Self::AutopilotOsu(_) => GameModIntermode::Autopilot,
6919 Self::SpunOutOsu(_) => GameModIntermode::SpunOut,
6920 Self::TransformOsu(_) => GameModIntermode::Transform,
6921 Self::WiggleOsu(_) => GameModIntermode::Wiggle,
6922 Self::SpinInOsu(_) => GameModIntermode::SpinIn,
6923 Self::GrowOsu(_) => GameModIntermode::Grow,
6924 Self::DeflateOsu(_) => GameModIntermode::Deflate,
6925 Self::WindUpOsu(_) => GameModIntermode::WindUp,
6926 Self::WindDownOsu(_) => GameModIntermode::WindDown,
6927 Self::TraceableOsu(_) => GameModIntermode::Traceable,
6928 Self::BarrelRollOsu(_) => GameModIntermode::BarrelRoll,
6929 Self::ApproachDifferentOsu(_) => GameModIntermode::ApproachDifferent,
6930 Self::MutedOsu(_) => GameModIntermode::Muted,
6931 Self::NoScopeOsu(_) => GameModIntermode::NoScope,
6932 Self::MagnetisedOsu(_) => GameModIntermode::Magnetised,
6933 Self::RepelOsu(_) => GameModIntermode::Repel,
6934 Self::AdaptiveSpeedOsu(_) => GameModIntermode::AdaptiveSpeed,
6935 Self::FreezeFrameOsu(_) => GameModIntermode::FreezeFrame,
6936 Self::BubblesOsu(_) => GameModIntermode::Bubbles,
6937 Self::SynesthesiaOsu(_) => GameModIntermode::Synesthesia,
6938 Self::DepthOsu(_) => GameModIntermode::Depth,
6939 Self::BloomOsu(_) => GameModIntermode::Bloom,
6940 Self::TouchDeviceOsu(_) => GameModIntermode::TouchDevice,
6941 Self::ScoreV2Osu(_) => GameModIntermode::ScoreV2,
6942 Self::EasyTaiko(_) => GameModIntermode::Easy,
6943 Self::NoFailTaiko(_) => GameModIntermode::NoFail,
6944 Self::HalfTimeTaiko(_) => GameModIntermode::HalfTime,
6945 Self::DaycoreTaiko(_) => GameModIntermode::Daycore,
6946 Self::HardRockTaiko(_) => GameModIntermode::HardRock,
6947 Self::SuddenDeathTaiko(_) => GameModIntermode::SuddenDeath,
6948 Self::PerfectTaiko(_) => GameModIntermode::Perfect,
6949 Self::DoubleTimeTaiko(_) => GameModIntermode::DoubleTime,
6950 Self::NightcoreTaiko(_) => GameModIntermode::Nightcore,
6951 Self::HiddenTaiko(_) => GameModIntermode::Hidden,
6952 Self::FlashlightTaiko(_) => GameModIntermode::Flashlight,
6953 Self::AccuracyChallengeTaiko(_) => GameModIntermode::AccuracyChallenge,
6954 Self::RandomTaiko(_) => GameModIntermode::Random,
6955 Self::DifficultyAdjustTaiko(_) => GameModIntermode::DifficultyAdjust,
6956 Self::ClassicTaiko(_) => GameModIntermode::Classic,
6957 Self::SwapTaiko(_) => GameModIntermode::Swap,
6958 Self::SingleTapTaiko(_) => GameModIntermode::SingleTap,
6959 Self::ConstantSpeedTaiko(_) => GameModIntermode::ConstantSpeed,
6960 Self::AutoplayTaiko(_) => GameModIntermode::Autoplay,
6961 Self::CinemaTaiko(_) => GameModIntermode::Cinema,
6962 Self::RelaxTaiko(_) => GameModIntermode::Relax,
6963 Self::WindUpTaiko(_) => GameModIntermode::WindUp,
6964 Self::WindDownTaiko(_) => GameModIntermode::WindDown,
6965 Self::MutedTaiko(_) => GameModIntermode::Muted,
6966 Self::AdaptiveSpeedTaiko(_) => GameModIntermode::AdaptiveSpeed,
6967 Self::ScoreV2Taiko(_) => GameModIntermode::ScoreV2,
6968 Self::EasyCatch(_) => GameModIntermode::Easy,
6969 Self::NoFailCatch(_) => GameModIntermode::NoFail,
6970 Self::HalfTimeCatch(_) => GameModIntermode::HalfTime,
6971 Self::DaycoreCatch(_) => GameModIntermode::Daycore,
6972 Self::HardRockCatch(_) => GameModIntermode::HardRock,
6973 Self::SuddenDeathCatch(_) => GameModIntermode::SuddenDeath,
6974 Self::PerfectCatch(_) => GameModIntermode::Perfect,
6975 Self::DoubleTimeCatch(_) => GameModIntermode::DoubleTime,
6976 Self::NightcoreCatch(_) => GameModIntermode::Nightcore,
6977 Self::HiddenCatch(_) => GameModIntermode::Hidden,
6978 Self::FlashlightCatch(_) => GameModIntermode::Flashlight,
6979 Self::AccuracyChallengeCatch(_) => GameModIntermode::AccuracyChallenge,
6980 Self::DifficultyAdjustCatch(_) => GameModIntermode::DifficultyAdjust,
6981 Self::ClassicCatch(_) => GameModIntermode::Classic,
6982 Self::MirrorCatch(_) => GameModIntermode::Mirror,
6983 Self::AutoplayCatch(_) => GameModIntermode::Autoplay,
6984 Self::CinemaCatch(_) => GameModIntermode::Cinema,
6985 Self::RelaxCatch(_) => GameModIntermode::Relax,
6986 Self::WindUpCatch(_) => GameModIntermode::WindUp,
6987 Self::WindDownCatch(_) => GameModIntermode::WindDown,
6988 Self::FloatingFruitsCatch(_) => GameModIntermode::FloatingFruits,
6989 Self::MutedCatch(_) => GameModIntermode::Muted,
6990 Self::NoScopeCatch(_) => GameModIntermode::NoScope,
6991 Self::ScoreV2Catch(_) => GameModIntermode::ScoreV2,
6992 Self::EasyMania(_) => GameModIntermode::Easy,
6993 Self::NoFailMania(_) => GameModIntermode::NoFail,
6994 Self::HalfTimeMania(_) => GameModIntermode::HalfTime,
6995 Self::DaycoreMania(_) => GameModIntermode::Daycore,
6996 Self::NoReleaseMania(_) => GameModIntermode::NoRelease,
6997 Self::HardRockMania(_) => GameModIntermode::HardRock,
6998 Self::SuddenDeathMania(_) => GameModIntermode::SuddenDeath,
6999 Self::PerfectMania(_) => GameModIntermode::Perfect,
7000 Self::DoubleTimeMania(_) => GameModIntermode::DoubleTime,
7001 Self::NightcoreMania(_) => GameModIntermode::Nightcore,
7002 Self::FadeInMania(_) => GameModIntermode::FadeIn,
7003 Self::HiddenMania(_) => GameModIntermode::Hidden,
7004 Self::CoverMania(_) => GameModIntermode::Cover,
7005 Self::FlashlightMania(_) => GameModIntermode::Flashlight,
7006 Self::AccuracyChallengeMania(_) => GameModIntermode::AccuracyChallenge,
7007 Self::RandomMania(_) => GameModIntermode::Random,
7008 Self::DualStagesMania(_) => GameModIntermode::DualStages,
7009 Self::MirrorMania(_) => GameModIntermode::Mirror,
7010 Self::DifficultyAdjustMania(_) => GameModIntermode::DifficultyAdjust,
7011 Self::ClassicMania(_) => GameModIntermode::Classic,
7012 Self::InvertMania(_) => GameModIntermode::Invert,
7013 Self::ConstantSpeedMania(_) => GameModIntermode::ConstantSpeed,
7014 Self::HoldOffMania(_) => GameModIntermode::HoldOff,
7015 Self::OneKeyMania(_) => GameModIntermode::OneKey,
7016 Self::TwoKeysMania(_) => GameModIntermode::TwoKeys,
7017 Self::ThreeKeysMania(_) => GameModIntermode::ThreeKeys,
7018 Self::FourKeysMania(_) => GameModIntermode::FourKeys,
7019 Self::FiveKeysMania(_) => GameModIntermode::FiveKeys,
7020 Self::SixKeysMania(_) => GameModIntermode::SixKeys,
7021 Self::SevenKeysMania(_) => GameModIntermode::SevenKeys,
7022 Self::EightKeysMania(_) => GameModIntermode::EightKeys,
7023 Self::NineKeysMania(_) => GameModIntermode::NineKeys,
7024 Self::TenKeysMania(_) => GameModIntermode::TenKeys,
7025 Self::AutoplayMania(_) => GameModIntermode::Autoplay,
7026 Self::CinemaMania(_) => GameModIntermode::Cinema,
7027 Self::WindUpMania(_) => GameModIntermode::WindUp,
7028 Self::WindDownMania(_) => GameModIntermode::WindDown,
7029 Self::MutedMania(_) => GameModIntermode::Muted,
7030 Self::AdaptiveSpeedMania(_) => GameModIntermode::AdaptiveSpeed,
7031 Self::ScoreV2Mania(_) => GameModIntermode::ScoreV2,
7032 Self::UnknownOsu(m)
7033 | Self::UnknownTaiko(m)
7034 | Self::UnknownCatch(m)
7035 | Self::UnknownMania(m) => GameModIntermode::Unknown(*m),
7036 }
7037 }
7038}
7039impl PartialOrd for GameMod {
7040 fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
7041 self.bits()
7042 .zip(other.bits())
7043 .map(|(self_bits, other_bits)| self_bits.cmp(&other_bits))
7044 }
7045}
7046#[cfg(feature = "serde")]
7047#[cfg_attr(all(docsrs, not(doctest)), doc(cfg(feature = "serde")))]
7048const _: () = {
7049 use serde::{
7050 de::{
7051 value::MapAccessDeserializer, DeserializeSeed, Deserializer, Error as DeError,
7052 IgnoredAny, MapAccess, Visitor,
7053 },
7054 ser::{Serialize, SerializeMap, Serializer},
7055 Deserialize,
7056 };
7057
7058 use crate::serde::{
7059 DeserializedGameMod, GameModRaw, GameModRawSeed, GameModSettings, GameModSettingsSeed,
7060 GameModVisitor, MaybeOwnedStr,
7061 };
7062
7063 impl<'de> Visitor<'de> for GameModVisitor<EasyOsu> {
7064 type Value = DeserializedGameMod<'de, EasyOsu>;
7065 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7066 f.write_str("EasyOsu")
7067 }
7068 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7069 const FIELDS: &'static [&'static str] = &["retries"];
7070 let mut unknown_key__ = None;
7071 let mut retries = None;
7072 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7073 match key.as_str() {
7074 "retries" => retries = Some(map.next_value()?),
7075 _ => {
7076 unknown_key__ = Some(key);
7077 let _: IgnoredAny = map.next_value()?;
7078 }
7079 }
7080 }
7081 let gamemod = EasyOsu {
7082 retries: retries.unwrap_or_default(),
7083 };
7084 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7085 }
7086 }
7087 impl Serialize for EasyOsu {
7088 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7089 let field_count = self.retries.is_some() as usize;
7090 let mut map = s.serialize_map(Some(field_count))?;
7091 if let Some(ref x) = self.retries {
7092 map.serialize_entry("retries", x)?;
7093 }
7094 map.end()
7095 }
7096 }
7097 impl<'de> Visitor<'de> for GameModVisitor<NoFailOsu> {
7098 type Value = DeserializedGameMod<'de, NoFailOsu>;
7099 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7100 f.write_str("NoFailOsu")
7101 }
7102 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7103 const FIELDS: &'static [&'static str] = &[];
7104 let mut unknown_key__ = None;
7105 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7106 match key.as_str() {
7107 _ => {
7108 unknown_key__ = Some(key);
7109 let _: IgnoredAny = map.next_value()?;
7110 }
7111 }
7112 }
7113 let gamemod = NoFailOsu {};
7114 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7115 }
7116 }
7117 impl Serialize for NoFailOsu {
7118 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7119 let field_count = 0;
7120 let map = s.serialize_map(Some(field_count))?;
7121 map.end()
7122 }
7123 }
7124 impl<'de> Visitor<'de> for GameModVisitor<HalfTimeOsu> {
7125 type Value = DeserializedGameMod<'de, HalfTimeOsu>;
7126 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7127 f.write_str("HalfTimeOsu")
7128 }
7129 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7130 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
7131 let mut unknown_key__ = None;
7132 let mut speed_change = None;
7133 let mut adjust_pitch = None;
7134 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7135 match key.as_str() {
7136 "speed_change" => speed_change = Some(map.next_value()?),
7137 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
7138 _ => {
7139 unknown_key__ = Some(key);
7140 let _: IgnoredAny = map.next_value()?;
7141 }
7142 }
7143 }
7144 let gamemod = HalfTimeOsu {
7145 speed_change: speed_change.unwrap_or_default(),
7146 adjust_pitch: adjust_pitch.unwrap_or_default(),
7147 };
7148 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7149 }
7150 }
7151 impl Serialize for HalfTimeOsu {
7152 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7153 let field_count =
7154 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
7155 let mut map = s.serialize_map(Some(field_count))?;
7156 if let Some(ref x) = self.speed_change {
7157 map.serialize_entry("speed_change", x)?;
7158 }
7159 if let Some(ref x) = self.adjust_pitch {
7160 map.serialize_entry("adjust_pitch", x)?;
7161 }
7162 map.end()
7163 }
7164 }
7165 impl<'de> Visitor<'de> for GameModVisitor<DaycoreOsu> {
7166 type Value = DeserializedGameMod<'de, DaycoreOsu>;
7167 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7168 f.write_str("DaycoreOsu")
7169 }
7170 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7171 const FIELDS: &'static [&'static str] = &["speed_change"];
7172 let mut unknown_key__ = None;
7173 let mut speed_change = None;
7174 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7175 match key.as_str() {
7176 "speed_change" => speed_change = Some(map.next_value()?),
7177 _ => {
7178 unknown_key__ = Some(key);
7179 let _: IgnoredAny = map.next_value()?;
7180 }
7181 }
7182 }
7183 let gamemod = DaycoreOsu {
7184 speed_change: speed_change.unwrap_or_default(),
7185 };
7186 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7187 }
7188 }
7189 impl Serialize for DaycoreOsu {
7190 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7191 let field_count = self.speed_change.is_some() as usize;
7192 let mut map = s.serialize_map(Some(field_count))?;
7193 if let Some(ref x) = self.speed_change {
7194 map.serialize_entry("speed_change", x)?;
7195 }
7196 map.end()
7197 }
7198 }
7199 impl<'de> Visitor<'de> for GameModVisitor<HardRockOsu> {
7200 type Value = DeserializedGameMod<'de, HardRockOsu>;
7201 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7202 f.write_str("HardRockOsu")
7203 }
7204 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7205 const FIELDS: &'static [&'static str] = &[];
7206 let mut unknown_key__ = None;
7207 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7208 match key.as_str() {
7209 _ => {
7210 unknown_key__ = Some(key);
7211 let _: IgnoredAny = map.next_value()?;
7212 }
7213 }
7214 }
7215 let gamemod = HardRockOsu {};
7216 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7217 }
7218 }
7219 impl Serialize for HardRockOsu {
7220 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7221 let field_count = 0;
7222 let map = s.serialize_map(Some(field_count))?;
7223 map.end()
7224 }
7225 }
7226 impl<'de> Visitor<'de> for GameModVisitor<SuddenDeathOsu> {
7227 type Value = DeserializedGameMod<'de, SuddenDeathOsu>;
7228 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7229 f.write_str("SuddenDeathOsu")
7230 }
7231 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7232 const FIELDS: &'static [&'static str] = &["fail_on_slider_tail", "restart"];
7233 let mut unknown_key__ = None;
7234 let mut fail_on_slider_tail = None;
7235 let mut restart = None;
7236 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7237 match key.as_str() {
7238 "fail_on_slider_tail" => fail_on_slider_tail = Some(map.next_value()?),
7239 "restart" => restart = Some(map.next_value()?),
7240 _ => {
7241 unknown_key__ = Some(key);
7242 let _: IgnoredAny = map.next_value()?;
7243 }
7244 }
7245 }
7246 let gamemod = SuddenDeathOsu {
7247 fail_on_slider_tail: fail_on_slider_tail.unwrap_or_default(),
7248 restart: restart.unwrap_or_default(),
7249 };
7250 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7251 }
7252 }
7253 impl Serialize for SuddenDeathOsu {
7254 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7255 let field_count =
7256 self.fail_on_slider_tail.is_some() as usize + self.restart.is_some() as usize;
7257 let mut map = s.serialize_map(Some(field_count))?;
7258 if let Some(ref x) = self.fail_on_slider_tail {
7259 map.serialize_entry("fail_on_slider_tail", x)?;
7260 }
7261 if let Some(ref x) = self.restart {
7262 map.serialize_entry("restart", x)?;
7263 }
7264 map.end()
7265 }
7266 }
7267 impl<'de> Visitor<'de> for GameModVisitor<PerfectOsu> {
7268 type Value = DeserializedGameMod<'de, PerfectOsu>;
7269 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7270 f.write_str("PerfectOsu")
7271 }
7272 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7273 const FIELDS: &'static [&'static str] = &["restart"];
7274 let mut unknown_key__ = None;
7275 let mut restart = None;
7276 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7277 match key.as_str() {
7278 "restart" => restart = Some(map.next_value()?),
7279 _ => {
7280 unknown_key__ = Some(key);
7281 let _: IgnoredAny = map.next_value()?;
7282 }
7283 }
7284 }
7285 let gamemod = PerfectOsu {
7286 restart: restart.unwrap_or_default(),
7287 };
7288 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7289 }
7290 }
7291 impl Serialize for PerfectOsu {
7292 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7293 let field_count = self.restart.is_some() as usize;
7294 let mut map = s.serialize_map(Some(field_count))?;
7295 if let Some(ref x) = self.restart {
7296 map.serialize_entry("restart", x)?;
7297 }
7298 map.end()
7299 }
7300 }
7301 impl<'de> Visitor<'de> for GameModVisitor<DoubleTimeOsu> {
7302 type Value = DeserializedGameMod<'de, DoubleTimeOsu>;
7303 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7304 f.write_str("DoubleTimeOsu")
7305 }
7306 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7307 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
7308 let mut unknown_key__ = None;
7309 let mut speed_change = None;
7310 let mut adjust_pitch = None;
7311 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7312 match key.as_str() {
7313 "speed_change" => speed_change = Some(map.next_value()?),
7314 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
7315 _ => {
7316 unknown_key__ = Some(key);
7317 let _: IgnoredAny = map.next_value()?;
7318 }
7319 }
7320 }
7321 let gamemod = DoubleTimeOsu {
7322 speed_change: speed_change.unwrap_or_default(),
7323 adjust_pitch: adjust_pitch.unwrap_or_default(),
7324 };
7325 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7326 }
7327 }
7328 impl Serialize for DoubleTimeOsu {
7329 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7330 let field_count =
7331 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
7332 let mut map = s.serialize_map(Some(field_count))?;
7333 if let Some(ref x) = self.speed_change {
7334 map.serialize_entry("speed_change", x)?;
7335 }
7336 if let Some(ref x) = self.adjust_pitch {
7337 map.serialize_entry("adjust_pitch", x)?;
7338 }
7339 map.end()
7340 }
7341 }
7342 impl<'de> Visitor<'de> for GameModVisitor<NightcoreOsu> {
7343 type Value = DeserializedGameMod<'de, NightcoreOsu>;
7344 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7345 f.write_str("NightcoreOsu")
7346 }
7347 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7348 const FIELDS: &'static [&'static str] = &["speed_change"];
7349 let mut unknown_key__ = None;
7350 let mut speed_change = None;
7351 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7352 match key.as_str() {
7353 "speed_change" => speed_change = Some(map.next_value()?),
7354 _ => {
7355 unknown_key__ = Some(key);
7356 let _: IgnoredAny = map.next_value()?;
7357 }
7358 }
7359 }
7360 let gamemod = NightcoreOsu {
7361 speed_change: speed_change.unwrap_or_default(),
7362 };
7363 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7364 }
7365 }
7366 impl Serialize for NightcoreOsu {
7367 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7368 let field_count = self.speed_change.is_some() as usize;
7369 let mut map = s.serialize_map(Some(field_count))?;
7370 if let Some(ref x) = self.speed_change {
7371 map.serialize_entry("speed_change", x)?;
7372 }
7373 map.end()
7374 }
7375 }
7376 impl<'de> Visitor<'de> for GameModVisitor<HiddenOsu> {
7377 type Value = DeserializedGameMod<'de, HiddenOsu>;
7378 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7379 f.write_str("HiddenOsu")
7380 }
7381 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7382 const FIELDS: &'static [&'static str] = &["only_fade_approach_circles"];
7383 let mut unknown_key__ = None;
7384 let mut only_fade_approach_circles = None;
7385 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7386 match key.as_str() {
7387 "only_fade_approach_circles" => {
7388 only_fade_approach_circles = Some(map.next_value()?)
7389 }
7390 _ => {
7391 unknown_key__ = Some(key);
7392 let _: IgnoredAny = map.next_value()?;
7393 }
7394 }
7395 }
7396 let gamemod = HiddenOsu {
7397 only_fade_approach_circles: only_fade_approach_circles.unwrap_or_default(),
7398 };
7399 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7400 }
7401 }
7402 impl Serialize for HiddenOsu {
7403 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7404 let field_count = self.only_fade_approach_circles.is_some() as usize;
7405 let mut map = s.serialize_map(Some(field_count))?;
7406 if let Some(ref x) = self.only_fade_approach_circles {
7407 map.serialize_entry("only_fade_approach_circles", x)?;
7408 }
7409 map.end()
7410 }
7411 }
7412 impl<'de> Visitor<'de> for GameModVisitor<FlashlightOsu> {
7413 type Value = DeserializedGameMod<'de, FlashlightOsu>;
7414 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7415 f.write_str("FlashlightOsu")
7416 }
7417 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7418 const FIELDS: &'static [&'static str] =
7419 &["follow_delay", "size_multiplier", "combo_based_size"];
7420 let mut unknown_key__ = None;
7421 let mut follow_delay = None;
7422 let mut size_multiplier = None;
7423 let mut combo_based_size = None;
7424 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7425 match key.as_str() {
7426 "follow_delay" => follow_delay = Some(map.next_value()?),
7427 "size_multiplier" => size_multiplier = Some(map.next_value()?),
7428 "combo_based_size" => combo_based_size = Some(map.next_value()?),
7429 _ => {
7430 unknown_key__ = Some(key);
7431 let _: IgnoredAny = map.next_value()?;
7432 }
7433 }
7434 }
7435 let gamemod = FlashlightOsu {
7436 follow_delay: follow_delay.unwrap_or_default(),
7437 size_multiplier: size_multiplier.unwrap_or_default(),
7438 combo_based_size: combo_based_size.unwrap_or_default(),
7439 };
7440 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7441 }
7442 }
7443 impl Serialize for FlashlightOsu {
7444 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7445 let field_count = self.follow_delay.is_some() as usize
7446 + self.size_multiplier.is_some() as usize
7447 + self.combo_based_size.is_some() as usize;
7448 let mut map = s.serialize_map(Some(field_count))?;
7449 if let Some(ref x) = self.follow_delay {
7450 map.serialize_entry("follow_delay", x)?;
7451 }
7452 if let Some(ref x) = self.size_multiplier {
7453 map.serialize_entry("size_multiplier", x)?;
7454 }
7455 if let Some(ref x) = self.combo_based_size {
7456 map.serialize_entry("combo_based_size", x)?;
7457 }
7458 map.end()
7459 }
7460 }
7461 impl<'de> Visitor<'de> for GameModVisitor<BlindsOsu> {
7462 type Value = DeserializedGameMod<'de, BlindsOsu>;
7463 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7464 f.write_str("BlindsOsu")
7465 }
7466 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7467 const FIELDS: &'static [&'static str] = &[];
7468 let mut unknown_key__ = None;
7469 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7470 match key.as_str() {
7471 _ => {
7472 unknown_key__ = Some(key);
7473 let _: IgnoredAny = map.next_value()?;
7474 }
7475 }
7476 }
7477 let gamemod = BlindsOsu {};
7478 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7479 }
7480 }
7481 impl Serialize for BlindsOsu {
7482 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7483 let field_count = 0;
7484 let map = s.serialize_map(Some(field_count))?;
7485 map.end()
7486 }
7487 }
7488 impl<'de> Visitor<'de> for GameModVisitor<StrictTrackingOsu> {
7489 type Value = DeserializedGameMod<'de, StrictTrackingOsu>;
7490 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7491 f.write_str("StrictTrackingOsu")
7492 }
7493 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7494 const FIELDS: &'static [&'static str] = &[];
7495 let mut unknown_key__ = None;
7496 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7497 match key.as_str() {
7498 _ => {
7499 unknown_key__ = Some(key);
7500 let _: IgnoredAny = map.next_value()?;
7501 }
7502 }
7503 }
7504 let gamemod = StrictTrackingOsu {};
7505 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7506 }
7507 }
7508 impl Serialize for StrictTrackingOsu {
7509 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7510 let field_count = 0;
7511 let map = s.serialize_map(Some(field_count))?;
7512 map.end()
7513 }
7514 }
7515 impl<'de> Visitor<'de> for GameModVisitor<AccuracyChallengeOsu> {
7516 type Value = DeserializedGameMod<'de, AccuracyChallengeOsu>;
7517 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7518 f.write_str("AccuracyChallengeOsu")
7519 }
7520 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7521 const FIELDS: &'static [&'static str] =
7522 &["minimum_accuracy", "accuracy_judge_mode", "restart"];
7523 let mut unknown_key__ = None;
7524 let mut minimum_accuracy = None;
7525 let mut accuracy_judge_mode = None;
7526 let mut restart = None;
7527 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7528 match key.as_str() {
7529 "minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
7530 "accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
7531 "restart" => restart = Some(map.next_value()?),
7532 _ => {
7533 unknown_key__ = Some(key);
7534 let _: IgnoredAny = map.next_value()?;
7535 }
7536 }
7537 }
7538 let gamemod = AccuracyChallengeOsu {
7539 minimum_accuracy: minimum_accuracy.unwrap_or_default(),
7540 accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
7541 restart: restart.unwrap_or_default(),
7542 };
7543 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7544 }
7545 }
7546 impl Serialize for AccuracyChallengeOsu {
7547 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7548 let field_count = self.minimum_accuracy.is_some() as usize
7549 + self.accuracy_judge_mode.is_some() as usize
7550 + self.restart.is_some() as usize;
7551 let mut map = s.serialize_map(Some(field_count))?;
7552 if let Some(ref x) = self.minimum_accuracy {
7553 map.serialize_entry("minimum_accuracy", x)?;
7554 }
7555 if let Some(ref x) = self.accuracy_judge_mode {
7556 map.serialize_entry("accuracy_judge_mode", x)?;
7557 }
7558 if let Some(ref x) = self.restart {
7559 map.serialize_entry("restart", x)?;
7560 }
7561 map.end()
7562 }
7563 }
7564 impl<'de> Visitor<'de> for GameModVisitor<TargetPracticeOsu> {
7565 type Value = DeserializedGameMod<'de, TargetPracticeOsu>;
7566 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7567 f.write_str("TargetPracticeOsu")
7568 }
7569 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7570 const FIELDS: &'static [&'static str] = &["seed", "metronome"];
7571 let mut unknown_key__ = None;
7572 let mut seed = None;
7573 let mut metronome = None;
7574 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7575 match key.as_str() {
7576 "seed" => seed = Some(map.next_value()?),
7577 "metronome" => metronome = Some(map.next_value()?),
7578 _ => {
7579 unknown_key__ = Some(key);
7580 let _: IgnoredAny = map.next_value()?;
7581 }
7582 }
7583 }
7584 let gamemod = TargetPracticeOsu {
7585 seed: seed.unwrap_or_default(),
7586 metronome: metronome.unwrap_or_default(),
7587 };
7588 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7589 }
7590 }
7591 impl Serialize for TargetPracticeOsu {
7592 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7593 let field_count = self.seed.is_some() as usize + self.metronome.is_some() as usize;
7594 let mut map = s.serialize_map(Some(field_count))?;
7595 if let Some(ref x) = self.seed {
7596 map.serialize_entry("seed", x)?;
7597 }
7598 if let Some(ref x) = self.metronome {
7599 map.serialize_entry("metronome", x)?;
7600 }
7601 map.end()
7602 }
7603 }
7604 impl<'de> Visitor<'de> for GameModVisitor<DifficultyAdjustOsu> {
7605 type Value = DeserializedGameMod<'de, DifficultyAdjustOsu>;
7606 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7607 f.write_str("DifficultyAdjustOsu")
7608 }
7609 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7610 const FIELDS: &'static [&'static str] = &[
7611 "circle_size",
7612 "approach_rate",
7613 "drain_rate",
7614 "overall_difficulty",
7615 "extended_limits",
7616 ];
7617 let mut unknown_key__ = None;
7618 let mut circle_size = None;
7619 let mut approach_rate = None;
7620 let mut drain_rate = None;
7621 let mut overall_difficulty = None;
7622 let mut extended_limits = None;
7623 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7624 match key.as_str() {
7625 "circle_size" => circle_size = Some(map.next_value()?),
7626 "approach_rate" => approach_rate = Some(map.next_value()?),
7627 "drain_rate" => drain_rate = Some(map.next_value()?),
7628 "overall_difficulty" => overall_difficulty = Some(map.next_value()?),
7629 "extended_limits" => extended_limits = Some(map.next_value()?),
7630 _ => {
7631 unknown_key__ = Some(key);
7632 let _: IgnoredAny = map.next_value()?;
7633 }
7634 }
7635 }
7636 let gamemod = DifficultyAdjustOsu {
7637 circle_size: circle_size.unwrap_or_default(),
7638 approach_rate: approach_rate.unwrap_or_default(),
7639 drain_rate: drain_rate.unwrap_or_default(),
7640 overall_difficulty: overall_difficulty.unwrap_or_default(),
7641 extended_limits: extended_limits.unwrap_or_default(),
7642 };
7643 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7644 }
7645 }
7646 impl Serialize for DifficultyAdjustOsu {
7647 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7648 let field_count = self.circle_size.is_some() as usize
7649 + self.approach_rate.is_some() as usize
7650 + self.drain_rate.is_some() as usize
7651 + self.overall_difficulty.is_some() as usize
7652 + self.extended_limits.is_some() as usize;
7653 let mut map = s.serialize_map(Some(field_count))?;
7654 if let Some(ref x) = self.circle_size {
7655 map.serialize_entry("circle_size", x)?;
7656 }
7657 if let Some(ref x) = self.approach_rate {
7658 map.serialize_entry("approach_rate", x)?;
7659 }
7660 if let Some(ref x) = self.drain_rate {
7661 map.serialize_entry("drain_rate", x)?;
7662 }
7663 if let Some(ref x) = self.overall_difficulty {
7664 map.serialize_entry("overall_difficulty", x)?;
7665 }
7666 if let Some(ref x) = self.extended_limits {
7667 map.serialize_entry("extended_limits", x)?;
7668 }
7669 map.end()
7670 }
7671 }
7672 impl<'de> Visitor<'de> for GameModVisitor<ClassicOsu> {
7673 type Value = DeserializedGameMod<'de, ClassicOsu>;
7674 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7675 f.write_str("ClassicOsu")
7676 }
7677 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7678 const FIELDS: &'static [&'static str] = &[
7679 "no_slider_head_accuracy",
7680 "classic_note_lock",
7681 "always_play_tail_sample",
7682 "fade_hit_circle_early",
7683 "classic_health",
7684 ];
7685 let mut unknown_key__ = None;
7686 let mut no_slider_head_accuracy = None;
7687 let mut classic_note_lock = None;
7688 let mut always_play_tail_sample = None;
7689 let mut fade_hit_circle_early = None;
7690 let mut classic_health = None;
7691 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7692 match key.as_str() {
7693 "no_slider_head_accuracy" => no_slider_head_accuracy = Some(map.next_value()?),
7694 "classic_note_lock" => classic_note_lock = Some(map.next_value()?),
7695 "always_play_tail_sample" => always_play_tail_sample = Some(map.next_value()?),
7696 "fade_hit_circle_early" => fade_hit_circle_early = Some(map.next_value()?),
7697 "classic_health" => classic_health = Some(map.next_value()?),
7698 _ => {
7699 unknown_key__ = Some(key);
7700 let _: IgnoredAny = map.next_value()?;
7701 }
7702 }
7703 }
7704 let gamemod = ClassicOsu {
7705 no_slider_head_accuracy: no_slider_head_accuracy.unwrap_or_default(),
7706 classic_note_lock: classic_note_lock.unwrap_or_default(),
7707 always_play_tail_sample: always_play_tail_sample.unwrap_or_default(),
7708 fade_hit_circle_early: fade_hit_circle_early.unwrap_or_default(),
7709 classic_health: classic_health.unwrap_or_default(),
7710 };
7711 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7712 }
7713 }
7714 impl Serialize for ClassicOsu {
7715 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7716 let field_count = self.no_slider_head_accuracy.is_some() as usize
7717 + self.classic_note_lock.is_some() as usize
7718 + self.always_play_tail_sample.is_some() as usize
7719 + self.fade_hit_circle_early.is_some() as usize
7720 + self.classic_health.is_some() as usize;
7721 let mut map = s.serialize_map(Some(field_count))?;
7722 if let Some(ref x) = self.no_slider_head_accuracy {
7723 map.serialize_entry("no_slider_head_accuracy", x)?;
7724 }
7725 if let Some(ref x) = self.classic_note_lock {
7726 map.serialize_entry("classic_note_lock", x)?;
7727 }
7728 if let Some(ref x) = self.always_play_tail_sample {
7729 map.serialize_entry("always_play_tail_sample", x)?;
7730 }
7731 if let Some(ref x) = self.fade_hit_circle_early {
7732 map.serialize_entry("fade_hit_circle_early", x)?;
7733 }
7734 if let Some(ref x) = self.classic_health {
7735 map.serialize_entry("classic_health", x)?;
7736 }
7737 map.end()
7738 }
7739 }
7740 impl<'de> Visitor<'de> for GameModVisitor<RandomOsu> {
7741 type Value = DeserializedGameMod<'de, RandomOsu>;
7742 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7743 f.write_str("RandomOsu")
7744 }
7745 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7746 const FIELDS: &'static [&'static str] = &["angle_sharpness", "seed"];
7747 let mut unknown_key__ = None;
7748 let mut angle_sharpness = None;
7749 let mut seed = None;
7750 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7751 match key.as_str() {
7752 "angle_sharpness" => angle_sharpness = Some(map.next_value()?),
7753 "seed" => seed = Some(map.next_value()?),
7754 _ => {
7755 unknown_key__ = Some(key);
7756 let _: IgnoredAny = map.next_value()?;
7757 }
7758 }
7759 }
7760 let gamemod = RandomOsu {
7761 angle_sharpness: angle_sharpness.unwrap_or_default(),
7762 seed: seed.unwrap_or_default(),
7763 };
7764 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7765 }
7766 }
7767 impl Serialize for RandomOsu {
7768 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7769 let field_count =
7770 self.angle_sharpness.is_some() as usize + self.seed.is_some() as usize;
7771 let mut map = s.serialize_map(Some(field_count))?;
7772 if let Some(ref x) = self.angle_sharpness {
7773 map.serialize_entry("angle_sharpness", x)?;
7774 }
7775 if let Some(ref x) = self.seed {
7776 map.serialize_entry("seed", x)?;
7777 }
7778 map.end()
7779 }
7780 }
7781 impl<'de> Visitor<'de> for GameModVisitor<MirrorOsu> {
7782 type Value = DeserializedGameMod<'de, MirrorOsu>;
7783 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7784 f.write_str("MirrorOsu")
7785 }
7786 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7787 const FIELDS: &'static [&'static str] = &["reflection"];
7788 let mut unknown_key__ = None;
7789 let mut reflection = None;
7790 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7791 match key.as_str() {
7792 "reflection" => reflection = Some(map.next_value()?),
7793 _ => {
7794 unknown_key__ = Some(key);
7795 let _: IgnoredAny = map.next_value()?;
7796 }
7797 }
7798 }
7799 let gamemod = MirrorOsu {
7800 reflection: reflection.unwrap_or_default(),
7801 };
7802 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7803 }
7804 }
7805 impl Serialize for MirrorOsu {
7806 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7807 let field_count = self.reflection.is_some() as usize;
7808 let mut map = s.serialize_map(Some(field_count))?;
7809 if let Some(ref x) = self.reflection {
7810 map.serialize_entry("reflection", x)?;
7811 }
7812 map.end()
7813 }
7814 }
7815 impl<'de> Visitor<'de> for GameModVisitor<AlternateOsu> {
7816 type Value = DeserializedGameMod<'de, AlternateOsu>;
7817 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7818 f.write_str("AlternateOsu")
7819 }
7820 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7821 const FIELDS: &'static [&'static str] = &[];
7822 let mut unknown_key__ = None;
7823 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7824 match key.as_str() {
7825 _ => {
7826 unknown_key__ = Some(key);
7827 let _: IgnoredAny = map.next_value()?;
7828 }
7829 }
7830 }
7831 let gamemod = AlternateOsu {};
7832 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7833 }
7834 }
7835 impl Serialize for AlternateOsu {
7836 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7837 let field_count = 0;
7838 let map = s.serialize_map(Some(field_count))?;
7839 map.end()
7840 }
7841 }
7842 impl<'de> Visitor<'de> for GameModVisitor<SingleTapOsu> {
7843 type Value = DeserializedGameMod<'de, SingleTapOsu>;
7844 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7845 f.write_str("SingleTapOsu")
7846 }
7847 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7848 const FIELDS: &'static [&'static str] = &[];
7849 let mut unknown_key__ = None;
7850 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7851 match key.as_str() {
7852 _ => {
7853 unknown_key__ = Some(key);
7854 let _: IgnoredAny = map.next_value()?;
7855 }
7856 }
7857 }
7858 let gamemod = SingleTapOsu {};
7859 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7860 }
7861 }
7862 impl Serialize for SingleTapOsu {
7863 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7864 let field_count = 0;
7865 let map = s.serialize_map(Some(field_count))?;
7866 map.end()
7867 }
7868 }
7869 impl<'de> Visitor<'de> for GameModVisitor<AutoplayOsu> {
7870 type Value = DeserializedGameMod<'de, AutoplayOsu>;
7871 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7872 f.write_str("AutoplayOsu")
7873 }
7874 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7875 const FIELDS: &'static [&'static str] = &[];
7876 let mut unknown_key__ = None;
7877 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7878 match key.as_str() {
7879 _ => {
7880 unknown_key__ = Some(key);
7881 let _: IgnoredAny = map.next_value()?;
7882 }
7883 }
7884 }
7885 let gamemod = AutoplayOsu {};
7886 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7887 }
7888 }
7889 impl Serialize for AutoplayOsu {
7890 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7891 let field_count = 0;
7892 let map = s.serialize_map(Some(field_count))?;
7893 map.end()
7894 }
7895 }
7896 impl<'de> Visitor<'de> for GameModVisitor<CinemaOsu> {
7897 type Value = DeserializedGameMod<'de, CinemaOsu>;
7898 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7899 f.write_str("CinemaOsu")
7900 }
7901 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7902 const FIELDS: &'static [&'static str] = &[];
7903 let mut unknown_key__ = None;
7904 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7905 match key.as_str() {
7906 _ => {
7907 unknown_key__ = Some(key);
7908 let _: IgnoredAny = map.next_value()?;
7909 }
7910 }
7911 }
7912 let gamemod = CinemaOsu {};
7913 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7914 }
7915 }
7916 impl Serialize for CinemaOsu {
7917 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7918 let field_count = 0;
7919 let map = s.serialize_map(Some(field_count))?;
7920 map.end()
7921 }
7922 }
7923 impl<'de> Visitor<'de> for GameModVisitor<RelaxOsu> {
7924 type Value = DeserializedGameMod<'de, RelaxOsu>;
7925 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7926 f.write_str("RelaxOsu")
7927 }
7928 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7929 const FIELDS: &'static [&'static str] = &[];
7930 let mut unknown_key__ = None;
7931 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7932 match key.as_str() {
7933 _ => {
7934 unknown_key__ = Some(key);
7935 let _: IgnoredAny = map.next_value()?;
7936 }
7937 }
7938 }
7939 let gamemod = RelaxOsu {};
7940 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7941 }
7942 }
7943 impl Serialize for RelaxOsu {
7944 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7945 let field_count = 0;
7946 let map = s.serialize_map(Some(field_count))?;
7947 map.end()
7948 }
7949 }
7950 impl<'de> Visitor<'de> for GameModVisitor<AutopilotOsu> {
7951 type Value = DeserializedGameMod<'de, AutopilotOsu>;
7952 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7953 f.write_str("AutopilotOsu")
7954 }
7955 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7956 const FIELDS: &'static [&'static str] = &[];
7957 let mut unknown_key__ = None;
7958 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7959 match key.as_str() {
7960 _ => {
7961 unknown_key__ = Some(key);
7962 let _: IgnoredAny = map.next_value()?;
7963 }
7964 }
7965 }
7966 let gamemod = AutopilotOsu {};
7967 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7968 }
7969 }
7970 impl Serialize for AutopilotOsu {
7971 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7972 let field_count = 0;
7973 let map = s.serialize_map(Some(field_count))?;
7974 map.end()
7975 }
7976 }
7977 impl<'de> Visitor<'de> for GameModVisitor<SpunOutOsu> {
7978 type Value = DeserializedGameMod<'de, SpunOutOsu>;
7979 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
7980 f.write_str("SpunOutOsu")
7981 }
7982 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
7983 const FIELDS: &'static [&'static str] = &[];
7984 let mut unknown_key__ = None;
7985 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
7986 match key.as_str() {
7987 _ => {
7988 unknown_key__ = Some(key);
7989 let _: IgnoredAny = map.next_value()?;
7990 }
7991 }
7992 }
7993 let gamemod = SpunOutOsu {};
7994 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
7995 }
7996 }
7997 impl Serialize for SpunOutOsu {
7998 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
7999 let field_count = 0;
8000 let map = s.serialize_map(Some(field_count))?;
8001 map.end()
8002 }
8003 }
8004 impl<'de> Visitor<'de> for GameModVisitor<TransformOsu> {
8005 type Value = DeserializedGameMod<'de, TransformOsu>;
8006 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8007 f.write_str("TransformOsu")
8008 }
8009 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8010 const FIELDS: &'static [&'static str] = &[];
8011 let mut unknown_key__ = None;
8012 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8013 match key.as_str() {
8014 _ => {
8015 unknown_key__ = Some(key);
8016 let _: IgnoredAny = map.next_value()?;
8017 }
8018 }
8019 }
8020 let gamemod = TransformOsu {};
8021 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8022 }
8023 }
8024 impl Serialize for TransformOsu {
8025 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8026 let field_count = 0;
8027 let map = s.serialize_map(Some(field_count))?;
8028 map.end()
8029 }
8030 }
8031 impl<'de> Visitor<'de> for GameModVisitor<WiggleOsu> {
8032 type Value = DeserializedGameMod<'de, WiggleOsu>;
8033 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8034 f.write_str("WiggleOsu")
8035 }
8036 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8037 const FIELDS: &'static [&'static str] = &["strength"];
8038 let mut unknown_key__ = None;
8039 let mut strength = None;
8040 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8041 match key.as_str() {
8042 "strength" => strength = Some(map.next_value()?),
8043 _ => {
8044 unknown_key__ = Some(key);
8045 let _: IgnoredAny = map.next_value()?;
8046 }
8047 }
8048 }
8049 let gamemod = WiggleOsu {
8050 strength: strength.unwrap_or_default(),
8051 };
8052 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8053 }
8054 }
8055 impl Serialize for WiggleOsu {
8056 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8057 let field_count = self.strength.is_some() as usize;
8058 let mut map = s.serialize_map(Some(field_count))?;
8059 if let Some(ref x) = self.strength {
8060 map.serialize_entry("strength", x)?;
8061 }
8062 map.end()
8063 }
8064 }
8065 impl<'de> Visitor<'de> for GameModVisitor<SpinInOsu> {
8066 type Value = DeserializedGameMod<'de, SpinInOsu>;
8067 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8068 f.write_str("SpinInOsu")
8069 }
8070 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8071 const FIELDS: &'static [&'static str] = &[];
8072 let mut unknown_key__ = None;
8073 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8074 match key.as_str() {
8075 _ => {
8076 unknown_key__ = Some(key);
8077 let _: IgnoredAny = map.next_value()?;
8078 }
8079 }
8080 }
8081 let gamemod = SpinInOsu {};
8082 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8083 }
8084 }
8085 impl Serialize for SpinInOsu {
8086 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8087 let field_count = 0;
8088 let map = s.serialize_map(Some(field_count))?;
8089 map.end()
8090 }
8091 }
8092 impl<'de> Visitor<'de> for GameModVisitor<GrowOsu> {
8093 type Value = DeserializedGameMod<'de, GrowOsu>;
8094 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8095 f.write_str("GrowOsu")
8096 }
8097 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8098 const FIELDS: &'static [&'static str] = &["start_scale"];
8099 let mut unknown_key__ = None;
8100 let mut start_scale = None;
8101 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8102 match key.as_str() {
8103 "start_scale" => start_scale = Some(map.next_value()?),
8104 _ => {
8105 unknown_key__ = Some(key);
8106 let _: IgnoredAny = map.next_value()?;
8107 }
8108 }
8109 }
8110 let gamemod = GrowOsu {
8111 start_scale: start_scale.unwrap_or_default(),
8112 };
8113 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8114 }
8115 }
8116 impl Serialize for GrowOsu {
8117 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8118 let field_count = self.start_scale.is_some() as usize;
8119 let mut map = s.serialize_map(Some(field_count))?;
8120 if let Some(ref x) = self.start_scale {
8121 map.serialize_entry("start_scale", x)?;
8122 }
8123 map.end()
8124 }
8125 }
8126 impl<'de> Visitor<'de> for GameModVisitor<DeflateOsu> {
8127 type Value = DeserializedGameMod<'de, DeflateOsu>;
8128 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8129 f.write_str("DeflateOsu")
8130 }
8131 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8132 const FIELDS: &'static [&'static str] = &["start_scale"];
8133 let mut unknown_key__ = None;
8134 let mut start_scale = None;
8135 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8136 match key.as_str() {
8137 "start_scale" => start_scale = Some(map.next_value()?),
8138 _ => {
8139 unknown_key__ = Some(key);
8140 let _: IgnoredAny = map.next_value()?;
8141 }
8142 }
8143 }
8144 let gamemod = DeflateOsu {
8145 start_scale: start_scale.unwrap_or_default(),
8146 };
8147 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8148 }
8149 }
8150 impl Serialize for DeflateOsu {
8151 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8152 let field_count = self.start_scale.is_some() as usize;
8153 let mut map = s.serialize_map(Some(field_count))?;
8154 if let Some(ref x) = self.start_scale {
8155 map.serialize_entry("start_scale", x)?;
8156 }
8157 map.end()
8158 }
8159 }
8160 impl<'de> Visitor<'de> for GameModVisitor<WindUpOsu> {
8161 type Value = DeserializedGameMod<'de, WindUpOsu>;
8162 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8163 f.write_str("WindUpOsu")
8164 }
8165 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8166 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
8167 let mut unknown_key__ = None;
8168 let mut initial_rate = None;
8169 let mut final_rate = None;
8170 let mut adjust_pitch = None;
8171 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8172 match key.as_str() {
8173 "initial_rate" => initial_rate = Some(map.next_value()?),
8174 "final_rate" => final_rate = Some(map.next_value()?),
8175 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
8176 _ => {
8177 unknown_key__ = Some(key);
8178 let _: IgnoredAny = map.next_value()?;
8179 }
8180 }
8181 }
8182 let gamemod = WindUpOsu {
8183 initial_rate: initial_rate.unwrap_or_default(),
8184 final_rate: final_rate.unwrap_or_default(),
8185 adjust_pitch: adjust_pitch.unwrap_or_default(),
8186 };
8187 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8188 }
8189 }
8190 impl Serialize for WindUpOsu {
8191 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8192 let field_count = self.initial_rate.is_some() as usize
8193 + self.final_rate.is_some() as usize
8194 + self.adjust_pitch.is_some() as usize;
8195 let mut map = s.serialize_map(Some(field_count))?;
8196 if let Some(ref x) = self.initial_rate {
8197 map.serialize_entry("initial_rate", x)?;
8198 }
8199 if let Some(ref x) = self.final_rate {
8200 map.serialize_entry("final_rate", x)?;
8201 }
8202 if let Some(ref x) = self.adjust_pitch {
8203 map.serialize_entry("adjust_pitch", x)?;
8204 }
8205 map.end()
8206 }
8207 }
8208 impl<'de> Visitor<'de> for GameModVisitor<WindDownOsu> {
8209 type Value = DeserializedGameMod<'de, WindDownOsu>;
8210 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8211 f.write_str("WindDownOsu")
8212 }
8213 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8214 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
8215 let mut unknown_key__ = None;
8216 let mut initial_rate = None;
8217 let mut final_rate = None;
8218 let mut adjust_pitch = None;
8219 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8220 match key.as_str() {
8221 "initial_rate" => initial_rate = Some(map.next_value()?),
8222 "final_rate" => final_rate = Some(map.next_value()?),
8223 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
8224 _ => {
8225 unknown_key__ = Some(key);
8226 let _: IgnoredAny = map.next_value()?;
8227 }
8228 }
8229 }
8230 let gamemod = WindDownOsu {
8231 initial_rate: initial_rate.unwrap_or_default(),
8232 final_rate: final_rate.unwrap_or_default(),
8233 adjust_pitch: adjust_pitch.unwrap_or_default(),
8234 };
8235 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8236 }
8237 }
8238 impl Serialize for WindDownOsu {
8239 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8240 let field_count = self.initial_rate.is_some() as usize
8241 + self.final_rate.is_some() as usize
8242 + self.adjust_pitch.is_some() as usize;
8243 let mut map = s.serialize_map(Some(field_count))?;
8244 if let Some(ref x) = self.initial_rate {
8245 map.serialize_entry("initial_rate", x)?;
8246 }
8247 if let Some(ref x) = self.final_rate {
8248 map.serialize_entry("final_rate", x)?;
8249 }
8250 if let Some(ref x) = self.adjust_pitch {
8251 map.serialize_entry("adjust_pitch", x)?;
8252 }
8253 map.end()
8254 }
8255 }
8256 impl<'de> Visitor<'de> for GameModVisitor<TraceableOsu> {
8257 type Value = DeserializedGameMod<'de, TraceableOsu>;
8258 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8259 f.write_str("TraceableOsu")
8260 }
8261 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8262 const FIELDS: &'static [&'static str] = &[];
8263 let mut unknown_key__ = None;
8264 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8265 match key.as_str() {
8266 _ => {
8267 unknown_key__ = Some(key);
8268 let _: IgnoredAny = map.next_value()?;
8269 }
8270 }
8271 }
8272 let gamemod = TraceableOsu {};
8273 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8274 }
8275 }
8276 impl Serialize for TraceableOsu {
8277 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8278 let field_count = 0;
8279 let map = s.serialize_map(Some(field_count))?;
8280 map.end()
8281 }
8282 }
8283 impl<'de> Visitor<'de> for GameModVisitor<BarrelRollOsu> {
8284 type Value = DeserializedGameMod<'de, BarrelRollOsu>;
8285 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8286 f.write_str("BarrelRollOsu")
8287 }
8288 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8289 const FIELDS: &'static [&'static str] = &["spin_speed", "direction"];
8290 let mut unknown_key__ = None;
8291 let mut spin_speed = None;
8292 let mut direction = None;
8293 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8294 match key.as_str() {
8295 "spin_speed" => spin_speed = Some(map.next_value()?),
8296 "direction" => direction = Some(map.next_value()?),
8297 _ => {
8298 unknown_key__ = Some(key);
8299 let _: IgnoredAny = map.next_value()?;
8300 }
8301 }
8302 }
8303 let gamemod = BarrelRollOsu {
8304 spin_speed: spin_speed.unwrap_or_default(),
8305 direction: direction.unwrap_or_default(),
8306 };
8307 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8308 }
8309 }
8310 impl Serialize for BarrelRollOsu {
8311 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8312 let field_count =
8313 self.spin_speed.is_some() as usize + self.direction.is_some() as usize;
8314 let mut map = s.serialize_map(Some(field_count))?;
8315 if let Some(ref x) = self.spin_speed {
8316 map.serialize_entry("spin_speed", x)?;
8317 }
8318 if let Some(ref x) = self.direction {
8319 map.serialize_entry("direction", x)?;
8320 }
8321 map.end()
8322 }
8323 }
8324 impl<'de> Visitor<'de> for GameModVisitor<ApproachDifferentOsu> {
8325 type Value = DeserializedGameMod<'de, ApproachDifferentOsu>;
8326 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8327 f.write_str("ApproachDifferentOsu")
8328 }
8329 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8330 const FIELDS: &'static [&'static str] = &["scale", "style"];
8331 let mut unknown_key__ = None;
8332 let mut scale = None;
8333 let mut style = None;
8334 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8335 match key.as_str() {
8336 "scale" => scale = Some(map.next_value()?),
8337 "style" => style = Some(map.next_value()?),
8338 _ => {
8339 unknown_key__ = Some(key);
8340 let _: IgnoredAny = map.next_value()?;
8341 }
8342 }
8343 }
8344 let gamemod = ApproachDifferentOsu {
8345 scale: scale.unwrap_or_default(),
8346 style: style.unwrap_or_default(),
8347 };
8348 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8349 }
8350 }
8351 impl Serialize for ApproachDifferentOsu {
8352 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8353 let field_count = self.scale.is_some() as usize + self.style.is_some() as usize;
8354 let mut map = s.serialize_map(Some(field_count))?;
8355 if let Some(ref x) = self.scale {
8356 map.serialize_entry("scale", x)?;
8357 }
8358 if let Some(ref x) = self.style {
8359 map.serialize_entry("style", x)?;
8360 }
8361 map.end()
8362 }
8363 }
8364 impl<'de> Visitor<'de> for GameModVisitor<MutedOsu> {
8365 type Value = DeserializedGameMod<'de, MutedOsu>;
8366 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8367 f.write_str("MutedOsu")
8368 }
8369 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8370 const FIELDS: &'static [&'static str] = &[
8371 "inverse_muting",
8372 "enable_metronome",
8373 "mute_combo_count",
8374 "affects_hit_sounds",
8375 ];
8376 let mut unknown_key__ = None;
8377 let mut inverse_muting = None;
8378 let mut enable_metronome = None;
8379 let mut mute_combo_count = None;
8380 let mut affects_hit_sounds = None;
8381 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8382 match key.as_str() {
8383 "inverse_muting" => inverse_muting = Some(map.next_value()?),
8384 "enable_metronome" => enable_metronome = Some(map.next_value()?),
8385 "mute_combo_count" => mute_combo_count = Some(map.next_value()?),
8386 "affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
8387 _ => {
8388 unknown_key__ = Some(key);
8389 let _: IgnoredAny = map.next_value()?;
8390 }
8391 }
8392 }
8393 let gamemod = MutedOsu {
8394 inverse_muting: inverse_muting.unwrap_or_default(),
8395 enable_metronome: enable_metronome.unwrap_or_default(),
8396 mute_combo_count: mute_combo_count.unwrap_or_default(),
8397 affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
8398 };
8399 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8400 }
8401 }
8402 impl Serialize for MutedOsu {
8403 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8404 let field_count = self.inverse_muting.is_some() as usize
8405 + self.enable_metronome.is_some() as usize
8406 + self.mute_combo_count.is_some() as usize
8407 + self.affects_hit_sounds.is_some() as usize;
8408 let mut map = s.serialize_map(Some(field_count))?;
8409 if let Some(ref x) = self.inverse_muting {
8410 map.serialize_entry("inverse_muting", x)?;
8411 }
8412 if let Some(ref x) = self.enable_metronome {
8413 map.serialize_entry("enable_metronome", x)?;
8414 }
8415 if let Some(ref x) = self.mute_combo_count {
8416 map.serialize_entry("mute_combo_count", x)?;
8417 }
8418 if let Some(ref x) = self.affects_hit_sounds {
8419 map.serialize_entry("affects_hit_sounds", x)?;
8420 }
8421 map.end()
8422 }
8423 }
8424 impl<'de> Visitor<'de> for GameModVisitor<NoScopeOsu> {
8425 type Value = DeserializedGameMod<'de, NoScopeOsu>;
8426 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8427 f.write_str("NoScopeOsu")
8428 }
8429 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8430 const FIELDS: &'static [&'static str] = &["hidden_combo_count"];
8431 let mut unknown_key__ = None;
8432 let mut hidden_combo_count = None;
8433 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8434 match key.as_str() {
8435 "hidden_combo_count" => hidden_combo_count = Some(map.next_value()?),
8436 _ => {
8437 unknown_key__ = Some(key);
8438 let _: IgnoredAny = map.next_value()?;
8439 }
8440 }
8441 }
8442 let gamemod = NoScopeOsu {
8443 hidden_combo_count: hidden_combo_count.unwrap_or_default(),
8444 };
8445 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8446 }
8447 }
8448 impl Serialize for NoScopeOsu {
8449 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8450 let field_count = self.hidden_combo_count.is_some() as usize;
8451 let mut map = s.serialize_map(Some(field_count))?;
8452 if let Some(ref x) = self.hidden_combo_count {
8453 map.serialize_entry("hidden_combo_count", x)?;
8454 }
8455 map.end()
8456 }
8457 }
8458 impl<'de> Visitor<'de> for GameModVisitor<MagnetisedOsu> {
8459 type Value = DeserializedGameMod<'de, MagnetisedOsu>;
8460 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8461 f.write_str("MagnetisedOsu")
8462 }
8463 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8464 const FIELDS: &'static [&'static str] = &["attraction_strength"];
8465 let mut unknown_key__ = None;
8466 let mut attraction_strength = None;
8467 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8468 match key.as_str() {
8469 "attraction_strength" => attraction_strength = Some(map.next_value()?),
8470 _ => {
8471 unknown_key__ = Some(key);
8472 let _: IgnoredAny = map.next_value()?;
8473 }
8474 }
8475 }
8476 let gamemod = MagnetisedOsu {
8477 attraction_strength: attraction_strength.unwrap_or_default(),
8478 };
8479 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8480 }
8481 }
8482 impl Serialize for MagnetisedOsu {
8483 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8484 let field_count = self.attraction_strength.is_some() as usize;
8485 let mut map = s.serialize_map(Some(field_count))?;
8486 if let Some(ref x) = self.attraction_strength {
8487 map.serialize_entry("attraction_strength", x)?;
8488 }
8489 map.end()
8490 }
8491 }
8492 impl<'de> Visitor<'de> for GameModVisitor<RepelOsu> {
8493 type Value = DeserializedGameMod<'de, RepelOsu>;
8494 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8495 f.write_str("RepelOsu")
8496 }
8497 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8498 const FIELDS: &'static [&'static str] = &["repulsion_strength"];
8499 let mut unknown_key__ = None;
8500 let mut repulsion_strength = None;
8501 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8502 match key.as_str() {
8503 "repulsion_strength" => repulsion_strength = Some(map.next_value()?),
8504 _ => {
8505 unknown_key__ = Some(key);
8506 let _: IgnoredAny = map.next_value()?;
8507 }
8508 }
8509 }
8510 let gamemod = RepelOsu {
8511 repulsion_strength: repulsion_strength.unwrap_or_default(),
8512 };
8513 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8514 }
8515 }
8516 impl Serialize for RepelOsu {
8517 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8518 let field_count = self.repulsion_strength.is_some() as usize;
8519 let mut map = s.serialize_map(Some(field_count))?;
8520 if let Some(ref x) = self.repulsion_strength {
8521 map.serialize_entry("repulsion_strength", x)?;
8522 }
8523 map.end()
8524 }
8525 }
8526 impl<'de> Visitor<'de> for GameModVisitor<AdaptiveSpeedOsu> {
8527 type Value = DeserializedGameMod<'de, AdaptiveSpeedOsu>;
8528 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8529 f.write_str("AdaptiveSpeedOsu")
8530 }
8531 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8532 const FIELDS: &'static [&'static str] = &["initial_rate", "adjust_pitch"];
8533 let mut unknown_key__ = None;
8534 let mut initial_rate = None;
8535 let mut adjust_pitch = None;
8536 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8537 match key.as_str() {
8538 "initial_rate" => initial_rate = Some(map.next_value()?),
8539 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
8540 _ => {
8541 unknown_key__ = Some(key);
8542 let _: IgnoredAny = map.next_value()?;
8543 }
8544 }
8545 }
8546 let gamemod = AdaptiveSpeedOsu {
8547 initial_rate: initial_rate.unwrap_or_default(),
8548 adjust_pitch: adjust_pitch.unwrap_or_default(),
8549 };
8550 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8551 }
8552 }
8553 impl Serialize for AdaptiveSpeedOsu {
8554 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8555 let field_count =
8556 self.initial_rate.is_some() as usize + self.adjust_pitch.is_some() as usize;
8557 let mut map = s.serialize_map(Some(field_count))?;
8558 if let Some(ref x) = self.initial_rate {
8559 map.serialize_entry("initial_rate", x)?;
8560 }
8561 if let Some(ref x) = self.adjust_pitch {
8562 map.serialize_entry("adjust_pitch", x)?;
8563 }
8564 map.end()
8565 }
8566 }
8567 impl<'de> Visitor<'de> for GameModVisitor<FreezeFrameOsu> {
8568 type Value = DeserializedGameMod<'de, FreezeFrameOsu>;
8569 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8570 f.write_str("FreezeFrameOsu")
8571 }
8572 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8573 const FIELDS: &'static [&'static str] = &[];
8574 let mut unknown_key__ = None;
8575 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8576 match key.as_str() {
8577 _ => {
8578 unknown_key__ = Some(key);
8579 let _: IgnoredAny = map.next_value()?;
8580 }
8581 }
8582 }
8583 let gamemod = FreezeFrameOsu {};
8584 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8585 }
8586 }
8587 impl Serialize for FreezeFrameOsu {
8588 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8589 let field_count = 0;
8590 let map = s.serialize_map(Some(field_count))?;
8591 map.end()
8592 }
8593 }
8594 impl<'de> Visitor<'de> for GameModVisitor<BubblesOsu> {
8595 type Value = DeserializedGameMod<'de, BubblesOsu>;
8596 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8597 f.write_str("BubblesOsu")
8598 }
8599 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8600 const FIELDS: &'static [&'static str] = &[];
8601 let mut unknown_key__ = None;
8602 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8603 match key.as_str() {
8604 _ => {
8605 unknown_key__ = Some(key);
8606 let _: IgnoredAny = map.next_value()?;
8607 }
8608 }
8609 }
8610 let gamemod = BubblesOsu {};
8611 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8612 }
8613 }
8614 impl Serialize for BubblesOsu {
8615 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8616 let field_count = 0;
8617 let map = s.serialize_map(Some(field_count))?;
8618 map.end()
8619 }
8620 }
8621 impl<'de> Visitor<'de> for GameModVisitor<SynesthesiaOsu> {
8622 type Value = DeserializedGameMod<'de, SynesthesiaOsu>;
8623 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8624 f.write_str("SynesthesiaOsu")
8625 }
8626 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8627 const FIELDS: &'static [&'static str] = &[];
8628 let mut unknown_key__ = None;
8629 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8630 match key.as_str() {
8631 _ => {
8632 unknown_key__ = Some(key);
8633 let _: IgnoredAny = map.next_value()?;
8634 }
8635 }
8636 }
8637 let gamemod = SynesthesiaOsu {};
8638 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8639 }
8640 }
8641 impl Serialize for SynesthesiaOsu {
8642 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8643 let field_count = 0;
8644 let map = s.serialize_map(Some(field_count))?;
8645 map.end()
8646 }
8647 }
8648 impl<'de> Visitor<'de> for GameModVisitor<DepthOsu> {
8649 type Value = DeserializedGameMod<'de, DepthOsu>;
8650 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8651 f.write_str("DepthOsu")
8652 }
8653 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8654 const FIELDS: &'static [&'static str] = &["max_depth", "show_approach_circles"];
8655 let mut unknown_key__ = None;
8656 let mut max_depth = None;
8657 let mut show_approach_circles = None;
8658 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8659 match key.as_str() {
8660 "max_depth" => max_depth = Some(map.next_value()?),
8661 "show_approach_circles" => show_approach_circles = Some(map.next_value()?),
8662 _ => {
8663 unknown_key__ = Some(key);
8664 let _: IgnoredAny = map.next_value()?;
8665 }
8666 }
8667 }
8668 let gamemod = DepthOsu {
8669 max_depth: max_depth.unwrap_or_default(),
8670 show_approach_circles: show_approach_circles.unwrap_or_default(),
8671 };
8672 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8673 }
8674 }
8675 impl Serialize for DepthOsu {
8676 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8677 let field_count =
8678 self.max_depth.is_some() as usize + self.show_approach_circles.is_some() as usize;
8679 let mut map = s.serialize_map(Some(field_count))?;
8680 if let Some(ref x) = self.max_depth {
8681 map.serialize_entry("max_depth", x)?;
8682 }
8683 if let Some(ref x) = self.show_approach_circles {
8684 map.serialize_entry("show_approach_circles", x)?;
8685 }
8686 map.end()
8687 }
8688 }
8689 impl<'de> Visitor<'de> for GameModVisitor<BloomOsu> {
8690 type Value = DeserializedGameMod<'de, BloomOsu>;
8691 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8692 f.write_str("BloomOsu")
8693 }
8694 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8695 const FIELDS: &'static [&'static str] = &["max_size_combo_count", "max_cursor_size"];
8696 let mut unknown_key__ = None;
8697 let mut max_size_combo_count = None;
8698 let mut max_cursor_size = None;
8699 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8700 match key.as_str() {
8701 "max_size_combo_count" => max_size_combo_count = Some(map.next_value()?),
8702 "max_cursor_size" => max_cursor_size = Some(map.next_value()?),
8703 _ => {
8704 unknown_key__ = Some(key);
8705 let _: IgnoredAny = map.next_value()?;
8706 }
8707 }
8708 }
8709 let gamemod = BloomOsu {
8710 max_size_combo_count: max_size_combo_count.unwrap_or_default(),
8711 max_cursor_size: max_cursor_size.unwrap_or_default(),
8712 };
8713 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8714 }
8715 }
8716 impl Serialize for BloomOsu {
8717 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8718 let field_count = self.max_size_combo_count.is_some() as usize
8719 + self.max_cursor_size.is_some() as usize;
8720 let mut map = s.serialize_map(Some(field_count))?;
8721 if let Some(ref x) = self.max_size_combo_count {
8722 map.serialize_entry("max_size_combo_count", x)?;
8723 }
8724 if let Some(ref x) = self.max_cursor_size {
8725 map.serialize_entry("max_cursor_size", x)?;
8726 }
8727 map.end()
8728 }
8729 }
8730 impl<'de> Visitor<'de> for GameModVisitor<TouchDeviceOsu> {
8731 type Value = DeserializedGameMod<'de, TouchDeviceOsu>;
8732 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8733 f.write_str("TouchDeviceOsu")
8734 }
8735 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8736 const FIELDS: &'static [&'static str] = &[];
8737 let mut unknown_key__ = None;
8738 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8739 match key.as_str() {
8740 _ => {
8741 unknown_key__ = Some(key);
8742 let _: IgnoredAny = map.next_value()?;
8743 }
8744 }
8745 }
8746 let gamemod = TouchDeviceOsu {};
8747 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8748 }
8749 }
8750 impl Serialize for TouchDeviceOsu {
8751 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8752 let field_count = 0;
8753 let map = s.serialize_map(Some(field_count))?;
8754 map.end()
8755 }
8756 }
8757 impl<'de> Visitor<'de> for GameModVisitor<ScoreV2Osu> {
8758 type Value = DeserializedGameMod<'de, ScoreV2Osu>;
8759 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8760 f.write_str("ScoreV2Osu")
8761 }
8762 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8763 const FIELDS: &'static [&'static str] = &[];
8764 let mut unknown_key__ = None;
8765 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8766 match key.as_str() {
8767 _ => {
8768 unknown_key__ = Some(key);
8769 let _: IgnoredAny = map.next_value()?;
8770 }
8771 }
8772 }
8773 let gamemod = ScoreV2Osu {};
8774 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8775 }
8776 }
8777 impl Serialize for ScoreV2Osu {
8778 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8779 let field_count = 0;
8780 let map = s.serialize_map(Some(field_count))?;
8781 map.end()
8782 }
8783 }
8784 impl<'de> Visitor<'de> for GameModVisitor<EasyTaiko> {
8785 type Value = DeserializedGameMod<'de, EasyTaiko>;
8786 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8787 f.write_str("EasyTaiko")
8788 }
8789 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8790 const FIELDS: &'static [&'static str] = &[];
8791 let mut unknown_key__ = None;
8792 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8793 match key.as_str() {
8794 _ => {
8795 unknown_key__ = Some(key);
8796 let _: IgnoredAny = map.next_value()?;
8797 }
8798 }
8799 }
8800 let gamemod = EasyTaiko {};
8801 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8802 }
8803 }
8804 impl Serialize for EasyTaiko {
8805 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8806 let field_count = 0;
8807 let map = s.serialize_map(Some(field_count))?;
8808 map.end()
8809 }
8810 }
8811 impl<'de> Visitor<'de> for GameModVisitor<NoFailTaiko> {
8812 type Value = DeserializedGameMod<'de, NoFailTaiko>;
8813 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8814 f.write_str("NoFailTaiko")
8815 }
8816 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8817 const FIELDS: &'static [&'static str] = &[];
8818 let mut unknown_key__ = None;
8819 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8820 match key.as_str() {
8821 _ => {
8822 unknown_key__ = Some(key);
8823 let _: IgnoredAny = map.next_value()?;
8824 }
8825 }
8826 }
8827 let gamemod = NoFailTaiko {};
8828 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8829 }
8830 }
8831 impl Serialize for NoFailTaiko {
8832 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8833 let field_count = 0;
8834 let map = s.serialize_map(Some(field_count))?;
8835 map.end()
8836 }
8837 }
8838 impl<'de> Visitor<'de> for GameModVisitor<HalfTimeTaiko> {
8839 type Value = DeserializedGameMod<'de, HalfTimeTaiko>;
8840 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8841 f.write_str("HalfTimeTaiko")
8842 }
8843 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8844 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
8845 let mut unknown_key__ = None;
8846 let mut speed_change = None;
8847 let mut adjust_pitch = None;
8848 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8849 match key.as_str() {
8850 "speed_change" => speed_change = Some(map.next_value()?),
8851 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
8852 _ => {
8853 unknown_key__ = Some(key);
8854 let _: IgnoredAny = map.next_value()?;
8855 }
8856 }
8857 }
8858 let gamemod = HalfTimeTaiko {
8859 speed_change: speed_change.unwrap_or_default(),
8860 adjust_pitch: adjust_pitch.unwrap_or_default(),
8861 };
8862 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8863 }
8864 }
8865 impl Serialize for HalfTimeTaiko {
8866 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8867 let field_count =
8868 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
8869 let mut map = s.serialize_map(Some(field_count))?;
8870 if let Some(ref x) = self.speed_change {
8871 map.serialize_entry("speed_change", x)?;
8872 }
8873 if let Some(ref x) = self.adjust_pitch {
8874 map.serialize_entry("adjust_pitch", x)?;
8875 }
8876 map.end()
8877 }
8878 }
8879 impl<'de> Visitor<'de> for GameModVisitor<DaycoreTaiko> {
8880 type Value = DeserializedGameMod<'de, DaycoreTaiko>;
8881 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8882 f.write_str("DaycoreTaiko")
8883 }
8884 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8885 const FIELDS: &'static [&'static str] = &["speed_change"];
8886 let mut unknown_key__ = None;
8887 let mut speed_change = None;
8888 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8889 match key.as_str() {
8890 "speed_change" => speed_change = Some(map.next_value()?),
8891 _ => {
8892 unknown_key__ = Some(key);
8893 let _: IgnoredAny = map.next_value()?;
8894 }
8895 }
8896 }
8897 let gamemod = DaycoreTaiko {
8898 speed_change: speed_change.unwrap_or_default(),
8899 };
8900 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8901 }
8902 }
8903 impl Serialize for DaycoreTaiko {
8904 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8905 let field_count = self.speed_change.is_some() as usize;
8906 let mut map = s.serialize_map(Some(field_count))?;
8907 if let Some(ref x) = self.speed_change {
8908 map.serialize_entry("speed_change", x)?;
8909 }
8910 map.end()
8911 }
8912 }
8913 impl<'de> Visitor<'de> for GameModVisitor<HardRockTaiko> {
8914 type Value = DeserializedGameMod<'de, HardRockTaiko>;
8915 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8916 f.write_str("HardRockTaiko")
8917 }
8918 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8919 const FIELDS: &'static [&'static str] = &[];
8920 let mut unknown_key__ = None;
8921 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8922 match key.as_str() {
8923 _ => {
8924 unknown_key__ = Some(key);
8925 let _: IgnoredAny = map.next_value()?;
8926 }
8927 }
8928 }
8929 let gamemod = HardRockTaiko {};
8930 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8931 }
8932 }
8933 impl Serialize for HardRockTaiko {
8934 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8935 let field_count = 0;
8936 let map = s.serialize_map(Some(field_count))?;
8937 map.end()
8938 }
8939 }
8940 impl<'de> Visitor<'de> for GameModVisitor<SuddenDeathTaiko> {
8941 type Value = DeserializedGameMod<'de, SuddenDeathTaiko>;
8942 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8943 f.write_str("SuddenDeathTaiko")
8944 }
8945 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8946 const FIELDS: &'static [&'static str] = &["restart"];
8947 let mut unknown_key__ = None;
8948 let mut restart = None;
8949 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8950 match key.as_str() {
8951 "restart" => restart = Some(map.next_value()?),
8952 _ => {
8953 unknown_key__ = Some(key);
8954 let _: IgnoredAny = map.next_value()?;
8955 }
8956 }
8957 }
8958 let gamemod = SuddenDeathTaiko {
8959 restart: restart.unwrap_or_default(),
8960 };
8961 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8962 }
8963 }
8964 impl Serialize for SuddenDeathTaiko {
8965 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
8966 let field_count = self.restart.is_some() as usize;
8967 let mut map = s.serialize_map(Some(field_count))?;
8968 if let Some(ref x) = self.restart {
8969 map.serialize_entry("restart", x)?;
8970 }
8971 map.end()
8972 }
8973 }
8974 impl<'de> Visitor<'de> for GameModVisitor<PerfectTaiko> {
8975 type Value = DeserializedGameMod<'de, PerfectTaiko>;
8976 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
8977 f.write_str("PerfectTaiko")
8978 }
8979 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
8980 const FIELDS: &'static [&'static str] = &["restart"];
8981 let mut unknown_key__ = None;
8982 let mut restart = None;
8983 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
8984 match key.as_str() {
8985 "restart" => restart = Some(map.next_value()?),
8986 _ => {
8987 unknown_key__ = Some(key);
8988 let _: IgnoredAny = map.next_value()?;
8989 }
8990 }
8991 }
8992 let gamemod = PerfectTaiko {
8993 restart: restart.unwrap_or_default(),
8994 };
8995 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
8996 }
8997 }
8998 impl Serialize for PerfectTaiko {
8999 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9000 let field_count = self.restart.is_some() as usize;
9001 let mut map = s.serialize_map(Some(field_count))?;
9002 if let Some(ref x) = self.restart {
9003 map.serialize_entry("restart", x)?;
9004 }
9005 map.end()
9006 }
9007 }
9008 impl<'de> Visitor<'de> for GameModVisitor<DoubleTimeTaiko> {
9009 type Value = DeserializedGameMod<'de, DoubleTimeTaiko>;
9010 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9011 f.write_str("DoubleTimeTaiko")
9012 }
9013 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9014 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
9015 let mut unknown_key__ = None;
9016 let mut speed_change = None;
9017 let mut adjust_pitch = None;
9018 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9019 match key.as_str() {
9020 "speed_change" => speed_change = Some(map.next_value()?),
9021 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
9022 _ => {
9023 unknown_key__ = Some(key);
9024 let _: IgnoredAny = map.next_value()?;
9025 }
9026 }
9027 }
9028 let gamemod = DoubleTimeTaiko {
9029 speed_change: speed_change.unwrap_or_default(),
9030 adjust_pitch: adjust_pitch.unwrap_or_default(),
9031 };
9032 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9033 }
9034 }
9035 impl Serialize for DoubleTimeTaiko {
9036 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9037 let field_count =
9038 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
9039 let mut map = s.serialize_map(Some(field_count))?;
9040 if let Some(ref x) = self.speed_change {
9041 map.serialize_entry("speed_change", x)?;
9042 }
9043 if let Some(ref x) = self.adjust_pitch {
9044 map.serialize_entry("adjust_pitch", x)?;
9045 }
9046 map.end()
9047 }
9048 }
9049 impl<'de> Visitor<'de> for GameModVisitor<NightcoreTaiko> {
9050 type Value = DeserializedGameMod<'de, NightcoreTaiko>;
9051 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9052 f.write_str("NightcoreTaiko")
9053 }
9054 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9055 const FIELDS: &'static [&'static str] = &["speed_change"];
9056 let mut unknown_key__ = None;
9057 let mut speed_change = None;
9058 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9059 match key.as_str() {
9060 "speed_change" => speed_change = Some(map.next_value()?),
9061 _ => {
9062 unknown_key__ = Some(key);
9063 let _: IgnoredAny = map.next_value()?;
9064 }
9065 }
9066 }
9067 let gamemod = NightcoreTaiko {
9068 speed_change: speed_change.unwrap_or_default(),
9069 };
9070 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9071 }
9072 }
9073 impl Serialize for NightcoreTaiko {
9074 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9075 let field_count = self.speed_change.is_some() as usize;
9076 let mut map = s.serialize_map(Some(field_count))?;
9077 if let Some(ref x) = self.speed_change {
9078 map.serialize_entry("speed_change", x)?;
9079 }
9080 map.end()
9081 }
9082 }
9083 impl<'de> Visitor<'de> for GameModVisitor<HiddenTaiko> {
9084 type Value = DeserializedGameMod<'de, HiddenTaiko>;
9085 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9086 f.write_str("HiddenTaiko")
9087 }
9088 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9089 const FIELDS: &'static [&'static str] = &[];
9090 let mut unknown_key__ = None;
9091 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9092 match key.as_str() {
9093 _ => {
9094 unknown_key__ = Some(key);
9095 let _: IgnoredAny = map.next_value()?;
9096 }
9097 }
9098 }
9099 let gamemod = HiddenTaiko {};
9100 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9101 }
9102 }
9103 impl Serialize for HiddenTaiko {
9104 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9105 let field_count = 0;
9106 let map = s.serialize_map(Some(field_count))?;
9107 map.end()
9108 }
9109 }
9110 impl<'de> Visitor<'de> for GameModVisitor<FlashlightTaiko> {
9111 type Value = DeserializedGameMod<'de, FlashlightTaiko>;
9112 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9113 f.write_str("FlashlightTaiko")
9114 }
9115 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9116 const FIELDS: &'static [&'static str] = &["size_multiplier", "combo_based_size"];
9117 let mut unknown_key__ = None;
9118 let mut size_multiplier = None;
9119 let mut combo_based_size = None;
9120 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9121 match key.as_str() {
9122 "size_multiplier" => size_multiplier = Some(map.next_value()?),
9123 "combo_based_size" => combo_based_size = Some(map.next_value()?),
9124 _ => {
9125 unknown_key__ = Some(key);
9126 let _: IgnoredAny = map.next_value()?;
9127 }
9128 }
9129 }
9130 let gamemod = FlashlightTaiko {
9131 size_multiplier: size_multiplier.unwrap_or_default(),
9132 combo_based_size: combo_based_size.unwrap_or_default(),
9133 };
9134 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9135 }
9136 }
9137 impl Serialize for FlashlightTaiko {
9138 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9139 let field_count =
9140 self.size_multiplier.is_some() as usize + self.combo_based_size.is_some() as usize;
9141 let mut map = s.serialize_map(Some(field_count))?;
9142 if let Some(ref x) = self.size_multiplier {
9143 map.serialize_entry("size_multiplier", x)?;
9144 }
9145 if let Some(ref x) = self.combo_based_size {
9146 map.serialize_entry("combo_based_size", x)?;
9147 }
9148 map.end()
9149 }
9150 }
9151 impl<'de> Visitor<'de> for GameModVisitor<AccuracyChallengeTaiko> {
9152 type Value = DeserializedGameMod<'de, AccuracyChallengeTaiko>;
9153 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9154 f.write_str("AccuracyChallengeTaiko")
9155 }
9156 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9157 const FIELDS: &'static [&'static str] =
9158 &["minimum_accuracy", "accuracy_judge_mode", "restart"];
9159 let mut unknown_key__ = None;
9160 let mut minimum_accuracy = None;
9161 let mut accuracy_judge_mode = None;
9162 let mut restart = None;
9163 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9164 match key.as_str() {
9165 "minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
9166 "accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
9167 "restart" => restart = Some(map.next_value()?),
9168 _ => {
9169 unknown_key__ = Some(key);
9170 let _: IgnoredAny = map.next_value()?;
9171 }
9172 }
9173 }
9174 let gamemod = AccuracyChallengeTaiko {
9175 minimum_accuracy: minimum_accuracy.unwrap_or_default(),
9176 accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
9177 restart: restart.unwrap_or_default(),
9178 };
9179 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9180 }
9181 }
9182 impl Serialize for AccuracyChallengeTaiko {
9183 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9184 let field_count = self.minimum_accuracy.is_some() as usize
9185 + self.accuracy_judge_mode.is_some() as usize
9186 + self.restart.is_some() as usize;
9187 let mut map = s.serialize_map(Some(field_count))?;
9188 if let Some(ref x) = self.minimum_accuracy {
9189 map.serialize_entry("minimum_accuracy", x)?;
9190 }
9191 if let Some(ref x) = self.accuracy_judge_mode {
9192 map.serialize_entry("accuracy_judge_mode", x)?;
9193 }
9194 if let Some(ref x) = self.restart {
9195 map.serialize_entry("restart", x)?;
9196 }
9197 map.end()
9198 }
9199 }
9200 impl<'de> Visitor<'de> for GameModVisitor<RandomTaiko> {
9201 type Value = DeserializedGameMod<'de, RandomTaiko>;
9202 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9203 f.write_str("RandomTaiko")
9204 }
9205 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9206 const FIELDS: &'static [&'static str] = &["seed"];
9207 let mut unknown_key__ = None;
9208 let mut seed = None;
9209 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9210 match key.as_str() {
9211 "seed" => seed = Some(map.next_value()?),
9212 _ => {
9213 unknown_key__ = Some(key);
9214 let _: IgnoredAny = map.next_value()?;
9215 }
9216 }
9217 }
9218 let gamemod = RandomTaiko {
9219 seed: seed.unwrap_or_default(),
9220 };
9221 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9222 }
9223 }
9224 impl Serialize for RandomTaiko {
9225 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9226 let field_count = self.seed.is_some() as usize;
9227 let mut map = s.serialize_map(Some(field_count))?;
9228 if let Some(ref x) = self.seed {
9229 map.serialize_entry("seed", x)?;
9230 }
9231 map.end()
9232 }
9233 }
9234 impl<'de> Visitor<'de> for GameModVisitor<DifficultyAdjustTaiko> {
9235 type Value = DeserializedGameMod<'de, DifficultyAdjustTaiko>;
9236 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9237 f.write_str("DifficultyAdjustTaiko")
9238 }
9239 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9240 const FIELDS: &'static [&'static str] = &[
9241 "scroll_speed",
9242 "drain_rate",
9243 "overall_difficulty",
9244 "extended_limits",
9245 ];
9246 let mut unknown_key__ = None;
9247 let mut scroll_speed = None;
9248 let mut drain_rate = None;
9249 let mut overall_difficulty = None;
9250 let mut extended_limits = None;
9251 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9252 match key.as_str() {
9253 "scroll_speed" => scroll_speed = Some(map.next_value()?),
9254 "drain_rate" => drain_rate = Some(map.next_value()?),
9255 "overall_difficulty" => overall_difficulty = Some(map.next_value()?),
9256 "extended_limits" => extended_limits = Some(map.next_value()?),
9257 _ => {
9258 unknown_key__ = Some(key);
9259 let _: IgnoredAny = map.next_value()?;
9260 }
9261 }
9262 }
9263 let gamemod = DifficultyAdjustTaiko {
9264 scroll_speed: scroll_speed.unwrap_or_default(),
9265 drain_rate: drain_rate.unwrap_or_default(),
9266 overall_difficulty: overall_difficulty.unwrap_or_default(),
9267 extended_limits: extended_limits.unwrap_or_default(),
9268 };
9269 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9270 }
9271 }
9272 impl Serialize for DifficultyAdjustTaiko {
9273 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9274 let field_count = self.scroll_speed.is_some() as usize
9275 + self.drain_rate.is_some() as usize
9276 + self.overall_difficulty.is_some() as usize
9277 + self.extended_limits.is_some() as usize;
9278 let mut map = s.serialize_map(Some(field_count))?;
9279 if let Some(ref x) = self.scroll_speed {
9280 map.serialize_entry("scroll_speed", x)?;
9281 }
9282 if let Some(ref x) = self.drain_rate {
9283 map.serialize_entry("drain_rate", x)?;
9284 }
9285 if let Some(ref x) = self.overall_difficulty {
9286 map.serialize_entry("overall_difficulty", x)?;
9287 }
9288 if let Some(ref x) = self.extended_limits {
9289 map.serialize_entry("extended_limits", x)?;
9290 }
9291 map.end()
9292 }
9293 }
9294 impl<'de> Visitor<'de> for GameModVisitor<ClassicTaiko> {
9295 type Value = DeserializedGameMod<'de, ClassicTaiko>;
9296 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9297 f.write_str("ClassicTaiko")
9298 }
9299 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9300 const FIELDS: &'static [&'static str] = &[];
9301 let mut unknown_key__ = None;
9302 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9303 match key.as_str() {
9304 _ => {
9305 unknown_key__ = Some(key);
9306 let _: IgnoredAny = map.next_value()?;
9307 }
9308 }
9309 }
9310 let gamemod = ClassicTaiko {};
9311 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9312 }
9313 }
9314 impl Serialize for ClassicTaiko {
9315 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9316 let field_count = 0;
9317 let map = s.serialize_map(Some(field_count))?;
9318 map.end()
9319 }
9320 }
9321 impl<'de> Visitor<'de> for GameModVisitor<SwapTaiko> {
9322 type Value = DeserializedGameMod<'de, SwapTaiko>;
9323 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9324 f.write_str("SwapTaiko")
9325 }
9326 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9327 const FIELDS: &'static [&'static str] = &[];
9328 let mut unknown_key__ = None;
9329 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9330 match key.as_str() {
9331 _ => {
9332 unknown_key__ = Some(key);
9333 let _: IgnoredAny = map.next_value()?;
9334 }
9335 }
9336 }
9337 let gamemod = SwapTaiko {};
9338 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9339 }
9340 }
9341 impl Serialize for SwapTaiko {
9342 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9343 let field_count = 0;
9344 let map = s.serialize_map(Some(field_count))?;
9345 map.end()
9346 }
9347 }
9348 impl<'de> Visitor<'de> for GameModVisitor<SingleTapTaiko> {
9349 type Value = DeserializedGameMod<'de, SingleTapTaiko>;
9350 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9351 f.write_str("SingleTapTaiko")
9352 }
9353 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9354 const FIELDS: &'static [&'static str] = &[];
9355 let mut unknown_key__ = None;
9356 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9357 match key.as_str() {
9358 _ => {
9359 unknown_key__ = Some(key);
9360 let _: IgnoredAny = map.next_value()?;
9361 }
9362 }
9363 }
9364 let gamemod = SingleTapTaiko {};
9365 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9366 }
9367 }
9368 impl Serialize for SingleTapTaiko {
9369 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9370 let field_count = 0;
9371 let map = s.serialize_map(Some(field_count))?;
9372 map.end()
9373 }
9374 }
9375 impl<'de> Visitor<'de> for GameModVisitor<ConstantSpeedTaiko> {
9376 type Value = DeserializedGameMod<'de, ConstantSpeedTaiko>;
9377 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9378 f.write_str("ConstantSpeedTaiko")
9379 }
9380 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9381 const FIELDS: &'static [&'static str] = &[];
9382 let mut unknown_key__ = None;
9383 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9384 match key.as_str() {
9385 _ => {
9386 unknown_key__ = Some(key);
9387 let _: IgnoredAny = map.next_value()?;
9388 }
9389 }
9390 }
9391 let gamemod = ConstantSpeedTaiko {};
9392 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9393 }
9394 }
9395 impl Serialize for ConstantSpeedTaiko {
9396 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9397 let field_count = 0;
9398 let map = s.serialize_map(Some(field_count))?;
9399 map.end()
9400 }
9401 }
9402 impl<'de> Visitor<'de> for GameModVisitor<AutoplayTaiko> {
9403 type Value = DeserializedGameMod<'de, AutoplayTaiko>;
9404 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9405 f.write_str("AutoplayTaiko")
9406 }
9407 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9408 const FIELDS: &'static [&'static str] = &[];
9409 let mut unknown_key__ = None;
9410 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9411 match key.as_str() {
9412 _ => {
9413 unknown_key__ = Some(key);
9414 let _: IgnoredAny = map.next_value()?;
9415 }
9416 }
9417 }
9418 let gamemod = AutoplayTaiko {};
9419 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9420 }
9421 }
9422 impl Serialize for AutoplayTaiko {
9423 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9424 let field_count = 0;
9425 let map = s.serialize_map(Some(field_count))?;
9426 map.end()
9427 }
9428 }
9429 impl<'de> Visitor<'de> for GameModVisitor<CinemaTaiko> {
9430 type Value = DeserializedGameMod<'de, CinemaTaiko>;
9431 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9432 f.write_str("CinemaTaiko")
9433 }
9434 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9435 const FIELDS: &'static [&'static str] = &[];
9436 let mut unknown_key__ = None;
9437 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9438 match key.as_str() {
9439 _ => {
9440 unknown_key__ = Some(key);
9441 let _: IgnoredAny = map.next_value()?;
9442 }
9443 }
9444 }
9445 let gamemod = CinemaTaiko {};
9446 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9447 }
9448 }
9449 impl Serialize for CinemaTaiko {
9450 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9451 let field_count = 0;
9452 let map = s.serialize_map(Some(field_count))?;
9453 map.end()
9454 }
9455 }
9456 impl<'de> Visitor<'de> for GameModVisitor<RelaxTaiko> {
9457 type Value = DeserializedGameMod<'de, RelaxTaiko>;
9458 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9459 f.write_str("RelaxTaiko")
9460 }
9461 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9462 const FIELDS: &'static [&'static str] = &[];
9463 let mut unknown_key__ = None;
9464 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9465 match key.as_str() {
9466 _ => {
9467 unknown_key__ = Some(key);
9468 let _: IgnoredAny = map.next_value()?;
9469 }
9470 }
9471 }
9472 let gamemod = RelaxTaiko {};
9473 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9474 }
9475 }
9476 impl Serialize for RelaxTaiko {
9477 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9478 let field_count = 0;
9479 let map = s.serialize_map(Some(field_count))?;
9480 map.end()
9481 }
9482 }
9483 impl<'de> Visitor<'de> for GameModVisitor<WindUpTaiko> {
9484 type Value = DeserializedGameMod<'de, WindUpTaiko>;
9485 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9486 f.write_str("WindUpTaiko")
9487 }
9488 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9489 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
9490 let mut unknown_key__ = None;
9491 let mut initial_rate = None;
9492 let mut final_rate = None;
9493 let mut adjust_pitch = None;
9494 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9495 match key.as_str() {
9496 "initial_rate" => initial_rate = Some(map.next_value()?),
9497 "final_rate" => final_rate = Some(map.next_value()?),
9498 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
9499 _ => {
9500 unknown_key__ = Some(key);
9501 let _: IgnoredAny = map.next_value()?;
9502 }
9503 }
9504 }
9505 let gamemod = WindUpTaiko {
9506 initial_rate: initial_rate.unwrap_or_default(),
9507 final_rate: final_rate.unwrap_or_default(),
9508 adjust_pitch: adjust_pitch.unwrap_or_default(),
9509 };
9510 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9511 }
9512 }
9513 impl Serialize for WindUpTaiko {
9514 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9515 let field_count = self.initial_rate.is_some() as usize
9516 + self.final_rate.is_some() as usize
9517 + self.adjust_pitch.is_some() as usize;
9518 let mut map = s.serialize_map(Some(field_count))?;
9519 if let Some(ref x) = self.initial_rate {
9520 map.serialize_entry("initial_rate", x)?;
9521 }
9522 if let Some(ref x) = self.final_rate {
9523 map.serialize_entry("final_rate", x)?;
9524 }
9525 if let Some(ref x) = self.adjust_pitch {
9526 map.serialize_entry("adjust_pitch", x)?;
9527 }
9528 map.end()
9529 }
9530 }
9531 impl<'de> Visitor<'de> for GameModVisitor<WindDownTaiko> {
9532 type Value = DeserializedGameMod<'de, WindDownTaiko>;
9533 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9534 f.write_str("WindDownTaiko")
9535 }
9536 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9537 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
9538 let mut unknown_key__ = None;
9539 let mut initial_rate = None;
9540 let mut final_rate = None;
9541 let mut adjust_pitch = None;
9542 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9543 match key.as_str() {
9544 "initial_rate" => initial_rate = Some(map.next_value()?),
9545 "final_rate" => final_rate = Some(map.next_value()?),
9546 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
9547 _ => {
9548 unknown_key__ = Some(key);
9549 let _: IgnoredAny = map.next_value()?;
9550 }
9551 }
9552 }
9553 let gamemod = WindDownTaiko {
9554 initial_rate: initial_rate.unwrap_or_default(),
9555 final_rate: final_rate.unwrap_or_default(),
9556 adjust_pitch: adjust_pitch.unwrap_or_default(),
9557 };
9558 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9559 }
9560 }
9561 impl Serialize for WindDownTaiko {
9562 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9563 let field_count = self.initial_rate.is_some() as usize
9564 + self.final_rate.is_some() as usize
9565 + self.adjust_pitch.is_some() as usize;
9566 let mut map = s.serialize_map(Some(field_count))?;
9567 if let Some(ref x) = self.initial_rate {
9568 map.serialize_entry("initial_rate", x)?;
9569 }
9570 if let Some(ref x) = self.final_rate {
9571 map.serialize_entry("final_rate", x)?;
9572 }
9573 if let Some(ref x) = self.adjust_pitch {
9574 map.serialize_entry("adjust_pitch", x)?;
9575 }
9576 map.end()
9577 }
9578 }
9579 impl<'de> Visitor<'de> for GameModVisitor<MutedTaiko> {
9580 type Value = DeserializedGameMod<'de, MutedTaiko>;
9581 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9582 f.write_str("MutedTaiko")
9583 }
9584 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9585 const FIELDS: &'static [&'static str] = &[
9586 "inverse_muting",
9587 "enable_metronome",
9588 "mute_combo_count",
9589 "affects_hit_sounds",
9590 ];
9591 let mut unknown_key__ = None;
9592 let mut inverse_muting = None;
9593 let mut enable_metronome = None;
9594 let mut mute_combo_count = None;
9595 let mut affects_hit_sounds = None;
9596 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9597 match key.as_str() {
9598 "inverse_muting" => inverse_muting = Some(map.next_value()?),
9599 "enable_metronome" => enable_metronome = Some(map.next_value()?),
9600 "mute_combo_count" => mute_combo_count = Some(map.next_value()?),
9601 "affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
9602 _ => {
9603 unknown_key__ = Some(key);
9604 let _: IgnoredAny = map.next_value()?;
9605 }
9606 }
9607 }
9608 let gamemod = MutedTaiko {
9609 inverse_muting: inverse_muting.unwrap_or_default(),
9610 enable_metronome: enable_metronome.unwrap_or_default(),
9611 mute_combo_count: mute_combo_count.unwrap_or_default(),
9612 affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
9613 };
9614 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9615 }
9616 }
9617 impl Serialize for MutedTaiko {
9618 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9619 let field_count = self.inverse_muting.is_some() as usize
9620 + self.enable_metronome.is_some() as usize
9621 + self.mute_combo_count.is_some() as usize
9622 + self.affects_hit_sounds.is_some() as usize;
9623 let mut map = s.serialize_map(Some(field_count))?;
9624 if let Some(ref x) = self.inverse_muting {
9625 map.serialize_entry("inverse_muting", x)?;
9626 }
9627 if let Some(ref x) = self.enable_metronome {
9628 map.serialize_entry("enable_metronome", x)?;
9629 }
9630 if let Some(ref x) = self.mute_combo_count {
9631 map.serialize_entry("mute_combo_count", x)?;
9632 }
9633 if let Some(ref x) = self.affects_hit_sounds {
9634 map.serialize_entry("affects_hit_sounds", x)?;
9635 }
9636 map.end()
9637 }
9638 }
9639 impl<'de> Visitor<'de> for GameModVisitor<AdaptiveSpeedTaiko> {
9640 type Value = DeserializedGameMod<'de, AdaptiveSpeedTaiko>;
9641 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9642 f.write_str("AdaptiveSpeedTaiko")
9643 }
9644 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9645 const FIELDS: &'static [&'static str] = &["initial_rate", "adjust_pitch"];
9646 let mut unknown_key__ = None;
9647 let mut initial_rate = None;
9648 let mut adjust_pitch = None;
9649 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9650 match key.as_str() {
9651 "initial_rate" => initial_rate = Some(map.next_value()?),
9652 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
9653 _ => {
9654 unknown_key__ = Some(key);
9655 let _: IgnoredAny = map.next_value()?;
9656 }
9657 }
9658 }
9659 let gamemod = AdaptiveSpeedTaiko {
9660 initial_rate: initial_rate.unwrap_or_default(),
9661 adjust_pitch: adjust_pitch.unwrap_or_default(),
9662 };
9663 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9664 }
9665 }
9666 impl Serialize for AdaptiveSpeedTaiko {
9667 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9668 let field_count =
9669 self.initial_rate.is_some() as usize + self.adjust_pitch.is_some() as usize;
9670 let mut map = s.serialize_map(Some(field_count))?;
9671 if let Some(ref x) = self.initial_rate {
9672 map.serialize_entry("initial_rate", x)?;
9673 }
9674 if let Some(ref x) = self.adjust_pitch {
9675 map.serialize_entry("adjust_pitch", x)?;
9676 }
9677 map.end()
9678 }
9679 }
9680 impl<'de> Visitor<'de> for GameModVisitor<ScoreV2Taiko> {
9681 type Value = DeserializedGameMod<'de, ScoreV2Taiko>;
9682 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9683 f.write_str("ScoreV2Taiko")
9684 }
9685 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9686 const FIELDS: &'static [&'static str] = &[];
9687 let mut unknown_key__ = None;
9688 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9689 match key.as_str() {
9690 _ => {
9691 unknown_key__ = Some(key);
9692 let _: IgnoredAny = map.next_value()?;
9693 }
9694 }
9695 }
9696 let gamemod = ScoreV2Taiko {};
9697 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9698 }
9699 }
9700 impl Serialize for ScoreV2Taiko {
9701 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9702 let field_count = 0;
9703 let map = s.serialize_map(Some(field_count))?;
9704 map.end()
9705 }
9706 }
9707 impl<'de> Visitor<'de> for GameModVisitor<EasyCatch> {
9708 type Value = DeserializedGameMod<'de, EasyCatch>;
9709 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9710 f.write_str("EasyCatch")
9711 }
9712 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9713 const FIELDS: &'static [&'static str] = &["retries"];
9714 let mut unknown_key__ = None;
9715 let mut retries = None;
9716 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9717 match key.as_str() {
9718 "retries" => retries = Some(map.next_value()?),
9719 _ => {
9720 unknown_key__ = Some(key);
9721 let _: IgnoredAny = map.next_value()?;
9722 }
9723 }
9724 }
9725 let gamemod = EasyCatch {
9726 retries: retries.unwrap_or_default(),
9727 };
9728 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9729 }
9730 }
9731 impl Serialize for EasyCatch {
9732 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9733 let field_count = self.retries.is_some() as usize;
9734 let mut map = s.serialize_map(Some(field_count))?;
9735 if let Some(ref x) = self.retries {
9736 map.serialize_entry("retries", x)?;
9737 }
9738 map.end()
9739 }
9740 }
9741 impl<'de> Visitor<'de> for GameModVisitor<NoFailCatch> {
9742 type Value = DeserializedGameMod<'de, NoFailCatch>;
9743 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9744 f.write_str("NoFailCatch")
9745 }
9746 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9747 const FIELDS: &'static [&'static str] = &[];
9748 let mut unknown_key__ = None;
9749 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9750 match key.as_str() {
9751 _ => {
9752 unknown_key__ = Some(key);
9753 let _: IgnoredAny = map.next_value()?;
9754 }
9755 }
9756 }
9757 let gamemod = NoFailCatch {};
9758 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9759 }
9760 }
9761 impl Serialize for NoFailCatch {
9762 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9763 let field_count = 0;
9764 let map = s.serialize_map(Some(field_count))?;
9765 map.end()
9766 }
9767 }
9768 impl<'de> Visitor<'de> for GameModVisitor<HalfTimeCatch> {
9769 type Value = DeserializedGameMod<'de, HalfTimeCatch>;
9770 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9771 f.write_str("HalfTimeCatch")
9772 }
9773 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9774 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
9775 let mut unknown_key__ = None;
9776 let mut speed_change = None;
9777 let mut adjust_pitch = None;
9778 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9779 match key.as_str() {
9780 "speed_change" => speed_change = Some(map.next_value()?),
9781 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
9782 _ => {
9783 unknown_key__ = Some(key);
9784 let _: IgnoredAny = map.next_value()?;
9785 }
9786 }
9787 }
9788 let gamemod = HalfTimeCatch {
9789 speed_change: speed_change.unwrap_or_default(),
9790 adjust_pitch: adjust_pitch.unwrap_or_default(),
9791 };
9792 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9793 }
9794 }
9795 impl Serialize for HalfTimeCatch {
9796 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9797 let field_count =
9798 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
9799 let mut map = s.serialize_map(Some(field_count))?;
9800 if let Some(ref x) = self.speed_change {
9801 map.serialize_entry("speed_change", x)?;
9802 }
9803 if let Some(ref x) = self.adjust_pitch {
9804 map.serialize_entry("adjust_pitch", x)?;
9805 }
9806 map.end()
9807 }
9808 }
9809 impl<'de> Visitor<'de> for GameModVisitor<DaycoreCatch> {
9810 type Value = DeserializedGameMod<'de, DaycoreCatch>;
9811 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9812 f.write_str("DaycoreCatch")
9813 }
9814 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9815 const FIELDS: &'static [&'static str] = &["speed_change"];
9816 let mut unknown_key__ = None;
9817 let mut speed_change = None;
9818 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9819 match key.as_str() {
9820 "speed_change" => speed_change = Some(map.next_value()?),
9821 _ => {
9822 unknown_key__ = Some(key);
9823 let _: IgnoredAny = map.next_value()?;
9824 }
9825 }
9826 }
9827 let gamemod = DaycoreCatch {
9828 speed_change: speed_change.unwrap_or_default(),
9829 };
9830 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9831 }
9832 }
9833 impl Serialize for DaycoreCatch {
9834 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9835 let field_count = self.speed_change.is_some() as usize;
9836 let mut map = s.serialize_map(Some(field_count))?;
9837 if let Some(ref x) = self.speed_change {
9838 map.serialize_entry("speed_change", x)?;
9839 }
9840 map.end()
9841 }
9842 }
9843 impl<'de> Visitor<'de> for GameModVisitor<HardRockCatch> {
9844 type Value = DeserializedGameMod<'de, HardRockCatch>;
9845 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9846 f.write_str("HardRockCatch")
9847 }
9848 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9849 const FIELDS: &'static [&'static str] = &[];
9850 let mut unknown_key__ = None;
9851 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9852 match key.as_str() {
9853 _ => {
9854 unknown_key__ = Some(key);
9855 let _: IgnoredAny = map.next_value()?;
9856 }
9857 }
9858 }
9859 let gamemod = HardRockCatch {};
9860 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9861 }
9862 }
9863 impl Serialize for HardRockCatch {
9864 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9865 let field_count = 0;
9866 let map = s.serialize_map(Some(field_count))?;
9867 map.end()
9868 }
9869 }
9870 impl<'de> Visitor<'de> for GameModVisitor<SuddenDeathCatch> {
9871 type Value = DeserializedGameMod<'de, SuddenDeathCatch>;
9872 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9873 f.write_str("SuddenDeathCatch")
9874 }
9875 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9876 const FIELDS: &'static [&'static str] = &["restart"];
9877 let mut unknown_key__ = None;
9878 let mut restart = None;
9879 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9880 match key.as_str() {
9881 "restart" => restart = Some(map.next_value()?),
9882 _ => {
9883 unknown_key__ = Some(key);
9884 let _: IgnoredAny = map.next_value()?;
9885 }
9886 }
9887 }
9888 let gamemod = SuddenDeathCatch {
9889 restart: restart.unwrap_or_default(),
9890 };
9891 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9892 }
9893 }
9894 impl Serialize for SuddenDeathCatch {
9895 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9896 let field_count = self.restart.is_some() as usize;
9897 let mut map = s.serialize_map(Some(field_count))?;
9898 if let Some(ref x) = self.restart {
9899 map.serialize_entry("restart", x)?;
9900 }
9901 map.end()
9902 }
9903 }
9904 impl<'de> Visitor<'de> for GameModVisitor<PerfectCatch> {
9905 type Value = DeserializedGameMod<'de, PerfectCatch>;
9906 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9907 f.write_str("PerfectCatch")
9908 }
9909 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9910 const FIELDS: &'static [&'static str] = &["restart"];
9911 let mut unknown_key__ = None;
9912 let mut restart = None;
9913 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9914 match key.as_str() {
9915 "restart" => restart = Some(map.next_value()?),
9916 _ => {
9917 unknown_key__ = Some(key);
9918 let _: IgnoredAny = map.next_value()?;
9919 }
9920 }
9921 }
9922 let gamemod = PerfectCatch {
9923 restart: restart.unwrap_or_default(),
9924 };
9925 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9926 }
9927 }
9928 impl Serialize for PerfectCatch {
9929 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9930 let field_count = self.restart.is_some() as usize;
9931 let mut map = s.serialize_map(Some(field_count))?;
9932 if let Some(ref x) = self.restart {
9933 map.serialize_entry("restart", x)?;
9934 }
9935 map.end()
9936 }
9937 }
9938 impl<'de> Visitor<'de> for GameModVisitor<DoubleTimeCatch> {
9939 type Value = DeserializedGameMod<'de, DoubleTimeCatch>;
9940 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9941 f.write_str("DoubleTimeCatch")
9942 }
9943 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9944 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
9945 let mut unknown_key__ = None;
9946 let mut speed_change = None;
9947 let mut adjust_pitch = None;
9948 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9949 match key.as_str() {
9950 "speed_change" => speed_change = Some(map.next_value()?),
9951 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
9952 _ => {
9953 unknown_key__ = Some(key);
9954 let _: IgnoredAny = map.next_value()?;
9955 }
9956 }
9957 }
9958 let gamemod = DoubleTimeCatch {
9959 speed_change: speed_change.unwrap_or_default(),
9960 adjust_pitch: adjust_pitch.unwrap_or_default(),
9961 };
9962 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
9963 }
9964 }
9965 impl Serialize for DoubleTimeCatch {
9966 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
9967 let field_count =
9968 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
9969 let mut map = s.serialize_map(Some(field_count))?;
9970 if let Some(ref x) = self.speed_change {
9971 map.serialize_entry("speed_change", x)?;
9972 }
9973 if let Some(ref x) = self.adjust_pitch {
9974 map.serialize_entry("adjust_pitch", x)?;
9975 }
9976 map.end()
9977 }
9978 }
9979 impl<'de> Visitor<'de> for GameModVisitor<NightcoreCatch> {
9980 type Value = DeserializedGameMod<'de, NightcoreCatch>;
9981 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
9982 f.write_str("NightcoreCatch")
9983 }
9984 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
9985 const FIELDS: &'static [&'static str] = &["speed_change"];
9986 let mut unknown_key__ = None;
9987 let mut speed_change = None;
9988 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
9989 match key.as_str() {
9990 "speed_change" => speed_change = Some(map.next_value()?),
9991 _ => {
9992 unknown_key__ = Some(key);
9993 let _: IgnoredAny = map.next_value()?;
9994 }
9995 }
9996 }
9997 let gamemod = NightcoreCatch {
9998 speed_change: speed_change.unwrap_or_default(),
9999 };
10000 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10001 }
10002 }
10003 impl Serialize for NightcoreCatch {
10004 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10005 let field_count = self.speed_change.is_some() as usize;
10006 let mut map = s.serialize_map(Some(field_count))?;
10007 if let Some(ref x) = self.speed_change {
10008 map.serialize_entry("speed_change", x)?;
10009 }
10010 map.end()
10011 }
10012 }
10013 impl<'de> Visitor<'de> for GameModVisitor<HiddenCatch> {
10014 type Value = DeserializedGameMod<'de, HiddenCatch>;
10015 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10016 f.write_str("HiddenCatch")
10017 }
10018 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10019 const FIELDS: &'static [&'static str] = &[];
10020 let mut unknown_key__ = None;
10021 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10022 match key.as_str() {
10023 _ => {
10024 unknown_key__ = Some(key);
10025 let _: IgnoredAny = map.next_value()?;
10026 }
10027 }
10028 }
10029 let gamemod = HiddenCatch {};
10030 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10031 }
10032 }
10033 impl Serialize for HiddenCatch {
10034 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10035 let field_count = 0;
10036 let map = s.serialize_map(Some(field_count))?;
10037 map.end()
10038 }
10039 }
10040 impl<'de> Visitor<'de> for GameModVisitor<FlashlightCatch> {
10041 type Value = DeserializedGameMod<'de, FlashlightCatch>;
10042 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10043 f.write_str("FlashlightCatch")
10044 }
10045 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10046 const FIELDS: &'static [&'static str] = &["size_multiplier", "combo_based_size"];
10047 let mut unknown_key__ = None;
10048 let mut size_multiplier = None;
10049 let mut combo_based_size = None;
10050 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10051 match key.as_str() {
10052 "size_multiplier" => size_multiplier = Some(map.next_value()?),
10053 "combo_based_size" => combo_based_size = Some(map.next_value()?),
10054 _ => {
10055 unknown_key__ = Some(key);
10056 let _: IgnoredAny = map.next_value()?;
10057 }
10058 }
10059 }
10060 let gamemod = FlashlightCatch {
10061 size_multiplier: size_multiplier.unwrap_or_default(),
10062 combo_based_size: combo_based_size.unwrap_or_default(),
10063 };
10064 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10065 }
10066 }
10067 impl Serialize for FlashlightCatch {
10068 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10069 let field_count =
10070 self.size_multiplier.is_some() as usize + self.combo_based_size.is_some() as usize;
10071 let mut map = s.serialize_map(Some(field_count))?;
10072 if let Some(ref x) = self.size_multiplier {
10073 map.serialize_entry("size_multiplier", x)?;
10074 }
10075 if let Some(ref x) = self.combo_based_size {
10076 map.serialize_entry("combo_based_size", x)?;
10077 }
10078 map.end()
10079 }
10080 }
10081 impl<'de> Visitor<'de> for GameModVisitor<AccuracyChallengeCatch> {
10082 type Value = DeserializedGameMod<'de, AccuracyChallengeCatch>;
10083 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10084 f.write_str("AccuracyChallengeCatch")
10085 }
10086 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10087 const FIELDS: &'static [&'static str] =
10088 &["minimum_accuracy", "accuracy_judge_mode", "restart"];
10089 let mut unknown_key__ = None;
10090 let mut minimum_accuracy = None;
10091 let mut accuracy_judge_mode = None;
10092 let mut restart = None;
10093 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10094 match key.as_str() {
10095 "minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
10096 "accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
10097 "restart" => restart = Some(map.next_value()?),
10098 _ => {
10099 unknown_key__ = Some(key);
10100 let _: IgnoredAny = map.next_value()?;
10101 }
10102 }
10103 }
10104 let gamemod = AccuracyChallengeCatch {
10105 minimum_accuracy: minimum_accuracy.unwrap_or_default(),
10106 accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
10107 restart: restart.unwrap_or_default(),
10108 };
10109 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10110 }
10111 }
10112 impl Serialize for AccuracyChallengeCatch {
10113 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10114 let field_count = self.minimum_accuracy.is_some() as usize
10115 + self.accuracy_judge_mode.is_some() as usize
10116 + self.restart.is_some() as usize;
10117 let mut map = s.serialize_map(Some(field_count))?;
10118 if let Some(ref x) = self.minimum_accuracy {
10119 map.serialize_entry("minimum_accuracy", x)?;
10120 }
10121 if let Some(ref x) = self.accuracy_judge_mode {
10122 map.serialize_entry("accuracy_judge_mode", x)?;
10123 }
10124 if let Some(ref x) = self.restart {
10125 map.serialize_entry("restart", x)?;
10126 }
10127 map.end()
10128 }
10129 }
10130 impl<'de> Visitor<'de> for GameModVisitor<DifficultyAdjustCatch> {
10131 type Value = DeserializedGameMod<'de, DifficultyAdjustCatch>;
10132 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10133 f.write_str("DifficultyAdjustCatch")
10134 }
10135 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10136 const FIELDS: &'static [&'static str] = &[
10137 "circle_size",
10138 "approach_rate",
10139 "hard_rock_offsets",
10140 "drain_rate",
10141 "overall_difficulty",
10142 "extended_limits",
10143 ];
10144 let mut unknown_key__ = None;
10145 let mut circle_size = None;
10146 let mut approach_rate = None;
10147 let mut hard_rock_offsets = None;
10148 let mut drain_rate = None;
10149 let mut overall_difficulty = None;
10150 let mut extended_limits = None;
10151 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10152 match key.as_str() {
10153 "circle_size" => circle_size = Some(map.next_value()?),
10154 "approach_rate" => approach_rate = Some(map.next_value()?),
10155 "hard_rock_offsets" => hard_rock_offsets = Some(map.next_value()?),
10156 "drain_rate" => drain_rate = Some(map.next_value()?),
10157 "overall_difficulty" => overall_difficulty = Some(map.next_value()?),
10158 "extended_limits" => extended_limits = Some(map.next_value()?),
10159 _ => {
10160 unknown_key__ = Some(key);
10161 let _: IgnoredAny = map.next_value()?;
10162 }
10163 }
10164 }
10165 let gamemod = DifficultyAdjustCatch {
10166 circle_size: circle_size.unwrap_or_default(),
10167 approach_rate: approach_rate.unwrap_or_default(),
10168 hard_rock_offsets: hard_rock_offsets.unwrap_or_default(),
10169 drain_rate: drain_rate.unwrap_or_default(),
10170 overall_difficulty: overall_difficulty.unwrap_or_default(),
10171 extended_limits: extended_limits.unwrap_or_default(),
10172 };
10173 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10174 }
10175 }
10176 impl Serialize for DifficultyAdjustCatch {
10177 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10178 let field_count = self.circle_size.is_some() as usize
10179 + self.approach_rate.is_some() as usize
10180 + self.hard_rock_offsets.is_some() as usize
10181 + self.drain_rate.is_some() as usize
10182 + self.overall_difficulty.is_some() as usize
10183 + self.extended_limits.is_some() as usize;
10184 let mut map = s.serialize_map(Some(field_count))?;
10185 if let Some(ref x) = self.circle_size {
10186 map.serialize_entry("circle_size", x)?;
10187 }
10188 if let Some(ref x) = self.approach_rate {
10189 map.serialize_entry("approach_rate", x)?;
10190 }
10191 if let Some(ref x) = self.hard_rock_offsets {
10192 map.serialize_entry("hard_rock_offsets", x)?;
10193 }
10194 if let Some(ref x) = self.drain_rate {
10195 map.serialize_entry("drain_rate", x)?;
10196 }
10197 if let Some(ref x) = self.overall_difficulty {
10198 map.serialize_entry("overall_difficulty", x)?;
10199 }
10200 if let Some(ref x) = self.extended_limits {
10201 map.serialize_entry("extended_limits", x)?;
10202 }
10203 map.end()
10204 }
10205 }
10206 impl<'de> Visitor<'de> for GameModVisitor<ClassicCatch> {
10207 type Value = DeserializedGameMod<'de, ClassicCatch>;
10208 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10209 f.write_str("ClassicCatch")
10210 }
10211 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10212 const FIELDS: &'static [&'static str] = &[];
10213 let mut unknown_key__ = None;
10214 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10215 match key.as_str() {
10216 _ => {
10217 unknown_key__ = Some(key);
10218 let _: IgnoredAny = map.next_value()?;
10219 }
10220 }
10221 }
10222 let gamemod = ClassicCatch {};
10223 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10224 }
10225 }
10226 impl Serialize for ClassicCatch {
10227 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10228 let field_count = 0;
10229 let map = s.serialize_map(Some(field_count))?;
10230 map.end()
10231 }
10232 }
10233 impl<'de> Visitor<'de> for GameModVisitor<MirrorCatch> {
10234 type Value = DeserializedGameMod<'de, MirrorCatch>;
10235 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10236 f.write_str("MirrorCatch")
10237 }
10238 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10239 const FIELDS: &'static [&'static str] = &[];
10240 let mut unknown_key__ = None;
10241 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10242 match key.as_str() {
10243 _ => {
10244 unknown_key__ = Some(key);
10245 let _: IgnoredAny = map.next_value()?;
10246 }
10247 }
10248 }
10249 let gamemod = MirrorCatch {};
10250 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10251 }
10252 }
10253 impl Serialize for MirrorCatch {
10254 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10255 let field_count = 0;
10256 let map = s.serialize_map(Some(field_count))?;
10257 map.end()
10258 }
10259 }
10260 impl<'de> Visitor<'de> for GameModVisitor<AutoplayCatch> {
10261 type Value = DeserializedGameMod<'de, AutoplayCatch>;
10262 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10263 f.write_str("AutoplayCatch")
10264 }
10265 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10266 const FIELDS: &'static [&'static str] = &[];
10267 let mut unknown_key__ = None;
10268 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10269 match key.as_str() {
10270 _ => {
10271 unknown_key__ = Some(key);
10272 let _: IgnoredAny = map.next_value()?;
10273 }
10274 }
10275 }
10276 let gamemod = AutoplayCatch {};
10277 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10278 }
10279 }
10280 impl Serialize for AutoplayCatch {
10281 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10282 let field_count = 0;
10283 let map = s.serialize_map(Some(field_count))?;
10284 map.end()
10285 }
10286 }
10287 impl<'de> Visitor<'de> for GameModVisitor<CinemaCatch> {
10288 type Value = DeserializedGameMod<'de, CinemaCatch>;
10289 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10290 f.write_str("CinemaCatch")
10291 }
10292 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10293 const FIELDS: &'static [&'static str] = &[];
10294 let mut unknown_key__ = None;
10295 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10296 match key.as_str() {
10297 _ => {
10298 unknown_key__ = Some(key);
10299 let _: IgnoredAny = map.next_value()?;
10300 }
10301 }
10302 }
10303 let gamemod = CinemaCatch {};
10304 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10305 }
10306 }
10307 impl Serialize for CinemaCatch {
10308 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10309 let field_count = 0;
10310 let map = s.serialize_map(Some(field_count))?;
10311 map.end()
10312 }
10313 }
10314 impl<'de> Visitor<'de> for GameModVisitor<RelaxCatch> {
10315 type Value = DeserializedGameMod<'de, RelaxCatch>;
10316 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10317 f.write_str("RelaxCatch")
10318 }
10319 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10320 const FIELDS: &'static [&'static str] = &[];
10321 let mut unknown_key__ = None;
10322 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10323 match key.as_str() {
10324 _ => {
10325 unknown_key__ = Some(key);
10326 let _: IgnoredAny = map.next_value()?;
10327 }
10328 }
10329 }
10330 let gamemod = RelaxCatch {};
10331 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10332 }
10333 }
10334 impl Serialize for RelaxCatch {
10335 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10336 let field_count = 0;
10337 let map = s.serialize_map(Some(field_count))?;
10338 map.end()
10339 }
10340 }
10341 impl<'de> Visitor<'de> for GameModVisitor<WindUpCatch> {
10342 type Value = DeserializedGameMod<'de, WindUpCatch>;
10343 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10344 f.write_str("WindUpCatch")
10345 }
10346 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10347 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
10348 let mut unknown_key__ = None;
10349 let mut initial_rate = None;
10350 let mut final_rate = None;
10351 let mut adjust_pitch = None;
10352 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10353 match key.as_str() {
10354 "initial_rate" => initial_rate = Some(map.next_value()?),
10355 "final_rate" => final_rate = Some(map.next_value()?),
10356 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
10357 _ => {
10358 unknown_key__ = Some(key);
10359 let _: IgnoredAny = map.next_value()?;
10360 }
10361 }
10362 }
10363 let gamemod = WindUpCatch {
10364 initial_rate: initial_rate.unwrap_or_default(),
10365 final_rate: final_rate.unwrap_or_default(),
10366 adjust_pitch: adjust_pitch.unwrap_or_default(),
10367 };
10368 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10369 }
10370 }
10371 impl Serialize for WindUpCatch {
10372 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10373 let field_count = self.initial_rate.is_some() as usize
10374 + self.final_rate.is_some() as usize
10375 + self.adjust_pitch.is_some() as usize;
10376 let mut map = s.serialize_map(Some(field_count))?;
10377 if let Some(ref x) = self.initial_rate {
10378 map.serialize_entry("initial_rate", x)?;
10379 }
10380 if let Some(ref x) = self.final_rate {
10381 map.serialize_entry("final_rate", x)?;
10382 }
10383 if let Some(ref x) = self.adjust_pitch {
10384 map.serialize_entry("adjust_pitch", x)?;
10385 }
10386 map.end()
10387 }
10388 }
10389 impl<'de> Visitor<'de> for GameModVisitor<WindDownCatch> {
10390 type Value = DeserializedGameMod<'de, WindDownCatch>;
10391 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10392 f.write_str("WindDownCatch")
10393 }
10394 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10395 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
10396 let mut unknown_key__ = None;
10397 let mut initial_rate = None;
10398 let mut final_rate = None;
10399 let mut adjust_pitch = None;
10400 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10401 match key.as_str() {
10402 "initial_rate" => initial_rate = Some(map.next_value()?),
10403 "final_rate" => final_rate = Some(map.next_value()?),
10404 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
10405 _ => {
10406 unknown_key__ = Some(key);
10407 let _: IgnoredAny = map.next_value()?;
10408 }
10409 }
10410 }
10411 let gamemod = WindDownCatch {
10412 initial_rate: initial_rate.unwrap_or_default(),
10413 final_rate: final_rate.unwrap_or_default(),
10414 adjust_pitch: adjust_pitch.unwrap_or_default(),
10415 };
10416 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10417 }
10418 }
10419 impl Serialize for WindDownCatch {
10420 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10421 let field_count = self.initial_rate.is_some() as usize
10422 + self.final_rate.is_some() as usize
10423 + self.adjust_pitch.is_some() as usize;
10424 let mut map = s.serialize_map(Some(field_count))?;
10425 if let Some(ref x) = self.initial_rate {
10426 map.serialize_entry("initial_rate", x)?;
10427 }
10428 if let Some(ref x) = self.final_rate {
10429 map.serialize_entry("final_rate", x)?;
10430 }
10431 if let Some(ref x) = self.adjust_pitch {
10432 map.serialize_entry("adjust_pitch", x)?;
10433 }
10434 map.end()
10435 }
10436 }
10437 impl<'de> Visitor<'de> for GameModVisitor<FloatingFruitsCatch> {
10438 type Value = DeserializedGameMod<'de, FloatingFruitsCatch>;
10439 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10440 f.write_str("FloatingFruitsCatch")
10441 }
10442 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10443 const FIELDS: &'static [&'static str] = &[];
10444 let mut unknown_key__ = None;
10445 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10446 match key.as_str() {
10447 _ => {
10448 unknown_key__ = Some(key);
10449 let _: IgnoredAny = map.next_value()?;
10450 }
10451 }
10452 }
10453 let gamemod = FloatingFruitsCatch {};
10454 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10455 }
10456 }
10457 impl Serialize for FloatingFruitsCatch {
10458 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10459 let field_count = 0;
10460 let map = s.serialize_map(Some(field_count))?;
10461 map.end()
10462 }
10463 }
10464 impl<'de> Visitor<'de> for GameModVisitor<MutedCatch> {
10465 type Value = DeserializedGameMod<'de, MutedCatch>;
10466 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10467 f.write_str("MutedCatch")
10468 }
10469 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10470 const FIELDS: &'static [&'static str] = &[
10471 "inverse_muting",
10472 "enable_metronome",
10473 "mute_combo_count",
10474 "affects_hit_sounds",
10475 ];
10476 let mut unknown_key__ = None;
10477 let mut inverse_muting = None;
10478 let mut enable_metronome = None;
10479 let mut mute_combo_count = None;
10480 let mut affects_hit_sounds = None;
10481 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10482 match key.as_str() {
10483 "inverse_muting" => inverse_muting = Some(map.next_value()?),
10484 "enable_metronome" => enable_metronome = Some(map.next_value()?),
10485 "mute_combo_count" => mute_combo_count = Some(map.next_value()?),
10486 "affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
10487 _ => {
10488 unknown_key__ = Some(key);
10489 let _: IgnoredAny = map.next_value()?;
10490 }
10491 }
10492 }
10493 let gamemod = MutedCatch {
10494 inverse_muting: inverse_muting.unwrap_or_default(),
10495 enable_metronome: enable_metronome.unwrap_or_default(),
10496 mute_combo_count: mute_combo_count.unwrap_or_default(),
10497 affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
10498 };
10499 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10500 }
10501 }
10502 impl Serialize for MutedCatch {
10503 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10504 let field_count = self.inverse_muting.is_some() as usize
10505 + self.enable_metronome.is_some() as usize
10506 + self.mute_combo_count.is_some() as usize
10507 + self.affects_hit_sounds.is_some() as usize;
10508 let mut map = s.serialize_map(Some(field_count))?;
10509 if let Some(ref x) = self.inverse_muting {
10510 map.serialize_entry("inverse_muting", x)?;
10511 }
10512 if let Some(ref x) = self.enable_metronome {
10513 map.serialize_entry("enable_metronome", x)?;
10514 }
10515 if let Some(ref x) = self.mute_combo_count {
10516 map.serialize_entry("mute_combo_count", x)?;
10517 }
10518 if let Some(ref x) = self.affects_hit_sounds {
10519 map.serialize_entry("affects_hit_sounds", x)?;
10520 }
10521 map.end()
10522 }
10523 }
10524 impl<'de> Visitor<'de> for GameModVisitor<NoScopeCatch> {
10525 type Value = DeserializedGameMod<'de, NoScopeCatch>;
10526 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10527 f.write_str("NoScopeCatch")
10528 }
10529 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10530 const FIELDS: &'static [&'static str] = &["hidden_combo_count"];
10531 let mut unknown_key__ = None;
10532 let mut hidden_combo_count = None;
10533 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10534 match key.as_str() {
10535 "hidden_combo_count" => hidden_combo_count = Some(map.next_value()?),
10536 _ => {
10537 unknown_key__ = Some(key);
10538 let _: IgnoredAny = map.next_value()?;
10539 }
10540 }
10541 }
10542 let gamemod = NoScopeCatch {
10543 hidden_combo_count: hidden_combo_count.unwrap_or_default(),
10544 };
10545 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10546 }
10547 }
10548 impl Serialize for NoScopeCatch {
10549 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10550 let field_count = self.hidden_combo_count.is_some() as usize;
10551 let mut map = s.serialize_map(Some(field_count))?;
10552 if let Some(ref x) = self.hidden_combo_count {
10553 map.serialize_entry("hidden_combo_count", x)?;
10554 }
10555 map.end()
10556 }
10557 }
10558 impl<'de> Visitor<'de> for GameModVisitor<ScoreV2Catch> {
10559 type Value = DeserializedGameMod<'de, ScoreV2Catch>;
10560 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10561 f.write_str("ScoreV2Catch")
10562 }
10563 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10564 const FIELDS: &'static [&'static str] = &[];
10565 let mut unknown_key__ = None;
10566 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10567 match key.as_str() {
10568 _ => {
10569 unknown_key__ = Some(key);
10570 let _: IgnoredAny = map.next_value()?;
10571 }
10572 }
10573 }
10574 let gamemod = ScoreV2Catch {};
10575 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10576 }
10577 }
10578 impl Serialize for ScoreV2Catch {
10579 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10580 let field_count = 0;
10581 let map = s.serialize_map(Some(field_count))?;
10582 map.end()
10583 }
10584 }
10585 impl<'de> Visitor<'de> for GameModVisitor<EasyMania> {
10586 type Value = DeserializedGameMod<'de, EasyMania>;
10587 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10588 f.write_str("EasyMania")
10589 }
10590 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10591 const FIELDS: &'static [&'static str] = &["retries"];
10592 let mut unknown_key__ = None;
10593 let mut retries = None;
10594 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10595 match key.as_str() {
10596 "retries" => retries = Some(map.next_value()?),
10597 _ => {
10598 unknown_key__ = Some(key);
10599 let _: IgnoredAny = map.next_value()?;
10600 }
10601 }
10602 }
10603 let gamemod = EasyMania {
10604 retries: retries.unwrap_or_default(),
10605 };
10606 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10607 }
10608 }
10609 impl Serialize for EasyMania {
10610 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10611 let field_count = self.retries.is_some() as usize;
10612 let mut map = s.serialize_map(Some(field_count))?;
10613 if let Some(ref x) = self.retries {
10614 map.serialize_entry("retries", x)?;
10615 }
10616 map.end()
10617 }
10618 }
10619 impl<'de> Visitor<'de> for GameModVisitor<NoFailMania> {
10620 type Value = DeserializedGameMod<'de, NoFailMania>;
10621 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10622 f.write_str("NoFailMania")
10623 }
10624 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10625 const FIELDS: &'static [&'static str] = &[];
10626 let mut unknown_key__ = None;
10627 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10628 match key.as_str() {
10629 _ => {
10630 unknown_key__ = Some(key);
10631 let _: IgnoredAny = map.next_value()?;
10632 }
10633 }
10634 }
10635 let gamemod = NoFailMania {};
10636 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10637 }
10638 }
10639 impl Serialize for NoFailMania {
10640 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10641 let field_count = 0;
10642 let map = s.serialize_map(Some(field_count))?;
10643 map.end()
10644 }
10645 }
10646 impl<'de> Visitor<'de> for GameModVisitor<HalfTimeMania> {
10647 type Value = DeserializedGameMod<'de, HalfTimeMania>;
10648 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10649 f.write_str("HalfTimeMania")
10650 }
10651 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10652 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
10653 let mut unknown_key__ = None;
10654 let mut speed_change = None;
10655 let mut adjust_pitch = None;
10656 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10657 match key.as_str() {
10658 "speed_change" => speed_change = Some(map.next_value()?),
10659 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
10660 _ => {
10661 unknown_key__ = Some(key);
10662 let _: IgnoredAny = map.next_value()?;
10663 }
10664 }
10665 }
10666 let gamemod = HalfTimeMania {
10667 speed_change: speed_change.unwrap_or_default(),
10668 adjust_pitch: adjust_pitch.unwrap_or_default(),
10669 };
10670 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10671 }
10672 }
10673 impl Serialize for HalfTimeMania {
10674 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10675 let field_count =
10676 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
10677 let mut map = s.serialize_map(Some(field_count))?;
10678 if let Some(ref x) = self.speed_change {
10679 map.serialize_entry("speed_change", x)?;
10680 }
10681 if let Some(ref x) = self.adjust_pitch {
10682 map.serialize_entry("adjust_pitch", x)?;
10683 }
10684 map.end()
10685 }
10686 }
10687 impl<'de> Visitor<'de> for GameModVisitor<DaycoreMania> {
10688 type Value = DeserializedGameMod<'de, DaycoreMania>;
10689 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10690 f.write_str("DaycoreMania")
10691 }
10692 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10693 const FIELDS: &'static [&'static str] = &["speed_change"];
10694 let mut unknown_key__ = None;
10695 let mut speed_change = None;
10696 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10697 match key.as_str() {
10698 "speed_change" => speed_change = Some(map.next_value()?),
10699 _ => {
10700 unknown_key__ = Some(key);
10701 let _: IgnoredAny = map.next_value()?;
10702 }
10703 }
10704 }
10705 let gamemod = DaycoreMania {
10706 speed_change: speed_change.unwrap_or_default(),
10707 };
10708 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10709 }
10710 }
10711 impl Serialize for DaycoreMania {
10712 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10713 let field_count = self.speed_change.is_some() as usize;
10714 let mut map = s.serialize_map(Some(field_count))?;
10715 if let Some(ref x) = self.speed_change {
10716 map.serialize_entry("speed_change", x)?;
10717 }
10718 map.end()
10719 }
10720 }
10721 impl<'de> Visitor<'de> for GameModVisitor<NoReleaseMania> {
10722 type Value = DeserializedGameMod<'de, NoReleaseMania>;
10723 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10724 f.write_str("NoReleaseMania")
10725 }
10726 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10727 const FIELDS: &'static [&'static str] = &[];
10728 let mut unknown_key__ = None;
10729 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10730 match key.as_str() {
10731 _ => {
10732 unknown_key__ = Some(key);
10733 let _: IgnoredAny = map.next_value()?;
10734 }
10735 }
10736 }
10737 let gamemod = NoReleaseMania {};
10738 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10739 }
10740 }
10741 impl Serialize for NoReleaseMania {
10742 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10743 let field_count = 0;
10744 let map = s.serialize_map(Some(field_count))?;
10745 map.end()
10746 }
10747 }
10748 impl<'de> Visitor<'de> for GameModVisitor<HardRockMania> {
10749 type Value = DeserializedGameMod<'de, HardRockMania>;
10750 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10751 f.write_str("HardRockMania")
10752 }
10753 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10754 const FIELDS: &'static [&'static str] = &[];
10755 let mut unknown_key__ = None;
10756 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10757 match key.as_str() {
10758 _ => {
10759 unknown_key__ = Some(key);
10760 let _: IgnoredAny = map.next_value()?;
10761 }
10762 }
10763 }
10764 let gamemod = HardRockMania {};
10765 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10766 }
10767 }
10768 impl Serialize for HardRockMania {
10769 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10770 let field_count = 0;
10771 let map = s.serialize_map(Some(field_count))?;
10772 map.end()
10773 }
10774 }
10775 impl<'de> Visitor<'de> for GameModVisitor<SuddenDeathMania> {
10776 type Value = DeserializedGameMod<'de, SuddenDeathMania>;
10777 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10778 f.write_str("SuddenDeathMania")
10779 }
10780 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10781 const FIELDS: &'static [&'static str] = &["restart"];
10782 let mut unknown_key__ = None;
10783 let mut restart = None;
10784 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10785 match key.as_str() {
10786 "restart" => restart = Some(map.next_value()?),
10787 _ => {
10788 unknown_key__ = Some(key);
10789 let _: IgnoredAny = map.next_value()?;
10790 }
10791 }
10792 }
10793 let gamemod = SuddenDeathMania {
10794 restart: restart.unwrap_or_default(),
10795 };
10796 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10797 }
10798 }
10799 impl Serialize for SuddenDeathMania {
10800 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10801 let field_count = self.restart.is_some() as usize;
10802 let mut map = s.serialize_map(Some(field_count))?;
10803 if let Some(ref x) = self.restart {
10804 map.serialize_entry("restart", x)?;
10805 }
10806 map.end()
10807 }
10808 }
10809 impl<'de> Visitor<'de> for GameModVisitor<PerfectMania> {
10810 type Value = DeserializedGameMod<'de, PerfectMania>;
10811 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10812 f.write_str("PerfectMania")
10813 }
10814 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10815 const FIELDS: &'static [&'static str] = &["restart"];
10816 let mut unknown_key__ = None;
10817 let mut restart = None;
10818 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10819 match key.as_str() {
10820 "restart" => restart = Some(map.next_value()?),
10821 _ => {
10822 unknown_key__ = Some(key);
10823 let _: IgnoredAny = map.next_value()?;
10824 }
10825 }
10826 }
10827 let gamemod = PerfectMania {
10828 restart: restart.unwrap_or_default(),
10829 };
10830 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10831 }
10832 }
10833 impl Serialize for PerfectMania {
10834 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10835 let field_count = self.restart.is_some() as usize;
10836 let mut map = s.serialize_map(Some(field_count))?;
10837 if let Some(ref x) = self.restart {
10838 map.serialize_entry("restart", x)?;
10839 }
10840 map.end()
10841 }
10842 }
10843 impl<'de> Visitor<'de> for GameModVisitor<DoubleTimeMania> {
10844 type Value = DeserializedGameMod<'de, DoubleTimeMania>;
10845 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10846 f.write_str("DoubleTimeMania")
10847 }
10848 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10849 const FIELDS: &'static [&'static str] = &["speed_change", "adjust_pitch"];
10850 let mut unknown_key__ = None;
10851 let mut speed_change = None;
10852 let mut adjust_pitch = None;
10853 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10854 match key.as_str() {
10855 "speed_change" => speed_change = Some(map.next_value()?),
10856 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
10857 _ => {
10858 unknown_key__ = Some(key);
10859 let _: IgnoredAny = map.next_value()?;
10860 }
10861 }
10862 }
10863 let gamemod = DoubleTimeMania {
10864 speed_change: speed_change.unwrap_or_default(),
10865 adjust_pitch: adjust_pitch.unwrap_or_default(),
10866 };
10867 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10868 }
10869 }
10870 impl Serialize for DoubleTimeMania {
10871 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10872 let field_count =
10873 self.speed_change.is_some() as usize + self.adjust_pitch.is_some() as usize;
10874 let mut map = s.serialize_map(Some(field_count))?;
10875 if let Some(ref x) = self.speed_change {
10876 map.serialize_entry("speed_change", x)?;
10877 }
10878 if let Some(ref x) = self.adjust_pitch {
10879 map.serialize_entry("adjust_pitch", x)?;
10880 }
10881 map.end()
10882 }
10883 }
10884 impl<'de> Visitor<'de> for GameModVisitor<NightcoreMania> {
10885 type Value = DeserializedGameMod<'de, NightcoreMania>;
10886 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10887 f.write_str("NightcoreMania")
10888 }
10889 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10890 const FIELDS: &'static [&'static str] = &["speed_change"];
10891 let mut unknown_key__ = None;
10892 let mut speed_change = None;
10893 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10894 match key.as_str() {
10895 "speed_change" => speed_change = Some(map.next_value()?),
10896 _ => {
10897 unknown_key__ = Some(key);
10898 let _: IgnoredAny = map.next_value()?;
10899 }
10900 }
10901 }
10902 let gamemod = NightcoreMania {
10903 speed_change: speed_change.unwrap_or_default(),
10904 };
10905 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10906 }
10907 }
10908 impl Serialize for NightcoreMania {
10909 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10910 let field_count = self.speed_change.is_some() as usize;
10911 let mut map = s.serialize_map(Some(field_count))?;
10912 if let Some(ref x) = self.speed_change {
10913 map.serialize_entry("speed_change", x)?;
10914 }
10915 map.end()
10916 }
10917 }
10918 impl<'de> Visitor<'de> for GameModVisitor<FadeInMania> {
10919 type Value = DeserializedGameMod<'de, FadeInMania>;
10920 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10921 f.write_str("FadeInMania")
10922 }
10923 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10924 const FIELDS: &'static [&'static str] = &[];
10925 let mut unknown_key__ = None;
10926 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10927 match key.as_str() {
10928 _ => {
10929 unknown_key__ = Some(key);
10930 let _: IgnoredAny = map.next_value()?;
10931 }
10932 }
10933 }
10934 let gamemod = FadeInMania {};
10935 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10936 }
10937 }
10938 impl Serialize for FadeInMania {
10939 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10940 let field_count = 0;
10941 let map = s.serialize_map(Some(field_count))?;
10942 map.end()
10943 }
10944 }
10945 impl<'de> Visitor<'de> for GameModVisitor<HiddenMania> {
10946 type Value = DeserializedGameMod<'de, HiddenMania>;
10947 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10948 f.write_str("HiddenMania")
10949 }
10950 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10951 const FIELDS: &'static [&'static str] = &[];
10952 let mut unknown_key__ = None;
10953 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10954 match key.as_str() {
10955 _ => {
10956 unknown_key__ = Some(key);
10957 let _: IgnoredAny = map.next_value()?;
10958 }
10959 }
10960 }
10961 let gamemod = HiddenMania {};
10962 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10963 }
10964 }
10965 impl Serialize for HiddenMania {
10966 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
10967 let field_count = 0;
10968 let map = s.serialize_map(Some(field_count))?;
10969 map.end()
10970 }
10971 }
10972 impl<'de> Visitor<'de> for GameModVisitor<CoverMania> {
10973 type Value = DeserializedGameMod<'de, CoverMania>;
10974 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
10975 f.write_str("CoverMania")
10976 }
10977 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
10978 const FIELDS: &'static [&'static str] = &["coverage", "direction"];
10979 let mut unknown_key__ = None;
10980 let mut coverage = None;
10981 let mut direction = None;
10982 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
10983 match key.as_str() {
10984 "coverage" => coverage = Some(map.next_value()?),
10985 "direction" => direction = Some(map.next_value()?),
10986 _ => {
10987 unknown_key__ = Some(key);
10988 let _: IgnoredAny = map.next_value()?;
10989 }
10990 }
10991 }
10992 let gamemod = CoverMania {
10993 coverage: coverage.unwrap_or_default(),
10994 direction: direction.unwrap_or_default(),
10995 };
10996 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
10997 }
10998 }
10999 impl Serialize for CoverMania {
11000 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11001 let field_count = self.coverage.is_some() as usize + self.direction.is_some() as usize;
11002 let mut map = s.serialize_map(Some(field_count))?;
11003 if let Some(ref x) = self.coverage {
11004 map.serialize_entry("coverage", x)?;
11005 }
11006 if let Some(ref x) = self.direction {
11007 map.serialize_entry("direction", x)?;
11008 }
11009 map.end()
11010 }
11011 }
11012 impl<'de> Visitor<'de> for GameModVisitor<FlashlightMania> {
11013 type Value = DeserializedGameMod<'de, FlashlightMania>;
11014 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11015 f.write_str("FlashlightMania")
11016 }
11017 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11018 const FIELDS: &'static [&'static str] = &["size_multiplier", "combo_based_size"];
11019 let mut unknown_key__ = None;
11020 let mut size_multiplier = None;
11021 let mut combo_based_size = None;
11022 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11023 match key.as_str() {
11024 "size_multiplier" => size_multiplier = Some(map.next_value()?),
11025 "combo_based_size" => combo_based_size = Some(map.next_value()?),
11026 _ => {
11027 unknown_key__ = Some(key);
11028 let _: IgnoredAny = map.next_value()?;
11029 }
11030 }
11031 }
11032 let gamemod = FlashlightMania {
11033 size_multiplier: size_multiplier.unwrap_or_default(),
11034 combo_based_size: combo_based_size.unwrap_or_default(),
11035 };
11036 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11037 }
11038 }
11039 impl Serialize for FlashlightMania {
11040 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11041 let field_count =
11042 self.size_multiplier.is_some() as usize + self.combo_based_size.is_some() as usize;
11043 let mut map = s.serialize_map(Some(field_count))?;
11044 if let Some(ref x) = self.size_multiplier {
11045 map.serialize_entry("size_multiplier", x)?;
11046 }
11047 if let Some(ref x) = self.combo_based_size {
11048 map.serialize_entry("combo_based_size", x)?;
11049 }
11050 map.end()
11051 }
11052 }
11053 impl<'de> Visitor<'de> for GameModVisitor<AccuracyChallengeMania> {
11054 type Value = DeserializedGameMod<'de, AccuracyChallengeMania>;
11055 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11056 f.write_str("AccuracyChallengeMania")
11057 }
11058 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11059 const FIELDS: &'static [&'static str] =
11060 &["minimum_accuracy", "accuracy_judge_mode", "restart"];
11061 let mut unknown_key__ = None;
11062 let mut minimum_accuracy = None;
11063 let mut accuracy_judge_mode = None;
11064 let mut restart = None;
11065 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11066 match key.as_str() {
11067 "minimum_accuracy" => minimum_accuracy = Some(map.next_value()?),
11068 "accuracy_judge_mode" => accuracy_judge_mode = Some(map.next_value()?),
11069 "restart" => restart = Some(map.next_value()?),
11070 _ => {
11071 unknown_key__ = Some(key);
11072 let _: IgnoredAny = map.next_value()?;
11073 }
11074 }
11075 }
11076 let gamemod = AccuracyChallengeMania {
11077 minimum_accuracy: minimum_accuracy.unwrap_or_default(),
11078 accuracy_judge_mode: accuracy_judge_mode.unwrap_or_default(),
11079 restart: restart.unwrap_or_default(),
11080 };
11081 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11082 }
11083 }
11084 impl Serialize for AccuracyChallengeMania {
11085 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11086 let field_count = self.minimum_accuracy.is_some() as usize
11087 + self.accuracy_judge_mode.is_some() as usize
11088 + self.restart.is_some() as usize;
11089 let mut map = s.serialize_map(Some(field_count))?;
11090 if let Some(ref x) = self.minimum_accuracy {
11091 map.serialize_entry("minimum_accuracy", x)?;
11092 }
11093 if let Some(ref x) = self.accuracy_judge_mode {
11094 map.serialize_entry("accuracy_judge_mode", x)?;
11095 }
11096 if let Some(ref x) = self.restart {
11097 map.serialize_entry("restart", x)?;
11098 }
11099 map.end()
11100 }
11101 }
11102 impl<'de> Visitor<'de> for GameModVisitor<RandomMania> {
11103 type Value = DeserializedGameMod<'de, RandomMania>;
11104 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11105 f.write_str("RandomMania")
11106 }
11107 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11108 const FIELDS: &'static [&'static str] = &["seed"];
11109 let mut unknown_key__ = None;
11110 let mut seed = None;
11111 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11112 match key.as_str() {
11113 "seed" => seed = Some(map.next_value()?),
11114 _ => {
11115 unknown_key__ = Some(key);
11116 let _: IgnoredAny = map.next_value()?;
11117 }
11118 }
11119 }
11120 let gamemod = RandomMania {
11121 seed: seed.unwrap_or_default(),
11122 };
11123 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11124 }
11125 }
11126 impl Serialize for RandomMania {
11127 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11128 let field_count = self.seed.is_some() as usize;
11129 let mut map = s.serialize_map(Some(field_count))?;
11130 if let Some(ref x) = self.seed {
11131 map.serialize_entry("seed", x)?;
11132 }
11133 map.end()
11134 }
11135 }
11136 impl<'de> Visitor<'de> for GameModVisitor<DualStagesMania> {
11137 type Value = DeserializedGameMod<'de, DualStagesMania>;
11138 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11139 f.write_str("DualStagesMania")
11140 }
11141 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11142 const FIELDS: &'static [&'static str] = &[];
11143 let mut unknown_key__ = None;
11144 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11145 match key.as_str() {
11146 _ => {
11147 unknown_key__ = Some(key);
11148 let _: IgnoredAny = map.next_value()?;
11149 }
11150 }
11151 }
11152 let gamemod = DualStagesMania {};
11153 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11154 }
11155 }
11156 impl Serialize for DualStagesMania {
11157 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11158 let field_count = 0;
11159 let map = s.serialize_map(Some(field_count))?;
11160 map.end()
11161 }
11162 }
11163 impl<'de> Visitor<'de> for GameModVisitor<MirrorMania> {
11164 type Value = DeserializedGameMod<'de, MirrorMania>;
11165 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11166 f.write_str("MirrorMania")
11167 }
11168 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11169 const FIELDS: &'static [&'static str] = &[];
11170 let mut unknown_key__ = None;
11171 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11172 match key.as_str() {
11173 _ => {
11174 unknown_key__ = Some(key);
11175 let _: IgnoredAny = map.next_value()?;
11176 }
11177 }
11178 }
11179 let gamemod = MirrorMania {};
11180 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11181 }
11182 }
11183 impl Serialize for MirrorMania {
11184 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11185 let field_count = 0;
11186 let map = s.serialize_map(Some(field_count))?;
11187 map.end()
11188 }
11189 }
11190 impl<'de> Visitor<'de> for GameModVisitor<DifficultyAdjustMania> {
11191 type Value = DeserializedGameMod<'de, DifficultyAdjustMania>;
11192 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11193 f.write_str("DifficultyAdjustMania")
11194 }
11195 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11196 const FIELDS: &'static [&'static str] =
11197 &["drain_rate", "overall_difficulty", "extended_limits"];
11198 let mut unknown_key__ = None;
11199 let mut drain_rate = None;
11200 let mut overall_difficulty = None;
11201 let mut extended_limits = None;
11202 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11203 match key.as_str() {
11204 "drain_rate" => drain_rate = Some(map.next_value()?),
11205 "overall_difficulty" => overall_difficulty = Some(map.next_value()?),
11206 "extended_limits" => extended_limits = Some(map.next_value()?),
11207 _ => {
11208 unknown_key__ = Some(key);
11209 let _: IgnoredAny = map.next_value()?;
11210 }
11211 }
11212 }
11213 let gamemod = DifficultyAdjustMania {
11214 drain_rate: drain_rate.unwrap_or_default(),
11215 overall_difficulty: overall_difficulty.unwrap_or_default(),
11216 extended_limits: extended_limits.unwrap_or_default(),
11217 };
11218 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11219 }
11220 }
11221 impl Serialize for DifficultyAdjustMania {
11222 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11223 let field_count = self.drain_rate.is_some() as usize
11224 + self.overall_difficulty.is_some() as usize
11225 + self.extended_limits.is_some() as usize;
11226 let mut map = s.serialize_map(Some(field_count))?;
11227 if let Some(ref x) = self.drain_rate {
11228 map.serialize_entry("drain_rate", x)?;
11229 }
11230 if let Some(ref x) = self.overall_difficulty {
11231 map.serialize_entry("overall_difficulty", x)?;
11232 }
11233 if let Some(ref x) = self.extended_limits {
11234 map.serialize_entry("extended_limits", x)?;
11235 }
11236 map.end()
11237 }
11238 }
11239 impl<'de> Visitor<'de> for GameModVisitor<ClassicMania> {
11240 type Value = DeserializedGameMod<'de, ClassicMania>;
11241 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11242 f.write_str("ClassicMania")
11243 }
11244 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11245 const FIELDS: &'static [&'static str] = &[];
11246 let mut unknown_key__ = None;
11247 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11248 match key.as_str() {
11249 _ => {
11250 unknown_key__ = Some(key);
11251 let _: IgnoredAny = map.next_value()?;
11252 }
11253 }
11254 }
11255 let gamemod = ClassicMania {};
11256 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11257 }
11258 }
11259 impl Serialize for ClassicMania {
11260 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11261 let field_count = 0;
11262 let map = s.serialize_map(Some(field_count))?;
11263 map.end()
11264 }
11265 }
11266 impl<'de> Visitor<'de> for GameModVisitor<InvertMania> {
11267 type Value = DeserializedGameMod<'de, InvertMania>;
11268 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11269 f.write_str("InvertMania")
11270 }
11271 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11272 const FIELDS: &'static [&'static str] = &[];
11273 let mut unknown_key__ = None;
11274 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11275 match key.as_str() {
11276 _ => {
11277 unknown_key__ = Some(key);
11278 let _: IgnoredAny = map.next_value()?;
11279 }
11280 }
11281 }
11282 let gamemod = InvertMania {};
11283 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11284 }
11285 }
11286 impl Serialize for InvertMania {
11287 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11288 let field_count = 0;
11289 let map = s.serialize_map(Some(field_count))?;
11290 map.end()
11291 }
11292 }
11293 impl<'de> Visitor<'de> for GameModVisitor<ConstantSpeedMania> {
11294 type Value = DeserializedGameMod<'de, ConstantSpeedMania>;
11295 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11296 f.write_str("ConstantSpeedMania")
11297 }
11298 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11299 const FIELDS: &'static [&'static str] = &[];
11300 let mut unknown_key__ = None;
11301 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11302 match key.as_str() {
11303 _ => {
11304 unknown_key__ = Some(key);
11305 let _: IgnoredAny = map.next_value()?;
11306 }
11307 }
11308 }
11309 let gamemod = ConstantSpeedMania {};
11310 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11311 }
11312 }
11313 impl Serialize for ConstantSpeedMania {
11314 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11315 let field_count = 0;
11316 let map = s.serialize_map(Some(field_count))?;
11317 map.end()
11318 }
11319 }
11320 impl<'de> Visitor<'de> for GameModVisitor<HoldOffMania> {
11321 type Value = DeserializedGameMod<'de, HoldOffMania>;
11322 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11323 f.write_str("HoldOffMania")
11324 }
11325 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11326 const FIELDS: &'static [&'static str] = &[];
11327 let mut unknown_key__ = None;
11328 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11329 match key.as_str() {
11330 _ => {
11331 unknown_key__ = Some(key);
11332 let _: IgnoredAny = map.next_value()?;
11333 }
11334 }
11335 }
11336 let gamemod = HoldOffMania {};
11337 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11338 }
11339 }
11340 impl Serialize for HoldOffMania {
11341 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11342 let field_count = 0;
11343 let map = s.serialize_map(Some(field_count))?;
11344 map.end()
11345 }
11346 }
11347 impl<'de> Visitor<'de> for GameModVisitor<OneKeyMania> {
11348 type Value = DeserializedGameMod<'de, OneKeyMania>;
11349 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11350 f.write_str("OneKeyMania")
11351 }
11352 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11353 const FIELDS: &'static [&'static str] = &[];
11354 let mut unknown_key__ = None;
11355 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11356 match key.as_str() {
11357 _ => {
11358 unknown_key__ = Some(key);
11359 let _: IgnoredAny = map.next_value()?;
11360 }
11361 }
11362 }
11363 let gamemod = OneKeyMania {};
11364 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11365 }
11366 }
11367 impl Serialize for OneKeyMania {
11368 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11369 let field_count = 0;
11370 let map = s.serialize_map(Some(field_count))?;
11371 map.end()
11372 }
11373 }
11374 impl<'de> Visitor<'de> for GameModVisitor<TwoKeysMania> {
11375 type Value = DeserializedGameMod<'de, TwoKeysMania>;
11376 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11377 f.write_str("TwoKeysMania")
11378 }
11379 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11380 const FIELDS: &'static [&'static str] = &[];
11381 let mut unknown_key__ = None;
11382 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11383 match key.as_str() {
11384 _ => {
11385 unknown_key__ = Some(key);
11386 let _: IgnoredAny = map.next_value()?;
11387 }
11388 }
11389 }
11390 let gamemod = TwoKeysMania {};
11391 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11392 }
11393 }
11394 impl Serialize for TwoKeysMania {
11395 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11396 let field_count = 0;
11397 let map = s.serialize_map(Some(field_count))?;
11398 map.end()
11399 }
11400 }
11401 impl<'de> Visitor<'de> for GameModVisitor<ThreeKeysMania> {
11402 type Value = DeserializedGameMod<'de, ThreeKeysMania>;
11403 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11404 f.write_str("ThreeKeysMania")
11405 }
11406 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11407 const FIELDS: &'static [&'static str] = &[];
11408 let mut unknown_key__ = None;
11409 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11410 match key.as_str() {
11411 _ => {
11412 unknown_key__ = Some(key);
11413 let _: IgnoredAny = map.next_value()?;
11414 }
11415 }
11416 }
11417 let gamemod = ThreeKeysMania {};
11418 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11419 }
11420 }
11421 impl Serialize for ThreeKeysMania {
11422 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11423 let field_count = 0;
11424 let map = s.serialize_map(Some(field_count))?;
11425 map.end()
11426 }
11427 }
11428 impl<'de> Visitor<'de> for GameModVisitor<FourKeysMania> {
11429 type Value = DeserializedGameMod<'de, FourKeysMania>;
11430 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11431 f.write_str("FourKeysMania")
11432 }
11433 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11434 const FIELDS: &'static [&'static str] = &[];
11435 let mut unknown_key__ = None;
11436 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11437 match key.as_str() {
11438 _ => {
11439 unknown_key__ = Some(key);
11440 let _: IgnoredAny = map.next_value()?;
11441 }
11442 }
11443 }
11444 let gamemod = FourKeysMania {};
11445 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11446 }
11447 }
11448 impl Serialize for FourKeysMania {
11449 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11450 let field_count = 0;
11451 let map = s.serialize_map(Some(field_count))?;
11452 map.end()
11453 }
11454 }
11455 impl<'de> Visitor<'de> for GameModVisitor<FiveKeysMania> {
11456 type Value = DeserializedGameMod<'de, FiveKeysMania>;
11457 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11458 f.write_str("FiveKeysMania")
11459 }
11460 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11461 const FIELDS: &'static [&'static str] = &[];
11462 let mut unknown_key__ = None;
11463 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11464 match key.as_str() {
11465 _ => {
11466 unknown_key__ = Some(key);
11467 let _: IgnoredAny = map.next_value()?;
11468 }
11469 }
11470 }
11471 let gamemod = FiveKeysMania {};
11472 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11473 }
11474 }
11475 impl Serialize for FiveKeysMania {
11476 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11477 let field_count = 0;
11478 let map = s.serialize_map(Some(field_count))?;
11479 map.end()
11480 }
11481 }
11482 impl<'de> Visitor<'de> for GameModVisitor<SixKeysMania> {
11483 type Value = DeserializedGameMod<'de, SixKeysMania>;
11484 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11485 f.write_str("SixKeysMania")
11486 }
11487 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11488 const FIELDS: &'static [&'static str] = &[];
11489 let mut unknown_key__ = None;
11490 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11491 match key.as_str() {
11492 _ => {
11493 unknown_key__ = Some(key);
11494 let _: IgnoredAny = map.next_value()?;
11495 }
11496 }
11497 }
11498 let gamemod = SixKeysMania {};
11499 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11500 }
11501 }
11502 impl Serialize for SixKeysMania {
11503 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11504 let field_count = 0;
11505 let map = s.serialize_map(Some(field_count))?;
11506 map.end()
11507 }
11508 }
11509 impl<'de> Visitor<'de> for GameModVisitor<SevenKeysMania> {
11510 type Value = DeserializedGameMod<'de, SevenKeysMania>;
11511 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11512 f.write_str("SevenKeysMania")
11513 }
11514 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11515 const FIELDS: &'static [&'static str] = &[];
11516 let mut unknown_key__ = None;
11517 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11518 match key.as_str() {
11519 _ => {
11520 unknown_key__ = Some(key);
11521 let _: IgnoredAny = map.next_value()?;
11522 }
11523 }
11524 }
11525 let gamemod = SevenKeysMania {};
11526 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11527 }
11528 }
11529 impl Serialize for SevenKeysMania {
11530 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11531 let field_count = 0;
11532 let map = s.serialize_map(Some(field_count))?;
11533 map.end()
11534 }
11535 }
11536 impl<'de> Visitor<'de> for GameModVisitor<EightKeysMania> {
11537 type Value = DeserializedGameMod<'de, EightKeysMania>;
11538 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11539 f.write_str("EightKeysMania")
11540 }
11541 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11542 const FIELDS: &'static [&'static str] = &[];
11543 let mut unknown_key__ = None;
11544 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11545 match key.as_str() {
11546 _ => {
11547 unknown_key__ = Some(key);
11548 let _: IgnoredAny = map.next_value()?;
11549 }
11550 }
11551 }
11552 let gamemod = EightKeysMania {};
11553 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11554 }
11555 }
11556 impl Serialize for EightKeysMania {
11557 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11558 let field_count = 0;
11559 let map = s.serialize_map(Some(field_count))?;
11560 map.end()
11561 }
11562 }
11563 impl<'de> Visitor<'de> for GameModVisitor<NineKeysMania> {
11564 type Value = DeserializedGameMod<'de, NineKeysMania>;
11565 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11566 f.write_str("NineKeysMania")
11567 }
11568 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11569 const FIELDS: &'static [&'static str] = &[];
11570 let mut unknown_key__ = None;
11571 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11572 match key.as_str() {
11573 _ => {
11574 unknown_key__ = Some(key);
11575 let _: IgnoredAny = map.next_value()?;
11576 }
11577 }
11578 }
11579 let gamemod = NineKeysMania {};
11580 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11581 }
11582 }
11583 impl Serialize for NineKeysMania {
11584 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11585 let field_count = 0;
11586 let map = s.serialize_map(Some(field_count))?;
11587 map.end()
11588 }
11589 }
11590 impl<'de> Visitor<'de> for GameModVisitor<TenKeysMania> {
11591 type Value = DeserializedGameMod<'de, TenKeysMania>;
11592 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11593 f.write_str("TenKeysMania")
11594 }
11595 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11596 const FIELDS: &'static [&'static str] = &[];
11597 let mut unknown_key__ = None;
11598 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11599 match key.as_str() {
11600 _ => {
11601 unknown_key__ = Some(key);
11602 let _: IgnoredAny = map.next_value()?;
11603 }
11604 }
11605 }
11606 let gamemod = TenKeysMania {};
11607 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11608 }
11609 }
11610 impl Serialize for TenKeysMania {
11611 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11612 let field_count = 0;
11613 let map = s.serialize_map(Some(field_count))?;
11614 map.end()
11615 }
11616 }
11617 impl<'de> Visitor<'de> for GameModVisitor<AutoplayMania> {
11618 type Value = DeserializedGameMod<'de, AutoplayMania>;
11619 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11620 f.write_str("AutoplayMania")
11621 }
11622 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11623 const FIELDS: &'static [&'static str] = &[];
11624 let mut unknown_key__ = None;
11625 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11626 match key.as_str() {
11627 _ => {
11628 unknown_key__ = Some(key);
11629 let _: IgnoredAny = map.next_value()?;
11630 }
11631 }
11632 }
11633 let gamemod = AutoplayMania {};
11634 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11635 }
11636 }
11637 impl Serialize for AutoplayMania {
11638 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11639 let field_count = 0;
11640 let map = s.serialize_map(Some(field_count))?;
11641 map.end()
11642 }
11643 }
11644 impl<'de> Visitor<'de> for GameModVisitor<CinemaMania> {
11645 type Value = DeserializedGameMod<'de, CinemaMania>;
11646 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11647 f.write_str("CinemaMania")
11648 }
11649 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11650 const FIELDS: &'static [&'static str] = &[];
11651 let mut unknown_key__ = None;
11652 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11653 match key.as_str() {
11654 _ => {
11655 unknown_key__ = Some(key);
11656 let _: IgnoredAny = map.next_value()?;
11657 }
11658 }
11659 }
11660 let gamemod = CinemaMania {};
11661 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11662 }
11663 }
11664 impl Serialize for CinemaMania {
11665 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11666 let field_count = 0;
11667 let map = s.serialize_map(Some(field_count))?;
11668 map.end()
11669 }
11670 }
11671 impl<'de> Visitor<'de> for GameModVisitor<WindUpMania> {
11672 type Value = DeserializedGameMod<'de, WindUpMania>;
11673 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11674 f.write_str("WindUpMania")
11675 }
11676 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11677 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
11678 let mut unknown_key__ = None;
11679 let mut initial_rate = None;
11680 let mut final_rate = None;
11681 let mut adjust_pitch = None;
11682 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11683 match key.as_str() {
11684 "initial_rate" => initial_rate = Some(map.next_value()?),
11685 "final_rate" => final_rate = Some(map.next_value()?),
11686 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
11687 _ => {
11688 unknown_key__ = Some(key);
11689 let _: IgnoredAny = map.next_value()?;
11690 }
11691 }
11692 }
11693 let gamemod = WindUpMania {
11694 initial_rate: initial_rate.unwrap_or_default(),
11695 final_rate: final_rate.unwrap_or_default(),
11696 adjust_pitch: adjust_pitch.unwrap_or_default(),
11697 };
11698 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11699 }
11700 }
11701 impl Serialize for WindUpMania {
11702 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11703 let field_count = self.initial_rate.is_some() as usize
11704 + self.final_rate.is_some() as usize
11705 + self.adjust_pitch.is_some() as usize;
11706 let mut map = s.serialize_map(Some(field_count))?;
11707 if let Some(ref x) = self.initial_rate {
11708 map.serialize_entry("initial_rate", x)?;
11709 }
11710 if let Some(ref x) = self.final_rate {
11711 map.serialize_entry("final_rate", x)?;
11712 }
11713 if let Some(ref x) = self.adjust_pitch {
11714 map.serialize_entry("adjust_pitch", x)?;
11715 }
11716 map.end()
11717 }
11718 }
11719 impl<'de> Visitor<'de> for GameModVisitor<WindDownMania> {
11720 type Value = DeserializedGameMod<'de, WindDownMania>;
11721 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11722 f.write_str("WindDownMania")
11723 }
11724 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11725 const FIELDS: &'static [&'static str] = &["initial_rate", "final_rate", "adjust_pitch"];
11726 let mut unknown_key__ = None;
11727 let mut initial_rate = None;
11728 let mut final_rate = None;
11729 let mut adjust_pitch = None;
11730 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11731 match key.as_str() {
11732 "initial_rate" => initial_rate = Some(map.next_value()?),
11733 "final_rate" => final_rate = Some(map.next_value()?),
11734 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
11735 _ => {
11736 unknown_key__ = Some(key);
11737 let _: IgnoredAny = map.next_value()?;
11738 }
11739 }
11740 }
11741 let gamemod = WindDownMania {
11742 initial_rate: initial_rate.unwrap_or_default(),
11743 final_rate: final_rate.unwrap_or_default(),
11744 adjust_pitch: adjust_pitch.unwrap_or_default(),
11745 };
11746 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11747 }
11748 }
11749 impl Serialize for WindDownMania {
11750 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11751 let field_count = self.initial_rate.is_some() as usize
11752 + self.final_rate.is_some() as usize
11753 + self.adjust_pitch.is_some() as usize;
11754 let mut map = s.serialize_map(Some(field_count))?;
11755 if let Some(ref x) = self.initial_rate {
11756 map.serialize_entry("initial_rate", x)?;
11757 }
11758 if let Some(ref x) = self.final_rate {
11759 map.serialize_entry("final_rate", x)?;
11760 }
11761 if let Some(ref x) = self.adjust_pitch {
11762 map.serialize_entry("adjust_pitch", x)?;
11763 }
11764 map.end()
11765 }
11766 }
11767 impl<'de> Visitor<'de> for GameModVisitor<MutedMania> {
11768 type Value = DeserializedGameMod<'de, MutedMania>;
11769 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11770 f.write_str("MutedMania")
11771 }
11772 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11773 const FIELDS: &'static [&'static str] = &[
11774 "inverse_muting",
11775 "enable_metronome",
11776 "mute_combo_count",
11777 "affects_hit_sounds",
11778 ];
11779 let mut unknown_key__ = None;
11780 let mut inverse_muting = None;
11781 let mut enable_metronome = None;
11782 let mut mute_combo_count = None;
11783 let mut affects_hit_sounds = None;
11784 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11785 match key.as_str() {
11786 "inverse_muting" => inverse_muting = Some(map.next_value()?),
11787 "enable_metronome" => enable_metronome = Some(map.next_value()?),
11788 "mute_combo_count" => mute_combo_count = Some(map.next_value()?),
11789 "affects_hit_sounds" => affects_hit_sounds = Some(map.next_value()?),
11790 _ => {
11791 unknown_key__ = Some(key);
11792 let _: IgnoredAny = map.next_value()?;
11793 }
11794 }
11795 }
11796 let gamemod = MutedMania {
11797 inverse_muting: inverse_muting.unwrap_or_default(),
11798 enable_metronome: enable_metronome.unwrap_or_default(),
11799 mute_combo_count: mute_combo_count.unwrap_or_default(),
11800 affects_hit_sounds: affects_hit_sounds.unwrap_or_default(),
11801 };
11802 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11803 }
11804 }
11805 impl Serialize for MutedMania {
11806 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11807 let field_count = self.inverse_muting.is_some() as usize
11808 + self.enable_metronome.is_some() as usize
11809 + self.mute_combo_count.is_some() as usize
11810 + self.affects_hit_sounds.is_some() as usize;
11811 let mut map = s.serialize_map(Some(field_count))?;
11812 if let Some(ref x) = self.inverse_muting {
11813 map.serialize_entry("inverse_muting", x)?;
11814 }
11815 if let Some(ref x) = self.enable_metronome {
11816 map.serialize_entry("enable_metronome", x)?;
11817 }
11818 if let Some(ref x) = self.mute_combo_count {
11819 map.serialize_entry("mute_combo_count", x)?;
11820 }
11821 if let Some(ref x) = self.affects_hit_sounds {
11822 map.serialize_entry("affects_hit_sounds", x)?;
11823 }
11824 map.end()
11825 }
11826 }
11827 impl<'de> Visitor<'de> for GameModVisitor<AdaptiveSpeedMania> {
11828 type Value = DeserializedGameMod<'de, AdaptiveSpeedMania>;
11829 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11830 f.write_str("AdaptiveSpeedMania")
11831 }
11832 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11833 const FIELDS: &'static [&'static str] = &["initial_rate", "adjust_pitch"];
11834 let mut unknown_key__ = None;
11835 let mut initial_rate = None;
11836 let mut adjust_pitch = None;
11837 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11838 match key.as_str() {
11839 "initial_rate" => initial_rate = Some(map.next_value()?),
11840 "adjust_pitch" => adjust_pitch = Some(map.next_value()?),
11841 _ => {
11842 unknown_key__ = Some(key);
11843 let _: IgnoredAny = map.next_value()?;
11844 }
11845 }
11846 }
11847 let gamemod = AdaptiveSpeedMania {
11848 initial_rate: initial_rate.unwrap_or_default(),
11849 adjust_pitch: adjust_pitch.unwrap_or_default(),
11850 };
11851 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11852 }
11853 }
11854 impl Serialize for AdaptiveSpeedMania {
11855 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11856 let field_count =
11857 self.initial_rate.is_some() as usize + self.adjust_pitch.is_some() as usize;
11858 let mut map = s.serialize_map(Some(field_count))?;
11859 if let Some(ref x) = self.initial_rate {
11860 map.serialize_entry("initial_rate", x)?;
11861 }
11862 if let Some(ref x) = self.adjust_pitch {
11863 map.serialize_entry("adjust_pitch", x)?;
11864 }
11865 map.end()
11866 }
11867 }
11868 impl<'de> Visitor<'de> for GameModVisitor<ScoreV2Mania> {
11869 type Value = DeserializedGameMod<'de, ScoreV2Mania>;
11870 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11871 f.write_str("ScoreV2Mania")
11872 }
11873 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11874 const FIELDS: &'static [&'static str] = &[];
11875 let mut unknown_key__ = None;
11876 while let Some(key) = map.next_key::<MaybeOwnedStr<'de>>()? {
11877 match key.as_str() {
11878 _ => {
11879 unknown_key__ = Some(key);
11880 let _: IgnoredAny = map.next_value()?;
11881 }
11882 }
11883 }
11884 let gamemod = ScoreV2Mania {};
11885 Ok(DeserializedGameMod::new(gamemod, unknown_key__, FIELDS))
11886 }
11887 }
11888 impl Serialize for ScoreV2Mania {
11889 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11890 let field_count = 0;
11891 let map = s.serialize_map(Some(field_count))?;
11892 map.end()
11893 }
11894 }
11895 impl<'de> Deserialize<'de> for UnknownMod {
11896 fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
11897 struct UnknownModVisitor;
11898 impl<'de> Visitor<'de> for UnknownModVisitor {
11899 type Value = UnknownMod;
11900 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11901 f.write_str("any unknown mod")
11902 }
11903 fn visit_map<A: MapAccess<'de>>(self, mut map: A) -> Result<Self::Value, A::Error> {
11904 while map.next_entry::<IgnoredAny, IgnoredAny>()?.is_some() {}
11905 Ok(UnknownMod {
11906 acronym: UnknownMod::UNKNOWN_ACRONYM,
11907 })
11908 }
11909 }
11910 d.deserialize_map(UnknownModVisitor)
11911 }
11912 }
11913 impl Serialize for UnknownMod {
11914 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
11915 s.serialize_map(Some(0)).and_then(SerializeMap::end)
11916 }
11917 }
11918 impl<'a, 'de> Visitor<'de> for GameModSettingsSeed<'a> {
11919 type Value = GameMod;
11920 fn expecting(&self, f: &mut Formatter<'_>) -> FmtResult {
11921 f.write_str("GameMod settings")
11922 }
11923 fn visit_map<A: MapAccess<'de>>(self, map: A) -> Result<Self::Value, A::Error> {
11924 let d = MapAccessDeserializer::new(map);
11925 let res = match (self.acronym, self.mode) {
11926 ("EZ", GameMode::Osu) => GameMod::EasyOsu(
11927 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11928 ),
11929 ("NF", GameMode::Osu) => GameMod::NoFailOsu(
11930 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11931 ),
11932 ("HT", GameMode::Osu) => GameMod::HalfTimeOsu(
11933 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11934 ),
11935 ("DC", GameMode::Osu) => GameMod::DaycoreOsu(
11936 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11937 ),
11938 ("HR", GameMode::Osu) => GameMod::HardRockOsu(
11939 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11940 ),
11941 ("SD", GameMode::Osu) => GameMod::SuddenDeathOsu(
11942 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11943 ),
11944 ("PF", GameMode::Osu) => GameMod::PerfectOsu(
11945 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11946 ),
11947 ("DT", GameMode::Osu) => GameMod::DoubleTimeOsu(
11948 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11949 ),
11950 ("NC", GameMode::Osu) => GameMod::NightcoreOsu(
11951 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11952 ),
11953 ("HD", GameMode::Osu) => GameMod::HiddenOsu(
11954 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11955 ),
11956 ("FL", GameMode::Osu) => GameMod::FlashlightOsu(
11957 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11958 ),
11959 ("BL", GameMode::Osu) => GameMod::BlindsOsu(
11960 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11961 ),
11962 ("ST", GameMode::Osu) => GameMod::StrictTrackingOsu(
11963 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11964 ),
11965 ("AC", GameMode::Osu) => GameMod::AccuracyChallengeOsu(
11966 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11967 ),
11968 ("TP", GameMode::Osu) => GameMod::TargetPracticeOsu(
11969 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11970 ),
11971 ("DA", GameMode::Osu) => GameMod::DifficultyAdjustOsu(
11972 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11973 ),
11974 ("CL", GameMode::Osu) => GameMod::ClassicOsu(
11975 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11976 ),
11977 ("RD", GameMode::Osu) => GameMod::RandomOsu(
11978 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11979 ),
11980 ("MR", GameMode::Osu) => GameMod::MirrorOsu(
11981 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11982 ),
11983 ("AL", GameMode::Osu) => GameMod::AlternateOsu(
11984 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11985 ),
11986 ("SG", GameMode::Osu) => GameMod::SingleTapOsu(
11987 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11988 ),
11989 ("AT", GameMode::Osu) => GameMod::AutoplayOsu(
11990 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11991 ),
11992 ("CN", GameMode::Osu) => GameMod::CinemaOsu(
11993 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11994 ),
11995 ("RX", GameMode::Osu) => GameMod::RelaxOsu(
11996 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
11997 ),
11998 ("AP", GameMode::Osu) => GameMod::AutopilotOsu(
11999 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12000 ),
12001 ("SO", GameMode::Osu) => GameMod::SpunOutOsu(
12002 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12003 ),
12004 ("TR", GameMode::Osu) => GameMod::TransformOsu(
12005 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12006 ),
12007 ("WG", GameMode::Osu) => GameMod::WiggleOsu(
12008 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12009 ),
12010 ("SI", GameMode::Osu) => GameMod::SpinInOsu(
12011 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12012 ),
12013 ("GR", GameMode::Osu) => GameMod::GrowOsu(
12014 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12015 ),
12016 ("DF", GameMode::Osu) => GameMod::DeflateOsu(
12017 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12018 ),
12019 ("WU", GameMode::Osu) => GameMod::WindUpOsu(
12020 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12021 ),
12022 ("WD", GameMode::Osu) => GameMod::WindDownOsu(
12023 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12024 ),
12025 ("TC", GameMode::Osu) => GameMod::TraceableOsu(
12026 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12027 ),
12028 ("BR", GameMode::Osu) => GameMod::BarrelRollOsu(
12029 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12030 ),
12031 ("AD", GameMode::Osu) => GameMod::ApproachDifferentOsu(
12032 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12033 ),
12034 ("MU", GameMode::Osu) => GameMod::MutedOsu(
12035 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12036 ),
12037 ("NS", GameMode::Osu) => GameMod::NoScopeOsu(
12038 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12039 ),
12040 ("MG", GameMode::Osu) => GameMod::MagnetisedOsu(
12041 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12042 ),
12043 ("RP", GameMode::Osu) => GameMod::RepelOsu(
12044 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12045 ),
12046 ("AS", GameMode::Osu) => GameMod::AdaptiveSpeedOsu(
12047 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12048 ),
12049 ("FR", GameMode::Osu) => GameMod::FreezeFrameOsu(
12050 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12051 ),
12052 ("BU", GameMode::Osu) => GameMod::BubblesOsu(
12053 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12054 ),
12055 ("SY", GameMode::Osu) => GameMod::SynesthesiaOsu(
12056 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12057 ),
12058 ("DP", GameMode::Osu) => GameMod::DepthOsu(
12059 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12060 ),
12061 ("BM", GameMode::Osu) => GameMod::BloomOsu(
12062 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12063 ),
12064 ("TD", GameMode::Osu) => GameMod::TouchDeviceOsu(
12065 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12066 ),
12067 ("SV2", GameMode::Osu) => GameMod::ScoreV2Osu(
12068 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12069 ),
12070 ("EZ", GameMode::Taiko) => GameMod::EasyTaiko(
12071 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12072 ),
12073 ("NF", GameMode::Taiko) => GameMod::NoFailTaiko(
12074 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12075 ),
12076 ("HT", GameMode::Taiko) => GameMod::HalfTimeTaiko(
12077 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12078 ),
12079 ("DC", GameMode::Taiko) => GameMod::DaycoreTaiko(
12080 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12081 ),
12082 ("HR", GameMode::Taiko) => GameMod::HardRockTaiko(
12083 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12084 ),
12085 ("SD", GameMode::Taiko) => GameMod::SuddenDeathTaiko(
12086 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12087 ),
12088 ("PF", GameMode::Taiko) => GameMod::PerfectTaiko(
12089 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12090 ),
12091 ("DT", GameMode::Taiko) => GameMod::DoubleTimeTaiko(
12092 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12093 ),
12094 ("NC", GameMode::Taiko) => GameMod::NightcoreTaiko(
12095 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12096 ),
12097 ("HD", GameMode::Taiko) => GameMod::HiddenTaiko(
12098 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12099 ),
12100 ("FL", GameMode::Taiko) => GameMod::FlashlightTaiko(
12101 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12102 ),
12103 ("AC", GameMode::Taiko) => GameMod::AccuracyChallengeTaiko(
12104 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12105 ),
12106 ("RD", GameMode::Taiko) => GameMod::RandomTaiko(
12107 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12108 ),
12109 ("DA", GameMode::Taiko) => GameMod::DifficultyAdjustTaiko(
12110 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12111 ),
12112 ("CL", GameMode::Taiko) => GameMod::ClassicTaiko(
12113 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12114 ),
12115 ("SW", GameMode::Taiko) => GameMod::SwapTaiko(
12116 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12117 ),
12118 ("SG", GameMode::Taiko) => GameMod::SingleTapTaiko(
12119 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12120 ),
12121 ("CS", GameMode::Taiko) => GameMod::ConstantSpeedTaiko(
12122 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12123 ),
12124 ("AT", GameMode::Taiko) => GameMod::AutoplayTaiko(
12125 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12126 ),
12127 ("CN", GameMode::Taiko) => GameMod::CinemaTaiko(
12128 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12129 ),
12130 ("RX", GameMode::Taiko) => GameMod::RelaxTaiko(
12131 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12132 ),
12133 ("WU", GameMode::Taiko) => GameMod::WindUpTaiko(
12134 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12135 ),
12136 ("WD", GameMode::Taiko) => GameMod::WindDownTaiko(
12137 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12138 ),
12139 ("MU", GameMode::Taiko) => GameMod::MutedTaiko(
12140 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12141 ),
12142 ("AS", GameMode::Taiko) => GameMod::AdaptiveSpeedTaiko(
12143 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12144 ),
12145 ("SV2", GameMode::Taiko) => GameMod::ScoreV2Taiko(
12146 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12147 ),
12148 ("EZ", GameMode::Catch) => GameMod::EasyCatch(
12149 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12150 ),
12151 ("NF", GameMode::Catch) => GameMod::NoFailCatch(
12152 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12153 ),
12154 ("HT", GameMode::Catch) => GameMod::HalfTimeCatch(
12155 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12156 ),
12157 ("DC", GameMode::Catch) => GameMod::DaycoreCatch(
12158 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12159 ),
12160 ("HR", GameMode::Catch) => GameMod::HardRockCatch(
12161 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12162 ),
12163 ("SD", GameMode::Catch) => GameMod::SuddenDeathCatch(
12164 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12165 ),
12166 ("PF", GameMode::Catch) => GameMod::PerfectCatch(
12167 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12168 ),
12169 ("DT", GameMode::Catch) => GameMod::DoubleTimeCatch(
12170 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12171 ),
12172 ("NC", GameMode::Catch) => GameMod::NightcoreCatch(
12173 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12174 ),
12175 ("HD", GameMode::Catch) => GameMod::HiddenCatch(
12176 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12177 ),
12178 ("FL", GameMode::Catch) => GameMod::FlashlightCatch(
12179 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12180 ),
12181 ("AC", GameMode::Catch) => GameMod::AccuracyChallengeCatch(
12182 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12183 ),
12184 ("DA", GameMode::Catch) => GameMod::DifficultyAdjustCatch(
12185 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12186 ),
12187 ("CL", GameMode::Catch) => GameMod::ClassicCatch(
12188 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12189 ),
12190 ("MR", GameMode::Catch) => GameMod::MirrorCatch(
12191 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12192 ),
12193 ("AT", GameMode::Catch) => GameMod::AutoplayCatch(
12194 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12195 ),
12196 ("CN", GameMode::Catch) => GameMod::CinemaCatch(
12197 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12198 ),
12199 ("RX", GameMode::Catch) => GameMod::RelaxCatch(
12200 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12201 ),
12202 ("WU", GameMode::Catch) => GameMod::WindUpCatch(
12203 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12204 ),
12205 ("WD", GameMode::Catch) => GameMod::WindDownCatch(
12206 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12207 ),
12208 ("FF", GameMode::Catch) => GameMod::FloatingFruitsCatch(
12209 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12210 ),
12211 ("MU", GameMode::Catch) => GameMod::MutedCatch(
12212 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12213 ),
12214 ("NS", GameMode::Catch) => GameMod::NoScopeCatch(
12215 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12216 ),
12217 ("SV2", GameMode::Catch) => GameMod::ScoreV2Catch(
12218 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12219 ),
12220 ("EZ", GameMode::Mania) => GameMod::EasyMania(
12221 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12222 ),
12223 ("NF", GameMode::Mania) => GameMod::NoFailMania(
12224 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12225 ),
12226 ("HT", GameMode::Mania) => GameMod::HalfTimeMania(
12227 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12228 ),
12229 ("DC", GameMode::Mania) => GameMod::DaycoreMania(
12230 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12231 ),
12232 ("NR", GameMode::Mania) => GameMod::NoReleaseMania(
12233 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12234 ),
12235 ("HR", GameMode::Mania) => GameMod::HardRockMania(
12236 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12237 ),
12238 ("SD", GameMode::Mania) => GameMod::SuddenDeathMania(
12239 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12240 ),
12241 ("PF", GameMode::Mania) => GameMod::PerfectMania(
12242 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12243 ),
12244 ("DT", GameMode::Mania) => GameMod::DoubleTimeMania(
12245 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12246 ),
12247 ("NC", GameMode::Mania) => GameMod::NightcoreMania(
12248 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12249 ),
12250 ("FI", GameMode::Mania) => GameMod::FadeInMania(
12251 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12252 ),
12253 ("HD", GameMode::Mania) => GameMod::HiddenMania(
12254 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12255 ),
12256 ("CO", GameMode::Mania) => GameMod::CoverMania(
12257 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12258 ),
12259 ("FL", GameMode::Mania) => GameMod::FlashlightMania(
12260 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12261 ),
12262 ("AC", GameMode::Mania) => GameMod::AccuracyChallengeMania(
12263 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12264 ),
12265 ("RD", GameMode::Mania) => GameMod::RandomMania(
12266 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12267 ),
12268 ("DS", GameMode::Mania) => GameMod::DualStagesMania(
12269 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12270 ),
12271 ("MR", GameMode::Mania) => GameMod::MirrorMania(
12272 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12273 ),
12274 ("DA", GameMode::Mania) => GameMod::DifficultyAdjustMania(
12275 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12276 ),
12277 ("CL", GameMode::Mania) => GameMod::ClassicMania(
12278 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12279 ),
12280 ("IN", GameMode::Mania) => GameMod::InvertMania(
12281 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12282 ),
12283 ("CS", GameMode::Mania) => GameMod::ConstantSpeedMania(
12284 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12285 ),
12286 ("HO", GameMode::Mania) => GameMod::HoldOffMania(
12287 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12288 ),
12289 ("1K", GameMode::Mania) => GameMod::OneKeyMania(
12290 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12291 ),
12292 ("2K", GameMode::Mania) => GameMod::TwoKeysMania(
12293 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12294 ),
12295 ("3K", GameMode::Mania) => GameMod::ThreeKeysMania(
12296 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12297 ),
12298 ("4K", GameMode::Mania) => GameMod::FourKeysMania(
12299 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12300 ),
12301 ("5K", GameMode::Mania) => GameMod::FiveKeysMania(
12302 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12303 ),
12304 ("6K", GameMode::Mania) => GameMod::SixKeysMania(
12305 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12306 ),
12307 ("7K", GameMode::Mania) => GameMod::SevenKeysMania(
12308 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12309 ),
12310 ("8K", GameMode::Mania) => GameMod::EightKeysMania(
12311 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12312 ),
12313 ("9K", GameMode::Mania) => GameMod::NineKeysMania(
12314 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12315 ),
12316 ("10K", GameMode::Mania) => GameMod::TenKeysMania(
12317 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12318 ),
12319 ("AT", GameMode::Mania) => GameMod::AutoplayMania(
12320 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12321 ),
12322 ("CN", GameMode::Mania) => GameMod::CinemaMania(
12323 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12324 ),
12325 ("WU", GameMode::Mania) => GameMod::WindUpMania(
12326 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12327 ),
12328 ("WD", GameMode::Mania) => GameMod::WindDownMania(
12329 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12330 ),
12331 ("MU", GameMode::Mania) => GameMod::MutedMania(
12332 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12333 ),
12334 ("AS", GameMode::Mania) => GameMod::AdaptiveSpeedMania(
12335 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12336 ),
12337 ("SV2", GameMode::Mania) => GameMod::ScoreV2Mania(
12338 DeserializedGameMod::try_deserialize_mod(d, self.deny_unknown_fields)?,
12339 ),
12340 _ => {
12341 let acronym = <Acronym as std::str::FromStr>::from_str(self.acronym)
12342 .map_err(DeError::custom)?;
12343 #[allow(clippy::needless_update)]
12346 let unknown = UnknownMod {
12347 acronym,
12348 ..Deserialize::deserialize(d)?
12349 };
12350 match self.mode {
12351 GameMode::Osu => GameMod::UnknownOsu(unknown),
12352 GameMode::Taiko => GameMod::UnknownTaiko(unknown),
12353 GameMode::Catch => GameMod::UnknownCatch(unknown),
12354 GameMode::Mania => GameMod::UnknownMania(unknown),
12355 }
12356 }
12357 };
12358 Ok(res)
12359 }
12360 }
12361 impl Serialize for GameMod {
12362 fn serialize<S: Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
12363 let mut s = s.serialize_map(None)?;
12364 s.serialize_entry("acronym", self.acronym().as_str())?;
12365 match self {
12366 Self::EasyOsu(m) => {
12367 let has_some = m.retries.is_some();
12368 if has_some {
12369 s.serialize_entry("settings", m)?;
12370 }
12371 }
12372 Self::HalfTimeOsu(m) => {
12373 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12374 if has_some {
12375 s.serialize_entry("settings", m)?;
12376 }
12377 }
12378 Self::DaycoreOsu(m) => {
12379 let has_some = m.speed_change.is_some();
12380 if has_some {
12381 s.serialize_entry("settings", m)?;
12382 }
12383 }
12384 Self::SuddenDeathOsu(m) => {
12385 let has_some = m.fail_on_slider_tail.is_some() || m.restart.is_some();
12386 if has_some {
12387 s.serialize_entry("settings", m)?;
12388 }
12389 }
12390 Self::PerfectOsu(m) => {
12391 let has_some = m.restart.is_some();
12392 if has_some {
12393 s.serialize_entry("settings", m)?;
12394 }
12395 }
12396 Self::DoubleTimeOsu(m) => {
12397 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12398 if has_some {
12399 s.serialize_entry("settings", m)?;
12400 }
12401 }
12402 Self::NightcoreOsu(m) => {
12403 let has_some = m.speed_change.is_some();
12404 if has_some {
12405 s.serialize_entry("settings", m)?;
12406 }
12407 }
12408 Self::HiddenOsu(m) => {
12409 let has_some = m.only_fade_approach_circles.is_some();
12410 if has_some {
12411 s.serialize_entry("settings", m)?;
12412 }
12413 }
12414 Self::FlashlightOsu(m) => {
12415 let has_some = m.follow_delay.is_some()
12416 || m.size_multiplier.is_some()
12417 || m.combo_based_size.is_some();
12418 if has_some {
12419 s.serialize_entry("settings", m)?;
12420 }
12421 }
12422 Self::AccuracyChallengeOsu(m) => {
12423 let has_some = m.minimum_accuracy.is_some()
12424 || m.accuracy_judge_mode.is_some()
12425 || m.restart.is_some();
12426 if has_some {
12427 s.serialize_entry("settings", m)?;
12428 }
12429 }
12430 Self::TargetPracticeOsu(m) => {
12431 let has_some = m.seed.is_some() || m.metronome.is_some();
12432 if has_some {
12433 s.serialize_entry("settings", m)?;
12434 }
12435 }
12436 Self::DifficultyAdjustOsu(m) => {
12437 let has_some = m.circle_size.is_some()
12438 || m.approach_rate.is_some()
12439 || m.drain_rate.is_some()
12440 || m.overall_difficulty.is_some()
12441 || m.extended_limits.is_some();
12442 if has_some {
12443 s.serialize_entry("settings", m)?;
12444 }
12445 }
12446 Self::ClassicOsu(m) => {
12447 let has_some = m.no_slider_head_accuracy.is_some()
12448 || m.classic_note_lock.is_some()
12449 || m.always_play_tail_sample.is_some()
12450 || m.fade_hit_circle_early.is_some()
12451 || m.classic_health.is_some();
12452 if has_some {
12453 s.serialize_entry("settings", m)?;
12454 }
12455 }
12456 Self::RandomOsu(m) => {
12457 let has_some = m.angle_sharpness.is_some() || m.seed.is_some();
12458 if has_some {
12459 s.serialize_entry("settings", m)?;
12460 }
12461 }
12462 Self::MirrorOsu(m) => {
12463 let has_some = m.reflection.is_some();
12464 if has_some {
12465 s.serialize_entry("settings", m)?;
12466 }
12467 }
12468 Self::WiggleOsu(m) => {
12469 let has_some = m.strength.is_some();
12470 if has_some {
12471 s.serialize_entry("settings", m)?;
12472 }
12473 }
12474 Self::GrowOsu(m) => {
12475 let has_some = m.start_scale.is_some();
12476 if has_some {
12477 s.serialize_entry("settings", m)?;
12478 }
12479 }
12480 Self::DeflateOsu(m) => {
12481 let has_some = m.start_scale.is_some();
12482 if has_some {
12483 s.serialize_entry("settings", m)?;
12484 }
12485 }
12486 Self::WindUpOsu(m) => {
12487 let has_some = m.initial_rate.is_some()
12488 || m.final_rate.is_some()
12489 || m.adjust_pitch.is_some();
12490 if has_some {
12491 s.serialize_entry("settings", m)?;
12492 }
12493 }
12494 Self::WindDownOsu(m) => {
12495 let has_some = m.initial_rate.is_some()
12496 || m.final_rate.is_some()
12497 || m.adjust_pitch.is_some();
12498 if has_some {
12499 s.serialize_entry("settings", m)?;
12500 }
12501 }
12502 Self::BarrelRollOsu(m) => {
12503 let has_some = m.spin_speed.is_some() || m.direction.is_some();
12504 if has_some {
12505 s.serialize_entry("settings", m)?;
12506 }
12507 }
12508 Self::ApproachDifferentOsu(m) => {
12509 let has_some = m.scale.is_some() || m.style.is_some();
12510 if has_some {
12511 s.serialize_entry("settings", m)?;
12512 }
12513 }
12514 Self::MutedOsu(m) => {
12515 let has_some = m.inverse_muting.is_some()
12516 || m.enable_metronome.is_some()
12517 || m.mute_combo_count.is_some()
12518 || m.affects_hit_sounds.is_some();
12519 if has_some {
12520 s.serialize_entry("settings", m)?;
12521 }
12522 }
12523 Self::NoScopeOsu(m) => {
12524 let has_some = m.hidden_combo_count.is_some();
12525 if has_some {
12526 s.serialize_entry("settings", m)?;
12527 }
12528 }
12529 Self::MagnetisedOsu(m) => {
12530 let has_some = m.attraction_strength.is_some();
12531 if has_some {
12532 s.serialize_entry("settings", m)?;
12533 }
12534 }
12535 Self::RepelOsu(m) => {
12536 let has_some = m.repulsion_strength.is_some();
12537 if has_some {
12538 s.serialize_entry("settings", m)?;
12539 }
12540 }
12541 Self::AdaptiveSpeedOsu(m) => {
12542 let has_some = m.initial_rate.is_some() || m.adjust_pitch.is_some();
12543 if has_some {
12544 s.serialize_entry("settings", m)?;
12545 }
12546 }
12547 Self::DepthOsu(m) => {
12548 let has_some = m.max_depth.is_some() || m.show_approach_circles.is_some();
12549 if has_some {
12550 s.serialize_entry("settings", m)?;
12551 }
12552 }
12553 Self::BloomOsu(m) => {
12554 let has_some = m.max_size_combo_count.is_some() || m.max_cursor_size.is_some();
12555 if has_some {
12556 s.serialize_entry("settings", m)?;
12557 }
12558 }
12559 Self::HalfTimeTaiko(m) => {
12560 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12561 if has_some {
12562 s.serialize_entry("settings", m)?;
12563 }
12564 }
12565 Self::DaycoreTaiko(m) => {
12566 let has_some = m.speed_change.is_some();
12567 if has_some {
12568 s.serialize_entry("settings", m)?;
12569 }
12570 }
12571 Self::SuddenDeathTaiko(m) => {
12572 let has_some = m.restart.is_some();
12573 if has_some {
12574 s.serialize_entry("settings", m)?;
12575 }
12576 }
12577 Self::PerfectTaiko(m) => {
12578 let has_some = m.restart.is_some();
12579 if has_some {
12580 s.serialize_entry("settings", m)?;
12581 }
12582 }
12583 Self::DoubleTimeTaiko(m) => {
12584 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12585 if has_some {
12586 s.serialize_entry("settings", m)?;
12587 }
12588 }
12589 Self::NightcoreTaiko(m) => {
12590 let has_some = m.speed_change.is_some();
12591 if has_some {
12592 s.serialize_entry("settings", m)?;
12593 }
12594 }
12595 Self::FlashlightTaiko(m) => {
12596 let has_some = m.size_multiplier.is_some() || m.combo_based_size.is_some();
12597 if has_some {
12598 s.serialize_entry("settings", m)?;
12599 }
12600 }
12601 Self::AccuracyChallengeTaiko(m) => {
12602 let has_some = m.minimum_accuracy.is_some()
12603 || m.accuracy_judge_mode.is_some()
12604 || m.restart.is_some();
12605 if has_some {
12606 s.serialize_entry("settings", m)?;
12607 }
12608 }
12609 Self::RandomTaiko(m) => {
12610 let has_some = m.seed.is_some();
12611 if has_some {
12612 s.serialize_entry("settings", m)?;
12613 }
12614 }
12615 Self::DifficultyAdjustTaiko(m) => {
12616 let has_some = m.scroll_speed.is_some()
12617 || m.drain_rate.is_some()
12618 || m.overall_difficulty.is_some()
12619 || m.extended_limits.is_some();
12620 if has_some {
12621 s.serialize_entry("settings", m)?;
12622 }
12623 }
12624 Self::WindUpTaiko(m) => {
12625 let has_some = m.initial_rate.is_some()
12626 || m.final_rate.is_some()
12627 || m.adjust_pitch.is_some();
12628 if has_some {
12629 s.serialize_entry("settings", m)?;
12630 }
12631 }
12632 Self::WindDownTaiko(m) => {
12633 let has_some = m.initial_rate.is_some()
12634 || m.final_rate.is_some()
12635 || m.adjust_pitch.is_some();
12636 if has_some {
12637 s.serialize_entry("settings", m)?;
12638 }
12639 }
12640 Self::MutedTaiko(m) => {
12641 let has_some = m.inverse_muting.is_some()
12642 || m.enable_metronome.is_some()
12643 || m.mute_combo_count.is_some()
12644 || m.affects_hit_sounds.is_some();
12645 if has_some {
12646 s.serialize_entry("settings", m)?;
12647 }
12648 }
12649 Self::AdaptiveSpeedTaiko(m) => {
12650 let has_some = m.initial_rate.is_some() || m.adjust_pitch.is_some();
12651 if has_some {
12652 s.serialize_entry("settings", m)?;
12653 }
12654 }
12655 Self::EasyCatch(m) => {
12656 let has_some = m.retries.is_some();
12657 if has_some {
12658 s.serialize_entry("settings", m)?;
12659 }
12660 }
12661 Self::HalfTimeCatch(m) => {
12662 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12663 if has_some {
12664 s.serialize_entry("settings", m)?;
12665 }
12666 }
12667 Self::DaycoreCatch(m) => {
12668 let has_some = m.speed_change.is_some();
12669 if has_some {
12670 s.serialize_entry("settings", m)?;
12671 }
12672 }
12673 Self::SuddenDeathCatch(m) => {
12674 let has_some = m.restart.is_some();
12675 if has_some {
12676 s.serialize_entry("settings", m)?;
12677 }
12678 }
12679 Self::PerfectCatch(m) => {
12680 let has_some = m.restart.is_some();
12681 if has_some {
12682 s.serialize_entry("settings", m)?;
12683 }
12684 }
12685 Self::DoubleTimeCatch(m) => {
12686 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12687 if has_some {
12688 s.serialize_entry("settings", m)?;
12689 }
12690 }
12691 Self::NightcoreCatch(m) => {
12692 let has_some = m.speed_change.is_some();
12693 if has_some {
12694 s.serialize_entry("settings", m)?;
12695 }
12696 }
12697 Self::FlashlightCatch(m) => {
12698 let has_some = m.size_multiplier.is_some() || m.combo_based_size.is_some();
12699 if has_some {
12700 s.serialize_entry("settings", m)?;
12701 }
12702 }
12703 Self::AccuracyChallengeCatch(m) => {
12704 let has_some = m.minimum_accuracy.is_some()
12705 || m.accuracy_judge_mode.is_some()
12706 || m.restart.is_some();
12707 if has_some {
12708 s.serialize_entry("settings", m)?;
12709 }
12710 }
12711 Self::DifficultyAdjustCatch(m) => {
12712 let has_some = m.circle_size.is_some()
12713 || m.approach_rate.is_some()
12714 || m.hard_rock_offsets.is_some()
12715 || m.drain_rate.is_some()
12716 || m.overall_difficulty.is_some()
12717 || m.extended_limits.is_some();
12718 if has_some {
12719 s.serialize_entry("settings", m)?;
12720 }
12721 }
12722 Self::WindUpCatch(m) => {
12723 let has_some = m.initial_rate.is_some()
12724 || m.final_rate.is_some()
12725 || m.adjust_pitch.is_some();
12726 if has_some {
12727 s.serialize_entry("settings", m)?;
12728 }
12729 }
12730 Self::WindDownCatch(m) => {
12731 let has_some = m.initial_rate.is_some()
12732 || m.final_rate.is_some()
12733 || m.adjust_pitch.is_some();
12734 if has_some {
12735 s.serialize_entry("settings", m)?;
12736 }
12737 }
12738 Self::MutedCatch(m) => {
12739 let has_some = m.inverse_muting.is_some()
12740 || m.enable_metronome.is_some()
12741 || m.mute_combo_count.is_some()
12742 || m.affects_hit_sounds.is_some();
12743 if has_some {
12744 s.serialize_entry("settings", m)?;
12745 }
12746 }
12747 Self::NoScopeCatch(m) => {
12748 let has_some = m.hidden_combo_count.is_some();
12749 if has_some {
12750 s.serialize_entry("settings", m)?;
12751 }
12752 }
12753 Self::EasyMania(m) => {
12754 let has_some = m.retries.is_some();
12755 if has_some {
12756 s.serialize_entry("settings", m)?;
12757 }
12758 }
12759 Self::HalfTimeMania(m) => {
12760 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12761 if has_some {
12762 s.serialize_entry("settings", m)?;
12763 }
12764 }
12765 Self::DaycoreMania(m) => {
12766 let has_some = m.speed_change.is_some();
12767 if has_some {
12768 s.serialize_entry("settings", m)?;
12769 }
12770 }
12771 Self::SuddenDeathMania(m) => {
12772 let has_some = m.restart.is_some();
12773 if has_some {
12774 s.serialize_entry("settings", m)?;
12775 }
12776 }
12777 Self::PerfectMania(m) => {
12778 let has_some = m.restart.is_some();
12779 if has_some {
12780 s.serialize_entry("settings", m)?;
12781 }
12782 }
12783 Self::DoubleTimeMania(m) => {
12784 let has_some = m.speed_change.is_some() || m.adjust_pitch.is_some();
12785 if has_some {
12786 s.serialize_entry("settings", m)?;
12787 }
12788 }
12789 Self::NightcoreMania(m) => {
12790 let has_some = m.speed_change.is_some();
12791 if has_some {
12792 s.serialize_entry("settings", m)?;
12793 }
12794 }
12795 Self::CoverMania(m) => {
12796 let has_some = m.coverage.is_some() || m.direction.is_some();
12797 if has_some {
12798 s.serialize_entry("settings", m)?;
12799 }
12800 }
12801 Self::FlashlightMania(m) => {
12802 let has_some = m.size_multiplier.is_some() || m.combo_based_size.is_some();
12803 if has_some {
12804 s.serialize_entry("settings", m)?;
12805 }
12806 }
12807 Self::AccuracyChallengeMania(m) => {
12808 let has_some = m.minimum_accuracy.is_some()
12809 || m.accuracy_judge_mode.is_some()
12810 || m.restart.is_some();
12811 if has_some {
12812 s.serialize_entry("settings", m)?;
12813 }
12814 }
12815 Self::RandomMania(m) => {
12816 let has_some = m.seed.is_some();
12817 if has_some {
12818 s.serialize_entry("settings", m)?;
12819 }
12820 }
12821 Self::DifficultyAdjustMania(m) => {
12822 let has_some = m.drain_rate.is_some()
12823 || m.overall_difficulty.is_some()
12824 || m.extended_limits.is_some();
12825 if has_some {
12826 s.serialize_entry("settings", m)?;
12827 }
12828 }
12829 Self::WindUpMania(m) => {
12830 let has_some = m.initial_rate.is_some()
12831 || m.final_rate.is_some()
12832 || m.adjust_pitch.is_some();
12833 if has_some {
12834 s.serialize_entry("settings", m)?;
12835 }
12836 }
12837 Self::WindDownMania(m) => {
12838 let has_some = m.initial_rate.is_some()
12839 || m.final_rate.is_some()
12840 || m.adjust_pitch.is_some();
12841 if has_some {
12842 s.serialize_entry("settings", m)?;
12843 }
12844 }
12845 Self::MutedMania(m) => {
12846 let has_some = m.inverse_muting.is_some()
12847 || m.enable_metronome.is_some()
12848 || m.mute_combo_count.is_some()
12849 || m.affects_hit_sounds.is_some();
12850 if has_some {
12851 s.serialize_entry("settings", m)?;
12852 }
12853 }
12854 Self::AdaptiveSpeedMania(m) => {
12855 let has_some = m.initial_rate.is_some() || m.adjust_pitch.is_some();
12856 if has_some {
12857 s.serialize_entry("settings", m)?;
12858 }
12859 }
12860 _ => {}
12861 }
12862 s.end()
12863 }
12864 }
12865 impl<'de> Deserialize<'de> for GameModIntermode {
12866 fn deserialize<D: Deserializer<'de>>(d: D) -> Result<Self, D::Error> {
12867 fn try_acronym_to_gamemod<E: DeError>(
12868 acronym: &MaybeOwnedStr<'_>,
12869 ) -> Result<GameModIntermode, E> {
12870 acronym
12871 .as_str()
12872 .parse()
12873 .map(GameModIntermode::from_acronym)
12874 .map_err(DeError::custom)
12875 }
12876 let raw_seed = GameModRawSeed {
12877 deny_unknown_fields: true,
12878 };
12879 match raw_seed.deserialize(d)? {
12880 GameModRaw::Bits(bits) => GameModIntermode::try_from_bits(bits)
12881 .ok_or_else(|| DeError::custom("invalid bitflags")),
12882 GameModRaw::Acronym(acronym) => try_acronym_to_gamemod(&acronym),
12883 GameModRaw::Full { acronym, .. } => try_acronym_to_gamemod(&acronym),
12884 }
12885 }
12886 }
12887 impl serde::Serialize for GameModIntermode {
12888 fn serialize<S: serde::Serializer>(&self, s: S) -> Result<S::Ok, S::Error> {
12889 s.serialize_str(self.acronym().as_str())
12890 }
12891 }
12892 impl GameModSettings<'_> {
12893 pub(crate) fn try_deserialize(
12894 &self,
12895 acronym: &str,
12896 deny_unknown_fields: bool,
12897 ) -> Option<GameMod> {
12898 macro_rules! try_deser {
12899 ( $osu_mod:ident, $taiko_mod:ident, $catch_mod:ident, $mania_mod:ident, ) => {{
12900 try_deser!(@ $osu_mod Osu);
12901 try_deser!(@ $taiko_mod Taiko);
12902 try_deser!(@ $catch_mod Catch);
12903 try_deser!(@ $mania_mod Mania);
12904 }};
12905 ( @ Skip_ $mode:ident ) => {};
12906 ( @ $name:ident $mode:ident ) => {
12907 if let Ok(m) = DeserializedGameMod::try_deserialize_mod(self, deny_unknown_fields) {
12908 return Some(GameMod::$name(m));
12909 }
12910 };
12911 }
12912 match acronym {
12913 "10K" => try_deser!(Skip_, Skip_, Skip_, TenKeysMania,),
12914 "1K" => try_deser!(Skip_, Skip_, Skip_, OneKeyMania,),
12915 "2K" => try_deser!(Skip_, Skip_, Skip_, TwoKeysMania,),
12916 "3K" => try_deser!(Skip_, Skip_, Skip_, ThreeKeysMania,),
12917 "4K" => try_deser!(Skip_, Skip_, Skip_, FourKeysMania,),
12918 "5K" => try_deser!(Skip_, Skip_, Skip_, FiveKeysMania,),
12919 "6K" => try_deser!(Skip_, Skip_, Skip_, SixKeysMania,),
12920 "7K" => try_deser!(Skip_, Skip_, Skip_, SevenKeysMania,),
12921 "8K" => try_deser!(Skip_, Skip_, Skip_, EightKeysMania,),
12922 "9K" => try_deser!(Skip_, Skip_, Skip_, NineKeysMania,),
12923 "AC" => try_deser!(
12924 AccuracyChallengeOsu,
12925 AccuracyChallengeTaiko,
12926 AccuracyChallengeCatch,
12927 AccuracyChallengeMania,
12928 ),
12929 "AD" => try_deser!(ApproachDifferentOsu, Skip_, Skip_, Skip_,),
12930 "AL" => try_deser!(AlternateOsu, Skip_, Skip_, Skip_,),
12931 "AP" => try_deser!(AutopilotOsu, Skip_, Skip_, Skip_,),
12932 "AS" => try_deser!(
12933 AdaptiveSpeedOsu,
12934 AdaptiveSpeedTaiko,
12935 Skip_,
12936 AdaptiveSpeedMania,
12937 ),
12938 "AT" => try_deser!(AutoplayOsu, AutoplayTaiko, AutoplayCatch, AutoplayMania,),
12939 "BL" => try_deser!(BlindsOsu, Skip_, Skip_, Skip_,),
12940 "BM" => try_deser!(BloomOsu, Skip_, Skip_, Skip_,),
12941 "BR" => try_deser!(BarrelRollOsu, Skip_, Skip_, Skip_,),
12942 "BU" => try_deser!(BubblesOsu, Skip_, Skip_, Skip_,),
12943 "CL" => try_deser!(ClassicOsu, ClassicTaiko, ClassicCatch, ClassicMania,),
12944 "CN" => try_deser!(CinemaOsu, CinemaTaiko, CinemaCatch, CinemaMania,),
12945 "CO" => try_deser!(Skip_, Skip_, Skip_, CoverMania,),
12946 "CS" => try_deser!(Skip_, ConstantSpeedTaiko, Skip_, ConstantSpeedMania,),
12947 "DA" => try_deser!(
12948 DifficultyAdjustOsu,
12949 DifficultyAdjustTaiko,
12950 DifficultyAdjustCatch,
12951 DifficultyAdjustMania,
12952 ),
12953 "DC" => try_deser!(DaycoreOsu, DaycoreTaiko, DaycoreCatch, DaycoreMania,),
12954 "DF" => try_deser!(DeflateOsu, Skip_, Skip_, Skip_,),
12955 "DP" => try_deser!(DepthOsu, Skip_, Skip_, Skip_,),
12956 "DS" => try_deser!(Skip_, Skip_, Skip_, DualStagesMania,),
12957 "DT" => try_deser!(
12958 DoubleTimeOsu,
12959 DoubleTimeTaiko,
12960 DoubleTimeCatch,
12961 DoubleTimeMania,
12962 ),
12963 "EZ" => try_deser!(EasyOsu, EasyTaiko, EasyCatch, EasyMania,),
12964 "FF" => try_deser!(Skip_, Skip_, FloatingFruitsCatch, Skip_,),
12965 "FI" => try_deser!(Skip_, Skip_, Skip_, FadeInMania,),
12966 "FL" => try_deser!(
12967 FlashlightOsu,
12968 FlashlightTaiko,
12969 FlashlightCatch,
12970 FlashlightMania,
12971 ),
12972 "FR" => try_deser!(FreezeFrameOsu, Skip_, Skip_, Skip_,),
12973 "GR" => try_deser!(GrowOsu, Skip_, Skip_, Skip_,),
12974 "HD" => try_deser!(HiddenOsu, HiddenTaiko, HiddenCatch, HiddenMania,),
12975 "HO" => try_deser!(Skip_, Skip_, Skip_, HoldOffMania,),
12976 "HR" => try_deser!(HardRockOsu, HardRockTaiko, HardRockCatch, HardRockMania,),
12977 "HT" => try_deser!(HalfTimeOsu, HalfTimeTaiko, HalfTimeCatch, HalfTimeMania,),
12978 "IN" => try_deser!(Skip_, Skip_, Skip_, InvertMania,),
12979 "MG" => try_deser!(MagnetisedOsu, Skip_, Skip_, Skip_,),
12980 "MR" => try_deser!(MirrorOsu, Skip_, MirrorCatch, MirrorMania,),
12981 "MU" => try_deser!(MutedOsu, MutedTaiko, MutedCatch, MutedMania,),
12982 "NC" => try_deser!(NightcoreOsu, NightcoreTaiko, NightcoreCatch, NightcoreMania,),
12983 "NF" => try_deser!(NoFailOsu, NoFailTaiko, NoFailCatch, NoFailMania,),
12984 "NR" => try_deser!(Skip_, Skip_, Skip_, NoReleaseMania,),
12985 "NS" => try_deser!(NoScopeOsu, Skip_, NoScopeCatch, Skip_,),
12986 "PF" => try_deser!(PerfectOsu, PerfectTaiko, PerfectCatch, PerfectMania,),
12987 "RD" => try_deser!(RandomOsu, RandomTaiko, Skip_, RandomMania,),
12988 "RP" => try_deser!(RepelOsu, Skip_, Skip_, Skip_,),
12989 "RX" => try_deser!(RelaxOsu, RelaxTaiko, RelaxCatch, Skip_,),
12990 "SD" => try_deser!(
12991 SuddenDeathOsu,
12992 SuddenDeathTaiko,
12993 SuddenDeathCatch,
12994 SuddenDeathMania,
12995 ),
12996 "SG" => try_deser!(SingleTapOsu, SingleTapTaiko, Skip_, Skip_,),
12997 "SI" => try_deser!(SpinInOsu, Skip_, Skip_, Skip_,),
12998 "SO" => try_deser!(SpunOutOsu, Skip_, Skip_, Skip_,),
12999 "ST" => try_deser!(StrictTrackingOsu, Skip_, Skip_, Skip_,),
13000 "SV2" => try_deser!(ScoreV2Osu, ScoreV2Taiko, ScoreV2Catch, ScoreV2Mania,),
13001 "SW" => try_deser!(Skip_, SwapTaiko, Skip_, Skip_,),
13002 "SY" => try_deser!(SynesthesiaOsu, Skip_, Skip_, Skip_,),
13003 "TC" => try_deser!(TraceableOsu, Skip_, Skip_, Skip_,),
13004 "TD" => try_deser!(TouchDeviceOsu, Skip_, Skip_, Skip_,),
13005 "TP" => try_deser!(TargetPracticeOsu, Skip_, Skip_, Skip_,),
13006 "TR" => try_deser!(TransformOsu, Skip_, Skip_, Skip_,),
13007 "WD" => try_deser!(WindDownOsu, WindDownTaiko, WindDownCatch, WindDownMania,),
13008 "WG" => try_deser!(WiggleOsu, Skip_, Skip_, Skip_,),
13009 "WU" => try_deser!(WindUpOsu, WindUpTaiko, WindUpCatch, WindUpMania,),
13010 _ => {}
13011 }
13012 None
13013 }
13014 }
13015};
13016#[macro_export(local_inner_macros)]
13017#[cfg(feature = "macros")]
13018#[doc(hidden)]
13019macro_rules! mods_inner {
13020 ( @ $mode:ident: $( $acronym:tt )* ) => {{
13021 let _ = $crate::GameMode::$mode;
13023
13024 #[allow(unused_mut)]
13025 let mut mods = $crate::GameMods::new();
13026 $( mods.insert(mods_inner!(< ! $mode $acronym)(Default::default())); )*
13027 mods
13028 }};
13029 ( @ $( $acronym:tt )* ) => {{
13030 #[allow(unused_mut)]
13031 let mut mods = $crate::GameModsIntermode::new();
13032 $( mods.insert(mods_inner!(< $acronym)); )*
13033 mods
13034 }};
13035
13036 ( < $( ! $mode:ident )? 10K ) => { mods_inner!(> $( $mode )? TenKeys ) };
13038 ( < $( ! $mode:ident )? 1K ) => { mods_inner!(> $( $mode )? OneKey ) };
13039 ( < $( ! $mode:ident )? 2K ) => { mods_inner!(> $( $mode )? TwoKeys ) };
13040 ( < $( ! $mode:ident )? 3K ) => { mods_inner!(> $( $mode )? ThreeKeys ) };
13041 ( < $( ! $mode:ident )? 4K ) => { mods_inner!(> $( $mode )? FourKeys ) };
13042 ( < $( ! $mode:ident )? 5K ) => { mods_inner!(> $( $mode )? FiveKeys ) };
13043 ( < $( ! $mode:ident )? 6K ) => { mods_inner!(> $( $mode )? SixKeys ) };
13044 ( < $( ! $mode:ident )? 7K ) => { mods_inner!(> $( $mode )? SevenKeys ) };
13045 ( < $( ! $mode:ident )? 8K ) => { mods_inner!(> $( $mode )? EightKeys ) };
13046 ( < $( ! $mode:ident )? 9K ) => { mods_inner!(> $( $mode )? NineKeys ) };
13047 ( < $( ! $mode:ident )? AC ) => { mods_inner!(> $( $mode )? AccuracyChallenge ) };
13048 ( < $( ! $mode:ident )? AD ) => { mods_inner!(> $( $mode )? ApproachDifferent ) };
13049 ( < $( ! $mode:ident )? AL ) => { mods_inner!(> $( $mode )? Alternate ) };
13050 ( < $( ! $mode:ident )? AP ) => { mods_inner!(> $( $mode )? Autopilot ) };
13051 ( < $( ! $mode:ident )? AS ) => { mods_inner!(> $( $mode )? AdaptiveSpeed ) };
13052 ( < $( ! $mode:ident )? AT ) => { mods_inner!(> $( $mode )? Autoplay ) };
13053 ( < $( ! $mode:ident )? BL ) => { mods_inner!(> $( $mode )? Blinds ) };
13054 ( < $( ! $mode:ident )? BM ) => { mods_inner!(> $( $mode )? Bloom ) };
13055 ( < $( ! $mode:ident )? BR ) => { mods_inner!(> $( $mode )? BarrelRoll ) };
13056 ( < $( ! $mode:ident )? BU ) => { mods_inner!(> $( $mode )? Bubbles ) };
13057 ( < $( ! $mode:ident )? CL ) => { mods_inner!(> $( $mode )? Classic ) };
13058 ( < $( ! $mode:ident )? CN ) => { mods_inner!(> $( $mode )? Cinema ) };
13059 ( < $( ! $mode:ident )? CO ) => { mods_inner!(> $( $mode )? Cover ) };
13060 ( < $( ! $mode:ident )? CS ) => { mods_inner!(> $( $mode )? ConstantSpeed ) };
13061 ( < $( ! $mode:ident )? DA ) => { mods_inner!(> $( $mode )? DifficultyAdjust ) };
13062 ( < $( ! $mode:ident )? DC ) => { mods_inner!(> $( $mode )? Daycore ) };
13063 ( < $( ! $mode:ident )? DF ) => { mods_inner!(> $( $mode )? Deflate ) };
13064 ( < $( ! $mode:ident )? DP ) => { mods_inner!(> $( $mode )? Depth ) };
13065 ( < $( ! $mode:ident )? DS ) => { mods_inner!(> $( $mode )? DualStages ) };
13066 ( < $( ! $mode:ident )? DT ) => { mods_inner!(> $( $mode )? DoubleTime ) };
13067 ( < $( ! $mode:ident )? EZ ) => { mods_inner!(> $( $mode )? Easy ) };
13068 ( < $( ! $mode:ident )? FF ) => { mods_inner!(> $( $mode )? FloatingFruits ) };
13069 ( < $( ! $mode:ident )? FI ) => { mods_inner!(> $( $mode )? FadeIn ) };
13070 ( < $( ! $mode:ident )? FL ) => { mods_inner!(> $( $mode )? Flashlight ) };
13071 ( < $( ! $mode:ident )? FR ) => { mods_inner!(> $( $mode )? FreezeFrame ) };
13072 ( < $( ! $mode:ident )? GR ) => { mods_inner!(> $( $mode )? Grow ) };
13073 ( < $( ! $mode:ident )? HD ) => { mods_inner!(> $( $mode )? Hidden ) };
13074 ( < $( ! $mode:ident )? HO ) => { mods_inner!(> $( $mode )? HoldOff ) };
13075 ( < $( ! $mode:ident )? HR ) => { mods_inner!(> $( $mode )? HardRock ) };
13076 ( < $( ! $mode:ident )? HT ) => { mods_inner!(> $( $mode )? HalfTime ) };
13077 ( < $( ! $mode:ident )? IN ) => { mods_inner!(> $( $mode )? Invert ) };
13078 ( < $( ! $mode:ident )? MG ) => { mods_inner!(> $( $mode )? Magnetised ) };
13079 ( < $( ! $mode:ident )? MR ) => { mods_inner!(> $( $mode )? Mirror ) };
13080 ( < $( ! $mode:ident )? MU ) => { mods_inner!(> $( $mode )? Muted ) };
13081 ( < $( ! $mode:ident )? NC ) => { mods_inner!(> $( $mode )? Nightcore ) };
13082 ( < $( ! $mode:ident )? NF ) => { mods_inner!(> $( $mode )? NoFail ) };
13083 ( < $( ! $mode:ident )? NR ) => { mods_inner!(> $( $mode )? NoRelease ) };
13084 ( < $( ! $mode:ident )? NS ) => { mods_inner!(> $( $mode )? NoScope ) };
13085 ( < $( ! $mode:ident )? PF ) => { mods_inner!(> $( $mode )? Perfect ) };
13086 ( < $( ! $mode:ident )? RD ) => { mods_inner!(> $( $mode )? Random ) };
13087 ( < $( ! $mode:ident )? RP ) => { mods_inner!(> $( $mode )? Repel ) };
13088 ( < $( ! $mode:ident )? RX ) => { mods_inner!(> $( $mode )? Relax ) };
13089 ( < $( ! $mode:ident )? SD ) => { mods_inner!(> $( $mode )? SuddenDeath ) };
13090 ( < $( ! $mode:ident )? SG ) => { mods_inner!(> $( $mode )? SingleTap ) };
13091 ( < $( ! $mode:ident )? SI ) => { mods_inner!(> $( $mode )? SpinIn ) };
13092 ( < $( ! $mode:ident )? SO ) => { mods_inner!(> $( $mode )? SpunOut ) };
13093 ( < $( ! $mode:ident )? ST ) => { mods_inner!(> $( $mode )? StrictTracking ) };
13094 ( < $( ! $mode:ident )? SV2 ) => { mods_inner!(> $( $mode )? ScoreV2 ) };
13095 ( < $( ! $mode:ident )? SW ) => { mods_inner!(> $( $mode )? Swap ) };
13096 ( < $( ! $mode:ident )? SY ) => { mods_inner!(> $( $mode )? Synesthesia ) };
13097 ( < $( ! $mode:ident )? TC ) => { mods_inner!(> $( $mode )? Traceable ) };
13098 ( < $( ! $mode:ident )? TD ) => { mods_inner!(> $( $mode )? TouchDevice ) };
13099 ( < $( ! $mode:ident )? TP ) => { mods_inner!(> $( $mode )? TargetPractice ) };
13100 ( < $( ! $mode:ident )? TR ) => { mods_inner!(> $( $mode )? Transform ) };
13101 ( < $( ! $mode:ident )? WD ) => { mods_inner!(> $( $mode )? WindDown ) };
13102 ( < $( ! $mode:ident )? WG ) => { mods_inner!(> $( $mode )? Wiggle ) };
13103 ( < $( ! $mode:ident )? WU ) => { mods_inner!(> $( $mode )? WindUp ) };
13104
13105 ( < ! $mode:ident $other:tt $( $rest:tt )* ) => { mods_inner!(<< $other) };
13107 ( < $other:tt $( $rest:tt )* ) => { mods_inner!(<< $other) };
13108 ( << $other:tt ) => {
13109 std::compile_error!(std::concat!("unknown mod acronym `", std::stringify!($other), "`"))
13110 };
13111
13112 ( > $mode:ident $name:ident ) => {
13114 $crate::macros::paste! { $crate::generated_mods::GameMod::[<$name $mode>] }
13115 };
13116 ( > $name:ident ) => {
13117 $crate::generated_mods::GameModIntermode::$name
13118 };
13119}