mirror of
https://github.com/ppy/osu.git
synced 2025-01-19 13:02:54 +08:00
Add ruleset config to HitObjectComposer
This commit is contained in:
parent
6437fdd9db
commit
9b7d01397b
@ -11,6 +11,7 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Timing;
|
using osu.Framework.Timing;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
|
using osu.Game.Rulesets.Configuration;
|
||||||
using osu.Game.Rulesets.Edit.Tools;
|
using osu.Game.Rulesets.Edit.Tools;
|
||||||
using osu.Game.Rulesets.Objects.Drawables;
|
using osu.Game.Rulesets.Objects.Drawables;
|
||||||
using osu.Game.Rulesets.UI;
|
using osu.Game.Rulesets.UI;
|
||||||
@ -25,6 +26,8 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
|
|
||||||
protected ICompositionTool CurrentTool { get; private set; }
|
protected ICompositionTool CurrentTool { get; private set; }
|
||||||
|
|
||||||
|
protected IRulesetConfigManager Config { get; private set; }
|
||||||
|
|
||||||
protected RulesetContainer RulesetContainer;
|
protected RulesetContainer RulesetContainer;
|
||||||
private readonly List<Container> layerContainers = new List<Container>();
|
private readonly List<Container> layerContainers = new List<Container>();
|
||||||
|
|
||||||
@ -115,7 +118,10 @@ namespace osu.Game.Rulesets.Edit
|
|||||||
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
protected override IReadOnlyDependencyContainer CreateChildDependencies(IReadOnlyDependencyContainer parent)
|
||||||
{
|
{
|
||||||
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
var dependencies = new DependencyContainer(base.CreateChildDependencies(parent));
|
||||||
|
|
||||||
dependencies.CacheAs(this);
|
dependencies.CacheAs(this);
|
||||||
|
Config = dependencies.Get<RulesetConfigCache>().GetConfigFor(ruleset);
|
||||||
|
|
||||||
return dependencies;
|
return dependencies;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user