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

Commit 6da4f07

Browse files
committed
Add ModFolder attribute to SFSMod class
1 parent af4b6b9 commit 6da4f07

2 files changed

Lines changed: 15 additions & 2 deletions

File tree

ModLoader/Loader.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ private Dictionary<string, SFSMod> getModList()
199199
{
200200
throw new Exception("There is already another mod with id " + mod.ModId);
201201
}
202-
202+
mod.ModFolder = Path.Combine(basePath, folder.FolderName);
203203
modList.Add(mod.ModId, mod);
204204
}
205205
catch (Exception e)
@@ -384,6 +384,14 @@ private void detectIndividualDlls()
384384
}
385385
}
386386

387+
/// <summary>
388+
///
389+
/// </summary>
390+
public void test()
391+
{
392+
393+
}
394+
387395
/// <summary>
388396
/// This is the mod loader entry point, this is the method that is executed after being injected into the game.
389397
/// </summary>

ModLoader/SFSMod.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public abstract class SFSMod
2222
private Dictionary<string, string[]> _dependencies;
2323
private AssetBundle _assets;
2424
private string _assetsFilename;
25+
private string _modFolder;
2526

2627
/// <summary>
2728
/// Get folder where is store this mod
@@ -30,7 +31,11 @@ public string ModFolder
3031
{
3132
get
3233
{
33-
return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "\\";
34+
return this._modFolder;
35+
}
36+
set
37+
{
38+
this._modFolder = value;
3439
}
3540
}
3641

0 commit comments

Comments
 (0)