mirror of https://github.com/ppy/osu
Add icon for random mod
This commit is contained in:
parent
ae3e118584
commit
a42fb4af2a
|
@ -90,12 +90,14 @@ public class ManiaModRandom : Mod, IApplicableMod<ManiaHitObject>
|
||||||
{
|
{
|
||||||
public override string Name => "Random";
|
public override string Name => "Random";
|
||||||
public override string ShortenedName => "RD";
|
public override string ShortenedName => "RD";
|
||||||
|
public override FontAwesome Icon => FontAwesome.fa_osu_dice;
|
||||||
public override string Description => @"Shuffle around the notes!";
|
public override string Description => @"Shuffle around the notes!";
|
||||||
public override double ScoreMultiplier => 1;
|
public override double ScoreMultiplier => 1;
|
||||||
|
|
||||||
public void ApplyToRulesetContainer(RulesetContainer<ManiaHitObject> rulesetContainer)
|
public void ApplyToRulesetContainer(RulesetContainer<ManiaHitObject> rulesetContainer)
|
||||||
{
|
{
|
||||||
int availableColumns = ((ManiaRulesetContainer)rulesetContainer).AvailableColumns;
|
int availableColumns = ((ManiaRulesetContainer)rulesetContainer).AvailableColumns;
|
||||||
|
|
||||||
var shuffledColumns = Enumerable.Range(0, availableColumns).OrderBy(item => RNG.Next()).ToList();
|
var shuffledColumns = Enumerable.Range(0, availableColumns).OrderBy(item => RNG.Next()).ToList();
|
||||||
|
|
||||||
rulesetContainer.Objects.OfType<ManiaHitObject>().ForEach(h => h.Column = shuffledColumns[h.Column]);
|
rulesetContainer.Objects.OfType<ManiaHitObject>().ForEach(h => h.Column = shuffledColumns[h.Column]);
|
||||||
|
|
Loading…
Reference in New Issue