Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
Also set it as netstandard project, and remove redundant dependencies.
  • Loading branch information
LumpBloom7 committed Jun 2, 2020
1 parent 28ac290 commit 921b5a1
Show file tree
Hide file tree
Showing 10 changed files with 23 additions and 26 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./osu.Game.Rulesets.Sentakki/bin/Release/netcoreapp3.1/osu.Game.Rulesets.Sentakki.dll
asset_path: ./osu.Game.Rulesets.Sentakki/bin/Release/netstandard2.1/osu.Game.Rulesets.Sentakki.dll
asset_name: osu.Game.Rulesets.Sentakki.dll
asset_content_type: application/vnd.microsoft.portable-executable
- name: Generate changelog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1"/>
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" />
</ItemGroup>
<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ protected override IEnumerable<SentakkiHitObject> ConvertHitObject(HitObject ori

switch (original)
{
case IHasCurve _:
case IHasPathWithRepeats _:
objects.AddRange(Conversions.CreateHoldNote(original, path, beatmap, random, Experimental));
break;

case IHasEndTime _:
case IHasDuration _:
objects.Add(Conversions.CreateTouchHold(original));
break;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
using osu.Game.Audio;
using osu.Game.Beatmaps.ControlPoints;
using System.Diagnostics;
using System.Threading;

namespace osu.Game.Rulesets.Sentakki.Beatmaps
{
Expand Down Expand Up @@ -82,13 +83,13 @@ public static SentakkiHitObject CreateTouchHold(HitObject original)
{
Position = Vector2.Zero,
StartTime = original.StartTime,
EndTime = (original as IHasEndTime).EndTime,
EndTime = (original as IHasDuration).EndTime,
Samples = original.Samples,
};

public static List<SentakkiHitObject> CreateHoldNote(HitObject original, int path, IBeatmap beatmap, Random rng, bool experimental)
{
var curveData = original as IHasCurve;
var curveData = original as IHasPathWithRepeats;

List<SentakkiHitObject> notes = new List<SentakkiHitObject>();
bool twin = curveData.NodeSamples.Any(s => s.Any(s => s.Name == HitSampleInfo.HIT_CLAP));
Expand Down Expand Up @@ -134,7 +135,7 @@ public static List<SentakkiHitObject> CreateHoldNote(HitObject original, int pat

public static List<SentakkiHitObject> CreateTapFromTicks(HitObject original, int path, IBeatmap beatmap, Random rng)
{
var curve = original as IHasCurve;
var curve = original as IHasPathWithRepeats;
double spanDuration = curve.Duration / (curve.RepeatCount + 1);
bool isRepeatSpam = spanDuration < 75 && curve.RepeatCount > 0;

Expand All @@ -155,7 +156,7 @@ public static List<SentakkiHitObject> CreateTapFromTicks(HitObject original, int

double legacyLastTickOffset = (original as IHasLegacyLastTickOffset)?.LegacyLastTickOffset ?? 0;

foreach (var e in SliderEventGenerator.Generate(original.StartTime, spanDuration, velocity, tickDistance, curve.Path.Distance, curve.RepeatCount + 1, legacyLastTickOffset))
foreach (var e in SliderEventGenerator.Generate(original.StartTime, spanDuration, velocity, tickDistance, curve.Path.Distance, curve.RepeatCount + 1, legacyLastTickOffset, CancellationToken.None))
{
int newPath = path;
while (newPath == path) newPath = rng.Next(0, 8);
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Sentakki/Mods/SentakkiModRelax.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void Update(Playfield playfield)
break;

// already hit or beyond the hittable end time.
if (h.IsHit || (h.HitObject is IHasEndTime hasEnd && time > hasEnd.EndTime))
if (h.IsHit || (h.HitObject is IHasDuration hasEnd && time > hasEnd.EndTime))
continue;

switch (h)
Expand Down
8 changes: 4 additions & 4 deletions osu.Game.Rulesets.Sentakki/Objects/Drawables/DrawableHold.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ protected override void Update()
note.Scale = new Vector2((float)(1 * fadeAmount));

// Calculate total length of hold note
double length = Convert.ToSingle((SentakkiPlayfield.INTERSECTDISTANCE - 66) / moveTo * ((HitObject as IHasEndTime).Duration));
double length = Convert.ToSingle((SentakkiPlayfield.INTERSECTDISTANCE - 66) / moveTo * ((HitObject as IHasDuration).Duration));
if (length > SentakkiPlayfield.INTERSECTDISTANCE - 66) // Clip max length
length = SentakkiPlayfield.INTERSECTDISTANCE - 66;

Expand All @@ -170,7 +170,7 @@ protected override void Update()
note.Height = (float)(80 + (length * extendAmount));

// Calculate duration where no movement is happening (when notes are very long)
float idleTime = (float)((HitObject as IHasEndTime).Duration - extendTime);
float idleTime = (float)((HitObject as IHasDuration).Duration - extendTime);

// Move the note once idle time is over
float moveAmount = (float)((currentProg - fadeIn - extendTime - idleTime) / moveTo);
Expand Down Expand Up @@ -235,15 +235,15 @@ protected override void UpdateStateTransforms(ArmedState state)
switch (state)
{
case ArmedState.Hit:
using (BeginDelayedSequence((HitObject as IHasEndTime).Duration, true))
using (BeginDelayedSequence((HitObject as IHasDuration).Duration, true))
{
this.ScaleTo(1f, time_fade_hit);
}
break;

case ArmedState.Miss:
double longestSurvivalTime = Tail.HitObject.HitWindows.WindowFor(HitResult.Miss);
using (BeginDelayedSequence((HitObject as IHasEndTime).Duration + longestSurvivalTime, true))
using (BeginDelayedSequence((HitObject as IHasDuration).Duration + longestSurvivalTime, true))
{
note.ScaleTo(0.5f, time_fade_miss, Easing.InCubic)
.FadeColour(Color4.Red, time_fade_miss, Easing.OutQuint)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
{
if (Time.Current < HitObject.StartTime) return;

if (userTriggered || Time.Current < (HitObject as IHasEndTime)?.EndTime)
if (userTriggered || Time.Current < (HitObject as IHasDuration)?.EndTime)
return;

double result = held / potential;
Expand All @@ -59,7 +59,7 @@ protected override void CheckForResult(bool userTriggered, double timeOffset)
r.Type = HitResult.Good;
else if (result >= .2)
r.Type = HitResult.Ok;
else if (Time.Current >= (HitObject as IHasEndTime)?.EndTime)
else if (Time.Current >= (HitObject as IHasDuration)?.EndTime)
r.Type = HitResult.Miss;
});
}
Expand Down Expand Up @@ -97,7 +97,7 @@ protected override void Update()

// Input and feedback
buttonHeld = SentakkiActionInputManager?.PressedActions.Any(x => x == SentakkiAction.Button1 || x == SentakkiAction.Button2) ?? false;
if (Time.Current >= HitObject.StartTime && Time.Current <= (HitObject as IHasEndTime)?.EndTime)
if (Time.Current >= HitObject.StartTime && Time.Current <= (HitObject as IHasDuration)?.EndTime)
{
potential++;
if ((buttonHeld && IsHovered) || Auto)
Expand Down Expand Up @@ -125,11 +125,11 @@ protected override void UpdateStateTransforms(ArmedState state)
switch (state)
{
case ArmedState.Hit:
this.Delay((HitObject as IHasEndTime).Duration).ScaleTo(1f, time_fade_hit).Expire();
this.Delay((HitObject as IHasDuration).Duration).ScaleTo(1f, time_fade_hit).Expire();
break;

case ArmedState.Miss:
this.Delay((HitObject as IHasEndTime).Duration).ScaleTo(.0f, time_fade_miss).FadeOut(time_fade_miss);
this.Delay((HitObject as IHasDuration).Duration).ScaleTo(.0f, time_fade_miss).FadeOut(time_fade_miss);
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Sentakki/Objects/Hold.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using osuTK;
namespace osu.Game.Rulesets.Sentakki.Objects
{
public class Hold : SentakkiHitObject, IHasEndTime
public class Hold : SentakkiHitObject, IHasDuration
{
private List<IList<HitSampleInfo>> nodeSamples = new List<IList<HitSampleInfo>>();

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Sentakki/Objects/TouchHold.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

namespace osu.Game.Rulesets.Sentakki.Objects
{
public class TouchHold : SentakkiHitObject, IHasEndTime
public class TouchHold : SentakkiHitObject, IHasDuration
{
public double EndTime
{
Expand Down
5 changes: 2 additions & 3 deletions osu.Game.Rulesets.Sentakki/osu.Game.Rulesets.Sentakki.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>netstandard2.1</TargetFramework>
<AssemblyTitle>osu.Game.Rulesets.Sentakki</AssemblyTitle>
<OutputType>Library</OutputType>
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -10,7 +10,6 @@
<AssemblyName>osu.Game.Rulesets.Sentakki</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Framework" Version="2020.519.0"/>
<PackageReference Include="ppy.osu.Game" Version="2020.523.0"/>
<PackageReference Include="ppy.osu.Game" Version="2020.602.0"/>
</ItemGroup>
</Project>

0 comments on commit 921b5a1

Please sign in to comment.