mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 19:22:54 +08:00
Cache available rulesets as they are pretty static for now
This commit is contained in:
parent
2d0f4d3859
commit
90af472717
@ -41,7 +41,7 @@ namespace osu.Game.Rulesets
|
||||
/// <summary>
|
||||
/// All available rulesets.
|
||||
/// </summary>
|
||||
public IEnumerable<RulesetInfo> AvailableRulesets => GetContext().RulesetInfo.Where(r => r.Available);
|
||||
public IEnumerable<RulesetInfo> AvailableRulesets;
|
||||
|
||||
private static Assembly currentDomain_AssemblyResolve(object sender, ResolveEventArgs args) => loaded_assemblies.Keys.FirstOrDefault(a => a.FullName == args.Name);
|
||||
|
||||
@ -93,6 +93,8 @@ namespace osu.Game.Rulesets
|
||||
}
|
||||
|
||||
context.SaveChanges();
|
||||
|
||||
AvailableRulesets = context.RulesetInfo.Where(r => r.Available).ToList();
|
||||
}
|
||||
|
||||
private static void loadRulesetFromFile(string file)
|
||||
|
Loading…
Reference in New Issue
Block a user