mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 00:40:09 +09:00
Merge branch 'master' into tournament-tools
# Conflicts: # osu.Game/Online/API/Requests/Responses/APIBeatmap.cs # osu.Game/OsuGameBase.cs # osu.Game/Overlays/ChatOverlay.cs # osu.Game/Screens/Menu/MainMenu.cs # osu.Game/Screens/Tournament/Drawings.cs # osu.Game/Screens/Tournament/Teams/DrawingsTeam.cs # osu.Game/osu.Game.csproj # osu.sln
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -24,6 +24,7 @@ using osu.Framework.Input;
|
||||
using osu.Framework.Logging;
|
||||
using osu.Game.Audio;
|
||||
using osu.Game.Database;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Input;
|
||||
using osu.Game.Input.Bindings;
|
||||
using osu.Game.IO;
|
||||
@ -60,10 +61,10 @@ namespace osu.Game
|
||||
|
||||
protected RulesetConfigCache RulesetConfigCache;
|
||||
|
||||
protected MenuCursorContainer MenuCursorContainer;
|
||||
|
||||
protected APIAccess API;
|
||||
|
||||
protected MenuCursorContainer MenuCursorContainer;
|
||||
|
||||
private Container content;
|
||||
|
||||
protected override Container<Drawable> Content => content;
|
||||
@ -110,9 +111,9 @@ namespace osu.Game
|
||||
|
||||
dependencies.Cache(contextFactory = new DatabaseContextFactory(Host.Storage));
|
||||
|
||||
LargeTextureStore = new LargeTextureStore(new TextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures")));
|
||||
LargeTextureStore.AddStore(new TextureLoaderStore(new OnlineStore()));
|
||||
dependencies.Cache(LargeTextureStore);
|
||||
var largeStore = new LargeTextureStore(Host.CreateTextureLoaderStore(new NamespacedResourceStore<byte[]>(Resources, @"Textures")));
|
||||
largeStore.AddStore(Host.CreateTextureLoaderStore(new OnlineStore()));
|
||||
dependencies.Cache(largeStore);
|
||||
|
||||
dependencies.CacheAs(this);
|
||||
dependencies.Cache(LocalConfig);
|
||||
@ -153,9 +154,12 @@ namespace osu.Game
|
||||
dependencies.Cache(API);
|
||||
dependencies.CacheAs<IAPIProvider>(API);
|
||||
|
||||
var defaultBeatmap = new DummyWorkingBeatmap(this);
|
||||
beatmap = new OsuBindableBeatmap(defaultBeatmap, Audio);
|
||||
|
||||
dependencies.Cache(RulesetStore = new RulesetStore(contextFactory));
|
||||
dependencies.Cache(FileStore = new FileStore(contextFactory, Host.Storage));
|
||||
dependencies.Cache(BeatmapManager = new BeatmapManager(Host.Storage, contextFactory, RulesetStore, API, Audio, Host));
|
||||
dependencies.Cache(BeatmapManager = new BeatmapManager(Host.Storage, contextFactory, RulesetStore, API, Audio, Host, defaultBeatmap));
|
||||
dependencies.Cache(ScoreManager = new ScoreManager(RulesetStore, BeatmapManager, Host.Storage, contextFactory, Host));
|
||||
dependencies.Cache(KeyBindingStore = new KeyBindingStore(contextFactory, RulesetStore));
|
||||
dependencies.Cache(SettingsStore = new SettingsStore(contextFactory));
|
||||
@ -166,10 +170,6 @@ namespace osu.Game
|
||||
fileImporters.Add(ScoreManager);
|
||||
fileImporters.Add(SkinManager);
|
||||
|
||||
var defaultBeatmap = new DummyWorkingBeatmap(this);
|
||||
beatmap = new OsuBindableBeatmap(defaultBeatmap, Audio);
|
||||
BeatmapManager.DefaultBeatmap = defaultBeatmap;
|
||||
|
||||
// tracks play so loud our samples can't keep up.
|
||||
// this adds a global reduction of track volume for the time being.
|
||||
Audio.Track.AddAdjustment(AdjustableProperty.Volume, new BindableDouble(0.8));
|
||||
@ -190,7 +190,7 @@ namespace osu.Game
|
||||
Child = content = new OsuTooltipContainer(MenuCursorContainer.Cursor) { RelativeSizeAxes = Axes.Both }
|
||||
};
|
||||
|
||||
base.Content.Add(new DrawSizePreservingFillContainer { Child = MenuCursorContainer });
|
||||
base.Content.Add(new ScalingContainer(ScalingMode.Everything) { Child = MenuCursorContainer });
|
||||
|
||||
KeyBindingStore.Register(globalBinding);
|
||||
dependencies.Cache(globalBinding);
|
||||
@ -250,7 +250,8 @@ namespace osu.Game
|
||||
var extension = Path.GetExtension(paths.First())?.ToLowerInvariant();
|
||||
|
||||
foreach (var importer in fileImporters)
|
||||
if (importer.HandledExtensions.Contains(extension)) importer.Import(paths);
|
||||
if (importer.HandledExtensions.Contains(extension))
|
||||
importer.Import(paths);
|
||||
}
|
||||
|
||||
public string[] HandledExtensions => fileImporters.SelectMany(i => i.HandledExtensions).ToArray();
|
||||
@ -263,7 +264,7 @@ namespace osu.Game
|
||||
RegisterAudioManager(audioManager);
|
||||
}
|
||||
|
||||
private OsuBindableBeatmap(WorkingBeatmap defaultValue)
|
||||
public OsuBindableBeatmap(WorkingBeatmap defaultValue)
|
||||
: base(defaultValue)
|
||||
{
|
||||
}
|
||||
|
Reference in New Issue
Block a user