Skip to content

Commit

Permalink
Merge pull request #1600 from andy840119/update-package-to-the-latest
Browse files Browse the repository at this point in the history
Update package to the latest.
  • Loading branch information
andy840119 authored Sep 20, 2022
2 parents 30202bb + 61b70a8 commit 469ac1f
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ protected override void ParseLine(Beatmap beatmap, Section section, string line)
{
if (section != Section.HitObjects)
{
// should not let base.ParseLine read the line like "Mode: 111"
if (line.StartsWith("Mode", StringComparison.Ordinal))
{
beatmap.BeatmapInfo.Ruleset = new KaraokeRuleset().RulesetInfo;
return;
}

base.ParseLine(beatmap, section, line);
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#nullable disable

using System;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Input.Events;
Expand All @@ -27,7 +28,10 @@ protected EditorScrollContainer()
void assignZoomRange(float _)
{
// we should make sure that will not cause error while assigning the size.
SetupZoom(BindableZoom.Value, BindableZoom.MinValue, BindableZoom.MaxValue);
float initial = Math.Clamp(BindableZoom.Value, BindableZoom.MinValue, BindableZoom.MaxValue);
float minimum = BindableZoom.MinValue;
float maximum = BindableZoom.MaxValue;
SetupZoom(initial, minimum, maximum);
}

BindableZoom.BindValueChanged(e =>
Expand Down
6 changes: 5 additions & 1 deletion osu.Game.Rulesets.Karaoke/KaraokeRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,11 @@ public override IResourceStore<byte[]> CreateResourceStore()

public override string PlayingVerb => "Singing karaoke";

public override ISkin CreateLegacySkinProvider(ISkin skin, IBeatmap beatmap) => new KaraokeLegacySkinTransformer(skin, beatmap);
public override ISkin CreateSkinTransformer(ISkin skin, IBeatmap beatmap)
{
// always return the legacy skin for now until have skin for karaoke.
return new KaraokeLegacySkinTransformer(skin, beatmap);
}

public override IConvertibleReplayFrame CreateConvertibleReplayFrame() => new KaraokeReplayFrame();

Expand Down
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Karaoke/Skinning/KaraokeBeatmapSkin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Linq;
using Newtonsoft.Json;
using osu.Framework.Bindables;
using osu.Framework.IO.Serialization;
using osu.Framework.IO.Stores;
using osu.Framework.Logging;
using osu.Game.IO;
Expand All @@ -33,7 +34,7 @@ public KaraokeBeatmapSkin(SkinInfo skin, IStorageResourceProvider? resources, IR
{
SkinInfo.PerformRead(s =>
{
var globalSetting = CreateJsonSerializerSettings(new KaraokeSkinElementConvertor());
var globalSetting = CreateJsonSerializerSettings(new KaraokeSkinElementConvertor(), new ShaderConvertor(), new Vector2Converter(), new ColourConvertor());

// we may want to move this to some kind of async operation in the future.
foreach (ElementType skinnableTarget in Enum.GetValues(typeof(ElementType)))
Expand Down
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Karaoke/Skinning/KaraokeSkin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
using osu.Framework.Graphics.Textures;
using osu.Framework.IO.Serialization;
using osu.Framework.IO.Stores;
using osu.Framework.Logging;
using osu.Game.Audio;
Expand Down Expand Up @@ -58,7 +59,7 @@ public KaraokeSkin(SkinInfo skin, IStorageResourceProvider? resources, IResource
if (string.IsNullOrEmpty(jsonContent))
return;

var globalSetting = CreateJsonSerializerSettings(new KaraokeSkinElementConvertor());
var globalSetting = CreateJsonSerializerSettings(new KaraokeSkinElementConvertor(), new ShaderConvertor(), new Vector2Converter(), new ColourConvertor());
var deserializedContent = JsonConvert.DeserializeObject<DefaultSkinFormat>(jsonContent, globalSetting);

if (deserializedContent == null)
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
<PackageReference Include="osu.Game.Rulesets.Karaoke.Resources" Version="2022.611.0" />
<PackageReference Include="LanguageDetection.karaoke-dev" Version="1.3.3-alpha" />
<PackageReference Include="LrcParser" Version="2022.529.1" />
<PackageReference Include="Octokit" Version="2.0.1" />
<PackageReference Include="Octokit" Version="3.0.0" />
<PackageReference Include="osu.Framework.KaraokeFont" Version="2022.909.0" />
<PackageReference Include="osu.Framework.Microphone" Version="2022.909.0" />
<PackageReference Include="ppy.LocalisationAnalyser" Version="2022.809.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="ppy.osu.Game" Version="2022.910.0" />
<PackageReference Include="ppy.osu.Game" Version="2022.920.0" />
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
<PackageReference Include="Lucene.Net.Analysis.Kuromoji" Version="4.8.0-beta00016" />
<PackageReference Include="NicoKaraParser" Version="1.1.0" />
Expand Down

0 comments on commit 469ac1f

Please sign in to comment.