Update to SMAPI 3.1
This commit is contained in:
parent
326c7d7db1
commit
0ea0fccf5c
|
@ -35,6 +35,7 @@
|
|||
</ItemGroup>
|
||||
|
||||
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
|
||||
<Import Project="..\..\build\common.targets" />
|
||||
<Import Project="..\..\build\prepare-install-package.targets" />
|
||||
|
||||
</Project>
|
|
@ -10,23 +10,6 @@
|
|||
<PlatformTarget>x86</PlatformTarget>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI\SMAPI.csproj">
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="$(GameExecutableName)">
|
||||
<HintPath>$(GamePath)\$(GameExecutableName).exe</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley.GameData">
|
||||
<HintPath>$(GamePath)\StardewValley.GameData.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<Choose>
|
||||
<!-- Windows -->
|
||||
<When Condition="$(OS) == 'Windows_NT'">
|
||||
|
@ -35,18 +18,6 @@
|
|||
<HintPath>$(GamePath)\Netcode.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
</When>
|
||||
|
||||
|
@ -61,6 +32,25 @@
|
|||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewModdingAPI">
|
||||
<HintPath>..\SMAPI\bin\Debug\StardewModdingAPI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\StardewValley.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley.GameData">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\StardewValley.GameData.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="manifest.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
|
|
|
@ -68,22 +68,21 @@ namespace StardewModdingAPI.Mods.SaveBackup
|
|||
if (targetFile.Exists || fallbackDir.Exists)
|
||||
return;
|
||||
|
||||
// back up saves
|
||||
this.Monitor.Log($"Backing up saves to {targetFile.FullName}...", LogLevel.Trace);
|
||||
if (!this.TryCompress(Constants.SavesPath, targetFile, out Exception compressError))
|
||||
{
|
||||
// log error (expected on Android due to missing compression DLLs)
|
||||
if (Constants.TargetPlatform == GamePlatform.Android)
|
||||
this.Monitor.VerboseLog($"Compression isn't supported on Android:\n{compressError}");
|
||||
else
|
||||
{
|
||||
this.Monitor.Log("Couldn't zip the save backup, creating uncompressed backup instead.", LogLevel.Debug);
|
||||
this.Monitor.Log(compressError.ToString(), LogLevel.Trace);
|
||||
}
|
||||
// copy saves to fallback directory (ignore non-save files/folders)
|
||||
this.Monitor.Log($"Backing up saves to {fallbackDir.FullName}...", LogLevel.Trace);
|
||||
DirectoryInfo savesDir = new DirectoryInfo(Constants.SavesPath);
|
||||
this.RecursiveCopy(savesDir, fallbackDir, entry => this.MatchSaveFolders(savesDir, entry), copyRoot: false);
|
||||
|
||||
// fallback to uncompressed
|
||||
this.RecursiveCopy(new DirectoryInfo(Constants.SavesPath), fallbackDir, copyRoot: false);
|
||||
// compress backup if possible
|
||||
this.Monitor.Log("Compressing backup if possible...", LogLevel.Trace);
|
||||
if (!this.TryCompress(fallbackDir.FullName, targetFile, out Exception compressError))
|
||||
{
|
||||
if (Constants.TargetPlatform != GamePlatform.Android) // expected to fail on Android
|
||||
this.Monitor.Log($"Couldn't compress backup, leaving it uncompressed.\n{compressError}", LogLevel.Trace);
|
||||
}
|
||||
else
|
||||
fallbackDir.Delete(recursive: true);
|
||||
|
||||
this.Monitor.Log("Backup done!", LogLevel.Trace);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -198,12 +197,16 @@ namespace StardewModdingAPI.Mods.SaveBackup
|
|||
/// <param name="source">The file or folder to copy.</param>
|
||||
/// <param name="targetFolder">The folder to copy into.</param>
|
||||
/// <param name="copyRoot">Whether to copy the root folder itself, or <c>false</c> to only copy its contents.</param>
|
||||
/// <param name="filter">A filter which matches the files or directories to copy, or <c>null</c> to copy everything.</param>
|
||||
/// <remarks>Derived from the SMAPI installer code.</remarks>
|
||||
private void RecursiveCopy(FileSystemInfo source, DirectoryInfo targetFolder, bool copyRoot = true)
|
||||
private void RecursiveCopy(FileSystemInfo source, DirectoryInfo targetFolder, Func<FileSystemInfo, bool> filter = null, bool copyRoot = true)
|
||||
{
|
||||
if (!targetFolder.Exists)
|
||||
targetFolder.Create();
|
||||
|
||||
if (filter?.Invoke(source) == false)
|
||||
return;
|
||||
|
||||
switch (source)
|
||||
{
|
||||
case FileInfo sourceFile:
|
||||
|
@ -213,12 +216,35 @@ namespace StardewModdingAPI.Mods.SaveBackup
|
|||
case DirectoryInfo sourceDir:
|
||||
DirectoryInfo targetSubfolder = copyRoot ? new DirectoryInfo(Path.Combine(targetFolder.FullName, sourceDir.Name)) : targetFolder;
|
||||
foreach (var entry in sourceDir.EnumerateFileSystemInfos())
|
||||
this.RecursiveCopy(entry, targetSubfolder);
|
||||
this.RecursiveCopy(entry, targetSubfolder, filter);
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new NotSupportedException($"Unknown filesystem info type '{source.GetType().FullName}'.");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>A copy filter which matches save folders.</summary>
|
||||
/// <param name="savesFolder">The folder containing save folders.</param>
|
||||
/// <param name="entry">The current entry to check under <paramref name="savesFolder"/>.</param>
|
||||
private bool MatchSaveFolders(DirectoryInfo savesFolder, FileSystemInfo entry)
|
||||
{
|
||||
this.Monitor.Log($"Checking {entry.FullName}...");
|
||||
|
||||
// only need to filter top-level entries
|
||||
string parentPath = (entry as FileInfo)?.DirectoryName ?? (entry as DirectoryInfo)?.Parent?.FullName;
|
||||
if (parentPath != savesFolder.FullName)
|
||||
{
|
||||
this.Monitor.Log(" OK: not root path");
|
||||
return true;
|
||||
}
|
||||
|
||||
// match folders with Name_ID format
|
||||
bool include =
|
||||
entry is DirectoryInfo
|
||||
&& ulong.TryParse(entry.Name.Split('_').Last(), out _);
|
||||
this.Monitor.Log(include ? " OK: name matches save folder format" : " SKIP: not a save folder");
|
||||
return include;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,9 +11,8 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI\SMAPI.csproj">
|
||||
<Private>False</Private>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\SMAPI.Toolkit.CoreInterfaces.csproj" />
|
||||
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -21,6 +20,12 @@
|
|||
<HintPath>$(GamePath)\$(GameExecutableName).exe</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="StardewModdingAPI">
|
||||
<HintPath>..\SMAPI\bin\Debug\StardewModdingAPI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\StardewValley.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -62,14 +62,8 @@ namespace StardewModdingAPI.Mods.VirtualKeyboard
|
|||
this.buttonPressed = eventManager.GetType().GetField("ButtonPressed", BindingFlags.Public | BindingFlags.Instance).GetValue(eventManager);
|
||||
this.buttonReleased = eventManager.GetType().GetField("ButtonReleased", BindingFlags.Public | BindingFlags.Instance).GetValue(eventManager);
|
||||
|
||||
this.legacyButtonPressed = eventManager.GetType().GetField("Legacy_KeyPressed", BindingFlags.Public | BindingFlags.Instance).GetValue(eventManager);
|
||||
this.legacyButtonReleased = eventManager.GetType().GetField("Legacy_KeyReleased", BindingFlags.Public | BindingFlags.Instance).GetValue(eventManager);
|
||||
|
||||
this.RaiseButtonPressed = this.buttonPressed.GetType().GetMethod("Raise", BindingFlags.Public | BindingFlags.Instance);
|
||||
this.RaiseButtonReleased = this.buttonReleased.GetType().GetMethod("Raise", BindingFlags.Public | BindingFlags.Instance);
|
||||
|
||||
this.Legacy_KeyPressed = this.legacyButtonPressed.GetType().GetMethod("Raise", BindingFlags.Public | BindingFlags.Instance);
|
||||
this.Legacy_KeyReleased = this.legacyButtonReleased.GetType().GetMethod("Raise", BindingFlags.Public | BindingFlags.Instance);
|
||||
}
|
||||
|
||||
private bool shouldTrigger(Vector2 screenPixels)
|
||||
|
@ -95,13 +89,11 @@ namespace StardewModdingAPI.Mods.VirtualKeyboard
|
|||
object inputState = e.GetType().GetField("InputState", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(e);
|
||||
|
||||
object buttonPressedEventArgs = Activator.CreateInstance(typeof(ButtonPressedEventArgs), BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { this.buttonKey, e.Cursor, inputState }, null);
|
||||
EventArgsKeyPressed eventArgsKey = new EventArgsKeyPressed((Keys)this.buttonKey);
|
||||
try
|
||||
{
|
||||
this.raisingPressed = true;
|
||||
|
||||
this.RaiseButtonPressed.Invoke(this.buttonPressed, new object[] { buttonPressedEventArgs });
|
||||
this.Legacy_KeyPressed.Invoke(this.legacyButtonPressed, new object[] { eventArgsKey });
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
@ -122,12 +114,10 @@ namespace StardewModdingAPI.Mods.VirtualKeyboard
|
|||
{
|
||||
object inputState = e.GetType().GetField("InputState", BindingFlags.NonPublic | BindingFlags.Instance).GetValue(e);
|
||||
object buttonReleasedEventArgs = Activator.CreateInstance(typeof(ButtonReleasedEventArgs), BindingFlags.NonPublic | BindingFlags.Instance, null, new object[] { this.buttonKey, e.Cursor, inputState }, null);
|
||||
EventArgsKeyPressed eventArgsKeyReleased = new EventArgsKeyPressed((Keys)this.buttonKey);
|
||||
try
|
||||
{
|
||||
this.raisingReleased = true;
|
||||
this.RaiseButtonReleased.Invoke(this.buttonReleased, new object[] { buttonReleasedEventArgs });
|
||||
this.Legacy_KeyReleased.Invoke(this.legacyButtonReleased, new object[] { eventArgsKeyReleased });
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
|
|
@ -32,17 +32,18 @@
|
|||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Mono.Android.dll</HintPath>
|
||||
<Reference Include="Mono.Android">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\Mono.Android.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoGame.Framework, Version=3.7.1.189, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\MonoGame.Framework.dll</HintPath>
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley, Version=1.3.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\StardewValley.dll</HintPath>
|
||||
<Reference Include="StardewModdingAPI">
|
||||
<HintPath>..\SMAPI\bin\Debug\StardewModdingAPI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\StardewValley.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System">
|
||||
<Private>True</Private>
|
||||
|
@ -87,9 +88,9 @@
|
|||
<Content Include="assets\togglebutton.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI\StardewModdingAPI.csproj">
|
||||
<Project>{9ef11e43-1701-4396-8835-8392d57abb70}</Project>
|
||||
<Name>StardewModdingAPI</Name>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj">
|
||||
<Project>{08184f74-60ad-4eee-a78c-f4a35ade6246}</Project>
|
||||
<Name>SMAPI.Toolkit</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"Name": "VirtualKeyboard",
|
||||
"Author": "MartyrPher",
|
||||
"Version": "0.9.7",
|
||||
"MinimumApiVersion": "2.10.1",
|
||||
"Version": "3.1.0",
|
||||
"MinimumApiVersion": "3.1.0",
|
||||
"Description": "A much needed Virtual Keyboard for SMAPI Android.",
|
||||
"UniqueID": "VirtualKeyboard",
|
||||
"EntryDll": "VirtualKeyboard.dll",
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\SMAPI.Toolkit.CoreInterfaces.csproj" />
|
||||
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj" />
|
||||
<ProjectReference Include="..\SMAPI\SMAPI.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace StardewModdingAPI.Toolkit.Serialization.Converters
|
|||
{
|
||||
/// <summary>The base implementation for simplified converters which deserialize <typeparamref name="T"/> without overriding serialization.</summary>
|
||||
/// <typeparam name="T">The type to deserialize.</typeparam>
|
||||
internal abstract class SimpleReadOnlyConverter<T> : JsonConverter
|
||||
public class SimpleReadOnlyConverter<T> : JsonConverter
|
||||
{
|
||||
/*********
|
||||
** Accessors
|
||||
|
|
|
@ -3,7 +3,7 @@ using System;
|
|||
namespace StardewModdingAPI.Toolkit.Serialization
|
||||
{
|
||||
/// <summary>A format exception which provides a user-facing error message.</summary>
|
||||
internal class SParseException : FormatException
|
||||
public class SParseException : FormatException
|
||||
{
|
||||
/*********
|
||||
** Public methods
|
||||
|
|
|
@ -13,9 +13,6 @@ namespace StardewModdingAPI.Toolkit.Utilities
|
|||
Mac,
|
||||
|
||||
/// <summary>The Windows version of the game.</summary>
|
||||
Windows,
|
||||
|
||||
/// <summary>The Android version of the game.</summary>
|
||||
Android
|
||||
Windows
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,11 +11,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".root", ".root", "{86C452BE
|
|||
..\LICENSE.txt = ..\LICENSE.txt
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StardewModdingAPI.Installer", "SMAPI.Installer\StardewModdingAPI.Installer.csproj", "{0ED5EAD8-5D85-420D-8101-6D8CCCE29C9B}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{8C2CA4AB-BA8A-446A-B59E-9D6502E145F7} = {8C2CA4AB-BA8A-446A-B59E-9D6502E145F7}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ISSUE_TEMPLATE", "ISSUE_TEMPLATE", "{F4453AB6-D7D6-447F-A973-956CC777968F}"
|
||||
ProjectSection(SolutionItems) = preProject
|
||||
..\.github\ISSUE_TEMPLATE\bug_report.md = ..\.github\ISSUE_TEMPLATE\bug_report.md
|
||||
|
@ -45,24 +40,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "technical", "technical", "{
|
|||
..\docs\technical\web.md = ..\docs\technical\web.md
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "StardewModdingAPI.ModBuildConfig", "SMAPI.ModBuildConfig\StardewModdingAPI.ModBuildConfig.csproj", "{C11D0AFB-2893-41A9-AD55-D002F032D6AD}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{80AD8528-AA49-4731-B4A6-C691845815A1} = {80AD8528-AA49-4731-B4A6-C691845815A1}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{D954291E-2A0B-460D-934E-DC6B0785DB48}") = "SMAPI.Internal", "SMAPI.Internal\SMAPI.Internal.shproj", "{85208F8D-6FD1-4531-BE05-7142490F59FE}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.ModBuildConfig.Analyzer.Tests", "SMAPI.ModBuildConfig.Analyzer.Tests\SMAPI.ModBuildConfig.Analyzer.Tests.csproj", "{680B2641-81EA-467C-86A5-0E81CDC57ED0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.Tests", "SMAPI.Tests\SMAPI.Tests.csproj", "{AA95884B-7097-476E-92C8-D0500DE9D6D1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI", "SMAPI\SMAPI.csproj", "{E6DA2198-7686-4F1D-B312-4A4DC70884C0}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.Installer", "SMAPI.Installer\SMAPI.Installer.csproj", "{0A9BB24F-15FF-4C26-B1A2-81F7AE316518}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{0634EA4C-3B8F-42DB-AEA6-CA9E4EF6E92F} = {0634EA4C-3B8F-42DB-AEA6-CA9E4EF6E92F}
|
||||
{CD53AD6F-97F4-4872-A212-50C2A0FD3601} = {CD53AD6F-97F4-4872-A212-50C2A0FD3601}
|
||||
{E6DA2198-7686-4F1D-B312-4A4DC70884C0} = {E6DA2198-7686-4F1D-B312-4A4DC70884C0}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.ModBuildConfig", "SMAPI.ModBuildConfig\SMAPI.ModBuildConfig.csproj", "{1B3821E6-D030-402C-B3A1-7CA45C2800EA}"
|
||||
|
@ -81,12 +68,14 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.Web", "SMAPI.Web\SMAP
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SMAPI.Web.LegacyRedirects", "SMAPI.Web.LegacyRedirects\SMAPI.Web.LegacyRedirects.csproj", "{159AA5A5-35C2-488C-B23F-1613C80594AE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SMAPI", "SMAPI\SMAPI.csproj", "{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SMAPI.Mods.VirtualKeyboard", "SMAPI.Mods.VirtualKeyboard\SMAPI.Mods.VirtualKeyboard.csproj", "{29CCE9C9-6811-415D-A681-A6D47073924D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SharedMSBuildProjectFiles) = preSolution
|
||||
SMAPI.Internal\SMAPI.Internal.projitems*{0ed5ead8-5d85-420d-8101-6d8ccce29c9b}*SharedItemsImports = 4
|
||||
SMAPI.Internal\SMAPI.Internal.projitems*{85208f8d-6fd1-4531-be05-7142490f59fe}*SharedItemsImports = 13
|
||||
SMAPI.Internal\SMAPI.Internal.projitems*{9ef11e43-1701-4396-8835-8392d57abb70}*SharedItemsImports = 4
|
||||
SMAPI.Internal\SMAPI.Internal.projitems*{c11d0afb-2893-41a9-ad55-d002f032d6ad}*SharedItemsImports = 4
|
||||
SMAPI.Internal\SMAPI.Internal.projitems*{ebd13eab-e70b-4d9f-92c2-c34a21e1fa32}*SharedItemsImports = 4
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -101,10 +90,6 @@ Global
|
|||
{AA95884B-7097-476E-92C8-D0500DE9D6D1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{AA95884B-7097-476E-92C8-D0500DE9D6D1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{AA95884B-7097-476E-92C8-D0500DE9D6D1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{E6DA2198-7686-4F1D-B312-4A4DC70884C0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E6DA2198-7686-4F1D-B312-4A4DC70884C0}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E6DA2198-7686-4F1D-B312-4A4DC70884C0}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{E6DA2198-7686-4F1D-B312-4A4DC70884C0}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0A9BB24F-15FF-4C26-B1A2-81F7AE316518}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0A9BB24F-15FF-4C26-B1A2-81F7AE316518}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0A9BB24F-15FF-4C26-B1A2-81F7AE316518}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
|
@ -141,19 +126,22 @@ Global
|
|||
{159AA5A5-35C2-488C-B23F-1613C80594AE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{159AA5A5-35C2-488C-B23F-1613C80594AE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{159AA5A5-35C2-488C-B23F-1613C80594AE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{29CCE9C9-6811-415D-A681-A6D47073924D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{29CCE9C9-6811-415D-A681-A6D47073924D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{29CCE9C9-6811-415D-A681-A6D47073924D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{29CCE9C9-6811-415D-A681-A6D47073924D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(NestedProjects) = preSolution
|
||||
{4B1CEB70-F756-4A57-AAE8-8CD78C475F25} = {86C452BE-D2D8-45B4-B63F-E329EB06CEDA}
|
||||
{F4453AB6-D7D6-447F-A973-956CC777968F} = {4B1CEB70-F756-4A57-AAE8-8CD78C475F25}
|
||||
{09CF91E5-5BAB-4650-A200-E5EA9A633046} = {86C452BE-D2D8-45B4-B63F-E329EB06CEDA}
|
||||
{EB35A917-67B9-4EFA-8DFC-4FB49B3949BB} = {86C452BE-D2D8-45B4-B63F-E329EB06CEDA}
|
||||
{5947303D-3512-413A-9009-7AC43F5D3513} = {EB35A917-67B9-4EFA-8DFC-4FB49B3949BB}
|
||||
{85208F8D-6FD1-4531-BE05-7142490F59FE} = {82D22ED7-A0A7-4D64-8E92-4B6A5E74ED11}
|
||||
{680B2641-81EA-467C-86A5-0E81CDC57ED0} = {82D22ED7-A0A7-4D64-8E92-4B6A5E74ED11}
|
||||
{AA95884B-7097-476E-92C8-D0500DE9D6D1} = {82D22ED7-A0A7-4D64-8E92-4B6A5E74ED11}
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {70143042-A862-47A8-A677-7C819DDC90DC}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace StardewModdingAPI
|
|||
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("3.1.0");
|
||||
|
||||
/// <summary>Android SMAPI's current semantic version.</summary>
|
||||
public static ISemanticVersion AndroidApiVersion { get; } = new Toolkit.SemanticVersion("0.9.2");
|
||||
public static ISemanticVersion AndroidApiVersion { get; } = new Toolkit.SemanticVersion("3.1.0-experimental");
|
||||
|
||||
/// <summary>The minimum supported version of Stardew Valley.</summary>
|
||||
public static ISemanticVersion MinimumGameVersion { get; } = new GameVersion("1.4.0");
|
||||
|
@ -164,8 +164,7 @@ namespace StardewModdingAPI
|
|||
typeof(MonoMod.Utils.Platform).Assembly,
|
||||
typeof(Harmony.HarmonyPatch).Assembly,
|
||||
typeof(Mono.Cecil.MethodDefinition).Assembly,
|
||||
typeof(Microsoft.Xna.Framework.Vector2).Assembly,
|
||||
typeof(StardewModdingAPI.IManifest).Assembly
|
||||
typeof(StardewModdingAPI.IManifest).Assembly,
|
||||
};
|
||||
break;
|
||||
|
||||
|
|
|
@ -48,9 +48,6 @@ namespace StardewModdingAPI.Framework
|
|||
/// <summary>Whether the content coordinator has been disposed.</summary>
|
||||
private bool IsDisposed;
|
||||
|
||||
/// <summary>A callback to invoke the first time *any* game content manager loads an asset.</summary>
|
||||
private readonly Action OnLoadingFirstAsset;
|
||||
|
||||
|
||||
/*********
|
||||
** Accessors
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Content;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
@ -32,6 +34,9 @@ namespace StardewModdingAPI.Framework.ContentManagers
|
|||
/// <summary>The language code for language-agnostic mod assets.</summary>
|
||||
private readonly LanguageCode DefaultLanguage = Constants.DefaultLanguage;
|
||||
|
||||
/// <summary>Reflector used to access xnbs on Android.
|
||||
private readonly Reflector Reflector;
|
||||
|
||||
|
||||
/*********
|
||||
** Public methods
|
||||
|
@ -52,6 +57,7 @@ namespace StardewModdingAPI.Framework.ContentManagers
|
|||
{
|
||||
this.GameContentManager = gameContentManager;
|
||||
this.JsonHelper = jsonHelper;
|
||||
this.Reflector = reflection;
|
||||
}
|
||||
|
||||
/// <summary>Load an asset that has been processed by the content pipeline.</summary>
|
||||
|
@ -124,11 +130,9 @@ namespace StardewModdingAPI.Framework.ContentManagers
|
|||
{
|
||||
this.NormalizeTilesheetPaths(map);
|
||||
this.FixCustomTilesheetPaths(map, relativeMapPath: assetName);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return this.ModedLoad<T>(relativePath, language);
|
||||
break;
|
||||
return this.ModedLoad<T>(assetName, language);
|
||||
|
||||
// unpacked data
|
||||
case ".json":
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace StardewModdingAPI.Framework.Models
|
|||
false,
|
||||
#endif
|
||||
[nameof(UseBetaChannel)] = Constants.ApiVersion.IsPrerelease(),
|
||||
[nameof(GitHubProjectName)] = "Pathoschild/SMAPI",
|
||||
[nameof(GitHubProjectName)] = "MartyrPher/SMAPI-Android-Installer",
|
||||
[nameof(WebApiBaseUrl)] = "https://smapi.io/api/",
|
||||
[nameof(VerboseLogging)] = false,
|
||||
[nameof(LogNetworkTraffic)] = false
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Microsoft.Xna.Framework.Graphics;
|
||||
|
@ -9,9 +10,9 @@ namespace StardewModdingAPI.Framework.RewriteFacades
|
|||
public class IClickableMenuMethods : IClickableMenu
|
||||
{
|
||||
[SuppressMessage("ReSharper", "CS0109", Justification = "The 'new' modifier applies when compiled on Windows.")]
|
||||
public static new void drawHoverText(SpriteBatch b, string text, SpriteFont font, int xOffset = 0, int yOffset = 0, int moneyAmounttoDisplayAtBottom = -1, string boldTitleText = null, int healAmountToDisplay = -1, string[] buffIconsToDsiplay = null, Item hoveredItem = null, int currencySymbol = 0, int extraItemToShowIndex = -1, int extraItemToShowAmount = -1, int overideX = -1, int overrideY = -1, float alpha = 1, CraftingRecipe craftingIngrediants = null)
|
||||
public static new void drawHoverText(SpriteBatch b, string text, SpriteFont font, int xOffset = 0, int yOffset = 0, int moneyAmounttoDisplayAtBottom = -1, string boldTitleText = null, int healAmountToDisplay = -1, string[] buffIconsToDsiplay = null, Item hoveredItem = null, int currencySymbol = 0, int extraItemToShowIndex = -1, int extraItemToShowAmount = -1, int overideX = -1, int overrideY = -1, float alpha = 1, CraftingRecipe craftingIngrediants = null, IList<Item> additional_craft_materials = null)
|
||||
{
|
||||
drawHoverText(b, text, font, xOffset, yOffset, moneyAmounttoDisplayAtBottom, boldTitleText, healAmountToDisplay, buffIconsToDsiplay, hoveredItem, currencySymbol, extraItemToShowIndex, extraItemToShowAmount, overideX, overrideY, alpha, craftingIngrediants, -1, 80, -1);
|
||||
drawHoverText(b, text, font, xOffset, yOffset, moneyAmounttoDisplayAtBottom, boldTitleText, healAmountToDisplay, buffIconsToDsiplay, hoveredItem, currencySymbol, extraItemToShowIndex, extraItemToShowAmount, overideX, overrideY, alpha, craftingIngrediants, -1, 80, -1, additional_craft_materials);
|
||||
}
|
||||
[SuppressMessage("ReSharper", "CS0109", Justification = "The 'new' modifier applies when compiled on Windows.")]
|
||||
public static new void drawTextureBox(SpriteBatch b, Texture2D texture, Microsoft.Xna.Framework.Rectangle sourceRect, int x, int y, int width, int height, Color color)
|
||||
|
@ -28,6 +29,15 @@ namespace StardewModdingAPI.Framework.RewriteFacades
|
|||
{
|
||||
drawTextureBox(b, texture, sourceRect, x, y, width, height, color, scale, drawShadow, false);
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "CS0109", Justification = "The 'new' modifier applies when compiled on Windows.")]
|
||||
public new void drawHorizontalPartition(SpriteBatch b, int yPosition, bool small = false, int red = -1, int green = -1, int blue = -1)
|
||||
{
|
||||
this.drawMobileHorizontalPartition(b, 0, yPosition, 64, small);
|
||||
}
|
||||
[SuppressMessage("ReSharper", "CS0109", Justification = "The 'new' modifier applies when compiled on Windows.")]
|
||||
public new void drawVerticalUpperIntersectingPartition(SpriteBatch b, int xPosition, int partitionHeight, int red = -1, int green = -1, int blue = -1)
|
||||
{
|
||||
this.drawVerticalUpperIntersectingPartition(b, xPosition, partitionHeight);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,11 +8,6 @@ namespace StardewModdingAPI.Framework.RewriteFacades
|
|||
{
|
||||
public class NPCMethods : NPC
|
||||
{
|
||||
public Dictionary<int, SchedulePathDescription> getSchedule(int dayOfMonth)
|
||||
{
|
||||
return base.getSchedule(dayOfMonth, Game1.emergencyLoading);
|
||||
}
|
||||
|
||||
public void checkSchedule(int timeOfDay)
|
||||
{
|
||||
base.checkSchedule(timeOfDay, Game1.emergencyLoading);
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
using System.Diagnostics.CodeAnalysis;
|
||||
using StardewValley;
|
||||
|
||||
namespace StardewModdingAPI.Framework.RewriteFacades
|
||||
{
|
||||
public class UtilityMethods : Utility
|
||||
{
|
||||
[SuppressMessage("ReSharper", "CS0109", Justification = "The 'new' modifier applies when compiled on Windows.")]
|
||||
public static new void trashItem(Item item)
|
||||
{
|
||||
trashItem(item, -1);
|
||||
}
|
||||
|
||||
[SuppressMessage("ReSharper", "CS0109", Justification = "The 'new' modifier applies when compiled on Windows.")]
|
||||
public static new int getTrashReclamationPrice(Item item, Farmer player)
|
||||
{
|
||||
return getTrashReclamationPrice(item, player, -1);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -171,7 +171,7 @@ namespace StardewModdingAPI.Framework
|
|||
this.ConsoleManager.OnMessageIntercepted += message => this.HandleConsoleMessage(this.MonitorForGame, message);
|
||||
|
||||
// init logging
|
||||
this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} on {Constants.Platform} ({EnvironmentUtility.GetFriendlyPlatformName(Constants.Platform)})", LogLevel.Info);
|
||||
//this.Monitor.Log($"SMAPI {Constants.ApiVersion} with Stardew Valley {Constants.GameVersion} on {Constants.Platform} ({EnvironmentUtility.GetFriendlyPlatformName(Constants.Platform)})", LogLevel.Info);
|
||||
this.Monitor.Log($"MartyrPher's Android SMAPI Loader: {Constants.AndroidApiVersion} on Android: {Android.OS.Build.VERSION.Sdk}", LogLevel.Info);
|
||||
this.Monitor.Log($"Mods go here: {modsPath}");
|
||||
if (modsPath != Constants.DefaultModsPath)
|
||||
|
@ -213,6 +213,7 @@ namespace StardewModdingAPI.Framework
|
|||
JsonConverter[] converters = {
|
||||
new ColorConverter(),
|
||||
new PointConverter(),
|
||||
new Vector2Converter(),
|
||||
new RectangleConverter()
|
||||
};
|
||||
foreach (JsonConverter converter in converters)
|
||||
|
@ -248,17 +249,15 @@ namespace StardewModdingAPI.Framework
|
|||
logNetworkTraffic: this.Settings.LogNetworkTraffic
|
||||
);
|
||||
this.Translator.SetLocale(this.GameInstance.ContentCore.GetLocale(), this.GameInstance.ContentCore.Language);
|
||||
SGame.ConstructorHack = new SGameConstructorHack(this.Monitor, this.Reflection, this.Toolkit.JsonHelper, this.InitialiseBeforeFirstAssetLoaded);
|
||||
this.GameInstance = new SGame(this.Monitor, this.MonitorForGame, this.Reflection, this.EventManager, this.Toolkit.JsonHelper, this.ModRegistry, SCore.DeprecationManager, this.OnLocaleChanged, this.InitialiseAfterGameStart, this.Dispose);
|
||||
StardewValley.Program.gamePtr = this.GameInstance;
|
||||
|
||||
// apply game patches
|
||||
new GamePatcher(this.Monitor).Apply(
|
||||
new EventErrorPatch(this.MonitorForGame),
|
||||
new DialogueErrorPatch(this.MonitorForGame, this.Reflection),
|
||||
//new DialogueErrorPatch(this.MonitorForGame, this.Reflection),
|
||||
new ObjectErrorPatch(),
|
||||
new LoadContextPatch(this.Reflection, this.GameInstance.OnLoadStageChanged),
|
||||
new LoadErrorPatch(this.Monitor, this.GameInstance.OnSaveContentRemoved)
|
||||
new LoadErrorPatch(this.Monitor, this.GameInstance.OnSaveContentRemoved),
|
||||
new SaveBackupPatch(this.EventManager)
|
||||
);
|
||||
|
||||
|
@ -289,7 +288,7 @@ namespace StardewModdingAPI.Framework
|
|||
catch (Exception ex)
|
||||
{
|
||||
this.Monitor.Log($"SMAPI failed to initialize: {ex.GetLogSummary()}", LogLevel.Error);
|
||||
this.PressAnyKeyToExit();
|
||||
//this.PressAnyKeyToExit();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -332,8 +331,8 @@ namespace StardewModdingAPI.Framework
|
|||
this.Monitor.VerboseLog("Verbose logging enabled.");
|
||||
|
||||
// update window titles
|
||||
this.GameInstance.Window.Title = $"Stardew Valley {Constants.GameVersion} - running SMAPI {Constants.ApiVersion}";
|
||||
Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Constants.GameVersion}";
|
||||
//this.GameInstance.Window.Title = $"Stardew Valley {Constants.GameVersion} - running SMAPI {Constants.ApiVersion}";
|
||||
//Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Constants.GameVersion}";
|
||||
|
||||
// start game
|
||||
this.Monitor.Log("Starting game...", LogLevel.Debug);
|
||||
|
@ -412,11 +411,6 @@ namespace StardewModdingAPI.Framework
|
|||
this.Monitor.Log("SMAPI shutting down: aborting initialization.", LogLevel.Warn);
|
||||
return;
|
||||
}
|
||||
if (this.Monitor.IsExiting)
|
||||
{
|
||||
this.Monitor.Log("SMAPI shutting down: aborting initialisation.", LogLevel.Warn);
|
||||
return;
|
||||
}
|
||||
|
||||
this.GameInstance.IsGameSuspended = true;
|
||||
new Thread(() =>
|
||||
|
@ -450,17 +444,26 @@ namespace StardewModdingAPI.Framework
|
|||
|
||||
// load mods
|
||||
resolver.ValidateManifests(mods, Constants.ApiVersion, toolkit.GetUpdateUrl);
|
||||
mods = resolver.ProcessDependencies(mods, modDatabase).ToArray();
|
||||
//mods = resolver.ProcessDependencies(mods, modDatabase).ToArray();
|
||||
this.LoadMods(mods, this.Toolkit.JsonHelper, this.ContentCore, modDatabase);
|
||||
|
||||
// check for updates
|
||||
this.CheckForUpdatesAsync(mods);
|
||||
}
|
||||
|
||||
// prepare console since the console loop is disabled
|
||||
this.Monitor.Log("Type 'help' for help, or 'help <cmd>' for a command's usage", LogLevel.Info);
|
||||
this.GameInstance.CommandManager.Add(null, "help", "Lists command documentation.\n\nUsage: help\nLists all available commands.\n\nUsage: help <cmd>\n- cmd: The name of a command whose documentation to display.", this.HandleCommand);
|
||||
this.GameInstance.CommandManager.Add(null, "reload_i18n", "Reloads translation files for all mods.\n\nUsage: reload_i18n", this.HandleCommand);
|
||||
|
||||
// update window titles
|
||||
int modsLoaded = this.ModRegistry.GetAll().Count();
|
||||
//this.GameInstance.Window.Title = $"Stardew Valley {Constants.GameVersion} - running SMAPI {Constants.ApiVersion} with {modsLoaded} mods";
|
||||
//Console.Title = $"SMAPI {Constants.ApiVersion} - running Stardew Valley {Constants.GameVersion} with {modsLoaded} mods";
|
||||
|
||||
SGameConsole.Instance.isVisible = false;
|
||||
this.GameInstance.IsGameSuspended = false;
|
||||
}).Start();
|
||||
}
|
||||
|
||||
/// <summary>Initialize SMAPI and mods after the game starts.</summary>
|
||||
|
|
|
@ -99,8 +99,6 @@ namespace StardewModdingAPI.Framework
|
|||
/// <summary>Propagates notification that SMAPI should exit.</summary>
|
||||
private readonly CancellationTokenSource CancellationToken;
|
||||
|
||||
/// <summary>A callback to invoke the first time *any* game content manager loads an asset.</summary>
|
||||
private readonly Action OnLoadingFirstAsset;
|
||||
|
||||
/****
|
||||
** Game state
|
||||
|
@ -144,6 +142,7 @@ namespace StardewModdingAPI.Framework
|
|||
public ConcurrentQueue<string> CommandQueue { get; } = new ConcurrentQueue<string>();
|
||||
|
||||
public static SGame instance;
|
||||
|
||||
/// <summary>Asset interceptors added or removed since the last tick.</summary>
|
||||
private readonly List<AssetInterceptorChange> ReloadAssetInterceptorsQueue = new List<AssetInterceptorChange>();
|
||||
|
||||
|
@ -319,12 +318,6 @@ namespace StardewModdingAPI.Framework
|
|||
if (!this.IsAfterInitialize)
|
||||
this.IsAfterInitialize = true;
|
||||
|
||||
if (Game1.graphics.GraphicsDevice != null)
|
||||
{
|
||||
this.Reflection.GetMethod(this, "_updateAudioEngine").Invoke();
|
||||
this.Reflection.GetMethod(this, "_updateOptionsAndToggleFullScreen").Invoke();
|
||||
this.Reflection.GetMethod(this, "_updateInput").Invoke();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -368,7 +361,7 @@ namespace StardewModdingAPI.Framework
|
|||
bool saveParsed = false;
|
||||
if (Game1.currentLoader != null)
|
||||
{
|
||||
this.Monitor.Log("Game loader synchronizing...", LogLevel.Trace);
|
||||
//this.Monitor.Log("Game loader synchronizing...", LogLevel.Trace);
|
||||
while (Game1.currentLoader?.MoveNext() == true)
|
||||
{
|
||||
// raise load stage changed
|
||||
|
@ -692,16 +685,19 @@ namespace StardewModdingAPI.Framework
|
|||
*********/
|
||||
if (state.ActiveMenu.IsChanged)
|
||||
{
|
||||
IClickableMenu was = this.Watchers.ActiveMenuWatcher.PreviousValue;
|
||||
IClickableMenu now = this.Watchers.ActiveMenuWatcher.CurrentValue;
|
||||
|
||||
if (this.Monitor.IsVerbose)
|
||||
this.Monitor.Log($"Context: menu changed from {state.ActiveMenu.Old?.GetType().FullName ?? "none"} to {state.ActiveMenu.New?.GetType().FullName ?? "none"}.", LogLevel.Trace);
|
||||
|
||||
// raise menu events
|
||||
int forSaleCount = 0;
|
||||
Dictionary<Item, int[]> itemPriceAndStock;
|
||||
Dictionary<ISalable, int[]> itemPriceAndStock;
|
||||
List<Item> forSale;
|
||||
if (now is ShopMenu shop && !(was is ShopMenu))
|
||||
{
|
||||
itemPriceAndStock = this.Reflection.GetField<Dictionary<Item, int[]>>(shop, "itemPriceAndStock").GetValue();
|
||||
itemPriceAndStock = this.Reflection.GetField<Dictionary<ISalable, int[]>>(shop, "itemPriceAndStock").GetValue();
|
||||
forSale = this.Reflection.GetField<List<Item>>(shop, "forSale").GetValue();
|
||||
forSaleCount = forSale.Count;
|
||||
}
|
||||
|
@ -722,7 +718,7 @@ namespace StardewModdingAPI.Framework
|
|||
}
|
||||
else if (now is ShopMenu shopMenu && !(was is ShopMenu))
|
||||
{
|
||||
itemPriceAndStock = this.Reflection.GetField<Dictionary<Item, int[]>>(shopMenu, "itemPriceAndStock").GetValue();
|
||||
itemPriceAndStock = this.Reflection.GetField<Dictionary<ISalable, int[]>>(shopMenu, "itemPriceAndStock").GetValue();
|
||||
forSale = this.Reflection.GetField<List<Item>>(shopMenu, "forSale").GetValue();
|
||||
if (forSaleCount != forSale.Count)
|
||||
{
|
||||
|
@ -904,7 +900,7 @@ namespace StardewModdingAPI.Framework
|
|||
/// <param name="gameTime">A snapshot of the game timing state.</param>
|
||||
/// <param name="target_screen">The render target, if any.</param>
|
||||
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "copied from game code as-is")]
|
||||
protected override void _draw(GameTime gameTime, RenderTarget2D target_screen)
|
||||
protected override void _draw(GameTime gameTime, RenderTarget2D target_screen, RenderTarget2D toBuffer = null)
|
||||
{
|
||||
Context.IsInDrawLoop = true;
|
||||
try
|
||||
|
@ -942,7 +938,7 @@ namespace StardewModdingAPI.Framework
|
|||
Game1.spriteBatch.End();
|
||||
return;
|
||||
}
|
||||
this.DrawImpl(gameTime);
|
||||
this.DrawImpl(gameTime, target_screen, toBuffer);
|
||||
this.DrawCrashTimer.Reset();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -988,7 +984,7 @@ namespace StardewModdingAPI.Framework
|
|||
[SuppressMessage("ReSharper", "RedundantTypeArgumentsOfMethod", Justification = "copied from game code as-is")]
|
||||
[SuppressMessage("SMAPI.CommonErrors", "AvoidNetField", Justification = "copied from game code as-is")]
|
||||
[SuppressMessage("SMAPI.CommonErrors", "AvoidImplicitNetFieldCast", Justification = "copied from game code as-is")]
|
||||
private void DrawImpl(GameTime gameTime, RenderTarget2D toBuffer = null)
|
||||
private void DrawImpl(GameTime gameTime, RenderTarget2D target_screen, RenderTarget2D toBuffer = null)
|
||||
{
|
||||
var events = this.Events;
|
||||
if (skipNextDrawCall)
|
||||
|
@ -1000,7 +996,6 @@ namespace StardewModdingAPI.Framework
|
|||
IReflectedField<bool> _drawActiveClickableMenu = this.Reflection.GetField<bool>(this, "_drawActiveClickableMenu");
|
||||
IReflectedField<string> _spriteBatchBeginNextID = this.Reflection.GetField<string>(typeof(Game1), "_spriteBatchBeginNextID");
|
||||
IReflectedField<bool> _drawHUD = this.Reflection.GetField<bool>(this, "_drawHUD");
|
||||
IReflectedField<Color> bgColor = this.Reflection.GetField<Color>(this, "bgColor");
|
||||
IReflectedField<List<Farmer>> _farmerShadows = this.Reflection.GetField<List<Farmer>>(this, "_farmerShadows");
|
||||
IReflectedField<StringBuilder> _debugStringBuilder = this.Reflection.GetField<StringBuilder>(typeof(Game1), "_debugStringBuilder");
|
||||
IReflectedField<BlendState> lightingBlend = this.Reflection.GetField<BlendState>(this, "lightingBlend");
|
||||
|
@ -1026,27 +1021,23 @@ namespace StardewModdingAPI.Framework
|
|||
|
||||
_drawHUD.SetValue(false);
|
||||
_drawActiveClickableMenu.SetValue(false);
|
||||
Game1.showingHealthBar = false;
|
||||
if (_newDayTask != null)
|
||||
{
|
||||
base.GraphicsDevice.Clear(bgColor.GetValue());
|
||||
if (Game1.showInterDayScroll)
|
||||
{
|
||||
Matrix value = Matrix.CreateScale(1f);
|
||||
Game1.spriteBatch.Begin(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, new Matrix?(value));
|
||||
SpriteText.drawStringWithScrollCenteredAt(Game1.spriteBatch, Game1.content.LoadString("Strings\\UI:please_wait"), base.GraphicsDevice.Viewport.Width / 2, base.GraphicsDevice.Viewport.Height / 2, "", 1f, -1, 0, 0.088f, false);
|
||||
Game1.spriteBatch.End();
|
||||
}
|
||||
base.GraphicsDevice.Clear(Game1.bgColor);
|
||||
if (!Game1.showInterDayScroll)
|
||||
return;
|
||||
this.DrawSavingDotDotDot();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (options.zoomLevel != 1f)
|
||||
if (target_screen != null && toBuffer == null)
|
||||
{
|
||||
base.GraphicsDevice.SetRenderTarget(this.screen);
|
||||
this.GraphicsDevice.SetRenderTarget(target_screen);
|
||||
}
|
||||
if (this.IsSaving)
|
||||
{
|
||||
base.GraphicsDevice.Clear(bgColor.GetValue());
|
||||
base.GraphicsDevice.Clear(Game1.bgColor);
|
||||
this.renderScreenBuffer(BlendState.Opaque, toBuffer);
|
||||
if (activeClickableMenu != null)
|
||||
{
|
||||
|
@ -1059,23 +1050,14 @@ namespace StardewModdingAPI.Framework
|
|||
try
|
||||
{
|
||||
events.RenderingActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPreRenderGuiEvent.Raise();
|
||||
#endif
|
||||
Game1.activeClickableMenu.draw(Game1.spriteBatch);
|
||||
events.RenderedActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderGuiEvent.Raise();
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
this.Monitor.Log($"The {Game1.activeClickableMenu.GetType().FullName} menu crashed while drawing itself during save. SMAPI will force it to exit to avoid crashing the game.\n{ex.GetLogSummary()}", LogLevel.Error);
|
||||
Game1.activeClickableMenu.exitThisMenu();
|
||||
}
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
_spriteBatchEnd.Invoke();
|
||||
RestoreViewportAndZoom();
|
||||
}
|
||||
|
@ -1088,14 +1070,8 @@ namespace StardewModdingAPI.Framework
|
|||
try
|
||||
{
|
||||
events.RenderingActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPreRenderGuiEvent.Raise();
|
||||
#endif
|
||||
Game1.activeClickableMenu.draw(Game1.spriteBatch);
|
||||
events.RenderedActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderGuiEvent.Raise();
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1103,9 +1079,6 @@ namespace StardewModdingAPI.Framework
|
|||
Game1.activeClickableMenu.exitThisMenu();
|
||||
}
|
||||
events.Rendered.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
|
||||
_spriteBatchEnd.Invoke();
|
||||
RestoreViewportAndZoom();
|
||||
|
@ -1124,8 +1097,8 @@ namespace StardewModdingAPI.Framework
|
|||
}
|
||||
else
|
||||
{
|
||||
base.GraphicsDevice.Clear(bgColor.GetValue());
|
||||
if (activeClickableMenu != null && options.showMenuBackground && activeClickableMenu.showWithoutTransparencyIfOptionIsSet())
|
||||
base.GraphicsDevice.Clear(Game1.bgColor);
|
||||
if (activeClickableMenu != null && options.showMenuBackground && (activeClickableMenu.showWithoutTransparencyIfOptionIsSet() && !this.takingMapScreenshot))
|
||||
{
|
||||
Matrix value = Matrix.CreateScale(1f);
|
||||
SetSpriteBatchBeginNextID("C");
|
||||
|
@ -1135,15 +1108,10 @@ namespace StardewModdingAPI.Framework
|
|||
{
|
||||
Game1.activeClickableMenu.drawBackground(Game1.spriteBatch);
|
||||
events.RenderingActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPreRenderGuiEvent.Raise();
|
||||
#endif
|
||||
|
||||
Game1.activeClickableMenu.drawBackground(Game1.spriteBatch);
|
||||
Game1.activeClickableMenu.draw(Game1.spriteBatch);
|
||||
events.RenderedActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderGuiEvent.Raise();
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1151,9 +1119,6 @@ namespace StardewModdingAPI.Framework
|
|||
Game1.activeClickableMenu.exitThisMenu();
|
||||
}
|
||||
events.Rendered.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
|
||||
_spriteBatchEnd.Invoke();
|
||||
this.drawOverlays(spriteBatch);
|
||||
|
@ -1199,9 +1164,6 @@ namespace StardewModdingAPI.Framework
|
|||
spriteBatch.DrawString(dialogueFont, content.LoadString("Strings\\StringsFromCSFiles:Game1.cs.3686"), new Vector2(16f, 32f), new Color(0, 255, 0));
|
||||
spriteBatch.DrawString(dialogueFont, parseText(errorMessage, dialogueFont, graphics.GraphicsDevice.Viewport.Width), new Vector2(16f, 48f), Color.White);
|
||||
events.Rendered.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
|
||||
_spriteBatchEnd.Invoke();
|
||||
return;
|
||||
|
@ -1217,7 +1179,7 @@ namespace StardewModdingAPI.Framework
|
|||
_spriteBatchEnd.Invoke();
|
||||
}
|
||||
this.drawOverlays(spriteBatch);
|
||||
this.renderScreenBuffer(BlendState.AlphaBlend, null);
|
||||
this.renderScreenBufferTargetScreen(target_screen);
|
||||
if (currentMinigame is FishingGame && activeClickableMenu != null)
|
||||
{
|
||||
SetSpriteBatchBeginNextID("A-A");
|
||||
|
@ -1264,14 +1226,8 @@ namespace StardewModdingAPI.Framework
|
|||
try
|
||||
{
|
||||
events.RenderingActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPreRenderGuiEvent.Raise();
|
||||
#endif
|
||||
Game1.activeClickableMenu.draw(Game1.spriteBatch);
|
||||
events.RenderedActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderGuiEvent.Raise();
|
||||
#endif
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
@ -1281,9 +1237,6 @@ namespace StardewModdingAPI.Framework
|
|||
}
|
||||
|
||||
events.Rendered.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
|
||||
_spriteBatchEnd.Invoke();
|
||||
this.drawOverlays(spriteBatch);
|
||||
|
@ -1295,12 +1248,8 @@ namespace StardewModdingAPI.Framework
|
|||
DrawLoadingDotDotDot.Invoke(gameTime);
|
||||
events.Rendered.RaiseEmpty();
|
||||
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
|
||||
this.drawOverlays(spriteBatch);
|
||||
this.renderScreenBuffer(BlendState.AlphaBlend, toBuffer);
|
||||
this.renderScreenBufferTargetScreen(target_screen);
|
||||
if (overlayMenu != null)
|
||||
{
|
||||
SetSpriteBatchBeginNextID("H");
|
||||
|
@ -1340,33 +1289,42 @@ namespace StardewModdingAPI.Framework
|
|||
if (++batchOpens == 1)
|
||||
events.Rendering.RaiseEmpty();
|
||||
spriteBatch.Draw(staminaRect, lightmap.Bounds, currentLocation.Name.StartsWith("UndergroundMine") ? mine.getLightingColor(gameTime) : (ambientLight.Equals(Color.White) || RainManager.Instance.isRaining && (bool)((NetFieldBase<bool, NetBool>)Game1.currentLocation.isOutdoors) ? Game1.outdoorLight : Game1.ambientLight));
|
||||
for (int i = 0; i < currentLightSources.Count; i++)
|
||||
foreach (LightSource currentLightSource in currentLightSources)
|
||||
{
|
||||
if (Utility.isOnScreen((Vector2)((NetFieldBase<Vector2, NetVector2>)Game1.currentLightSources.ElementAt<LightSource>(i).position), (int)((double)(float)((NetFieldBase<float, NetFloat>)Game1.currentLightSources.ElementAt<LightSource>(i).radius) * 64.0 * 4.0)))
|
||||
if (!RainManager.Instance.isRaining && !Game1.isDarkOut() || currentLightSource.lightContext.Value != LightSource.LightContext.WindowLight)
|
||||
{
|
||||
if (currentLightSource.PlayerID != 0L && currentLightSource.PlayerID != Game1.player.UniqueMultiplayerID)
|
||||
{
|
||||
Farmer farmerMaybeOffline = Game1.getFarmerMaybeOffline(currentLightSource.PlayerID);
|
||||
if (farmerMaybeOffline == null || farmerMaybeOffline.currentLocation != null && farmerMaybeOffline.currentLocation.Name != Game1.currentLocation.Name || (bool) ((NetFieldBase<bool, NetBool>) farmerMaybeOffline.hidden))
|
||||
continue;
|
||||
}
|
||||
}
|
||||
if (Utility.isOnScreen((Vector2)((NetFieldBase<Vector2, NetVector2>)currentLightSource.position), (int)((double)(float)((NetFieldBase<float, NetFloat>)currentLightSource.radius) * 64.0 * 4.0)))
|
||||
{
|
||||
SpriteBatch spriteBatch = Game1.spriteBatch;
|
||||
Texture2D lightTexture = Game1.currentLightSources.ElementAt<LightSource>(i).lightTexture;
|
||||
Vector2 position = Game1.GlobalToLocal(Game1.viewport, (Vector2)((NetFieldBase<Vector2, NetVector2>)Game1.currentLightSources.ElementAt<LightSource>(i).position)) / (float)(Game1.options.lightingQuality / 2);
|
||||
Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(Game1.currentLightSources.ElementAt<LightSource>(i).lightTexture.Bounds);
|
||||
Color color = (Color)((NetFieldBase<Color, NetColor>)Game1.currentLightSources.ElementAt<LightSource>(i).color);
|
||||
Microsoft.Xna.Framework.Rectangle bounds = Game1.currentLightSources.ElementAt<LightSource>(i).lightTexture.Bounds;
|
||||
Texture2D lightTexture = currentLightSource.lightTexture;
|
||||
Vector2 position = Game1.GlobalToLocal(Game1.viewport, (Vector2)((NetFieldBase<Vector2, NetVector2>)currentLightSource.position)) / (float)(Game1.options.lightingQuality / 2);
|
||||
Microsoft.Xna.Framework.Rectangle? sourceRectangle = new Microsoft.Xna.Framework.Rectangle?(currentLightSource.lightTexture.Bounds);
|
||||
Color color = (Color)((NetFieldBase<Color, NetColor>)currentLightSource.color);
|
||||
Microsoft.Xna.Framework.Rectangle bounds = currentLightSource.lightTexture.Bounds;
|
||||
double x = (double)bounds.Center.X;
|
||||
bounds = Game1.currentLightSources.ElementAt<LightSource>(i).lightTexture.Bounds;
|
||||
bounds = currentLightSource.lightTexture.Bounds;
|
||||
double y = (double)bounds.Center.Y;
|
||||
Vector2 origin = new Vector2((float)x, (float)y);
|
||||
double num = (double)(float)((NetFieldBase<float, NetFloat>)Game1.currentLightSources.ElementAt<LightSource>(i).radius) / (double)(Game1.options.lightingQuality / 2);
|
||||
double num = (double)(float)((NetFieldBase<float, NetFloat>)currentLightSource.radius) / (double)(Game1.options.lightingQuality / 2);
|
||||
|
||||
spriteBatch.Draw(lightTexture, position, sourceRectangle, color, 0.0f, origin, (float) num, SpriteEffects.None, 0.9f);
|
||||
}
|
||||
}
|
||||
_spriteBatchEnd.Invoke();
|
||||
base.GraphicsDevice.SetRenderTarget((options.zoomLevel == 1f) ? null : this.screen);
|
||||
base.GraphicsDevice.SetRenderTarget(target_screen);
|
||||
}
|
||||
if (bloomDay && bloom != null)
|
||||
{
|
||||
bloom.BeginDraw();
|
||||
}
|
||||
base.GraphicsDevice.Clear(bgColor.GetValue());
|
||||
base.GraphicsDevice.Clear(Game1.bgColor);
|
||||
SetSpriteBatchBeginNextID("L");
|
||||
_spriteBatchBegin.Invoke(SpriteSortMode.Deferred, BlendState.AlphaBlend, SamplerState.PointClamp, null, null, null, null);
|
||||
if (++batchOpens == 1)
|
||||
|
@ -1910,9 +1868,6 @@ label_168:
|
|||
{
|
||||
_drawActiveClickableMenu.SetValue(true);
|
||||
events.RenderingActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPreRenderGuiEvent.Raise();
|
||||
#endif
|
||||
if (activeClickableMenu is CarpenterMenu)
|
||||
{
|
||||
((CarpenterMenu)activeClickableMenu).DrawPlacementSquares(spriteBatch);
|
||||
|
@ -1926,9 +1881,6 @@ label_168:
|
|||
activeClickableMenu.draw(spriteBatch);
|
||||
}
|
||||
events.RenderedActiveMenu.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderGuiEvent.Raise();
|
||||
#endif
|
||||
}
|
||||
else if (farmEvent != null)
|
||||
{
|
||||
|
@ -1940,9 +1892,6 @@ label_168:
|
|||
SpriteText.drawStringWithScrollBackground(spriteBatch, s, 96, 32);
|
||||
}
|
||||
events.Rendered.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
_spriteBatchEnd.Invoke();
|
||||
this.drawOverlays(spriteBatch);
|
||||
this.renderScreenBuffer(BlendState.Opaque, toBuffer);
|
||||
|
@ -1952,9 +1901,6 @@ label_168:
|
|||
SetSpriteBatchBeginNextID("A-C");
|
||||
SpriteBatchBegin.Invoke(1f);
|
||||
events.RenderingHud.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPreRenderHudEvent.Raise();
|
||||
#endif
|
||||
this.DrawHUD();
|
||||
if (currentLocation != null && !(activeClickableMenu is GameMenu) && !(activeClickableMenu is QuestLog))
|
||||
{
|
||||
|
@ -1962,9 +1908,6 @@ label_168:
|
|||
}
|
||||
DrawAfterMap.Invoke();
|
||||
events.RenderedHud.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderHudEvent.Raise();
|
||||
#endif
|
||||
_spriteBatchEnd.Invoke();
|
||||
if (tutorialManager != null)
|
||||
{
|
||||
|
@ -1989,9 +1932,6 @@ label_168:
|
|||
}
|
||||
SpriteBatchBegin.Invoke(Game1.options.zoomLevel);
|
||||
events.Rendered.RaiseEmpty();
|
||||
#if !SMAPI_3_0_STRICT
|
||||
events.Legacy_OnPostRenderEvent.Raise();
|
||||
#endif
|
||||
_spriteBatchEnd.Invoke();
|
||||
if (_drawHUD.GetValue() && hudMessages.Count > 0 && (!eventUp || isFestival()))
|
||||
{
|
||||
|
|
|
@ -0,0 +1,43 @@
|
|||
using System;
|
||||
using Microsoft.Xna.Framework;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using StardewModdingAPI.Toolkit.Serialization;
|
||||
using StardewModdingAPI.Toolkit.Serialization.Converters;
|
||||
|
||||
namespace StardewModdingAPI.Framework.Serialization
|
||||
{
|
||||
/// <summary>Handles deserialization of <see cref="Vector2"/> for crossplatform compatibility.</summary>
|
||||
/// <remarks>
|
||||
/// - Linux/Mac format: { "X": 1, "Y": 2 }
|
||||
/// - Windows format: "1, 2"
|
||||
/// </remarks>
|
||||
internal class Vector2Converter : SimpleReadOnlyConverter<Vector2>
|
||||
{
|
||||
/*********
|
||||
** Protected methods
|
||||
*********/
|
||||
/// <summary>Read a JSON object.</summary>
|
||||
/// <param name="obj">The JSON object to read.</param>
|
||||
/// <param name="path">The path to the current JSON node.</param>
|
||||
protected override Vector2 ReadObject(JObject obj, string path)
|
||||
{
|
||||
float x = obj.ValueIgnoreCase<float>(nameof(Vector2.X));
|
||||
float y = obj.ValueIgnoreCase<float>(nameof(Vector2.Y));
|
||||
return new Vector2(x, y);
|
||||
}
|
||||
|
||||
/// <summary>Read a JSON string.</summary>
|
||||
/// <param name="str">The JSON string value.</param>
|
||||
/// <param name="path">The path to the current JSON node.</param>
|
||||
protected override Vector2 ReadString(string str, string path)
|
||||
{
|
||||
string[] parts = str.Split(',');
|
||||
if (parts.Length != 2)
|
||||
throw new SParseException($"Can't parse {typeof(Vector2).Name} from invalid value '{str}' (path: {path}).");
|
||||
|
||||
float x = Convert.ToSingle(parts[0]);
|
||||
float y = Convert.ToSingle(parts[1]);
|
||||
return new Vector2(x, y);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -43,8 +43,8 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers
|
|||
public NetListWatcher(NetList<TValue, NetRef<TValue>> field)
|
||||
{
|
||||
this.Field = field;
|
||||
field.OnElementChanged += this.OnElementChanged;
|
||||
field.OnArrayReplaced += this.OnArrayReplaced;
|
||||
//field.OnElementChanged += this.OnElementChanged;
|
||||
//field.OnArrayReplaced += this.OnArrayReplaced;
|
||||
}
|
||||
|
||||
/// <summary>Set the current value as the baseline.</summary>
|
||||
|
@ -65,8 +65,8 @@ namespace StardewModdingAPI.Framework.StateTracking.FieldWatchers
|
|||
{
|
||||
if (!this.IsDisposed)
|
||||
{
|
||||
this.Field.OnElementChanged -= this.OnElementChanged;
|
||||
this.Field.OnArrayReplaced -= this.OnArrayReplaced;
|
||||
//this.Field.OnElementChanged -= this.OnElementChanged;
|
||||
//this.Field.OnArrayReplaced -= this.OnArrayReplaced;
|
||||
}
|
||||
|
||||
base.Dispose();
|
||||
|
|
|
@ -15,9 +15,6 @@ namespace StardewModdingAPI
|
|||
Mac = Platform.Mac,
|
||||
|
||||
/// <summary>The Windows version of the game.</summary>
|
||||
Windows = Platform.Windows,
|
||||
|
||||
/// <summary>The Android version of the game.</summary>
|
||||
Android = Platform.Android
|
||||
Windows = Platform.Windows
|
||||
}
|
||||
}
|
||||
|
|
|
@ -424,7 +424,7 @@ namespace StardewModdingAPI.Metadata
|
|||
return true;
|
||||
|
||||
case "tilesheets\\tools": // Game1.ResetToolSpriteSheet
|
||||
Game1.ResetToolSpriteSheet();
|
||||
Game1.toolSpriteSheet = content.Load<Texture2D>(key);
|
||||
return true;
|
||||
|
||||
case "tilesheets\\weapons": // Game1.LoadContent
|
||||
|
@ -457,7 +457,7 @@ namespace StardewModdingAPI.Metadata
|
|||
{
|
||||
if (Game1.activeClickableMenu is TitleMenu titleMenu)
|
||||
{
|
||||
titleMenu.cloudsTexture = content.Load<Texture2D>(key);
|
||||
this.Reflection.GetField<Texture2D>(titleMenu, "cloudsTexture").SetValue(content.Load<Texture2D>(key));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -468,8 +468,8 @@ namespace StardewModdingAPI.Metadata
|
|||
if (Game1.activeClickableMenu is TitleMenu titleMenu)
|
||||
{
|
||||
Texture2D texture = content.Load<Texture2D>(key);
|
||||
titleMenu.titleButtonsTexture = texture;
|
||||
foreach (TemporaryAnimatedSprite bird in titleMenu.birds)
|
||||
this.Reflection.GetField<Texture2D>(titleMenu, "titleButtonsTexture").SetValue(texture);
|
||||
foreach (TemporaryAnimatedSprite bird in this.Reflection.GetField<List<TemporaryAnimatedSprite>>(titleMenu, "birds").GetValue())
|
||||
bird.texture = texture;
|
||||
return true;
|
||||
}
|
||||
|
@ -906,7 +906,7 @@ namespace StardewModdingAPI.Metadata
|
|||
int lastScheduleTime = villager.Schedule.Keys.Where(p => p <= Game1.timeOfDay).OrderByDescending(p => p).FirstOrDefault();
|
||||
if (lastScheduleTime != 0)
|
||||
{
|
||||
villager.scheduleTimeToTry = NPC.NO_TRY; // use time that's passed in to checkSchedule
|
||||
this.Reflection.GetField<int>(villager, "scheduleTimeToTry").SetValue(9999999); // use time that's passed in to checkSchedule
|
||||
villager.checkSchedule(lastScheduleTime);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ namespace StardewModdingAPI.Metadata
|
|||
yield return new MethodParentRewriter(typeof(FarmerRenderer), typeof(FarmerRendererMethods));
|
||||
yield return new MethodParentRewriter(typeof(SpriteText), typeof(SpriteTextMethods));
|
||||
yield return new MethodParentRewriter(typeof(NPC), typeof(NPCMethods));
|
||||
yield return new MethodParentRewriter(typeof(Utility), typeof(UtilityMethods));
|
||||
|
||||
//Constructor Rewrites
|
||||
yield return new MethodParentRewriter(typeof(HUDMessage), typeof(HUDMessageMethods));
|
||||
|
@ -69,7 +70,6 @@ namespace StardewModdingAPI.Metadata
|
|||
|
||||
//Field Rewriters
|
||||
yield return new FieldReplaceRewriter(typeof(ItemGrabMenu), "context", "specialObject");
|
||||
yield return new FieldReplaceRewriter(typeof(FarmerTeam), "demolishLock", "buildingLock");
|
||||
|
||||
// rewrite for Stardew Valley 1.3
|
||||
yield return new StaticFieldToConstantRewriter<int>(typeof(Game1), "tileSize", Game1.tileSize);
|
||||
|
|
|
@ -1,10 +1,30 @@
|
|||
using System.Reflection;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Android.App;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("SMAPI")]
|
||||
[assembly: AssemblyDescription("A modding API for Stardew Valley.")]
|
||||
[assembly: InternalsVisibleTo("StardewModdingAPI.Tests")]
|
||||
[assembly: InternalsVisibleTo("DynamicProxyGenAssembly2")] // Moq for unit testing
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("SMAPI")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
[assembly: AssemblyVersion("2.11.3")]
|
||||
[assembly: AssemblyFileVersion("2.11.3")]
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// 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("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,4 +1,4 @@
|
|||
<resources>
|
||||
<string name="hello">Hello World, Click Me!</string>
|
||||
<string name="app_name">StardewModdingAPI</string>
|
||||
<string name="app_name">SMAPI</string>
|
||||
</resources>
|
||||
|
|
|
@ -43,9 +43,9 @@ The default values are mirrored in StardewModdingAPI.Framework.Models.SConfig to
|
|||
//"UseBetaChannel": true,
|
||||
|
||||
/**
|
||||
* SMAPI's GitHub project name, used to perform update checks.
|
||||
* SMAPI's Android Installer GitHub project name, used to perform update checks.
|
||||
*/
|
||||
"GitHubProjectName": "Pathoschild/SMAPI",
|
||||
"GitHubProjectName": "MartyrPher/SMAPI-Android-Installer",
|
||||
|
||||
/**
|
||||
* The base URL for SMAPI's web API, used to perform update checks.
|
||||
|
|
|
@ -1,134 +1,389 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<AssemblyName>StardewModdingAPI</AssemblyName>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProductVersion>8.0.30703</ProductVersion>
|
||||
<SchemaVersion>2.0</SchemaVersion>
|
||||
<ProjectGuid>{EBD13EAB-E70B-4D9F-92C2-C34A21E1FA32}</ProjectGuid>
|
||||
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<TemplateGuid>{9ef11e43-1701-4396-8835-8392d57abb70}</TemplateGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>StardewModdingAPI</RootNamespace>
|
||||
<Description>The modding API for Stardew Valley.</Description>
|
||||
<TargetFramework>net45</TargetFramework>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputType>Exe</OutputType>
|
||||
<OutputPath>$(SolutionDir)\..\bin\$(Configuration)\SMAPI</OutputPath>
|
||||
<DocumentationFile>$(SolutionDir)\..\bin\$(Configuration)\SMAPI\StardewModdingAPI.xml</DocumentationFile>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<LargeAddressAware Condition="'$(OS)' == 'Windows_NT'">true</LargeAddressAware>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
<AssemblyName>StardewModdingAPI</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
|
||||
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LargeAddressAware" Version="1.0.3" />
|
||||
<PackageReference Include="Lib.Harmony" Version="1.2.0.1" />
|
||||
<PackageReference Include="Mono.Cecil" Version="0.11.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="$(GameExecutableName)">
|
||||
<HintPath>$(GamePath)\$(GameExecutableName).exe</HintPath>
|
||||
<Private>False</Private>
|
||||
<Reference Include="0Harmony">
|
||||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\0Harmony.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Android.Vending.Expansion.Downloader">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\Google.Android.Vending.Expansion.Downloader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Android.Vending.Licensing">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\Google.Android.Vending.Licensing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Mono.Android" />
|
||||
<Reference Include="Mono.Cecil">
|
||||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\Mono.Cecil.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoMod.RuntimeDetour">
|
||||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\MonoMod.RuntimeDetour.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoMod.Utils">
|
||||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\MonoMod.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Newtonsoft.Json">
|
||||
<HintPath>..\..\..\..\..\..\..\SteamLibrary\steamapps\common\Stardew Valley\smapi-internal\Newtonsoft.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley">
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\StardewValley.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley.GameData">
|
||||
<HintPath>$(GamePath)\StardewValley.GameData.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Caching">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="GalaxyCSharp">
|
||||
<HintPath>$(GamePath)\GalaxyCSharp.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Lidgren.Network">
|
||||
<HintPath>$(GamePath)\Lidgren.Network.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\..\..\..\..\Downloads\StardewValleyAndroidStuff\base_1.4.4.118\assemblies\StardewValley.GameData.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="xTile">
|
||||
<HintPath>$(GamePath)\xTile.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
<HintPath>..\..\..\..\..\AndroidStudioProjects\SMAPI Android Installer\app\src\main\assets\Stardew\xTile.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<Choose>
|
||||
<!-- Windows -->
|
||||
<When Condition="$(OS) == 'Windows_NT'">
|
||||
<ItemGroup>
|
||||
<Reference Include="Netcode">
|
||||
<HintPath>$(GamePath)\Netcode.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Compile Include="Constants.cs" />
|
||||
<Compile Include="ContentSource.cs" />
|
||||
<Compile Include="Context.cs" />
|
||||
<Compile Include="Enums\LoadStage.cs" />
|
||||
<Compile Include="Enums\SkillType.cs" />
|
||||
<Compile Include="Events\BuildingListChangedEventArgs.cs" />
|
||||
<Compile Include="Events\ButtonPressedEventArgs.cs" />
|
||||
<Compile Include="Events\ButtonReleasedEventArgs.cs" />
|
||||
<Compile Include="Events\ChangeType.cs" />
|
||||
<Compile Include="Events\ChestInventoryChangedEventArgs.cs" />
|
||||
<Compile Include="Events\CursorMovedEventArgs.cs" />
|
||||
<Compile Include="Events\DayEndingEventArgs.cs" />
|
||||
<Compile Include="Events\DayStartedEventArgs.cs" />
|
||||
<Compile Include="Events\DebrisListChangedEventArgs.cs" />
|
||||
<Compile Include="Events\GameLaunchedEventArgs.cs" />
|
||||
<Compile Include="Events\IDisplayEvents.cs" />
|
||||
<Compile Include="Events\IGameLoopEvents.cs" />
|
||||
<Compile Include="Events\IInputEvents.cs" />
|
||||
<Compile Include="Events\IModEvents.cs" />
|
||||
<Compile Include="Events\IMultiplayerEvents.cs" />
|
||||
<Compile Include="Events\InventoryChangedEventArgs.cs" />
|
||||
<Compile Include="Events\IPlayerEvents.cs" />
|
||||
<Compile Include="Events\ISpecialisedEvents.cs" />
|
||||
<Compile Include="Events\ItemStackSizeChange.cs" />
|
||||
<Compile Include="Events\IWorldEvents.cs" />
|
||||
<Compile Include="Events\LargeTerrainFeatureListChangedEventArgs.cs" />
|
||||
<Compile Include="Events\LevelChangedEventArgs.cs" />
|
||||
<Compile Include="Events\LoadStageChangedEventArgs.cs" />
|
||||
<Compile Include="Events\LocationListChangedEventArgs.cs" />
|
||||
<Compile Include="Events\MenuChangedEventArgs.cs" />
|
||||
<Compile Include="Events\ModMessageReceivedEventArgs.cs" />
|
||||
<Compile Include="Events\MouseWheelScrolledEventArgs.cs" />
|
||||
<Compile Include="Events\NpcListChangedEventArgs.cs" />
|
||||
<Compile Include="Events\ObjectListChangedEventArgs.cs" />
|
||||
<Compile Include="Events\OneSecondUpdateTickedEventArgs.cs" />
|
||||
<Compile Include="Events\OneSecondUpdateTickingEventArgs.cs" />
|
||||
<Compile Include="Events\PeerContextReceivedEventArgs.cs" />
|
||||
<Compile Include="Events\PeerDisconnectedEventArgs.cs" />
|
||||
<Compile Include="Events\RenderedActiveMenuEventArgs.cs" />
|
||||
<Compile Include="Events\RenderedEventArgs.cs" />
|
||||
<Compile Include="Events\RenderedHudEventArgs.cs" />
|
||||
<Compile Include="Events\RenderedWorldEventArgs.cs" />
|
||||
<Compile Include="Events\RenderingActiveMenuEventArgs.cs" />
|
||||
<Compile Include="Events\RenderingEventArgs.cs" />
|
||||
<Compile Include="Events\RenderingHudEventArgs.cs" />
|
||||
<Compile Include="Events\RenderingWorldEventArgs.cs" />
|
||||
<Compile Include="Events\ReturnedToTitleEventArgs.cs" />
|
||||
<Compile Include="Events\SaveCreatedEventArgs.cs" />
|
||||
<Compile Include="Events\SaveCreatingEventArgs.cs" />
|
||||
<Compile Include="Events\SavedEventArgs.cs" />
|
||||
<Compile Include="Events\SaveLoadedEventArgs.cs" />
|
||||
<Compile Include="Events\SavingEventArgs.cs" />
|
||||
<Compile Include="Events\TerrainFeatureListChangedEventArgs.cs" />
|
||||
<Compile Include="Events\TimeChangedEventArgs.cs" />
|
||||
<Compile Include="Events\UnvalidatedUpdateTickedEventArgs.cs" />
|
||||
<Compile Include="Events\UnvalidatedUpdateTickingEventArgs.cs" />
|
||||
<Compile Include="Events\UpdateTickedEventArgs.cs" />
|
||||
<Compile Include="Events\UpdateTickingEventArgs.cs" />
|
||||
<Compile Include="Events\WarpedEventArgs.cs" />
|
||||
<Compile Include="Events\WindowResizedEventArgs.cs" />
|
||||
<Compile Include="Framework\Command.cs" />
|
||||
<Compile Include="Framework\CommandManager.cs" />
|
||||
<Compile Include="Framework\ContentCoordinator.cs" />
|
||||
<Compile Include="Framework\ContentManagers\BaseContentManager.cs" />
|
||||
<Compile Include="Framework\ContentManagers\GameContentManager.cs" />
|
||||
<Compile Include="Framework\ContentManagers\IContentManager.cs" />
|
||||
<Compile Include="Framework\ContentManagers\ModContentManager.cs" />
|
||||
<Compile Include="Framework\ContentPack.cs" />
|
||||
<Compile Include="Framework\Content\AssetData.cs" />
|
||||
<Compile Include="Framework\Content\AssetDataForDictionary.cs" />
|
||||
<Compile Include="Framework\Content\AssetDataForImage.cs" />
|
||||
<Compile Include="Framework\Content\AssetDataForObject.cs" />
|
||||
<Compile Include="Framework\Content\AssetInfo.cs" />
|
||||
<Compile Include="Framework\Content\AssetInterceptorChange.cs" />
|
||||
<Compile Include="Framework\Content\ContentCache.cs" />
|
||||
<Compile Include="Framework\CursorPosition.cs" />
|
||||
<Compile Include="Framework\DeprecationLevel.cs" />
|
||||
<Compile Include="Framework\DeprecationManager.cs" />
|
||||
<Compile Include="Framework\DeprecationWarning.cs" />
|
||||
<Compile Include="Framework\Events\EventManager.cs" />
|
||||
<Compile Include="Framework\Events\ManagedEvent.cs" />
|
||||
<Compile Include="Framework\Events\ModDisplayEvents.cs" />
|
||||
<Compile Include="Framework\Events\ModEvents.cs" />
|
||||
<Compile Include="Framework\Events\ModEventsBase.cs" />
|
||||
<Compile Include="Framework\Events\ModGameLoopEvents.cs" />
|
||||
<Compile Include="Framework\Events\ModInputEvents.cs" />
|
||||
<Compile Include="Framework\Events\ModMultiplayerEvents.cs" />
|
||||
<Compile Include="Framework\Events\ModPlayerEvents.cs" />
|
||||
<Compile Include="Framework\Events\ModSpecialisedEvents.cs" />
|
||||
<Compile Include="Framework\Events\ModWorldEvents.cs" />
|
||||
<Compile Include="Framework\Exceptions\SAssemblyLoadFailedException.cs" />
|
||||
<Compile Include="Framework\Exceptions\SContentLoadException.cs" />
|
||||
<Compile Include="Framework\GameVersion.cs" />
|
||||
<Compile Include="Framework\IModMetadata.cs" />
|
||||
<Compile Include="Framework\Input\GamePadStateBuilder.cs" />
|
||||
<Compile Include="Framework\Input\InputStatus.cs" />
|
||||
<Compile Include="Framework\Input\SInputState.cs" />
|
||||
<Compile Include="Framework\InternalExtensions.cs" />
|
||||
<Compile Include="Framework\Logging\ConsoleInterceptionManager.cs" />
|
||||
<Compile Include="Framework\Logging\InterceptingTextWriter.cs" />
|
||||
<Compile Include="Framework\Logging\LogFileManager.cs" />
|
||||
<Compile Include="Framework\Models\SConfig.cs" />
|
||||
<Compile Include="Framework\ModHelpers\BaseHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\CommandHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\ContentHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\ContentPackHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\DataHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\InputHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\ModHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\ModRegistryHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\MultiplayerHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\ReflectionHelper.cs" />
|
||||
<Compile Include="Framework\ModHelpers\TranslationHelper.cs" />
|
||||
<Compile Include="Framework\ModLoading\AssemblyDefinitionResolver.cs" />
|
||||
<Compile Include="Framework\ModLoading\AssemblyLoader.cs" />
|
||||
<Compile Include="Framework\ModLoading\AssemblyLoadStatus.cs" />
|
||||
<Compile Include="Framework\ModLoading\AssemblyParseResult.cs" />
|
||||
<Compile Include="Framework\ModLoading\Finders\EventFinder.cs" />
|
||||
<Compile Include="Framework\ModLoading\Finders\FieldFinder.cs" />
|
||||
<Compile Include="Framework\ModLoading\Finders\MethodFinder.cs" />
|
||||
<Compile Include="Framework\ModLoading\Finders\PropertyFinder.cs" />
|
||||
<Compile Include="Framework\ModLoading\Finders\ReferenceToMemberWithUnexpectedTypeFinder.cs" />
|
||||
<Compile Include="Framework\ModLoading\Finders\ReferenceToMissingMemberFinder.cs" />
|
||||
<Compile Include="Framework\ModLoading\Finders\TypeFinder.cs" />
|
||||
<Compile Include="Framework\ModLoading\IInstructionHandler.cs" />
|
||||
<Compile Include="Framework\ModLoading\IncompatibleInstructionException.cs" />
|
||||
<Compile Include="Framework\ModLoading\InstructionHandleResult.cs" />
|
||||
<Compile Include="Framework\ModLoading\InvalidModStateException.cs" />
|
||||
<Compile Include="Framework\ModLoading\ModDependencyStatus.cs" />
|
||||
<Compile Include="Framework\ModLoading\ModMetadata.cs" />
|
||||
<Compile Include="Framework\ModLoading\ModMetadataStatus.cs" />
|
||||
<Compile Include="Framework\ModLoading\ModResolver.cs" />
|
||||
<Compile Include="Framework\ModLoading\PlatformAssemblyMap.cs" />
|
||||
<Compile Include="Framework\ModLoading\RewriteHelper.cs" />
|
||||
<Compile Include="Framework\ModLoading\Rewriters\FieldReplaceRewriter.cs" />
|
||||
<Compile Include="Framework\ModLoading\Rewriters\FieldToPropertyRewriter.cs" />
|
||||
<Compile Include="Framework\ModLoading\Rewriters\MethodParentRewriter.cs" />
|
||||
<Compile Include="Framework\ModLoading\Rewriters\StaticFieldToConstantRewriter.cs" />
|
||||
<Compile Include="Framework\ModLoading\Rewriters\TypeFieldToAnotherTypeFieldRewriter.cs" />
|
||||
<Compile Include="Framework\ModLoading\Rewriters\TypeReferenceRewriter.cs" />
|
||||
<Compile Include="Framework\ModLoading\TypeReferenceComparer.cs" />
|
||||
<Compile Include="Framework\ModRegistry.cs" />
|
||||
<Compile Include="Framework\Monitor.cs" />
|
||||
<Compile Include="Framework\Networking\MessageType.cs" />
|
||||
<Compile Include="Framework\Networking\ModMessageModel.cs" />
|
||||
<Compile Include="Framework\Networking\MultiplayerPeer.cs" />
|
||||
<Compile Include="Framework\Networking\MultiplayerPeerMod.cs" />
|
||||
<Compile Include="Framework\Networking\RemoteContextModel.cs" />
|
||||
<Compile Include="Framework\Networking\RemoteContextModModel.cs" />
|
||||
<Compile Include="Framework\Patching\GamePatcher.cs" />
|
||||
<Compile Include="Framework\Patching\IHarmonyPatch.cs" />
|
||||
<Compile Include="Framework\Reflection\CacheEntry.cs" />
|
||||
<Compile Include="Framework\Reflection\InterfaceProxyBuilder.cs" />
|
||||
<Compile Include="Framework\Reflection\InterfaceProxyFactory.cs" />
|
||||
<Compile Include="Framework\Reflection\ReflectedField.cs" />
|
||||
<Compile Include="Framework\Reflection\ReflectedMethod.cs" />
|
||||
<Compile Include="Framework\Reflection\ReflectedProperty.cs" />
|
||||
<Compile Include="Framework\Reflection\Reflector.cs" />
|
||||
<Compile Include="Framework\RequestExitDelegate.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\DebrisMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\FarmerMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\FarmerRenderMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\Game1Methods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\GameLocationMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\HUDMessageMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\IClickableMenuMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\ItemGrabMenuMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\MapPageMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\NPCMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\SpriteBatchMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\SpriteTextMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\TextBoxMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\UtilityMethods.cs" />
|
||||
<Compile Include="Framework\RewriteFacades\WeatherDebrisMethods.cs" />
|
||||
<Compile Include="Framework\SCore.cs" />
|
||||
<Compile Include="Framework\Serialization\ColorConverter.cs" />
|
||||
<Compile Include="Framework\Serialization\PointConverter.cs" />
|
||||
<Compile Include="Framework\Serialization\RectangleConverter.cs" />
|
||||
<Compile Include="Framework\Serialization\Vector2Converter.cs" />
|
||||
<Compile Include="Framework\SGame.cs" />
|
||||
<Compile Include="Framework\SGameConstructorHack.cs" />
|
||||
<Compile Include="Framework\Singleton.cs" />
|
||||
<Compile Include="Framework\SModHooks.cs" />
|
||||
<Compile Include="Framework\SMultiplayer.cs" />
|
||||
<Compile Include="Framework\SnapshotDiff.cs" />
|
||||
<Compile Include="Framework\SnapshotItemListDiff.cs" />
|
||||
<Compile Include="Framework\SnapshotListDiff.cs" />
|
||||
<Compile Include="Framework\StateTracking\ChestTracker.cs" />
|
||||
<Compile Include="Framework\StateTracking\Comparers\EquatableComparer.cs" />
|
||||
<Compile Include="Framework\StateTracking\Comparers\GenericEqualsComparer.cs" />
|
||||
<Compile Include="Framework\StateTracking\Comparers\ObjectReferenceComparer.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\BaseDisposableWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\ComparableListWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\ComparableWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\ImmutableCollectionWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\NetCollectionWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\NetDictionaryWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\NetListWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\NetValueWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\ObservableCollectionWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\FieldWatchers\WatcherFactory.cs" />
|
||||
<Compile Include="Framework\StateTracking\ICollectionWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\IDictionaryWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\IValueWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\IWatcher.cs" />
|
||||
<Compile Include="Framework\StateTracking\LocationTracker.cs" />
|
||||
<Compile Include="Framework\StateTracking\PlayerTracker.cs" />
|
||||
<Compile Include="Framework\StateTracking\Snapshots\LocationSnapshot.cs" />
|
||||
<Compile Include="Framework\StateTracking\Snapshots\PlayerSnapshot.cs" />
|
||||
<Compile Include="Framework\StateTracking\Snapshots\WatcherSnapshot.cs" />
|
||||
<Compile Include="Framework\StateTracking\Snapshots\WorldLocationsSnapshot.cs" />
|
||||
<Compile Include="Framework\StateTracking\WorldLocationsTracker.cs" />
|
||||
<Compile Include="Framework\Translator.cs" />
|
||||
<Compile Include="Framework\Utilities\ContextHash.cs" />
|
||||
<Compile Include="Framework\Utilities\Countdown.cs" />
|
||||
<Compile Include="Framework\WatcherCore.cs" />
|
||||
<Compile Include="GamePlatform.cs" />
|
||||
<Compile Include="IAssetData.cs" />
|
||||
<Compile Include="IAssetDataForDictionary.cs" />
|
||||
<Compile Include="IAssetDataForImage.cs" />
|
||||
<Compile Include="IAssetEditor.cs" />
|
||||
<Compile Include="IAssetInfo.cs" />
|
||||
<Compile Include="IAssetLoader.cs" />
|
||||
<Compile Include="ICommandHelper.cs" />
|
||||
<Compile Include="IContentHelper.cs" />
|
||||
<Compile Include="IContentPack.cs" />
|
||||
<Compile Include="IContentPackHelper.cs" />
|
||||
<Compile Include="ICursorPosition.cs" />
|
||||
<Compile Include="IDataHelper.cs" />
|
||||
<Compile Include="IInputHelper.cs" />
|
||||
<Compile Include="IMod.cs" />
|
||||
<Compile Include="IModHelper.cs" />
|
||||
<Compile Include="IModInfo.cs" />
|
||||
<Compile Include="IModLinked.cs" />
|
||||
<Compile Include="IModRegistry.cs" />
|
||||
<Compile Include="IMonitor.cs" />
|
||||
<Compile Include="IMultiplayerHelper.cs" />
|
||||
<Compile Include="IMultiplayerPeer.cs" />
|
||||
<Compile Include="IMultiplayerPeerMod.cs" />
|
||||
<Compile Include="IReflectedField.cs" />
|
||||
<Compile Include="IReflectedMethod.cs" />
|
||||
<Compile Include="IReflectedProperty.cs" />
|
||||
<Compile Include="IReflectionHelper.cs" />
|
||||
<Compile Include="ITranslationHelper.cs" />
|
||||
<Compile Include="LogLevel.cs" />
|
||||
<Compile Include="Metadata\CoreAssetPropagator.cs" />
|
||||
<Compile Include="Metadata\InstructionMetadata.cs" />
|
||||
<Compile Include="Mod.cs" />
|
||||
<Compile Include="Patches\DialogueErrorPatch.cs" />
|
||||
<Compile Include="Patches\EventErrorPatch.cs" />
|
||||
<Compile Include="Patches\LoadContextPatch.cs" />
|
||||
<Compile Include="Patches\LoadErrorPatch.cs" />
|
||||
<Compile Include="Patches\ObjectErrorPatch.cs" />
|
||||
<Compile Include="Patches\SaveBackupPatch.cs" />
|
||||
<Compile Include="PatchMode.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Resources\Resource.designer.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="SButton.cs" />
|
||||
<Compile Include="SemanticVersion.cs" />
|
||||
<Compile Include="SGameConsole.cs" />
|
||||
<Compile Include="SMainActivity.cs" />
|
||||
<Compile Include="Translation.cs" />
|
||||
<Compile Include="Utilities\SDate.cs" />
|
||||
</ItemGroup>
|
||||
</When>
|
||||
|
||||
<!-- Linux/Mac -->
|
||||
<Otherwise>
|
||||
<ItemGroup>
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>$(GamePath)\MonoGame.Framework.dll</HintPath>
|
||||
<Private>False</Private>
|
||||
</Reference>
|
||||
<None Include="i18n\de.json" />
|
||||
<None Include="i18n\default.json" />
|
||||
<None Include="i18n\es.json" />
|
||||
<None Include="i18n\ja.json" />
|
||||
<None Include="i18n\pt.json" />
|
||||
<None Include="i18n\ru.json" />
|
||||
<None Include="i18n\tr.json" />
|
||||
<None Include="i18n\zh.json" />
|
||||
<None Include="Resources\AboutResources.txt" />
|
||||
<None Include="SMAPI.config.json" />
|
||||
</ItemGroup>
|
||||
</Otherwise>
|
||||
</Choose>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\SMAPI.Toolkit.CoreInterfaces.csproj" />
|
||||
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj" />
|
||||
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="SMAPI.config.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\SMAPI.Web\wwwroot\SMAPI.metadata.json">
|
||||
<Link>SMAPI.metadata.json</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Update="i18n\de.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="i18n\es.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="i18n\ja.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="i18n\default.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="i18n\pt.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="i18n\ru.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="i18n\tr.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="i18n\zh.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="steam_appid.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
<AndroidResource Include="Resources\values\strings.xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Resources\drawable\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="icon.ico" />
|
||||
<Content Include="steam_appid.txt" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\SMAPI.Toolkit.CoreInterfaces.csproj">
|
||||
<Project>{ed8e41fa-ddfa-4a77-932e-9853d279a129}</Project>
|
||||
<Name>SMAPI.Toolkit.CoreInterfaces</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj">
|
||||
<Project>{08184f74-60ad-4eee-a78c-f4a35ade6246}</Project>
|
||||
<Name>SMAPI.Toolkit</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
|
||||
<Import Project="..\..\build\common.targets" />
|
||||
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -13,16 +13,18 @@ using StardewModdingAPI.Framework;
|
|||
using StardewValley;
|
||||
using System.Reflection;
|
||||
using Android.Content.Res;
|
||||
using Java.Interop;
|
||||
|
||||
namespace StardewModdingAPI
|
||||
{
|
||||
[Activity(Label = "SMAPI Stardew Valley", Icon = "@mipmap/ic_launcher", Theme = "@style/Theme.Splash", MainLauncher = true, AlwaysRetainTaskState = true, LaunchMode = LaunchMode.SingleInstance, ScreenOrientation = ScreenOrientation.SensorLandscape, ConfigurationChanges = (ConfigChanges.Keyboard | ConfigChanges.KeyboardHidden | ConfigChanges.Orientation | ConfigChanges.ScreenLayout | ConfigChanges.ScreenSize | ConfigChanges.UiMode))]
|
||||
public class SMainActivity: MainActivity, ILicenseCheckerCallback, IJavaObject, IDisposable
|
||||
public class SMainActivity: MainActivity, ILicenseCheckerCallback, IJavaObject, IDisposable, IJavaPeerable
|
||||
{
|
||||
private SCore core;
|
||||
private LicenseChecker _licenseChecker;
|
||||
private PowerManager.WakeLock _wakeLock;
|
||||
private ServerManagedPolicyExtended _serverManagedPolicyExtended;
|
||||
|
||||
public new bool HasPermissions
|
||||
{
|
||||
get
|
||||
|
@ -77,10 +79,6 @@ namespace StardewModdingAPI
|
|||
}
|
||||
this.Window.SetFlags(WindowManagerFlags.Fullscreen, WindowManagerFlags.Fullscreen);
|
||||
this.Window.SetFlags(WindowManagerFlags.KeepScreenOn, WindowManagerFlags.KeepScreenOn);
|
||||
PowerManager powerManager = (PowerManager)this.GetSystemService("power");
|
||||
this._wakeLock = powerManager.NewWakeLock(WakeLockFlags.Full, "StardewWakeLock");
|
||||
this._wakeLock.Acquire();
|
||||
typeof(MainActivity).GetField("_wakeLock", BindingFlags.Instance | BindingFlags.NonPublic)?.SetValue(this, this._wakeLock);
|
||||
base.OnCreate(bundle);
|
||||
this.CheckAppPermissions();
|
||||
}
|
||||
|
|
|
@ -1,131 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>StardewModdingAPI</RootNamespace>
|
||||
<AssemblyName>StardewModdingAPI</AssemblyName>
|
||||
<TargetFramework>net45</TargetFramework>
|
||||
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<OutputType>Library</OutputType>
|
||||
<OutputPath>$(SolutionDir)\..\bin\$(Configuration)\SMAPI</OutputPath>
|
||||
<DocumentationFile>$(SolutionDir)\..\bin\$(Configuration)\SMAPI\StardewModdingAPI.xml</DocumentationFile>
|
||||
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
|
||||
<LargeAddressAware Condition="'$(OS)' == 'Windows_NT'">true</LargeAddressAware>
|
||||
<ApplicationIcon>icon.ico</ApplicationIcon>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
|
||||
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="Framework\Networking\SGalaxyNetClient.cs" />
|
||||
<Compile Remove="Framework\Networking\SGalaxyNetServer.cs" />
|
||||
<Compile Remove="Framework\Networking\SLidgrenClient.cs" />
|
||||
<Compile Remove="Framework\Networking\SLidgrenServer.cs" />
|
||||
<Compile Remove="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LargeAddressAware" Version="1.0.3" />
|
||||
<PackageReference Include="Lib.Harmony" Version="1.2.0.1" />
|
||||
<PackageReference Include="Mono.Cecil" Version="0.10.1" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="BmFont">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\BmFont.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Android.Vending.Expansion.Downloader">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Google.Android.Vending.Expansion.Downloader.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Google.Android.Vending.Licensing">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Google.Android.Vending.Licensing.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Java.Interop">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Java.Interop.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Mono.Android">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Mono.Android.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoGame.Framework">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\MonoGame.Framework.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoMod.RuntimeDetour">
|
||||
<HintPath>..\..\..\..\..\Downloads\net35 (1)\net35\MonoMod.RuntimeDetour.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MonoMod.Utils">
|
||||
<HintPath>..\..\..\..\..\Downloads\net35 (1)\net35\MonoMod.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="StardewValley">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\StardewValley.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Caching">
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Arch.Core.Common">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Arch.Core.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Arch.Lifecycle.Common">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Arch.Lifecycle.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Arch.Lifecycle.Runtime">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Arch.Lifecycle.Runtime.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Support.Annotations">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Support.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Support.Compat">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Support.Compat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Support.Core.UI">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Support.Core.UI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Support.Core.Utils">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Support.Core.Utils.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Support.Fragment">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Support.Fragment.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Support.Media.Compat">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Support.Media.Compat.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Xamarin.Android.Support.v4">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Xamarin.Android.Support.v4.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="xTile">
|
||||
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\xTile.dll</HintPath>
|
||||
</Reference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj" />
|
||||
<ProjectReference Include="..\SMAPI.Toolkit\StardewModdingAPI.Toolkit.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="StardewModdingAPI.config.json">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="..\SMAPI.Web\wwwroot\StardewModdingAPI.metadata.json">
|
||||
<Link>StardewModdingAPI.metadata.json</Link>
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<None Update="steam_appid.txt">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
|
||||
|
||||
</Project>
|
Loading…
Reference in New Issue