Skip to content

Commit

Permalink
Change PlayerOptions.None to avoid conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
MatrikMoon committed Apr 20, 2023
1 parent 1e7f1b2 commit 221b133
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion TournamentAssistant/PluginClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ async void loadSongAction(string hash, bool succeeded)
var playerSettings = playerData.playerSpecificSettings;

//Override defaults if we have forced options enabled
if (playSong.GameplayParameters.PlayerSettings.Options != PlayerOptions.None)
if (playSong.GameplayParameters.PlayerSettings.Options != PlayerOptions.NoPlayerOptions)
{
playerSettings = new PlayerSpecificSettings(
playSong.GameplayParameters.PlayerSettings.Options.HasFlag(PlayerOptions.LeftHanded),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ private void SongDetail_didPressPlayButtonEvent(IBeatmapLevel level, BeatmapChar
var playerSettings = playerData.playerSpecificSettings;

//Override defaults if we have forced options enabled
if (_currentParameters.PlayerSettings.Options != PlayerOptions.None)
if (_currentParameters.PlayerSettings.Options != PlayerOptions.NoPlayerOptions)
{
playerSettings = new PlayerSpecificSettings(
_currentParameters.PlayerSettings.Options.HasFlag(PlayerOptions.LeftHanded),
Expand Down
8 changes: 4 additions & 4 deletions TournamentAssistantCore/Discord/Modules/QualifierModule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ public async Task AddSongAsync(string eventId, string songId, BeatmapDifficulty

var playerOptions = Enum.GetValues(typeof(PlayerOptions)).Cast<PlayerOptions>()
.Where(o => !string.IsNullOrWhiteSpace(playerOptionsString.ParseArgs(o.ToString())))
.Aggregate(PlayerOptions.None, (current, o) => current | o);
.Aggregate(PlayerOptions.NoPlayerOptions, (current, o) => current | o);

//Sanitize input
songId = SanitizeSongId(songId);
Expand Down Expand Up @@ -374,7 +374,7 @@ public async Task AddSongAsync(string eventId, string songId, BeatmapDifficulty

await ModifyOriginalResponseAsync(x => x.Embed = (replyString +
$"{(gameOptions != GameOptions.None ? $" with game options: ({gameOptions})" : "")}" +
$"{(playerOptions != PlayerOptions.None ? $" with player options: ({playerOptions})" : "!")}").SuccessEmbed());
$"{(playerOptions != PlayerOptions.NoPlayerOptions ? $" with player options: ({playerOptions})" : "!")}").SuccessEmbed());
break;
case Response.ResponseType.Fail:
await ModifyOriginalResponseAsync(x => x.Embed = response.modify_qualifier.Message.ErrorEmbed());
Expand Down Expand Up @@ -489,7 +489,7 @@ public async Task RemoveSongAsync(string eventId, string songId, BeatmapDifficul

var playerOptions = Enum.GetValues(typeof(PlayerOptions)).Cast<PlayerOptions>()
.Where(o => !string.IsNullOrWhiteSpace(playerOptionsString.ParseArgs(o.ToString())))
.Aggregate(PlayerOptions.None, (current, o) => current | o);
.Aggregate(PlayerOptions.NoPlayerOptions, (current, o) => current | o);

//Sanitize input
songId = SanitizeSongId(songId);
Expand All @@ -516,7 +516,7 @@ public async Task RemoveSongAsync(string eventId, string songId, BeatmapDifficul
case Response.ResponseType.Success:
await ModifyOriginalResponseAsync(x => x.Embed = ($"Removed {song.Beatmap.Name} ({difficulty}) ({characteristic}) from the song list" +
$"{(gameOptions != GameOptions.None ? $" with game options: ({gameOptions})" : "")}" +
$"{(playerOptions != PlayerOptions.None ? $" with player options: ({playerOptions})" : "!")}").SuccessEmbed());
$"{(playerOptions != PlayerOptions.NoPlayerOptions ? $" with player options: ({playerOptions})" : "!")}").SuccessEmbed());
break;
case Response.ResponseType.Fail:
await ModifyOriginalResponseAsync(x => x.Embed = response.modify_qualifier.Message.ErrorEmbed());
Expand Down
2 changes: 1 addition & 1 deletion TournamentAssistantProtos

0 comments on commit 221b133

Please sign in to comment.