Skip to content

Commit

Permalink
Fussy nitpicks
Browse files Browse the repository at this point in the history
- Slightly reworded the `ingameText` config option.
- Flipped the order of the two config options.
- Fixed a typo I made in the the review. (inGameText -> ingameText) (whoops)
  • Loading branch information
SabreML committed Feb 16, 2023
1 parent 3a057a0 commit 4073443
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
5 changes: 5 additions & 0 deletions MusicAnnouncements.sln
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ VisualStudioVersion = 17.4.33213.308
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MusicAnnouncements", "MusicAnnouncements.csproj", "{B5F19BC8-AABD-4BB8-8B8B-F244DFE27D1B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{5D40386E-2500-41C1-837D-44229A67E2F1}"
ProjectSection(SolutionItems) = preProject
MusicAnnouncements\modinfo.json = MusicAnnouncements\modinfo.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down
2 changes: 1 addition & 1 deletion MusicAnnouncements/modinfo.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"id": "sabreml.musicannouncements",
"name": "Music Announcements",
"version": "1.1.1",
"version": "1.2.0",
"target_game_version": "v1.9.05",
"authors": "SabreML",
"description": "Shows the name of the currently playing music track in-game."
Expand Down
14 changes: 7 additions & 7 deletions src/MusicAnnouncementsConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ namespace MusicAnnouncements
{
public class MusicAnnouncementsConfig : OptionInterface
{
public static Configurable<bool> pauseMenuText;
public static Configurable<bool> ingameText;
public static Configurable<bool> pauseMenuText;

public MusicAnnouncementsConfig()
{
pauseMenuText = config.Bind("pauseMenuText", true, new ConfigurableInfo("Show the name of the currently playing song in the top right of the pause menu.", tags: new object[]
ingameText = config.Bind("ingameText", true, new ConfigurableInfo("Announce newly playing songs at the bottom left of the screen in-game.", tags: new object[]
{
"Show currently playing song in the pause menu"
"Announce new songs in-game"
}));
ingameText = config.Bind("ingameText", true, new ConfigurableInfo("Announce the name of the currently playing song in the bottom left of the screen.", tags: new object[]
pauseMenuText = config.Bind("pauseMenuText", true, new ConfigurableInfo("Show the name of the currently playing song in the top right of the pause menu.", tags: new object[]
{
"Announce currently playing song in the bottom left"
"Show currently playing song in the pause menu"
}));
}

Expand All @@ -32,8 +32,8 @@ public override void Initialize()
AddDivider(593f);
AddTitle();
AddDivider(540f);
AddCheckbox(pauseMenuText, 500f);
AddCheckbox(ingameText, 460f);
AddCheckbox(ingameText, 500f);
AddCheckbox(pauseMenuText, 460f);
}

private void AddDivider(float y)
Expand Down
4 changes: 2 additions & 2 deletions src/MusicAnnouncementsMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

namespace MusicAnnouncements
{
[BepInPlugin("sabreml.musicannouncements", "MusicAnnouncements", "1.1.1")]
[BepInPlugin("sabreml.musicannouncements", "MusicAnnouncements", "1.2.0")]
public partial class MusicAnnouncementsMod : BaseUnityPlugin
{
// The current mod version. (Stored here as a variable so that I don't have to update it in as many places.)
Expand Down Expand Up @@ -66,7 +66,7 @@ private void SongHK(On.Music.Song.orig_ctor orig, Song self, MusicPlayer musicPl
// The full `name` will be something like "RW_24 - Kayava". We only want to announce the part after the dash.
songToAnnounce = Regex.Split(name, " - ")[1];

if (MusicAnnouncementsConfig.inGameText.Value) // Gameplay announcements are enabled.
if (MusicAnnouncementsConfig.ingameText.Value) // Gameplay announcements are enabled.
{
announceAttempts = 500; // 500 attempts
}
Expand Down

0 comments on commit 4073443

Please sign in to comment.