mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Merge branch 'master' into score-multiplier-edits
This commit is contained in:
@ -19,7 +19,7 @@ namespace osu.Game.Beatmaps
|
||||
/// <summary>
|
||||
/// Converts a Beatmap using this Beatmap Converter.
|
||||
/// </summary>
|
||||
/// <param name="original">The un-converted Beatmap.</param>
|
||||
/// <param name="beatmap">The un-converted Beatmap.</param>
|
||||
void Convert(Beatmap beatmap);
|
||||
}
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Ionic.Zip;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Framework.Platform;
|
||||
@ -13,6 +12,7 @@ using osu.Game.IO;
|
||||
using osu.Game.IO.Archives;
|
||||
using osu.Game.IPC;
|
||||
using osu.Game.Overlays.Notifications;
|
||||
using osu.Game.Utils;
|
||||
using SharpCompress.Common;
|
||||
using FileInfo = osu.Game.IO.FileInfo;
|
||||
|
||||
@ -336,7 +336,7 @@ namespace osu.Game.Database
|
||||
/// <returns>A reader giving access to the archive's content.</returns>
|
||||
private ArchiveReader getReaderFrom(string path)
|
||||
{
|
||||
if (ZipFile.IsZipFile(path))
|
||||
if (ZipUtils.IsZipArchive(path))
|
||||
return new ZipArchiveReader(Files.Storage.GetStream(path), Path.GetFileName(path));
|
||||
if (Directory.Exists(path))
|
||||
return new LegacyFilesystemReader(path);
|
||||
|
@ -11,9 +11,6 @@ namespace osu.Game.Database
|
||||
{
|
||||
protected readonly Storage Storage;
|
||||
|
||||
/// <summary>
|
||||
/// Create a new <see cref="OsuDbContext"/> instance (separate from the shared context via <see cref="GetContext"/> for performing isolated operations.
|
||||
/// </summary>
|
||||
protected readonly IDatabaseContextFactory ContextFactory;
|
||||
|
||||
/// <summary>
|
||||
|
@ -17,7 +17,7 @@ namespace osu.Game.Database
|
||||
private readonly object writeLock = new object();
|
||||
|
||||
private bool currentWriteDidWrite;
|
||||
private volatile int currentWriteUsages;
|
||||
private int currentWriteUsages;
|
||||
|
||||
public DatabaseContextFactory(GameHost host)
|
||||
{
|
||||
|
@ -33,6 +33,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
|
||||
// don't start rotating until we're moved a minimum distance away from the mouse down location,
|
||||
// else it can have an annoying effect.
|
||||
// ReSharper disable once PossibleInvalidOperationException
|
||||
startRotation |= Vector2Extensions.Distance(state.Mouse.Position, state.Mouse.PositionMouseDown.Value) > 30;
|
||||
|
||||
if (startRotation)
|
||||
|
@ -6,7 +6,6 @@ using Humanizer;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Cursor;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
|
||||
namespace osu.Game.Graphics
|
||||
@ -14,7 +13,6 @@ namespace osu.Game.Graphics
|
||||
public class DrawableDate : OsuSpriteText, IHasTooltip
|
||||
{
|
||||
private readonly DateTimeOffset date;
|
||||
private ScheduledDelegate updateTask;
|
||||
|
||||
public DrawableDate(DateTimeOffset date)
|
||||
{
|
||||
@ -61,6 +59,7 @@ namespace osu.Game.Graphics
|
||||
public override bool HandleMouseInput => true;
|
||||
|
||||
private void updateTime() => Text = date.Humanize();
|
||||
|
||||
public string TooltipText => date.ToString();
|
||||
}
|
||||
}
|
||||
|
@ -4,32 +4,32 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Ionic.Zip;
|
||||
using SharpCompress.Archives.Zip;
|
||||
|
||||
namespace osu.Game.IO.Archives
|
||||
{
|
||||
public sealed class ZipArchiveReader : ArchiveReader
|
||||
{
|
||||
private readonly Stream archiveStream;
|
||||
private readonly ZipFile archive;
|
||||
private readonly ZipArchive archive;
|
||||
|
||||
public ZipArchiveReader(Stream archiveStream, string name = null)
|
||||
: base(name)
|
||||
{
|
||||
this.archiveStream = archiveStream;
|
||||
archive = ZipFile.Read(archiveStream);
|
||||
archive = ZipArchive.Open(archiveStream);
|
||||
}
|
||||
|
||||
public override Stream GetStream(string name)
|
||||
{
|
||||
ZipEntry entry = archive.Entries.SingleOrDefault(e => e.FileName == name);
|
||||
ZipArchiveEntry entry = archive.Entries.SingleOrDefault(e => e.Key == name);
|
||||
if (entry == null)
|
||||
throw new FileNotFoundException();
|
||||
|
||||
// allow seeking
|
||||
MemoryStream copy = new MemoryStream();
|
||||
|
||||
using (Stream s = entry.OpenReader())
|
||||
using (Stream s = entry.OpenEntryStream())
|
||||
s.CopyTo(copy);
|
||||
|
||||
copy.Position = 0;
|
||||
@ -43,7 +43,7 @@ namespace osu.Game.IO.Archives
|
||||
archiveStream.Dispose();
|
||||
}
|
||||
|
||||
public override IEnumerable<string> Filenames => archive.Entries.Select(e => e.FileName).ToArray();
|
||||
public override IEnumerable<string> Filenames => archive.Entries.Select(e => e.Key).ToArray();
|
||||
|
||||
public override Stream GetUnderlyingStream() => archiveStream;
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Runtime.Serialization.Formatters;
|
||||
using System.Runtime.Serialization.Formatters.Binary;
|
||||
using System.Text;
|
||||
|
||||
@ -175,7 +174,7 @@ namespace osu.Game.IO.Legacy
|
||||
versionBinder = new VersionConfigToNamespaceAssemblyObjectBinder();
|
||||
formatter = new BinaryFormatter
|
||||
{
|
||||
AssemblyFormat = FormatterAssemblyStyle.Simple,
|
||||
// AssemblyFormat = FormatterAssemblyStyle.Simple,
|
||||
Binder = versionBinder
|
||||
};
|
||||
}
|
||||
@ -187,6 +186,7 @@ namespace osu.Game.IO.Legacy
|
||||
|
||||
Debug.Assert(formatter != null, "formatter != null");
|
||||
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
return formatter.Deserialize(stream);
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ namespace osu.Game.IO.Legacy
|
||||
Write((byte)ObjType.otherType);
|
||||
BinaryFormatter b = new BinaryFormatter
|
||||
{
|
||||
AssemblyFormat = FormatterAssemblyStyle.Simple,
|
||||
// AssemblyFormat = FormatterAssemblyStyle.Simple,
|
||||
TypeFormat = FormatterTypeStyle.TypesWhenNeeded
|
||||
};
|
||||
b.Serialize(BaseStream, obj);
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Migrations
|
||||
{
|
||||
|
@ -1,6 +1,4 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace osu.Game.Migrations
|
||||
{
|
||||
|
@ -1,11 +1,7 @@
|
||||
// <auto-generated />
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage;
|
||||
using osu.Game.Database;
|
||||
using System;
|
||||
|
||||
namespace osu.Game.Migrations
|
||||
{
|
||||
|
@ -64,7 +64,7 @@ namespace osu.Game.Online.API
|
||||
|
||||
private readonly List<IOnlineComponent> components = new List<IOnlineComponent>();
|
||||
|
||||
internal void Schedule(Action action) => base.Schedule(action);
|
||||
internal new void Schedule(Action action) => base.Schedule(action);
|
||||
|
||||
public void Register(IOnlineComponent component)
|
||||
{
|
||||
|
@ -96,6 +96,7 @@ namespace osu.Game.Online.API
|
||||
|
||||
// if not, let's try using our refresh token to request a new access token.
|
||||
if (!string.IsNullOrEmpty(Token?.RefreshToken))
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
AuthenticateWithRefresh(Token.RefreshToken);
|
||||
|
||||
return accessTokenValid;
|
||||
|
@ -19,6 +19,7 @@ namespace osu.Game.Online.API.Requests
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
protected override string Target => $@"users/{userId}/beatmapsets/{type.ToString().Underscore()}?offset={offset}";
|
||||
}
|
||||
|
||||
|
@ -18,6 +18,7 @@ namespace osu.Game.Online.API.Requests
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
protected override string Target => $@"users/{userId}/scores/{type.ToString().ToLower()}?offset={offset}";
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@ namespace osu.Game.Online.API.Requests
|
||||
this.direction = direction;
|
||||
}
|
||||
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
protected override string Target => $@"beatmapsets/search?q={query}&m={ruleset.ID ?? 0}&s={(int)rankStatus}&sort={sortCriteria.ToString().ToLower()}_{directionString}";
|
||||
}
|
||||
}
|
||||
|
@ -69,6 +69,7 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
public virtual bool Equals(Message other) => Id == other?.Id;
|
||||
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
public override int GetHashCode() => Id.GetHashCode();
|
||||
}
|
||||
|
||||
|
@ -1,25 +0,0 @@
|
||||
<configuration>
|
||||
<dllmap os="linux" dll="opengl32.dll" target="libGL.so.1"/>
|
||||
<dllmap os="linux" dll="glu32.dll" target="libGLU.so.1"/>
|
||||
<dllmap os="linux" dll="openal32.dll" target="libopenal.so.1"/>
|
||||
<dllmap os="linux" dll="alut.dll" target="libalut.so.0"/>
|
||||
<dllmap os="linux" dll="opencl.dll" target="libOpenCL.so"/>
|
||||
<dllmap os="linux" dll="libX11" target="libX11.so.6"/>
|
||||
<dllmap os="linux" dll="libXi" target="libXi.so.6"/>
|
||||
<dllmap os="linux" dll="SDL2.dll" target="libSDL2-2.0.so.0"/>
|
||||
<dllmap os="osx" dll="opengl32.dll" target="/System/Library/Frameworks/OpenGL.framework/OpenGL"/>
|
||||
<dllmap os="osx" dll="openal32.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
|
||||
<dllmap os="osx" dll="alut.dll" target="/System/Library/Frameworks/OpenAL.framework/OpenAL" />
|
||||
<dllmap os="osx" dll="libGLES.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||
<dllmap os="osx" dll="libGLESv1_CM.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||
<dllmap os="osx" dll="libGLESv2.dll" target="/System/Library/Frameworks/OpenGLES.framework/OpenGLES" />
|
||||
<dllmap os="osx" dll="opencl.dll" target="/System/Library/Frameworks/OpenCL.framework/OpenCL"/>
|
||||
<dllmap os="osx" dll="SDL2.dll" target="libSDL2.dylib"/>
|
||||
<!-- XQuartz compatibility (X11 on Mac) -->
|
||||
<dllmap os="osx" dll="libGL.so.1" target="/usr/X11/lib/libGL.dylib"/>
|
||||
<dllmap os="osx" dll="libX11" target="/usr/X11/lib/libX11.dylib"/>
|
||||
<dllmap os="osx" dll="libXcursor.so.1" target="/usr/X11/lib/libXcursor.dylib"/>
|
||||
<dllmap os="osx" dll="libXi" target="/usr/X11/lib/libXi.dylib"/>
|
||||
<dllmap os="osx" dll="libXinerama" target="/usr/X11/lib/libXinerama.dylib"/>
|
||||
<dllmap os="osx" dll="libXrandr.so.2" target="/usr/X11/lib/libXrandr.dylib"/>
|
||||
</configuration>
|
@ -210,6 +210,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
Trace.Assert(state.Mouse.PositionMouseDown != null);
|
||||
|
||||
// ReSharper disable once PossibleInvalidOperationException
|
||||
double targetChatHeight = startDragChatHeight - (state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y;
|
||||
|
||||
// If the channel selection screen is shown, mind its minimum height
|
||||
@ -383,6 +384,7 @@ namespace osu.Game.Overlays
|
||||
{
|
||||
if (channel == null) return;
|
||||
|
||||
// ReSharper disable once AccessToModifiedClosure
|
||||
var existing = careChannels.Find(c => c.Id == channel.Id);
|
||||
|
||||
if (existing != null)
|
||||
|
@ -76,7 +76,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
|
||||
{
|
||||
private readonly OsuSpriteText valueText;
|
||||
|
||||
public int Count
|
||||
public new int Count
|
||||
{
|
||||
set { valueText.Text = value.ToString(); }
|
||||
}
|
||||
|
@ -5,7 +5,6 @@ using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.Sprites;
|
||||
@ -18,7 +17,7 @@ using System.ComponentModel;
|
||||
using osu.Game.Graphics;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
|
||||
using RectangleF = osu.Framework.Graphics.Primitives.RectangleF;
|
||||
using Container = osu.Framework.Graphics.Containers.Container;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.General
|
||||
|
@ -22,7 +22,7 @@ namespace osu.Game.Overlays.Settings
|
||||
private readonly SpriteText headerText;
|
||||
private readonly Box selectionIndicator;
|
||||
private readonly Container text;
|
||||
public Action<SettingsSection> Action;
|
||||
public new Action<SettingsSection> Action;
|
||||
|
||||
private SettingsSection section;
|
||||
public SettingsSection Section
|
||||
|
@ -4,8 +4,8 @@
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Primitives;
|
||||
using OpenTK;
|
||||
using RectangleF = osu.Framework.Graphics.Primitives.RectangleF;
|
||||
|
||||
namespace osu.Game.Overlays.Toolbar
|
||||
{
|
||||
|
@ -1,28 +0,0 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.Reflection;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("osu.Game")]
|
||||
[assembly: AssemblyDescription("click the circles. to the beat.")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("ppy Pty Ltd")]
|
||||
[assembly: AssemblyProduct("osu.Game")]
|
||||
[assembly: AssemblyCopyright("ppy Pty Ltd 2007-2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("55e28cb2-7b6c-4595-8dcc-9871d8aad7e9")]
|
||||
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
@ -33,6 +33,7 @@ namespace osu.Game.Rulesets.Judgements
|
||||
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
|
||||
/// </summary>
|
||||
/// <param name="judgement">The judgement to visualise.</param>
|
||||
/// <param name="judgedObject">The object which was judged.</param>
|
||||
public DrawableJudgement(Judgement judgement, DrawableHitObject judgedObject)
|
||||
{
|
||||
Judgement = judgement;
|
||||
|
@ -15,7 +15,6 @@ namespace osu.Game.Rulesets.Replays.Types
|
||||
/// Populates this <see cref="ReplayFrame"/> using values from a <see cref="LegacyReplayFrame"/>.
|
||||
/// </summary>
|
||||
/// <param name="legacyFrame">The <see cref="LegacyReplayFrame"/> to extract values from.</param>
|
||||
/// <param name="score">The score.</param>
|
||||
/// <param name="beatmap">The beatmap.</param>
|
||||
void ConvertFrom(LegacyReplayFrame legacyFrame, Beatmap beatmap);
|
||||
}
|
||||
|
@ -60,6 +60,7 @@ namespace osu.Game.Rulesets.Timing
|
||||
DifficultyPoint = other.DifficultyPoint;
|
||||
}
|
||||
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
public int CompareTo(MultiplierControlPoint other) => StartTime.CompareTo(other?.StartTime);
|
||||
}
|
||||
}
|
||||
|
@ -214,6 +214,7 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
WorkingBeatmap = workingBeatmap;
|
||||
IsForCurrentRuleset = isForCurrentRuleset;
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
Mods = workingBeatmap.Mods.Value;
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
@ -24,7 +24,6 @@ namespace osu.Game.Screens.Edit.Screens.Compose
|
||||
public class BeatDivisorControl : CompositeDrawable
|
||||
{
|
||||
private readonly BindableBeatDivisor beatDivisor = new BindableBeatDivisor();
|
||||
private int currentDivisorIndex;
|
||||
|
||||
public BeatDivisorControl(BindableBeatDivisor beatDivisor)
|
||||
{
|
||||
|
@ -14,6 +14,7 @@ using osu.Game.Rulesets.Objects.Drawables;
|
||||
using osu.Game.Rulesets.UI;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using RectangleF = osu.Framework.Graphics.Primitives.RectangleF;
|
||||
|
||||
namespace osu.Game.Screens.Edit.Screens.Compose.Layers
|
||||
{
|
||||
|
@ -547,6 +547,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
float? setY = null;
|
||||
if (!d.IsLoaded || beatmap.Alpha == 0) // can't use IsPresent due to DrawableCarouselItem override.
|
||||
// ReSharper disable once PossibleNullReferenceException (resharper broken?)
|
||||
setY = lastSet.Y + lastSet.DrawHeight + 5;
|
||||
|
||||
if (d.IsLoaded)
|
||||
|
@ -268,6 +268,7 @@ namespace osu.Game.Screens.Select
|
||||
new OsuSpriteText
|
||||
{
|
||||
Font = @"Exo2.0-Bold",
|
||||
// ReSharper disable once PossibleNullReferenceException (resharper broken?)
|
||||
Text = metadata.Author.Username,
|
||||
TextSize = 15,
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ namespace osu.Game.Screens.Select.Leaderboards
|
||||
Origin = Anchor.CentreLeft,
|
||||
Font = @"Exo2.0-MediumItalic",
|
||||
TextSize = 22,
|
||||
// ReSharper disable once ImpureMethodCallOnReadonlyValueField
|
||||
Text = RankPosition.ToString(),
|
||||
},
|
||||
},
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using OpenTK.Input;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Audio;
|
||||
@ -75,7 +76,8 @@ namespace osu.Game.Screens.Select
|
||||
{
|
||||
// if we have no beatmaps but osu-stable is found, let's prompt the user to import.
|
||||
if (!beatmaps.GetAllUsableBeatmapSets().Any() && beatmaps.StableInstallationAvailable)
|
||||
dialogOverlay.Push(new ImportFromStablePopup(() => beatmaps.ImportFromStable()));
|
||||
dialogOverlay.Push(new ImportFromStablePopup(() =>
|
||||
Task.Factory.StartNew(beatmaps.ImportFromStable, TaskCreationOptions.LongRunning)));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -326,6 +326,7 @@ namespace osu.Game.Screens.Tournament
|
||||
if (line.ToUpper().StartsWith("GROUP"))
|
||||
continue;
|
||||
|
||||
// ReSharper disable once AccessToModifiedClosure
|
||||
DrawingsTeam teamToAdd = allTeams.FirstOrDefault(t => t.FullName == line);
|
||||
|
||||
if (teamToAdd == null)
|
||||
|
@ -13,9 +13,9 @@ using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Screens.Tournament.Teams;
|
||||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using osu.Game.Screens.Tournament.Teams;
|
||||
|
||||
namespace osu.Game.Screens.Tournament
|
||||
{
|
||||
@ -118,16 +118,18 @@ namespace osu.Game.Screens.Tournament
|
||||
if (!Children.Any())
|
||||
break;
|
||||
|
||||
Drawable closest = null;
|
||||
ScrollingTeam closest = null;
|
||||
|
||||
foreach (var c in Children)
|
||||
{
|
||||
if (!(c is ScrollingTeam))
|
||||
var stc = c as ScrollingTeam;
|
||||
|
||||
if (stc == null)
|
||||
continue;
|
||||
|
||||
if (closest == null)
|
||||
{
|
||||
closest = c;
|
||||
closest = stc;
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -135,14 +137,15 @@ namespace osu.Game.Screens.Tournament
|
||||
float lastOffset = Math.Abs(closest.Position.X + closest.DrawWidth / 2f - DrawWidth / 2f);
|
||||
|
||||
if (o < lastOffset)
|
||||
closest = c;
|
||||
closest = stc;
|
||||
}
|
||||
|
||||
Trace.Assert(closest != null, "closest != null");
|
||||
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
offset += DrawWidth / 2f - (closest.Position.X + closest.DrawWidth / 2f);
|
||||
|
||||
ScrollingTeam st = closest as ScrollingTeam;
|
||||
ScrollingTeam st = closest;
|
||||
|
||||
availableTeams.RemoveAll(at => at == st.Team);
|
||||
|
||||
|
@ -38,6 +38,7 @@ namespace osu.Game.Screens.Tournament.Teams
|
||||
if (string.IsNullOrEmpty(line))
|
||||
continue;
|
||||
|
||||
// ReSharper disable once PossibleNullReferenceException
|
||||
string[] split = line.Split(':');
|
||||
|
||||
if (split.Length < 2)
|
||||
|
@ -80,8 +80,6 @@ namespace osu.Game.Skinning
|
||||
return new LegacySkin(skinInfo, Files.Store, audio);
|
||||
}
|
||||
|
||||
private SkinStore store;
|
||||
|
||||
public SkinManager(Storage storage, DatabaseContextFactory contextFactory, IIpcHost importHost, AudioManager audio)
|
||||
: base(storage, contextFactory, new SkinStore(contextFactory, storage), importHost)
|
||||
{
|
||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Skinning
|
||||
/// <summary>
|
||||
/// Create a new <see cref="SkinReloadableDrawable"/>
|
||||
/// </summary>
|
||||
/// <param name="fallback">Whether fallback to default skin should be allowed if the custom skin is missing this resource.</param>
|
||||
/// <param name="allowFallback">A conditional to decide whether to allow fallback to the default implementation if a skinned element is not present.</param>
|
||||
protected SkinReloadableDrawable(Func<ISkinSource, bool> allowFallback = null)
|
||||
{
|
||||
this.allowFallback = allowFallback;
|
||||
|
@ -29,7 +29,7 @@ namespace osu.Game.Skinning
|
||||
/// </summary>
|
||||
/// <param name="name">The namespace-complete resource name for this skinnable element.</param>
|
||||
/// <param name="defaultImplementation">A function to create the default skin implementation of this element.</param>
|
||||
/// <param name="fallback">Whther to fallback to the default implementation when a custom skin is specified but not implementation is present.</param>
|
||||
/// <param name="allowFallback">A conditional to decide whether to allow fallback to the default implementation if a skinned element is not present.</param>
|
||||
/// <param name="restrictSize">Whether a user-skin drawable should be limited to the size of our parent.</param>
|
||||
public SkinnableDrawable(string name, Func<string, T> defaultImplementation, Func<ISkinSource, bool> allowFallback = null, bool restrictSize = true) : base(allowFallback)
|
||||
{
|
||||
|
33
osu.Game/Utils/ZipUtils.cs
Normal file
33
osu.Game/Utils/ZipUtils.cs
Normal file
@ -0,0 +1,33 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System;
|
||||
using SharpCompress.Archives.Zip;
|
||||
|
||||
namespace osu.Game.Utils
|
||||
{
|
||||
public static class ZipUtils
|
||||
{
|
||||
public static bool IsZipArchive(string path)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (var arc = ZipArchive.Open(path))
|
||||
{
|
||||
foreach (var entry in arc.Entries)
|
||||
{
|
||||
using (entry.OpenEntryStream())
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="SharpCompress" publicKeyToken="afb0a02973931d96" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-0.18.1.0" newVersion="0.18.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral"/>
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.2.0" newVersion="4.0.2.0"/>
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
File diff suppressed because it is too large
Load Diff
@ -1,96 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
-->
|
||||
<packages>
|
||||
<package id="DotNetZip" version="1.10.1" targetFramework="net461" />
|
||||
<package id="Humanizer" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.af" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.ar" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.bg" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.bn-BD" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.cs" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.da" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.de" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.el" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.es" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.fa" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.fi-FI" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.fr" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.fr-BE" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.he" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.hr" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.hu" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.id" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.it" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.ja" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.lv" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.nb" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.nb-NO" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.nl" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.pl" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.pt" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.ro" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.ru" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.sk" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.sl" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.sr" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.sr-Latn" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.sv" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.tr" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.uk" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.uz-Cyrl-UZ" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.uz-Latn-UZ" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.vi" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.zh-CN" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.zh-Hans" version="2.2.0" targetFramework="net461" />
|
||||
<package id="Humanizer.Core.zh-Hant" version="2.2.0" targetFramework="net461" />
|
||||
<package id="JetBrains.Annotations" version="11.1.0" targetFramework="net461" />
|
||||
<package id="Microsoft.CSharp" version="4.4.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Data.Sqlite.Core" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.EntityFrameworkCore" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.EntityFrameworkCore.Design" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.EntityFrameworkCore.Relational" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.EntityFrameworkCore.Sqlite" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.EntityFrameworkCore.Sqlite.Core" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.EntityFrameworkCore.Tools" version="2.0.0" targetFramework="net461" developmentDependency="true" />
|
||||
<package id="Microsoft.Extensions.Caching.Abstractions" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.Caching.Memory" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.Logging" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.Options" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="2.0.0" targetFramework="net461" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net461" />
|
||||
<package id="NUnit" version="3.8.1" targetFramework="net461" />
|
||||
<package id="ppy.OpenTK" version="3.0.13" targetFramework="net461" />
|
||||
<package id="Remotion.Linq" version="2.1.2" targetFramework="net461" />
|
||||
<package id="SharpCompress" version="0.18.1" targetFramework="net461" />
|
||||
<package id="SQLitePCLRaw.bundle_green" version="1.1.8" targetFramework="net461" />
|
||||
<package id="SQLitePCLRaw.core" version="1.1.8" targetFramework="net461" />
|
||||
<package id="SQLitePCLRaw.lib.e_sqlite3.linux" version="1.1.8" targetFramework="net461" />
|
||||
<package id="SQLitePCLRaw.lib.e_sqlite3.osx" version="1.1.8" targetFramework="net461" />
|
||||
<package id="SQLitePCLRaw.lib.e_sqlite3.v110_xp" version="1.1.8" targetFramework="net461" />
|
||||
<package id="SQLitePCLRaw.provider.e_sqlite3.net45" version="1.1.8" targetFramework="net461" />
|
||||
<package id="System.Collections" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Collections.Immutable" version="1.4.0" targetFramework="net461" />
|
||||
<package id="System.ComponentModel.Annotations" version="4.4.0" targetFramework="net461" />
|
||||
<package id="System.Diagnostics.Debug" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Diagnostics.DiagnosticSource" version="4.4.1" targetFramework="net461" />
|
||||
<package id="System.Interactive.Async" version="3.1.1" targetFramework="net461" />
|
||||
<package id="System.Linq" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Linq.Expressions" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Linq.Queryable" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.ObjectModel" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Reflection" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Reflection.Extensions" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Runtime" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.4.0" targetFramework="net461" />
|
||||
<package id="System.Runtime.Extensions" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.Threading" version="4.3.0" targetFramework="net461" />
|
||||
<package id="System.ValueTuple" version="4.4.0" targetFramework="net461" />
|
||||
</packages>
|
Reference in New Issue
Block a user