mirror of https://github.com/ppy/osu
Address mod incompatibilities
This commit is contained in:
parent
bbb22479a8
commit
8a108b143e
|
@ -1,6 +1,7 @@
|
|||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Game.Rulesets.Mods;
|
||||
using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.Osu.Objects;
|
||||
|
@ -10,6 +11,8 @@ namespace osu.Game.Rulesets.Osu.Mods
|
|||
{
|
||||
public class OsuModBarrelRoll : ModBarrelRoll<OsuHitObject>, IApplicableToDrawableHitObject
|
||||
{
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModBubbles) };
|
||||
|
||||
public void ApplyToDrawableHitObject(DrawableHitObject d)
|
||||
{
|
||||
d.OnUpdate += _ =>
|
||||
|
|
|
@ -86,12 +86,12 @@ private void applyBubbleState(DrawableHitObject drawableObject)
|
|||
{
|
||||
//Needs to be done explicitly to avoid being handled by DrawableHitCircle below
|
||||
case DrawableSliderHead:
|
||||
addBubbleContainer(hitObject.Position);
|
||||
addBubbleContainer(hitObject.Position, drawableOsuObject);
|
||||
break;
|
||||
|
||||
//Stack leniency causes placement issues if this isn't handled as such.
|
||||
case DrawableHitCircle hitCircle:
|
||||
addBubbleContainer(hitCircle.Position);
|
||||
addBubbleContainer(hitCircle.Position, drawableOsuObject);
|
||||
break;
|
||||
|
||||
case DrawableSpinnerTick:
|
||||
|
@ -99,19 +99,24 @@ private void applyBubbleState(DrawableHitObject drawableObject)
|
|||
return;
|
||||
|
||||
default:
|
||||
addBubbleContainer(hitObject.Position);
|
||||
addBubbleContainer(hitObject.Position, drawableOsuObject);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void addBubbleContainer(Vector2 position) => bubbleContainer.Add(new BubbleLifeTimeEntry
|
||||
private void addBubbleContainer(Vector2 position, DrawableHitObject hitObject)
|
||||
{
|
||||
bubbleContainer.Add
|
||||
(
|
||||
new BubbleLifeTimeEntry
|
||||
{
|
||||
LifetimeStart = bubbleContainer.Time.Current,
|
||||
Colour = drawableOsuObject.AccentColour.Value,
|
||||
Colour = hitObject.AccentColour.Value,
|
||||
Position = position,
|
||||
InitialSize = new Vector2(bubbleRadius),
|
||||
MaxSize = maxSize,
|
||||
FadeTime = bubbleFade,
|
||||
IsHit = drawableOsuObject.IsHit
|
||||
IsHit = hitObject.IsHit
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ internal class OsuModMagnetised : Mod, IUpdatableByPlayfield, IApplicableToDrawa
|
|||
public override ModType Type => ModType.Fun;
|
||||
public override LocalisableString Description => "No need to chase the circles – your cursor is a magnet!";
|
||||
public override double ScoreMultiplier => 0.5;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay), typeof(OsuModRelax), typeof(OsuModRepel) };
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay), typeof(OsuModRelax), typeof(OsuModRepel), typeof(OsuModBubbles) };
|
||||
|
||||
[SettingSource("Attraction strength", "How strong the pull is.", 0)]
|
||||
public BindableFloat AttractionStrength { get; } = new BindableFloat(0.5f)
|
||||
|
|
|
@ -26,7 +26,7 @@ internal class OsuModRepel : Mod, IUpdatableByPlayfield, IApplicableToDrawableRu
|
|||
public override ModType Type => ModType.Fun;
|
||||
public override LocalisableString Description => "Hit objects run away!";
|
||||
public override double ScoreMultiplier => 1;
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay), typeof(OsuModMagnetised) };
|
||||
public override Type[] IncompatibleMods => new[] { typeof(OsuModAutopilot), typeof(OsuModWiggle), typeof(OsuModTransform), typeof(ModAutoplay), typeof(OsuModMagnetised), typeof(OsuModBubbles) };
|
||||
|
||||
[SettingSource("Repulsion strength", "How strong the repulsion is.", 0)]
|
||||
public BindableFloat RepulsionStrength { get; } = new BindableFloat(0.5f)
|
||||
|
|
Loading…
Reference in New Issue