Skip to content
This repository was archived by the owner on Oct 21, 2022. It is now read-only.

Commit 8ef79cc

Browse files
committed
Remove getModFolder from SFSSettings interface
1 parent 0c6546a commit 8ef79cc

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

ModLoader/IO/ModSettings.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ public void resetKeybindings()
178178

179179
private void save(SFSSettings modSettings)
180180
{
181-
FolderPath folder = new FolderPath(modSettings.getModFolder()).Extend("Settings").CreateFolder();
181+
SFSMod mod =Loader.main.getMod(modSettings.getModId());
182+
FolderPath folder = new FolderPath(mod.ModFolder).Extend("Settings").CreateFolder();
182183
FilePath settingsFile = folder.ExtendToFile("keybindings.json");
183184
string text = JsonWrapper.ToJson(modSettings, true);
184185
settingsFile.WriteText(text);

ModLoader/Mod/SFSSettings.cs

-13
Original file line numberDiff line numberDiff line change
@@ -39,18 +39,5 @@ public interface SFSSettings
3939
/// </example>
4040
string getModId();
4141

42-
/// <summary>
43-
/// Get mod folder. This is used to load and store your keybindings.
44-
/// </summary>
45-
/// <returns>
46-
/// My folder Path
47-
/// </returns>
48-
/// <example>
49-
/// public string getModFolder(){
50-
/// return MyMod.main.ModFolder;
51-
/// }
52-
/// </example>
53-
string getModFolder();
54-
5542
}
5643
}

0 commit comments

Comments
 (0)