Skip to content

Commit

Permalink
Remove hardcoded path
Browse files Browse the repository at this point in the history
  • Loading branch information
IntelOrca committed Nov 3, 2022
1 parent b648284 commit f37b1ef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion IntelOrca.Biohazard/BgmRandomiser.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System;
using System.IO;
using System.Reflection;
using System.Text.Json;

namespace IntelOrca.Biohazard
Expand Down Expand Up @@ -77,7 +78,10 @@ private static BgmList GetBtmList()
private static string GetBgmJson()
{
#if DEBUG
return File.ReadAllText(@"M:\git\rer\rer\data\bgm.json");
var jsonPath = Path.Combine(
Path.GetDirectoryName(Assembly.GetEntryAssembly().Location),
@"..\..\..\..\IntelOrca.BioHazard\data\bgm.json");
return File.ReadAllText(jsonPath);
#else
return Resources.bgm;
#endif
Expand Down

0 comments on commit f37b1ef

Please sign in to comment.