summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Release/Mods/TrainerMod.dllbin24064 -> 24064 bytes
-rw-r--r--Release/StardewModdingAPI.exebin69120 -> 73728 bytes
-rw-r--r--StardewInjector/bin/Debug/StardewInjector.dllbin18432 -> 18432 bytes
-rw-r--r--StardewInjector/bin/Debug/StardewInjector.pdbbin42496 -> 46592 bytes
-rw-r--r--StardewInjector/bin/Debug/StardewModdingAPI.exebin72704 -> 73728 bytes
-rw-r--r--StardewInjector/bin/Debug/StardewModdingAPI.pdbbin138752 -> 140800 bytes
-rw-r--r--StardewInjector/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cachebin7163 -> 7263 bytes
-rw-r--r--StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt20
-rw-r--r--StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cachebin60415 -> 91814 bytes
-rw-r--r--StardewInjector/obj/Debug/StardewInjector.dllbin18432 -> 18432 bytes
-rw-r--r--StardewInjector/obj/Debug/StardewInjector.pdbbin42496 -> 46592 bytes
-rw-r--r--StardewModdingAPI.v12.suobin89088 -> 89088 bytes
-rw-r--r--StardewModdingAPI/Program.cs44
-rw-r--r--StardewModdingAPI/StardewModdingAPI.csproj4
-rw-r--r--TrainerMod/bin/Debug/StardewModdingAPI.exebin72704 -> 73728 bytes
-rw-r--r--TrainerMod/bin/Debug/StardewModdingAPI.pdbbin138752 -> 140800 bytes
-rw-r--r--TrainerMod/bin/Debug/TrainerMod.dllbin24064 -> 24064 bytes
-rw-r--r--TrainerMod/bin/Debug/TrainerMod.pdbbin34304 -> 34304 bytes
-rw-r--r--TrainerMod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cachebin7012 -> 7087 bytes
-rw-r--r--TrainerMod/obj/Debug/TrainerMod.csproj.FileListAbsolute.txt7
-rw-r--r--TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cachebin79113 -> 112500 bytes
-rw-r--r--TrainerMod/obj/Debug/TrainerMod.dllbin24064 -> 24064 bytes
-rw-r--r--TrainerMod/obj/Debug/TrainerMod.pdbbin34304 -> 34304 bytes
23 files changed, 59 insertions, 16 deletions
diff --git a/Release/Mods/TrainerMod.dll b/Release/Mods/TrainerMod.dll
index d39f4375..f508923b 100644
--- a/Release/Mods/TrainerMod.dll
+++ b/Release/Mods/TrainerMod.dll
Binary files differ
diff --git a/Release/StardewModdingAPI.exe b/Release/StardewModdingAPI.exe
index 001ada22..934e9570 100644
--- a/Release/StardewModdingAPI.exe
+++ b/Release/StardewModdingAPI.exe
Binary files differ
diff --git a/StardewInjector/bin/Debug/StardewInjector.dll b/StardewInjector/bin/Debug/StardewInjector.dll
index ec198674..edc2b8bc 100644
--- a/StardewInjector/bin/Debug/StardewInjector.dll
+++ b/StardewInjector/bin/Debug/StardewInjector.dll
Binary files differ
diff --git a/StardewInjector/bin/Debug/StardewInjector.pdb b/StardewInjector/bin/Debug/StardewInjector.pdb
index ea65643b..3d35d4d8 100644
--- a/StardewInjector/bin/Debug/StardewInjector.pdb
+++ b/StardewInjector/bin/Debug/StardewInjector.pdb
Binary files differ
diff --git a/StardewInjector/bin/Debug/StardewModdingAPI.exe b/StardewInjector/bin/Debug/StardewModdingAPI.exe
index c1090547..7389ad0c 100644
--- a/StardewInjector/bin/Debug/StardewModdingAPI.exe
+++ b/StardewInjector/bin/Debug/StardewModdingAPI.exe
Binary files differ
diff --git a/StardewInjector/bin/Debug/StardewModdingAPI.pdb b/StardewInjector/bin/Debug/StardewModdingAPI.pdb
index 07545045..a3d7d1b0 100644
--- a/StardewInjector/bin/Debug/StardewModdingAPI.pdb
+++ b/StardewInjector/bin/Debug/StardewModdingAPI.pdb
Binary files differ
diff --git a/StardewInjector/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/StardewInjector/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 836ea946..69432333 100644
--- a/StardewInjector/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+++ b/StardewInjector/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary files differ
diff --git a/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt b/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt
index 95f28c1a..7c17c873 100644
--- a/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt
+++ b/StardewInjector/obj/Debug/StardewInjector.csproj.FileListAbsolute.txt
@@ -20,3 +20,23 @@ C:\Users\zoryn\Documents\GitHub\SMAPI\StardewInjector\bin\Debug\Microsoft.Xna.Fr
C:\Users\zoryn\Documents\GitHub\SMAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Xact.xml
C:\Users\zoryn\Documents\GitHub\SMAPI\StardewInjector\obj\Debug\StardewInjector.dll
C:\Users\zoryn\Documents\GitHub\SMAPI\StardewInjector\obj\Debug\StardewInjector.pdb
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\StardewInjector.dll.config
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\StardewInjector.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\StardewInjector.pdb
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Game.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\StardewModdingAPI.exe
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Stardew Valley.exe
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Graphics.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\xTile.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Lidgren.Network.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Xact.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Steamworks.NET.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\StardewModdingAPI.pdb
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.xml
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Game.xml
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Graphics.xml
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\bin\Debug\Microsoft.Xna.Framework.Xact.xml
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\obj\Debug\StardewInjector.csprojResolveAssemblyReference.cache
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\obj\Debug\StardewInjector.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\StardewInjector\obj\Debug\StardewInjector.pdb
diff --git a/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache b/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache
index e17ed343..3cc9e142 100644
--- a/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache
+++ b/StardewInjector/obj/Debug/StardewInjector.csprojResolveAssemblyReference.cache
Binary files differ
diff --git a/StardewInjector/obj/Debug/StardewInjector.dll b/StardewInjector/obj/Debug/StardewInjector.dll
index ec198674..edc2b8bc 100644
--- a/StardewInjector/obj/Debug/StardewInjector.dll
+++ b/StardewInjector/obj/Debug/StardewInjector.dll
Binary files differ
diff --git a/StardewInjector/obj/Debug/StardewInjector.pdb b/StardewInjector/obj/Debug/StardewInjector.pdb
index ea65643b..3d35d4d8 100644
--- a/StardewInjector/obj/Debug/StardewInjector.pdb
+++ b/StardewInjector/obj/Debug/StardewInjector.pdb
Binary files differ
diff --git a/StardewModdingAPI.v12.suo b/StardewModdingAPI.v12.suo
index 0f5c0fce..6a286e20 100644
--- a/StardewModdingAPI.v12.suo
+++ b/StardewModdingAPI.v12.suo
Binary files differ
diff --git a/StardewModdingAPI/Program.cs b/StardewModdingAPI/Program.cs
index a7065c69..e7169bde 100644
--- a/StardewModdingAPI/Program.cs
+++ b/StardewModdingAPI/Program.cs
@@ -144,6 +144,10 @@ namespace StardewModdingAPI
//Load in that assembly. Also, ignore security :D
StardewAssembly = Assembly.UnsafeLoadFrom(ExecutionPath + "\\Stardew Valley.exe");
+ //This will load the injector before anything else if it sees it
+ //It doesn't matter though
+ //I'll leave it as a feature in case anyone in the community wants to tinker with it
+ //All you need is a DLL that inherits from mod and is called StardewInjector.dll with an Entry() method
foreach (string ModPath in ModPaths)
{
foreach (String s in Directory.GetFiles(ModPath, "StardewInjector.dll"))
@@ -153,11 +157,11 @@ namespace StardewModdingAPI
{
Assembly mod = Assembly.UnsafeLoadFrom(s); //to combat internet-downloaded DLLs
- if (mod.DefinedTypes.Count(x => x.BaseType == typeof(Mod)) > 0)
+ if (mod.DefinedTypes.Count(x => x.BaseType == typeof (Mod)) > 0)
{
LogColour(ConsoleColor.Green, "Loading Injector DLL...");
- TypeInfo tar = mod.DefinedTypes.First(x => x.BaseType == typeof(Mod));
- Mod m = (Mod)mod.CreateInstance(tar.ToString());
+ TypeInfo tar = mod.DefinedTypes.First(x => x.BaseType == typeof (Mod));
+ Mod m = (Mod) mod.CreateInstance(tar.ToString());
Console.WriteLine("LOADED: {0} by {1} - Version {2} | Description: {3}", m.Name, m.Authour, m.Version, m.Description);
m.Entry(false);
StardewInjectorLoaded = true;
@@ -178,7 +182,9 @@ namespace StardewModdingAPI
StardewProgramType = StardewAssembly.GetType("StardewValley.Program", true);
StardewGameInfo = StardewProgramType.GetField("gamePtr");
+ #region deprecated
/*
+ * Lol no. I tried though.
if (File.Exists(ExecutionPath + "\\Stardew_Injector.exe"))
{
//Stardew_Injector Mode
@@ -211,6 +217,7 @@ namespace StardewModdingAPI
//Now go back and load Stardew through SMAPI
}
*/
+ #endregion
//Change the game's version
LogInfo("Injecting New SDV Version...");
@@ -327,17 +334,24 @@ namespace StardewModdingAPI
ready = true;
- if (StardewInjectorLoaded)
+ StardewGameInfo.SetValue(StardewProgramType, gamePtr);
+ gamePtr.Run();
+
+ #region deprecated
+ if (false)
{
+ //Nope, I can't get it to work. I depend on Game1 being an SGame, and can't cast a parent to a child
+ //I'm leaving this here in case the community is interested
//StardewInjectorMod.Entry(true);
- StardewAssembly.EntryPoint.Invoke(null, new object[] {new string[0]});
- StardewGameInfo.SetValue(StardewProgramType, gamePtr);
- }
- else
- {
+ Type gt = StardewAssembly.GetType("StardewValley.Game1", true);
+ gamePtr = (SGame)Activator.CreateInstance(gt);
+
+ ready = true;
+
StardewGameInfo.SetValue(StardewProgramType, gamePtr);
gamePtr.Run();
}
+ #endregion
}
catch (Exception ex)
{
@@ -348,10 +362,14 @@ namespace StardewModdingAPI
static void StardewForm_Closing(object sender, CancelEventArgs e)
{
e.Cancel = true;
- gamePtr.Exit();
- gamePtr.Dispose();
- StardewForm.Hide();
- ready = false;
+
+ if (true || MessageBox.Show("Are you sure you would like to quit Stardew Valley?\nUnsaved progress will be lost!", "Confirm Exit", MessageBoxButtons.YesNo, MessageBoxIcon.Exclamation) == DialogResult.Yes)
+ {
+ gamePtr.Exit();
+ gamePtr.Dispose();
+ StardewForm.Hide();
+ ready = false;
+ }
}
public static void LoadMods()
diff --git a/StardewModdingAPI/StardewModdingAPI.csproj b/StardewModdingAPI/StardewModdingAPI.csproj
index 3e39ce98..b642598d 100644
--- a/StardewModdingAPI/StardewModdingAPI.csproj
+++ b/StardewModdingAPI/StardewModdingAPI.csproj
@@ -94,9 +94,7 @@
</ItemGroup>
<ItemGroup>
<Content Include="icon.ico" />
- <Content Include="steam_appid.txt">
- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
- </Content>
+ <Content Include="steam_appid.txt" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
diff --git a/TrainerMod/bin/Debug/StardewModdingAPI.exe b/TrainerMod/bin/Debug/StardewModdingAPI.exe
index c1090547..7389ad0c 100644
--- a/TrainerMod/bin/Debug/StardewModdingAPI.exe
+++ b/TrainerMod/bin/Debug/StardewModdingAPI.exe
Binary files differ
diff --git a/TrainerMod/bin/Debug/StardewModdingAPI.pdb b/TrainerMod/bin/Debug/StardewModdingAPI.pdb
index 07545045..a3d7d1b0 100644
--- a/TrainerMod/bin/Debug/StardewModdingAPI.pdb
+++ b/TrainerMod/bin/Debug/StardewModdingAPI.pdb
Binary files differ
diff --git a/TrainerMod/bin/Debug/TrainerMod.dll b/TrainerMod/bin/Debug/TrainerMod.dll
index d39f4375..f508923b 100644
--- a/TrainerMod/bin/Debug/TrainerMod.dll
+++ b/TrainerMod/bin/Debug/TrainerMod.dll
Binary files differ
diff --git a/TrainerMod/bin/Debug/TrainerMod.pdb b/TrainerMod/bin/Debug/TrainerMod.pdb
index e20c53af..06152379 100644
--- a/TrainerMod/bin/Debug/TrainerMod.pdb
+++ b/TrainerMod/bin/Debug/TrainerMod.pdb
Binary files differ
diff --git a/TrainerMod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/TrainerMod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
index 7b09d9e8..171a61ae 100644
--- a/TrainerMod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
+++ b/TrainerMod/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
Binary files differ
diff --git a/TrainerMod/obj/Debug/TrainerMod.csproj.FileListAbsolute.txt b/TrainerMod/obj/Debug/TrainerMod.csproj.FileListAbsolute.txt
index 9a9d9045..4ec02324 100644
--- a/TrainerMod/obj/Debug/TrainerMod.csproj.FileListAbsolute.txt
+++ b/TrainerMod/obj/Debug/TrainerMod.csproj.FileListAbsolute.txt
@@ -17,3 +17,10 @@ C:\Users\zoryn\Documents\GitHub\SMAPI\TrainerMod\bin\Debug\Microsoft.Xna.Framewo
C:\Users\zoryn\Documents\GitHub\SMAPI\TrainerMod\bin\Debug\Steamworks.NET.dll
C:\Users\zoryn\Documents\GitHub\SMAPI\TrainerMod\bin\Debug\StardewModdingAPI.pdb
C:\Users\zoryn\Documents\GitHub\SMAPI\TrainerMod\bin\Debug\Microsoft.Xna.Framework.Xact.xml
+C:\TFSource\Master-Collection\StardewModdingAPI\TrainerMod\bin\Debug\StardewModdingAPI.exe
+C:\TFSource\Master-Collection\StardewModdingAPI\TrainerMod\bin\Debug\xTile.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\TrainerMod\bin\Debug\Lidgren.Network.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\TrainerMod\bin\Debug\Microsoft.Xna.Framework.Xact.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\TrainerMod\bin\Debug\Steamworks.NET.dll
+C:\TFSource\Master-Collection\StardewModdingAPI\TrainerMod\bin\Debug\StardewModdingAPI.pdb
+C:\TFSource\Master-Collection\StardewModdingAPI\TrainerMod\bin\Debug\Microsoft.Xna.Framework.Xact.xml
diff --git a/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache b/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache
index cc53004f..62384c20 100644
--- a/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache
+++ b/TrainerMod/obj/Debug/TrainerMod.csprojResolveAssemblyReference.cache
Binary files differ
diff --git a/TrainerMod/obj/Debug/TrainerMod.dll b/TrainerMod/obj/Debug/TrainerMod.dll
index d39f4375..f508923b 100644
--- a/TrainerMod/obj/Debug/TrainerMod.dll
+++ b/TrainerMod/obj/Debug/TrainerMod.dll
Binary files differ
diff --git a/TrainerMod/obj/Debug/TrainerMod.pdb b/TrainerMod/obj/Debug/TrainerMod.pdb
index e20c53af..06152379 100644
--- a/TrainerMod/obj/Debug/TrainerMod.pdb
+++ b/TrainerMod/obj/Debug/TrainerMod.pdb
Binary files differ