Skip to content
This repository has been archived by the owner on Apr 5, 2021. It is now read-only.

Commit

Permalink
Merge pull request #24 from peppy/update-templates
Browse files Browse the repository at this point in the history
Update templates with latest ruleset changes
  • Loading branch information
smoogipoo authored Feb 3, 2020
2 parents dfa2075 + f1452c9 commit 1a4f634
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 144 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
Expand Down
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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@
using osu.Game.Rulesets.Difficulty;
using osu.Game.Rulesets.EmptyFreeform.Beatmaps;
using osu.Game.Rulesets.EmptyFreeform.Mods;
using osu.Game.Rulesets.EmptyFreeform.Scoring;
using osu.Game.Rulesets.EmptyFreeform.UI;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.UI;
using osuTK;
Expand All @@ -29,10 +27,8 @@ public class EmptyFreeformRuleset : Ruleset
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) =>
new DrawableEmptyFreeformRuleset(this, beatmap, mods);

public override ScoreProcessor CreateScoreProcessor(IBeatmap beatmap) => new EmptyFreeformScoreProcessor(beatmap);

public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) =>
new EmptyFreeformBeatmapConverter(beatmap);
new EmptyFreeformBeatmapConverter(beatmap, this);

public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) =>
new EmptyFreeformDifficultyCalculator(this, beatmap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using System.Diagnostics;
using System.Linq;
using osu.Framework.Input.StateChanges;
using osu.Framework.MathUtils;
using osu.Framework.Utils;
using osu.Game.Replays;
using osu.Game.Rulesets.Replays;
using osuTK;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EmbeddedResource Include="Resources\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2019.1219.0" />
<PackageReference Include="ppy.osu.Game" Version="2020.130.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\Samples\Gameplay" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
<StartupObject>osu.Game.Rulesets.Pippidon.Tests.VisualTestRunner</StartupObject>
</PropertyGroup>
<ItemGroup Label="Service">
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}"/>
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<PropertyGroup>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0"/>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0"/>
<PackageReference Include="NUnit" Version="3.12.0"/>
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1"/>
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4"/>
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\osu.Game.Rulesets.Pippidon\osu.Game.Rulesets.Pippidon.csproj"/>
<ProjectReference Include="..\osu.Game.Rulesets.Pippidon\osu.Game.Rulesets.Pippidon.csproj" />
</ItemGroup>
<PropertyGroup Label="Project">
<OutputType>WinExe</OutputType>
Expand Down
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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Pippidon.Beatmaps;
using osu.Game.Rulesets.Pippidon.Mods;
using osu.Game.Rulesets.Pippidon.Scoring;
using osu.Game.Rulesets.Pippidon.UI;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;

namespace osu.Game.Rulesets.Pippidon
Expand All @@ -25,10 +23,8 @@ public class PippidonRuleset : Ruleset
public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) =>
new DrawablePippidonRuleset(this, beatmap, mods);

public override ScoreProcessor CreateScoreProcessor(IBeatmap beatmap) => new PippidonScoreProcessor(beatmap);

public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) =>
new PippidonBeatmapConverter(beatmap);
new PippidonBeatmapConverter(beatmap, this);

public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) =>
new PippidonDifficultyCalculator(this, beatmap);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
using System.Collections.Generic;
using System.Diagnostics;
using osu.Framework.Input.StateChanges;
using osu.Framework.MathUtils;
using osu.Framework.Utils;
using osu.Game.Replays;
using osu.Game.Rulesets.Replays;
using osuTK;
Expand Down
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)
{
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<EmbeddedResource Include="Resources\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2019.1219.0" />
<PackageReference Include="ppy.osu.Game" Version="2020.130.0" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
Expand Down
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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.EmptyScrolling.Beatmaps;
using osu.Game.Rulesets.EmptyScrolling.Mods;
using osu.Game.Rulesets.EmptyScrolling.Scoring;
using osu.Game.Rulesets.EmptyScrolling.UI;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;

namespace osu.Game.Rulesets.EmptyScrolling
Expand All @@ -24,9 +22,7 @@ public class EmptyScrollingRuleset : Ruleset

public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawableEmptyScrollingRuleset(this, beatmap, mods);

public override ScoreProcessor CreateScoreProcessor(IBeatmap beatmap) => new EmptyScrollingScoreProcessor(beatmap);

public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new EmptyScrollingBeatmapConverter(beatmap);
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new EmptyScrollingBeatmapConverter(beatmap, this);

public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => new EmptyScrollingDifficultyCalculator(this, beatmap);

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<EmbeddedResource Include="Resources\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2019.1219.0" />
<PackageReference Include="ppy.osu.Game" Version="2020.130.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\Samples\Gameplay" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
Expand Down
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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Pippidon.Beatmaps;
using osu.Game.Rulesets.Pippidon.Mods;
using osu.Game.Rulesets.Pippidon.Scoring;
using osu.Game.Rulesets.Pippidon.UI;
using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;

namespace osu.Game.Rulesets.Pippidon
Expand All @@ -24,9 +22,7 @@ public class PippidonRuleset : Ruleset

public override DrawableRuleset CreateDrawableRulesetWith(IBeatmap beatmap, IReadOnlyList<Mod> mods = null) => new DrawablePippidonRuleset(this, beatmap, mods);

public override ScoreProcessor CreateScoreProcessor(IBeatmap beatmap) => new PippidonScoreProcessor(beatmap);

public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new PippidonBeatmapConverter(beatmap);
public override IBeatmapConverter CreateBeatmapConverter(IBeatmap beatmap) => new PippidonBeatmapConverter(beatmap, this);

public override DifficultyCalculator CreateDifficultyCalculator(WorkingBeatmap beatmap) => new PippidonDifficultyCalculator(this, beatmap);

Expand Down

This file was deleted.

Loading

0 comments on commit 1a4f634

Please sign in to comment.