mirror of
https://github.com/osukey/osukey.git
synced 2025-08-06 16:13:57 +09:00
Merge pull request #22141 from frenzibyte/fix-game-load-order
Fix game-level components not finishing load before game content
This commit is contained in:
@ -933,9 +933,9 @@ namespace osu.Game
|
|||||||
loadComponentSingleFile(dashboard = new DashboardOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(dashboard = new DashboardOverlay(), overlayContent.Add, true);
|
||||||
loadComponentSingleFile(news = new NewsOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(news = new NewsOverlay(), overlayContent.Add, true);
|
||||||
var rankingsOverlay = loadComponentSingleFile(new RankingsOverlay(), overlayContent.Add, true);
|
var rankingsOverlay = loadComponentSingleFile(new RankingsOverlay(), overlayContent.Add, true);
|
||||||
loadComponentSingleFile(channelManager = new ChannelManager(API), AddInternal, true);
|
loadComponentSingleFile(channelManager = new ChannelManager(API), Add, true);
|
||||||
loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(chatOverlay = new ChatOverlay(), overlayContent.Add, true);
|
||||||
loadComponentSingleFile(new MessageNotifier(), AddInternal, true);
|
loadComponentSingleFile(new MessageNotifier(), Add, true);
|
||||||
loadComponentSingleFile(Settings = new SettingsOverlay(), leftFloatingOverlayContent.Add, true);
|
loadComponentSingleFile(Settings = new SettingsOverlay(), leftFloatingOverlayContent.Add, true);
|
||||||
loadComponentSingleFile(changelogOverlay = new ChangelogOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(changelogOverlay = new ChangelogOverlay(), overlayContent.Add, true);
|
||||||
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add, true);
|
loadComponentSingleFile(userProfile = new UserProfileOverlay(), overlayContent.Add, true);
|
||||||
|
@ -296,7 +296,7 @@ namespace osu.Game
|
|||||||
dependencies.Cache(ScoreDownloader = new ScoreModelDownloader(ScoreManager, API));
|
dependencies.Cache(ScoreDownloader = new ScoreModelDownloader(ScoreManager, API));
|
||||||
|
|
||||||
// Add after all the above cache operations as it depends on them.
|
// Add after all the above cache operations as it depends on them.
|
||||||
AddInternal(difficultyCache);
|
base.Content.Add(difficultyCache);
|
||||||
|
|
||||||
// TODO: OsuGame or OsuGameBase?
|
// TODO: OsuGame or OsuGameBase?
|
||||||
dependencies.CacheAs(beatmapUpdater = new BeatmapUpdater(BeatmapManager, difficultyCache, API, Storage));
|
dependencies.CacheAs(beatmapUpdater = new BeatmapUpdater(BeatmapManager, difficultyCache, API, Storage));
|
||||||
@ -305,19 +305,19 @@ namespace osu.Game
|
|||||||
dependencies.CacheAs(metadataClient = new OnlineMetadataClient(endpoints));
|
dependencies.CacheAs(metadataClient = new OnlineMetadataClient(endpoints));
|
||||||
dependencies.CacheAs(soloStatisticsWatcher = new SoloStatisticsWatcher());
|
dependencies.CacheAs(soloStatisticsWatcher = new SoloStatisticsWatcher());
|
||||||
|
|
||||||
AddInternal(new BeatmapOnlineChangeIngest(beatmapUpdater, realm, metadataClient));
|
base.Content.Add(new BeatmapOnlineChangeIngest(beatmapUpdater, realm, metadataClient));
|
||||||
|
|
||||||
BeatmapManager.ProcessBeatmap = args => beatmapUpdater.Process(args.beatmapSet, !args.isBatch);
|
BeatmapManager.ProcessBeatmap = args => beatmapUpdater.Process(args.beatmapSet, !args.isBatch);
|
||||||
|
|
||||||
dependencies.Cache(userCache = new UserLookupCache());
|
dependencies.Cache(userCache = new UserLookupCache());
|
||||||
AddInternal(userCache);
|
base.Content.Add(userCache);
|
||||||
|
|
||||||
dependencies.Cache(beatmapCache = new BeatmapLookupCache());
|
dependencies.Cache(beatmapCache = new BeatmapLookupCache());
|
||||||
AddInternal(beatmapCache);
|
base.Content.Add(beatmapCache);
|
||||||
|
|
||||||
var scorePerformanceManager = new ScorePerformanceCache();
|
var scorePerformanceManager = new ScorePerformanceCache();
|
||||||
dependencies.Cache(scorePerformanceManager);
|
dependencies.Cache(scorePerformanceManager);
|
||||||
AddInternal(scorePerformanceManager);
|
base.Content.Add(scorePerformanceManager);
|
||||||
|
|
||||||
dependencies.CacheAs<IRulesetConfigCache>(rulesetConfigCache = new RulesetConfigCache(realm, RulesetStore));
|
dependencies.CacheAs<IRulesetConfigCache>(rulesetConfigCache = new RulesetConfigCache(realm, RulesetStore));
|
||||||
|
|
||||||
@ -344,14 +344,24 @@ namespace osu.Game
|
|||||||
|
|
||||||
// add api components to hierarchy.
|
// add api components to hierarchy.
|
||||||
if (API is APIAccess apiAccess)
|
if (API is APIAccess apiAccess)
|
||||||
AddInternal(apiAccess);
|
base.Content.Add(apiAccess);
|
||||||
|
|
||||||
AddInternal(spectatorClient);
|
base.Content.Add(spectatorClient);
|
||||||
AddInternal(MultiplayerClient);
|
base.Content.Add(MultiplayerClient);
|
||||||
AddInternal(metadataClient);
|
base.Content.Add(metadataClient);
|
||||||
AddInternal(soloStatisticsWatcher);
|
base.Content.Add(soloStatisticsWatcher);
|
||||||
|
|
||||||
AddInternal(rulesetConfigCache);
|
base.Content.Add(rulesetConfigCache);
|
||||||
|
|
||||||
|
PreviewTrackManager previewTrackManager;
|
||||||
|
dependencies.Cache(previewTrackManager = new PreviewTrackManager(BeatmapManager.BeatmapTrackStore));
|
||||||
|
base.Content.Add(previewTrackManager);
|
||||||
|
|
||||||
|
base.Content.Add(MusicController = new MusicController());
|
||||||
|
dependencies.CacheAs(MusicController);
|
||||||
|
|
||||||
|
MusicController.TrackChanged += onTrackChanged;
|
||||||
|
base.Content.Add(beatmapClock);
|
||||||
|
|
||||||
GlobalActionContainer globalBindings;
|
GlobalActionContainer globalBindings;
|
||||||
|
|
||||||
@ -378,16 +388,6 @@ namespace osu.Game
|
|||||||
|
|
||||||
dependencies.Cache(globalBindings);
|
dependencies.Cache(globalBindings);
|
||||||
|
|
||||||
PreviewTrackManager previewTrackManager;
|
|
||||||
dependencies.Cache(previewTrackManager = new PreviewTrackManager(BeatmapManager.BeatmapTrackStore));
|
|
||||||
Add(previewTrackManager);
|
|
||||||
|
|
||||||
AddInternal(MusicController = new MusicController());
|
|
||||||
dependencies.CacheAs(MusicController);
|
|
||||||
|
|
||||||
MusicController.TrackChanged += onTrackChanged;
|
|
||||||
AddInternal(beatmapClock);
|
|
||||||
|
|
||||||
Ruleset.BindValueChanged(onRulesetChanged);
|
Ruleset.BindValueChanged(onRulesetChanged);
|
||||||
Beatmap.BindValueChanged(onBeatmapChanged);
|
Beatmap.BindValueChanged(onBeatmapChanged);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user