Skip to content

Commit

Permalink
RW 1.9.05
Browse files Browse the repository at this point in the history
Plus a little bit of code cleanup
  • Loading branch information
SabreML committed Feb 12, 2023
1 parent bf99a29 commit 820c034
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion MusicAnnouncements.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>copy /Y "$(TargetPath)" "$(RainWorldSteam)\RainWorld_Data\StreamingAssets\mods\musicannouncements\plugins"</PostBuildEvent>
<PostBuildEvent>copy /Y "$(TargetPath)" "$(RainWorldSteam)\RainWorld_Data\StreamingAssets\mods\$(ProjectName)\plugins"</PostBuildEvent>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions MusicAnnouncements/modinfo.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"id": "sabreml.musicannouncements",
"name": "Music Announcements",
"version": "1.1.0",
"target_game_version": "v1.9.03",
"version": "1.1.1",
"target_game_version": "v1.9.05",
"authors": "SabreML",
"description": "Shows the name of the currently playing music track in-game."
}
11 changes: 7 additions & 4 deletions src/MusicAnnouncementsMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

namespace MusicAnnouncements
{
[BepInPlugin("sabreml.musicannouncements", "MusicAnnouncements", "1.1.0")]
[BepInPlugin("sabreml.musicannouncements", "MusicAnnouncements", "1.1.1")]
public partial class MusicAnnouncementsMod : BaseUnityPlugin
{
// The current mod version. (Set here as a variable so that I don't have to update it in as many places.)
public static readonly string version = "1.1.0";
// The current mod version. (Stored here as a variable so that I don't have to update it in as many places.)
public static string version;

// The name of the song to announce. (Also used to display the track name in the pause menu)
private string songToAnnounce;
Expand All @@ -24,6 +24,9 @@ public partial class MusicAnnouncementsMod : BaseUnityPlugin

public void OnEnable()
{
// Take the version number that was given to `BepInPlugin()` above.
version = Info.Metadata.Version.ToString();

On.RainWorld.OnModsInit += RainWorld_OnModsInitHK;

// In-game announcement hooks.
Expand All @@ -39,7 +42,7 @@ private void RainWorld_OnModsInitHK(On.RainWorld.orig_OnModsInit orig, RainWorld
{
orig(self);
// Set up the remix menu.
MachineConnector.SetRegisteredOI("sabreml.musicannouncements", new MusicAnnouncementsConfig());
MachineConnector.SetRegisteredOI(Info.Metadata.GUID, new MusicAnnouncementsConfig());
}

// Called when a new song is instantiated.
Expand Down

0 comments on commit 820c034

Please sign in to comment.