This repository has been archived by the owner on Apr 5, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #24 from peppy/update-templates
Update templates with latest ruleset changes
- Loading branch information
Showing
23 changed files
with
45 additions
and
144 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using osu.Game.Beatmaps; | ||
using osu.Game.Rulesets.EmptyFreeform.Objects; | ||
|
@@ -13,18 +12,15 @@ namespace osu.Game.Rulesets.EmptyFreeform.Beatmaps | |
{ | ||
public class EmptyFreeformBeatmapConverter : BeatmapConverter<EmptyFreeformHitObject> | ||
{ | ||
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] | ||
{ | ||
// todo: Populate with conversion types that should be supported other than position (ie. typeof(IHasCurve)) | ||
// https://github.com/ppy/osu/tree/master/osu.Game/Rulesets/Objects/Types | ||
typeof(IHasPosition) | ||
}; | ||
|
||
public EmptyFreeformBeatmapConverter(IBeatmap beatmap) | ||
: base(beatmap) | ||
public EmptyFreeformBeatmapConverter(IBeatmap beatmap, Ruleset ruleset) | ||
: base(beatmap, ruleset) | ||
{ | ||
} | ||
|
||
// todo: Check for conversion types that should be supported (ie. Beatmap.HitObjects.Any(h => h is IHasXPosition)) | ||
// https://github.com/ppy/osu/tree/master/osu.Game/Rulesets/Objects/Types | ||
public override bool CanConvert() => true; | ||
|
||
protected override IEnumerable<EmptyFreeformHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap) | ||
{ | ||
yield return new EmptyFreeformHitObject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
...ates/ruleset-empty/osu.Game.Rulesets.EmptyFreeform/Scoring/EmptyFreeformScoreProcessor.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using osu.Game.Beatmaps; | ||
using osu.Game.Rulesets.Objects; | ||
using osu.Game.Rulesets.Objects.Types; | ||
|
@@ -13,13 +13,13 @@ namespace osu.Game.Rulesets.Pippidon.Beatmaps | |
{ | ||
public class PippidonBeatmapConverter : BeatmapConverter<PippidonHitObject> | ||
{ | ||
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasPosition) }; | ||
|
||
public PippidonBeatmapConverter(IBeatmap beatmap) | ||
: base(beatmap) | ||
public PippidonBeatmapConverter(IBeatmap beatmap, Ruleset ruleset) | ||
: base(beatmap, ruleset) | ||
{ | ||
} | ||
|
||
public override bool CanConvert() => Beatmap.HitObjects.All(h => h is IHasPosition); | ||
|
||
protected override IEnumerable<PippidonHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap) | ||
{ | ||
yield return new PippidonHitObject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
templates/ruleset-example/osu.Game.Rulesets.Pippidon/Scoring/PippidonScoreProcessor.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,11 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using osu.Game.Beatmaps; | ||
using osu.Game.Rulesets.Scoring; | ||
|
||
namespace osu.Game.Rulesets.Pippidon.Scoring | ||
{ | ||
public class PippidonScoreProcessor : ScoreProcessor | ||
{ | ||
public PippidonScoreProcessor(IBeatmap beatmap) | ||
: base(beatmap) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using osu.Game.Beatmaps; | ||
using osu.Game.Rulesets.Objects; | ||
|
@@ -11,17 +10,15 @@ namespace osu.Game.Rulesets.EmptyScrolling.Beatmaps | |
{ | ||
public class EmptyScrollingBeatmapConverter : BeatmapConverter<EmptyScrollingHitObject> | ||
{ | ||
protected override IEnumerable<Type> ValidConversionTypes { get; } = new Type[] | ||
{ | ||
// todo: Populate with conversion types that should be supported (ie. typeof(IHasXPosition)) | ||
// https://github.com/ppy/osu/tree/master/osu.Game/Rulesets/Objects/Types | ||
}; | ||
|
||
public EmptyScrollingBeatmapConverter(IBeatmap beatmap) | ||
: base(beatmap) | ||
public EmptyScrollingBeatmapConverter(IBeatmap beatmap, Ruleset ruleset) | ||
: base(beatmap, ruleset) | ||
{ | ||
} | ||
|
||
// todo: Check for conversion types that should be supported (ie. Beatmap.HitObjects.Any(h => h is IHasXPosition)) | ||
// https://github.com/ppy/osu/tree/master/osu.Game/Rulesets/Objects/Types | ||
public override bool CanConvert() => true; | ||
|
||
protected override IEnumerable<EmptyScrollingHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap) | ||
{ | ||
yield return new EmptyScrollingHitObject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
...-scrolling-empty/osu.Game.Rulesets.EmptyScrolling/Scoring/EmptyScrollingScoreProcessor.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,6 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using osu.Game.Beatmaps; | ||
|
@@ -18,15 +17,15 @@ public class PippidonBeatmapConverter : BeatmapConverter<PippidonHitObject> | |
private readonly float minPosition; | ||
private readonly float maxPosition; | ||
|
||
protected override IEnumerable<Type> ValidConversionTypes { get; } = new[] { typeof(IHasXPosition), typeof(IHasYPosition) }; | ||
|
||
public PippidonBeatmapConverter(IBeatmap beatmap) | ||
: base(beatmap) | ||
public PippidonBeatmapConverter(IBeatmap beatmap, Ruleset ruleset) | ||
: base(beatmap, ruleset) | ||
{ | ||
minPosition = beatmap.HitObjects.Min(getUsablePosition); | ||
maxPosition = beatmap.HitObjects.Max(getUsablePosition); | ||
} | ||
|
||
public override bool CanConvert() => Beatmap.HitObjects.All(h => h is IHasXPosition && h is IHasYPosition); | ||
|
||
protected override IEnumerable<PippidonHitObject> ConvertHitObject(HitObject original, IBeatmap beatmap) | ||
{ | ||
yield return new PippidonHitObject | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 0 additions & 24 deletions
24
...es/ruleset-scrolling-example/osu.Game.Rulesets.Pippidon/Scoring/PippidonScoreProcessor.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.