Skip to content

Commit

Permalink
Hopefully last pathing fix
Browse files Browse the repository at this point in the history
  • Loading branch information
JBurlison committed Dec 1, 2019
1 parent f30b2b3 commit d9b4f1a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions Pandaros.Settlers/Pandaros.Settlers/GameLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public static class GameLoader
public static string MACHINE_JSON = "";
public static string Schematic_SAVE_LOC = "";
public static string Schematic_DEFAULT_LOC = "";
public static readonly Version MOD_VER = new Version(0, 8, 2, 71);
public static readonly Version MOD_VER = new Version(0, 8, 2, 72);
public static bool RUNNING { get; private set; }
public static bool WorldLoaded { get; private set; }
public static Colony StubColony { get; private set; }
Expand All @@ -61,21 +61,16 @@ public static void AfterSelectedWorld()
[ModLoader.ModCallback(ModLoader.EModCallbackType.OnAssemblyLoaded, NAMESPACE + ".OnAssemblyLoaded")]
public static void OnAssemblyLoaded(string path)
{
MOD_FOLDER = Path.GetDirectoryName(path);
MOD_FOLDER = Path.GetDirectoryName(path).Replace("\\", "/");
Schematic_DEFAULT_LOC = $"{MOD_FOLDER}/Schematics/";
AppDomain.CurrentDomain.AssemblyResolve += CurrentDomain_AssemblyResolve;

if (!Directory.Exists(Schematic_DEFAULT_LOC))
Directory.CreateDirectory(Schematic_DEFAULT_LOC);

SettlersLogger.Log("Found mod in {0}", MOD_FOLDER);

GAME_ROOT = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
SettlersLogger.Log("GAME_ROOT in {0}", GAME_ROOT);
GAMEDATA_FOLDER = Path.Combine(GAME_ROOT, "gamedata").Replace("\\", "/") + "/";
SettlersLogger.Log("GAMEDATA_FOLDER in {0}", GAMEDATA_FOLDER);
MODS_FOLDER = @"../../" + MOD_FOLDER;
SettlersLogger.Log("MODS_FOLDER in {0}", MODS_FOLDER);
GAME_ROOT = Path.GetDirectoryName(Assembly.GetCallingAssembly().Location) + @"/../../";
GAMEDATA_FOLDER = Path.Combine(GAME_ROOT, "gamedata").Replace("\\", "/") + "/";
MODS_FOLDER = MOD_FOLDER + @"/../../";

ICON_PATH = Path.Combine(MOD_FOLDER, "icons").Replace("\\", "/") + "/";
MESH_PATH = Path.Combine(MOD_FOLDER, "Meshes").Replace("\\", "/") + "/";
Expand All @@ -89,6 +84,11 @@ public static void OnAssemblyLoaded(string path)

ModInfo = JSON.Deserialize(MOD_FOLDER + "/modInfo.json")[0];

SettlersLogger.Log("Found mod in {0}", MOD_FOLDER);
SettlersLogger.Log("GAME_ROOT in {0}", GAME_ROOT);
SettlersLogger.Log("GAMEDATA_FOLDER in {0}", GAMEDATA_FOLDER);
SettlersLogger.Log("MODS_FOLDER in {0}", MODS_FOLDER);

List<string> allinfos = new List<string>();
DirSearch(MODS_FOLDER, "*modInfo.json", allinfos);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@
// 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("0.30.1201.25139")]
[assembly: AssemblyVersion("0.34.1201.25902")]
4 changes: 2 additions & 2 deletions Pandaros.Settlers/Pandaros.Settlers/modInfo.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"dllpath": "Pandaros.Settlers.dll",
"name": "Pandaros.Settlers",
"namepretty": "Pandaros' Settlers!",
"version": "0.8.2.71",
"version": "0.8.2.72",
"enabled": true,
"marksgamemodded": true,
"compatibleversions": [
Expand Down Expand Up @@ -287,7 +287,7 @@
"about": "The Settlers mod adds over 100 new researchables, 100's of new blocks, Weapons, Armor, Knights, Machines, teleporters, builders wand, magic items, new jobs and of course Settlers!",
"patchnotes": [
{
"version": "0.8.2.71-BETA",
"version": "0.8.2.72-BETA",
"notes": [
"Fixed Pathing"
]
Expand Down

0 comments on commit d9b4f1a

Please sign in to comment.