Skip to content
This repository has been archived by the owner on May 25, 2024. It is now read-only.

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lxymahatma committed May 4, 2023
1 parent 84caf61 commit dae61ac
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
22 changes: 11 additions & 11 deletions CustomHitSound.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')"/>
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
Expand Down Expand Up @@ -49,10 +49,10 @@
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Muse Dash\MelonLoader\MelonLoader.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System"/>
<Reference Include="Tomlet">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Muse Dash\MelonLoader\Tomlet.dll</HintPath>
<Private>False</Private>
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Muse Dash\MelonLoader\Tomlet.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="UnhollowerBaseLib">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Muse Dash\MelonLoader\Managed\UnhollowerBaseLib.dll</HintPath>
Expand All @@ -67,19 +67,19 @@
<Private>False</Private>
</Reference>
<Reference Include="UnityEngine.UI">
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Muse Dash\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\Muse Dash\MelonLoader\Managed\UnityEngine.UI.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="Main.cs" />
<Compile Include="Patch.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Main.cs"/>
<Compile Include="Patch.cs"/>
<Compile Include="Properties\AssemblyInfo.cs"/>
</ItemGroup>
<ItemGroup>
<Content Include=".gitignore" />
<Content Include=".gitignore"/>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets"/>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
Expand Down
2 changes: 1 addition & 1 deletion Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public override void OnInitializeMelon()

public override void OnDeinitializeMelon()
{
if (!Toggles.TryGetValue(Save.Sfx, out var toggle) || !toggle.isOn)
if (!Paths.ContainsKey(Save.Sfx))
Save.Sfx = string.Empty;
File.WriteAllText(Path.Combine("UserData", "Custom Hit Sound.cfg"), Save.Sfx);
}
Expand Down
6 changes: 5 additions & 1 deletion Patch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ internal static class AudioManagerPatch
{
private static void Postfix(AudioManager __instance)
{
if (!Main.Toggles.TryGetValue(Save.Sfx, out var toggle) || !toggle.isOn)
if (!Main.Paths.ContainsKey(Save.Sfx))
{
Save.Sfx = string.Empty;
return;
Expand Down Expand Up @@ -56,6 +56,10 @@ private static void Postfix()
DataHelper.battleSfxType = 0;
Save.Sfx = key;
}
else
{
Save.Sfx = string.Empty;
}
}));

if (Save.Sfx == key)
Expand Down
6 changes: 3 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.2")]
[assembly: AssemblyFileVersion("1.0.2")]
[assembly: MelonInfo(typeof(Main), "CustomHitSound", "1.0.2", "lxy")]
[assembly: AssemblyVersion("1.0.3")]
[assembly: AssemblyFileVersion("1.0.3")]
[assembly: MelonInfo(typeof(Main), "CustomHitSound", "1.0.3", "lxy")]
[assembly: MelonGame("PeroPeroGames", "MuseDash")]

0 comments on commit dae61ac

Please sign in to comment.