Commit 6b6a873 1 parent 8121dea commit 6b6a873 Copy full SHA for 6b6a873
File tree 3 files changed +20
-2
lines changed
3 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ public static class MODConfigManager
12
12
DefaultValueHandling = DefaultValueHandling . IgnoreAndPopulate
13
13
} ;
14
14
15
- private static readonly string ConfigFilePath = Path . Combine ( Application . dataPath , "nipah.json" ) ;
15
+ private static readonly string ConfigFilePath = Path . Combine ( MODSystem . BaseDirectory , "nipah.json" ) ;
16
16
17
17
private static TextReader EmptyConfigReader => new StringReader ( "{}" ) ;
18
18
Original file line number Diff line number Diff line change 3
3
using MOD . Scripts . Core . TextWindow ;
4
4
using MOD . Scripts . UI ;
5
5
using MOD . Scripts . UI . Tips ;
6
+ using UnityEngine ;
7
+ using System . IO ;
6
8
7
9
namespace MOD . Scripts . Core
8
10
{
@@ -27,5 +29,20 @@ public class MODSystem
27
29
public readonly MODTipsController modTipsController = fixedMODTipsControllerInstance ;
28
30
29
31
private static readonly MODTipsController fixedMODTipsControllerInstance = new MODTipsController ( ) ;
32
+
33
+ public static string BaseDirectory
34
+ {
35
+ get
36
+ {
37
+ if ( Application . platform == RuntimePlatform . OSXPlayer )
38
+ {
39
+ return Path . Combine ( Application . dataPath , "Resources/Data" ) ;
40
+ }
41
+ else
42
+ {
43
+ return Application . dataPath ;
44
+ }
45
+ }
46
+ }
30
47
}
31
48
}
Original file line number Diff line number Diff line change 4
4
using System . Collections . Generic ;
5
5
using System . IO ;
6
6
using UnityEngine ;
7
+ using MOD . Scripts . Core ;
7
8
8
9
namespace MOD . Scripts . UI . Tips
9
10
{
10
11
public class MODTipsController
11
12
{
12
13
private bool initialized ;
13
14
private Dictionary < int , List < TipsDataEntry > > fixedTips ;
14
- private static readonly string TipsFilePath = Path . Combine ( Application . dataPath , "tips.json" ) ;
15
+ private static readonly string TipsFilePath = Path . Combine ( MODSystem . BaseDirectory , "tips.json" ) ;
15
16
16
17
/// <summary>
17
18
/// This returns the current tips for the arc.
You can’t perform that action at this time.
0 commit comments