This commit is contained in:
Zoryn Aaron 2016-02-29 13:22:24 -05:00
parent 57bc4aa552
commit 9f1ecbcd27
3 changed files with 5 additions and 2 deletions

Binary file not shown.

View File

@ -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

View File

@ -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");