Skip to content

Commit

Permalink
Misc: Rename Omod to NM (NoMod)
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotrekol committed Jul 30, 2021
1 parent 4841b03 commit 515e072
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion App/Presenters/Controls/UserTopGeneratorPresenter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ private void ViewOnStart(object sender, EventArgs eventArgs)
foreach (var splitModCombination in splitModCombinations)
{
var splitMods = Regex.Split(splitModCombination, @"([A-Za-z]{2})").Where(s => !string.IsNullOrEmpty(s)).ToList();
Mods mods = Mods.Omod;
Mods mods = Mods.Nm;
foreach (var mod in splitMods)
{
if (Enum.TryParse(mod, true, out Mods parsedMod))
Expand Down
2 changes: 1 addition & 1 deletion CollectionManagerDll/DataTypes/Beatmap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public string MapSetLink
public PlayModeStars ModPpStars = new PlayModeStars();
public double StarsNomod => Stars(PlayMode);

public double Stars(PlayMode playMode, Mods mods = Mods.Omod)
public double Stars(PlayMode playMode, Mods mods = Mods.Nm)
{
mods = mods & Mods.MapChanging;
if (ModPpStars.ContainsKey(_playMode) && ModPpStars[_playMode].ContainsKey((int)mods))
Expand Down
2 changes: 1 addition & 1 deletion CollectionManagerDll/DataTypes/Mods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace CollectionManager.DataTypes
[Flags]
public enum Mods
{
Omod = 0,
Nm = 0,
Nf = 1 << 0,
Ez = 1 << 1,
Td = 1 << 2, //Touch device
Expand Down
12 changes: 6 additions & 6 deletions CollectionManagerDll/Modules/ModParser/ModParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,21 +23,21 @@ public OsuMod(Mods value, string shortMod, string longMod)

public string ShortNoModText
{
get { return _mods.Find(f => f.Value == Mods.Omod).ShortMod; }
set { _mods.Find(f => f.Value == Mods.Omod).ShortMod = value; }
get { return _mods.Find(f => f.Value == Mods.Nm).ShortMod; }
set { _mods.Find(f => f.Value == Mods.Nm).ShortMod = value; }
}
public string LongNoModText
{
get { return _mods.Find(f => f.Value == Mods.Omod).LongMod; }
set { _mods.Find(f => f.Value == Mods.Omod).LongMod = value; }
get { return _mods.Find(f => f.Value == Mods.Nm).LongMod; }
set { _mods.Find(f => f.Value == Mods.Nm).LongMod = value; }
}
public ReadOnlyCollection<OsuMod> AllMods => _mods.AsReadOnly();
public List<OsuMod> HiddenMods { get; } = new List<OsuMod>
{
};
private readonly List<OsuMod> _mods = new List<OsuMod>()
{
new OsuMod(Mods.Omod, "None", "None"),
new OsuMod(Mods.Nm, "None", "None"),
new OsuMod(Mods.Nf, "NF", "No Fail"),
new OsuMod(Mods.Ez, "EZ", "Easy"),
new OsuMod(Mods.Td, "TD","Touch Device"),
Expand Down Expand Up @@ -76,7 +76,7 @@ public string LongNoModText

public Mods GetModsFromInt(int mods)
{
Mods eMods = Mods.Omod;
Mods eMods = Mods.Nm;
foreach (var mod in _mods)
{
if (!IsModHidden(mod) && (mods & (int)mod.Value) > 0)
Expand Down
8 changes: 4 additions & 4 deletions CollectionManagerDllTests/Modules/ModParser/ModParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ public void ModsHiding1()
public void NoModText1()
{
_modParser = new ModParser();
var mods = Mods.Omod;
var mods = Mods.Nm;
var result = _modParser.GetModsFromEnum((int)mods);

Assert.IsTrue(result.Count(s => s == ',') == 0);
Expand All @@ -114,7 +114,7 @@ public void NoModText1()
public void NoModText2()
{
_modParser = new ModParser();
var mods = Mods.Omod;
var mods = Mods.Nm;
var result = _modParser.GetModsFromEnum((int)mods, true);

Assert.IsTrue(result.Count(s => s == ',') == 0);
Expand All @@ -124,7 +124,7 @@ public void NoModText2()
public void NoModText3()
{
_modParser = new ModParser();
var mods = Mods.Omod;
var mods = Mods.Nm;
_modParser.LongNoModText = "No mods enabled";
Assert.IsTrue(_modParser.LongNoModText == "No mods enabled");
_modParser.ShortNoModText = "N/A";
Expand All @@ -139,7 +139,7 @@ public void NoModText3()
public void NoModText4()
{
_modParser = new ModParser();
var mods = Mods.Omod;
var mods = Mods.Nm;
_modParser.LongNoModText = "No mods enabled";
Assert.IsTrue(_modParser.LongNoModText == "No mods enabled");
_modParser.ShortNoModText = "N/A";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ public void UpdateSearch(string searchString)

if (!words.Any(s => s.Contains("mods")))
{
CurrentMods = Mods.Omod;
CurrentMods = Mods.Nm;
}

foreach (string w in words)
Expand All @@ -98,7 +98,7 @@ public void UpdateSearch(string searchString)
}
}

public Mods CurrentMods { get; private set; } = Mods.Omod;
public Mods CurrentMods { get; private set; } = Mods.Nm;
public PlayMode CurrentPlayMode { get; private set; } = PlayMode.Osu;
private double GetStars(Beatmap b) => b.Stars(CurrentPlayMode, CurrentMods);

Expand Down Expand Up @@ -203,7 +203,7 @@ private searchFilter GetSearchFilter(string searchWord)
{
case "mods":
var splitMods = Regex.Split(val, @"([A-Za-z]{2})").Where(s => !string.IsNullOrEmpty(s)).ToList();
Mods mods = Mods.Omod;
Mods mods = Mods.Nm;
foreach (var mod in splitMods)
{
if (Enum.TryParse(mod, true, out Mods parsedMod))
Expand Down
2 changes: 1 addition & 1 deletion GuiComponents/Controls/BeatmapListingView.cs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ private void UpdateResultsCount()
label_resultsCount.Text = string.Format("{0} {1}", count, count == 1 ? "map" : "maps");
}
public static DateTime d = new DateTime(2006, 1, 1);
private Mods _currentMods = Mods.Omod;
private Mods _currentMods = Mods.Nm;
private PlayMode _currentPlayMode = PlayMode.Osu;
private DifficultyCalculator _difficultyCalculator = new DifficultyCalculator();
private void InitListView()
Expand Down

0 comments on commit 515e072

Please sign in to comment.