mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
Move default construction into constructor
This commit is contained in:
parent
0677f746aa
commit
d87203857b
@ -51,7 +51,14 @@ namespace osu.Game.Rulesets
|
|||||||
|
|
||||||
protected Ruleset()
|
protected Ruleset()
|
||||||
{
|
{
|
||||||
RulesetInfo = createRulesetInfo();
|
RulesetInfo = new RulesetInfo
|
||||||
|
{
|
||||||
|
Name = Description,
|
||||||
|
ShortName = ShortName,
|
||||||
|
ID = (this as ILegacyRuleset)?.LegacyID,
|
||||||
|
InstantiationInfo = GetType().AssemblyQualifiedName,
|
||||||
|
Available = true
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -133,17 +140,5 @@ namespace osu.Game.Rulesets
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>An empty frame for the current ruleset, or null if unsupported.</returns>
|
/// <returns>An empty frame for the current ruleset, or null if unsupported.</returns>
|
||||||
public virtual IConvertibleReplayFrame CreateConvertibleReplayFrame() => null;
|
public virtual IConvertibleReplayFrame CreateConvertibleReplayFrame() => null;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Create a ruleset info based on this ruleset.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>A filled <see cref="RulesetInfo"/>.</returns>
|
|
||||||
private RulesetInfo createRulesetInfo() => new RulesetInfo
|
|
||||||
{
|
|
||||||
Name = Description,
|
|
||||||
ShortName = ShortName,
|
|
||||||
InstantiationInfo = GetType().AssemblyQualifiedName,
|
|
||||||
Available = true
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user