mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 07:22:54 +08:00
Fix formatting regressions
This commit is contained in:
parent
0a6dcdd405
commit
4981630131
@ -36,7 +36,6 @@ namespace osu.Game.Database
|
||||
/// </summary>
|
||||
protected virtual void StartupTasks()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -67,7 +67,7 @@ namespace osu.Game.Input
|
||||
public void Update(KeyBinding keyBinding)
|
||||
{
|
||||
var dbKeyBinding = Connection.DatabasedKeyBinding.FirstOrDefault(kb => kb.ToString() == keyBinding.ToString());
|
||||
if (dbKeyBinding!=null)
|
||||
if (dbKeyBinding != null)
|
||||
{
|
||||
dbKeyBinding.KeyCombination = keyBinding.KeyCombination;
|
||||
dbKeyBinding.Action = keyBinding.Action;
|
||||
|
@ -20,7 +20,8 @@ namespace osu.Game.Rulesets
|
||||
|
||||
public IEnumerable<RulesetInfo> AllRulesets => Connection.RulesetInfo.Where(r => r.Available);
|
||||
|
||||
public RulesetStore(OsuDbContext connection) : base(connection)
|
||||
public RulesetStore(OsuDbContext connection)
|
||||
: base(connection)
|
||||
{
|
||||
}
|
||||
|
||||
@ -42,14 +43,14 @@ namespace osu.Game.Rulesets
|
||||
{
|
||||
Connection.Database.ExecuteSqlCommand("DELETE FROM RulesetInfo");
|
||||
}
|
||||
|
||||
|
||||
var instances = loaded_assemblies.Values.Select(r => (Ruleset)Activator.CreateInstance(r, new RulesetInfo()));
|
||||
|
||||
//add all legacy modes in correct order
|
||||
foreach (var r in instances.Where(r => r.LegacyID >= 0).OrderBy(r => r.LegacyID))
|
||||
{
|
||||
var rulesetInfo = createRulesetInfo(r);
|
||||
if (Connection.RulesetInfo.SingleOrDefault(rsi=>rsi.ID==rulesetInfo.ID)==null)
|
||||
if (Connection.RulesetInfo.SingleOrDefault(rsi => rsi.ID == rulesetInfo.ID) == null)
|
||||
{
|
||||
Connection.RulesetInfo.Add(rulesetInfo);
|
||||
}
|
||||
@ -96,7 +97,9 @@ namespace osu.Game.Rulesets
|
||||
var assembly = Assembly.LoadFrom(file);
|
||||
loaded_assemblies[assembly] = assembly.GetTypes().First(t => t.IsSubclassOf(typeof(Ruleset)));
|
||||
}
|
||||
catch (Exception) { }
|
||||
catch (Exception)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
private RulesetInfo createRulesetInfo(Ruleset ruleset) => new RulesetInfo
|
||||
|
Loading…
Reference in New Issue
Block a user