summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Release/StardewModdingAPI.exebin52736 -> 52736 bytes
-rw-r--r--StardewModdingAPI/Inheritance/SGame.cs1
-rw-r--r--StardewModdingAPI/Program.cs6
3 files changed, 5 insertions, 2 deletions
diff --git a/Release/StardewModdingAPI.exe b/Release/StardewModdingAPI.exe
index 21f3c99e..8e4d987e 100644
--- a/Release/StardewModdingAPI.exe
+++ b/Release/StardewModdingAPI.exe
Binary files differ
diff --git a/StardewModdingAPI/Inheritance/SGame.cs b/StardewModdingAPI/Inheritance/SGame.cs
index 61a0f390..895c4d95 100644
--- a/StardewModdingAPI/Inheritance/SGame.cs
+++ b/StardewModdingAPI/Inheritance/SGame.cs
@@ -8,6 +8,7 @@ using System.Threading.Tasks;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;
using StardewValley;
+using StardewValley.Menus;
using StardewValley.Minigames;
namespace StardewModdingAPI.Inheritance
diff --git a/StardewModdingAPI/Program.cs b/StardewModdingAPI/Program.cs
index ea1ff1da..583fc451 100644
--- a/StardewModdingAPI/Program.cs
+++ b/StardewModdingAPI/Program.cs
@@ -24,6 +24,7 @@ namespace StardewModdingAPI
{
public class Program
{
+ public static string ExecutionPath { get; private set; }
public static string DataPath = Path.Combine(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley"));
public static string ModPath = Path.Combine(Path.Combine(Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData), "StardewValley")), "Mods");
@@ -54,9 +55,10 @@ namespace StardewModdingAPI
if (!Directory.Exists(ModPath))
Directory.CreateDirectory(ModPath);
- Log(Assembly.GetExecutingAssembly().Location);
+ ExecutionPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+ Log(ExecutionPath);
LogInfo("Initializing SDV Assembly...");
- StardewAssembly = AppDomain.CurrentDomain.GetAssemblies().First(x => x.GetName().Name.Equals("Stardew Valley"));
+ StardewAssembly = Assembly.LoadFile(ExecutionPath + "\\Stardew Valley.exe");//AppDomain.CurrentDomain.GetAssemblies().First(x => x.GetName().Name.Equals("Stardew Valley"));
StardewProgramType = StardewAssembly.GetType("StardewValley.Program", true);
StardewGameInfo = StardewProgramType.GetField("gamePtr");