Skip to content

Commit

Permalink
Merge pull request #955 from andy840119/update-package
Browse files Browse the repository at this point in the history
Update package to latest.
  • Loading branch information
andy840119 authored Dec 7, 2021
2 parents d1d27b6 + f894cfa commit 5722de3
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Database;
using osu.Game.Overlays;
using osu.Game.Rulesets.Karaoke.Screens.Skin;
using osu.Game.Rulesets.Karaoke.Skinning;
Expand All @@ -23,10 +24,7 @@ public abstract class KaraokeSkinEditorScreenTestScene<T> : EditorClockTestScene
[BackgroundDependencyLoader]
private void load(SkinManager skinManager)
{
// because skin is compared by id, so should change id to let skin manager info knows that skin has been changed.
var defaultSkin = DefaultKaraokeSkin.Default;
defaultSkin.ID = 100;
skinManager.CurrentSkinInfo.Value = defaultSkin;
skinManager.CurrentSkinInfo.Value = DefaultKaraokeSkin.Default.ToLive();

karaokeSkin = skinManager.CurrentSkin.Value as KaraokeSkin;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Allocation;
using osu.Game.Database;
using osu.Game.Rulesets.Karaoke.Beatmaps;
using osu.Game.Rulesets.Karaoke.Screens.Skin;
using osu.Game.Rulesets.Karaoke.Skinning;
Expand All @@ -24,10 +25,7 @@ private void load(SkinManager skinManager)
// todo: karaoke skin editor might not need editor click eventually?
Dependencies.Cache(new EditorClock());

// because skin is compared by id, so should change id to let skin manager info knows that skin has been changed.
var defaultSkin = DefaultKaraokeSkin.Default;
defaultSkin.ID = 100;
skinManager.CurrentSkinInfo.Value = defaultSkin;
skinManager.CurrentSkinInfo.Value = DefaultKaraokeSkin.Default.ToLive();

karaokeSkin = skinManager.CurrentSkin.Value as KaraokeSkin;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class KaraokeLyricEditorSkin : KaraokeSkin
public const int MIN_FONT_SIZE = 10;
public const int MAX_FONT_SIZE = 45;

internal const int DEFAULT_SKIN = 0;
internal static readonly Guid DEFAULT_SKIN = new("FEC5A290-5709-11EC-9F10-0800200C9A66");

public static SkinInfo Default { get; } = new()
{
Expand Down
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Karaoke/Skinning/DefaultKaraokeSkin.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) andy840119 <[email protected]>. Licensed under the GPL Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Linq;
using System.Reflection;
using JetBrains.Annotations;
Expand All @@ -15,7 +16,7 @@ namespace osu.Game.Rulesets.Karaoke.Skinning
{
public class DefaultKaraokeSkin : KaraokeSkin
{
internal const int DEFAULT_SKIN = 0;
internal static readonly Guid DEFAULT_SKIN = new("FEC5A291-5709-11EC-9F10-0800200C9A66");

public static SkinInfo Default { get; } = new()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ SkinnableTargetComponentsContainer getTargetComponentsContainerFromOtherPlace()
switch (Skin)
{
case LegacySkin legacySkin:
return new TempLegacySkin(legacySkin.SkinInfo).GetDrawableComponent(component) as SkinnableTargetComponentsContainer;
return new TempLegacySkin(legacySkin.SkinInfo.Value).GetDrawableComponent(component) as SkinnableTargetComponentsContainer;

default:
throw new InvalidCastException();
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Karaoke/osu.Game.Rulesets.Karaoke.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<PackageReference Include="Octokit" Version="0.50.0" />
<PackageReference Include="osu.Framework.KaraokeFont" Version="2021.1204.0" />
<PackageReference Include="osu.Framework.Microphone" Version="2021.1204.0" />
<PackageReference Include="ppy.osu.Game" Version="2021.1204.0" />
<PackageReference Include="ppy.osu.Game" Version="2021.1206.0" />
<PackageReference Include="LyricMaker" Version="1.1.1" />
<PackageReference Include="NicoKaraParser" Version="1.1.0" />
<PackageReference Include="SixLabors.Fonts" Version="1.0.0-beta15" />
Expand Down

0 comments on commit 5722de3

Please sign in to comment.