@rian8337/osu-base 4.0.0-beta.91 → 4.0.0-beta.96

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -7294,20 +7294,33 @@ class Beatmap {
7294
7294
  // Convert
7295
7295
  const converted = new BeatmapConverter(this).convert();
7296
7296
  const adjustmentMods = new ModMap();
7297
+ const applicableMods = new ModMap();
7297
7298
  for (const mod of mods.values()) {
7299
+ switch (mode) {
7300
+ case exports.Modes.Droid:
7301
+ if (mod.isApplicableToDroid()) {
7302
+ applicableMods.set(mod);
7303
+ }
7304
+ break;
7305
+ case exports.Modes.Osu:
7306
+ if (mod.isApplicableToOsu()) {
7307
+ applicableMods.set(mod);
7308
+ }
7309
+ break;
7310
+ }
7298
7311
  if (mod.facilitatesAdjustment()) {
7299
7312
  adjustmentMods.set(mod);
7300
7313
  }
7301
7314
  }
7302
7315
  // Apply difficulty mods
7303
- mods.forEach((mod) => {
7316
+ applicableMods.forEach((mod) => {
7304
7317
  if (mod.isApplicableToDifficulty()) {
7305
7318
  mod.applyToDifficulty(mode, converted.difficulty, adjustmentMods);
7306
7319
  }
7307
7320
  });
7308
- mods.forEach((mod) => {
7321
+ applicableMods.forEach((mod) => {
7309
7322
  if (mod.isApplicableToDifficultyWithMods()) {
7310
- mod.applyToDifficultyWithMods(mode, converted.difficulty, mods);
7323
+ mod.applyToDifficultyWithMods(mode, converted.difficulty, applicableMods);
7311
7324
  }
7312
7325
  });
7313
7326
  const processor = new BeatmapProcessor(converted);
@@ -7316,22 +7329,22 @@ class Beatmap {
7316
7329
  converted.hitObjects.objects.forEach((hitObject) => {
7317
7330
  hitObject.applyDefaults(converted.controlPoints, converted.difficulty, mode);
7318
7331
  });
7319
- mods.forEach((mod) => {
7332
+ applicableMods.forEach((mod) => {
7320
7333
  if (mod.isApplicableToHitObject()) {
7321
7334
  for (const hitObject of converted.hitObjects.objects) {
7322
7335
  mod.applyToHitObject(mode, hitObject, adjustmentMods);
7323
7336
  }
7324
7337
  }
7325
7338
  });
7326
- mods.forEach((mod) => {
7339
+ applicableMods.forEach((mod) => {
7327
7340
  if (mod.isApplicableToHitObjectWithMods()) {
7328
7341
  for (const hitObject of converted.hitObjects.objects) {
7329
- mod.applyToHitObjectWithMods(mode, hitObject, mods);
7342
+ mod.applyToHitObjectWithMods(mode, hitObject, applicableMods);
7330
7343
  }
7331
7344
  }
7332
7345
  });
7333
7346
  processor.postProcess();
7334
- mods.forEach((mod) => {
7347
+ applicableMods.forEach((mod) => {
7335
7348
  if (mod.isApplicableToBeatmap()) {
7336
7349
  mod.applyToBeatmap(converted);
7337
7350
  }
@@ -12664,6 +12677,7 @@ exports.ModSetting = ModSetting;
12664
12677
  exports.ModSmallCircle = ModSmallCircle;
12665
12678
  exports.ModSpunOut = ModSpunOut;
12666
12679
  exports.ModSuddenDeath = ModSuddenDeath;
12680
+ exports.ModSynesthesia = ModSynesthesia;
12667
12681
  exports.ModTimeRamp = ModTimeRamp;
12668
12682
  exports.ModTouchDevice = ModTouchDevice;
12669
12683
  exports.ModTraceable = ModTraceable;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rian8337/osu-base",
3
- "version": "4.0.0-beta.91",
3
+ "version": "4.0.0-beta.96",
4
4
  "description": "Base module for all osu! related modules.",
5
5
  "keywords": [
6
6
  "osu",
@@ -35,5 +35,5 @@
35
35
  "publishConfig": {
36
36
  "access": "public"
37
37
  },
38
- "gitHead": "21fc1a8f1ddf89952521bf670a84dcfdd0495ed7"
38
+ "gitHead": "13af8d35ad74141c270c6b985941b5f2a14e248b"
39
39
  }
@@ -5242,6 +5242,21 @@ declare class ModSuddenDeath extends Mod implements IModApplicableToDroid, IModA
5242
5242
  constructor();
5243
5243
  }
5244
5244
 
5245
+ /**
5246
+ * Represents the Synesthesia mod in osu! and osu!droid.
5247
+ */
5248
+ declare class ModSynesthesia extends Mod implements IModApplicableToDroid, IModApplicableToOsu {
5249
+ readonly name = "Synesthesia";
5250
+ readonly acronym = "SY";
5251
+ readonly droidRanked = false;
5252
+ readonly isDroidRelevant = true;
5253
+ readonly droidScoreMultiplier = 0.8;
5254
+ readonly migrationDroidScoreMultiplier = 0.8;
5255
+ readonly osuRanked = false;
5256
+ readonly isOsuRelevant = true;
5257
+ readonly osuScoreMultiplier = 0.8;
5258
+ }
5259
+
5245
5260
  /**
5246
5261
  * Represents a mod that gradually adjusts the track's playback rate over time.
5247
5262
  */
@@ -6515,5 +6530,5 @@ declare abstract class Utils {
6515
6530
  static sleep(duration: number): Promise<void>;
6516
6531
  }
6517
6532
 
6518
- export { Accuracy, Anchor, AnimationLoopType, AnimationStyle, Axes, BankHitSampleInfo, Beatmap, BeatmapBackground, BeatmapColor, BeatmapControlPoints, BeatmapConverter, BeatmapCountdown, BeatmapDecoder, BeatmapDifficulty, BeatmapEditor, BeatmapEncoder, BeatmapEvents, BeatmapGeneral, BeatmapGenre, BeatmapHitObjects, BeatmapLanguage, BeatmapMetadata, BeatmapOverlayPosition, BeatmapProcessor, BeatmapVideo, Bin, BlendingEquation, BlendingParameters, BlendingType, BooleanModSetting, BreakPoint, Brent, Chandrupatla, Circle, CircleSizeCalculator, Command, CommandLoop, CommandTimeline, CommandTimelineGroup, CommandTrigger, ControlPointManager, DecimalModSetting, DifficultyAdjustModSetting, DifficultyControlPoint, DifficultyControlPointManager, DroidAPIRequestBuilder, DroidHitWindow, DroidLegacyModConverter, DroidPlayableBeatmap, Easing, EditorGridSize, EffectControlPoint, EffectControlPointManager, EmptyHitWindow, ErrorFunction, FileHitSampleInfo, GameMode, HitObject, HitObjectGenerationUtils, HitResult, HitSampleInfo, HitSoundType, HitWindow, IntegerModSetting, Interpolation, IterativePoissonBinomial, MapInfo, MathUtils, Mod, ModApproachDifferent, ModAuto, ModAutopilot, ModBlinds, ModCustomSpeed, ModDeflate, ModDifficultyAdjust, ModDoubleTime, ModEasy, ModFlashlight, ModFreezeFrame, ModGrow, ModHalfTime, ModHardRock, ModHidden, ModMagnetised, ModMap, ModMirror, ModMuted, ModNightCore, ModNoFail, ModObjectScaleTween, ModOldNightCore, ModPerfect, ModPrecise, ModRandom, ModRateAdjust, ModRateAdjustHelper, ModReallyEasy, ModRelax, ModReplayV6, ModScoreV2, ModSetting, ModSmallCircle, ModSpunOut, ModSuddenDeath, ModTimeRamp, ModTouchDevice, ModTraceable, ModUtil, ModWindDown, ModWindUp, Modes, NormalDistribution, NullableDecimalModSetting, NullableIntegerModSetting, NumberModSetting, ObjectTypes, OsuAPIRequestBuilder, OsuHitWindow, OsuPlayableBeatmap, PathApproximator, PathType, PlayableBeatmap, Playfield, PoissonBinomial, Polynomial, PreciseDroidHitWindow, Precision, RGBColor, Random, RangeConstrainedModSetting, RankedStatus, SampleBank, SampleBankInfo, SampleControlPoint, SampleControlPointManager, SequenceHitSampleInfo, Slider, SliderHead, SliderNestedHitObject, SliderPath, SliderRepeat, SliderTail, SliderTick, Spinner, Storyboard, StoryboardAnimation, StoryboardCommandType, StoryboardDecoder, StoryboardElement, StoryboardEncoder, StoryboardEventType, StoryboardLayer, StoryboardLayerType, StoryboardParameterCommandType, StoryboardSample, StoryboardSprite, TimedHitSampleInfo, TimingControlPoint, TimingControlPointManager, UnadjustedOsuHitWindow, Utils, Vector2, Vector4, ZeroCrossingBracketing, normalize };
6533
+ export { Accuracy, Anchor, AnimationLoopType, AnimationStyle, Axes, BankHitSampleInfo, Beatmap, BeatmapBackground, BeatmapColor, BeatmapControlPoints, BeatmapConverter, BeatmapCountdown, BeatmapDecoder, BeatmapDifficulty, BeatmapEditor, BeatmapEncoder, BeatmapEvents, BeatmapGeneral, BeatmapGenre, BeatmapHitObjects, BeatmapLanguage, BeatmapMetadata, BeatmapOverlayPosition, BeatmapProcessor, BeatmapVideo, Bin, BlendingEquation, BlendingParameters, BlendingType, BooleanModSetting, BreakPoint, Brent, Chandrupatla, Circle, CircleSizeCalculator, Command, CommandLoop, CommandTimeline, CommandTimelineGroup, CommandTrigger, ControlPointManager, DecimalModSetting, DifficultyAdjustModSetting, DifficultyControlPoint, DifficultyControlPointManager, DroidAPIRequestBuilder, DroidHitWindow, DroidLegacyModConverter, DroidPlayableBeatmap, Easing, EditorGridSize, EffectControlPoint, EffectControlPointManager, EmptyHitWindow, ErrorFunction, FileHitSampleInfo, GameMode, HitObject, HitObjectGenerationUtils, HitResult, HitSampleInfo, HitSoundType, HitWindow, IntegerModSetting, Interpolation, IterativePoissonBinomial, MapInfo, MathUtils, Mod, ModApproachDifferent, ModAuto, ModAutopilot, ModBlinds, ModCustomSpeed, ModDeflate, ModDifficultyAdjust, ModDoubleTime, ModEasy, ModFlashlight, ModFreezeFrame, ModGrow, ModHalfTime, ModHardRock, ModHidden, ModMagnetised, ModMap, ModMirror, ModMuted, ModNightCore, ModNoFail, ModObjectScaleTween, ModOldNightCore, ModPerfect, ModPrecise, ModRandom, ModRateAdjust, ModRateAdjustHelper, ModReallyEasy, ModRelax, ModReplayV6, ModScoreV2, ModSetting, ModSmallCircle, ModSpunOut, ModSuddenDeath, ModSynesthesia, ModTimeRamp, ModTouchDevice, ModTraceable, ModUtil, ModWindDown, ModWindUp, Modes, NormalDistribution, NullableDecimalModSetting, NullableIntegerModSetting, NumberModSetting, ObjectTypes, OsuAPIRequestBuilder, OsuHitWindow, OsuPlayableBeatmap, PathApproximator, PathType, PlayableBeatmap, Playfield, PoissonBinomial, Polynomial, PreciseDroidHitWindow, Precision, RGBColor, Random, RangeConstrainedModSetting, RankedStatus, SampleBank, SampleBankInfo, SampleControlPoint, SampleControlPointManager, SequenceHitSampleInfo, Slider, SliderHead, SliderNestedHitObject, SliderPath, SliderRepeat, SliderTail, SliderTick, Spinner, Storyboard, StoryboardAnimation, StoryboardCommandType, StoryboardDecoder, StoryboardElement, StoryboardEncoder, StoryboardEventType, StoryboardLayer, StoryboardLayerType, StoryboardParameterCommandType, StoryboardSample, StoryboardSprite, TimedHitSampleInfo, TimingControlPoint, TimingControlPointManager, UnadjustedOsuHitWindow, Utils, Vector2, Vector4, ZeroCrossingBracketing, normalize };
6519
6534
  export type { AccuracyInformation, ChandrupatlaOptions, CommandTimelineSelector, DroidAPIEndpoint, IBeatmap, ICommandTimeline, IMigratableDroidMod, IModApplicableToBeatmap, IModApplicableToDifficulty, IModApplicableToDifficultyWithMods, IModApplicableToDroid, IModApplicableToHitObject, IModApplicableToHitObjectWithMods, IModApplicableToOsu, IModApplicableToOsuStable, IModApplicableToTrackRate, IModFacilitatesAdjustment, IModRequiresBeatmapDifficulty, If, ModSettingValueChange, ModSettingValueChangedListener, OmitType, OsuAPIEndpoint, OsuAPIResponse, PlaceableHitObject, RequestResponse, RootBounds, ScoreRank, SerializedMod };