Update for Android 2.11.3

This commit is contained in:
Chris 2019-09-17 18:02:03 -04:00
commit c6c49a1d75
95 changed files with 1092 additions and 1429 deletions

View File

@ -12,12 +12,16 @@ insert_final_newline = true
trim_trailing_whitespace = true trim_trailing_whitespace = true
charset = utf-8 charset = utf-8
[*.{csproj,json,nuspec,targets}] [*.{csproj,nuspec,targets}]
indent_size = 2 indent_size = 2
[*.csproj] [*.csproj]
charset = utf-8-bom
insert_final_newline = false insert_final_newline = false
[README.txt]
end_of_line=crlf
########## ##########
## C# formatting ## C# formatting
## documentation: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference ## documentation: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference

1
.gitattributes vendored
View File

@ -1,2 +1,3 @@
# normalise line endings # normalise line endings
* text=auto * text=auto
README.txt text=crlf

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
patreon: pathoschild
ko_fi: pathoschild
custom: https://www.paypal.me/pathoschild

3
.gitignore vendored
View File

@ -26,3 +26,6 @@ _ReSharper*/
# sensitive files # sensitive files
appsettings.Development.json appsettings.Development.json
# AWS generated files
src/SMAPI.Web/aws-beanstalk-tools-defaults.json

View File

@ -1,5 +1,5 @@
using System.Reflection; using System.Reflection;
[assembly: AssemblyProduct("SMAPI")] [assembly: AssemblyProduct("SMAPI")]
[assembly: AssemblyVersion("2.11.2")] [assembly: AssemblyVersion("2.11.3")]
[assembly: AssemblyFileVersion("2.11.2")] [assembly: AssemblyFileVersion("2.11.3")]

View File

@ -39,6 +39,11 @@
<Choose> <Choose>
<When Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.ConsoleCommands' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.SaveBackup' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Tests'"> <When Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.ConsoleCommands' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.SaveBackup' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Tests'">
<!-- Windows --> <!-- Windows -->
<PropertyGroup>
<!--recognise XNA Framework DLLs in the GAC-->
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
</PropertyGroup>
<ItemGroup Condition="$(OS) == 'Windows_NT'"> <ItemGroup Condition="$(OS) == 'Windows_NT'">
<Reference Include="Stardew Valley"> <Reference Include="Stardew Valley">
<HintPath>$(GamePath)\Stardew Valley.exe</HintPath> <HintPath>$(GamePath)\Stardew Valley.exe</HintPath>
@ -93,12 +98,12 @@
</Choose> </Choose>
<!-- if game path is invalid, show one user-friendly error instead of a slew of reference errors --> <!-- if game path is invalid, show one user-friendly error instead of a slew of reference errors -->
<Target Name="BeforeBuild"> <Target Name="ValidateInstallPath" AfterTargets="BeforeBuild">
<Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically; edit the *.csproj file and manually add a &lt;GamePath&gt; setting with the full directory path containing the Stardew Valley executable." /> <Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically; edit the *.csproj file and manually add a &lt;GamePath&gt; setting with the full directory path containing the Stardew Valley executable." />
</Target> </Target>
<!-- copy files into game directory and enable debugging --> <!-- copy files into game directory and enable debugging -->
<Target Name="AfterBuild"> <Target Name="CopySmapiFiles" AfterTargets="AfterBuild">
<CallTarget Targets="CopySMAPI;CopyDefaultMods" /> <CallTarget Targets="CopySMAPI;CopyDefaultMods" />
</Target> </Target>
<Target Name="CopySMAPI" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI'"> <Target Name="CopySMAPI" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI'">

View File

@ -5,20 +5,18 @@
creates the build package in the bin\Packages folder. creates the build package in the bin\Packages folder.
--> -->
<Target Name="AfterBuild"> <Target Name="PrepareInstaller" AfterTargets="AfterBuild">
<PropertyGroup> <PropertyGroup>
<RootPath>$(SolutionDir)\..</RootPath> <RootPath>$(SolutionDir)\..</RootPath>
<CompiledRootPath>$(RootPath)\bin\$(Configuration)</CompiledRootPath> <CompiledRootPath>$(RootPath)\bin\$(Configuration)</CompiledRootPath>
<CompiledSmapiPath>$(CompiledRootPath)\SMAPI</CompiledSmapiPath> <CompiledSmapiPath>$(CompiledRootPath)\SMAPI</CompiledSmapiPath>
<CompiledToolkitPath>$(CompiledRootPath)\SMAPI.Toolkit\net4.5</CompiledToolkitPath> <CompiledToolkitPath>$(CompiledRootPath)\SMAPI.Toolkit\net4.5</CompiledToolkitPath>
<CompiledModsPath>$(CompiledRootPath)\Mods</CompiledModsPath>
<PackagePath>$(SolutionDir)\..\bin\SMAPI installer</PackagePath> <PackagePath>$(SolutionDir)\..\bin\SMAPI installer</PackagePath>
<PackageDevPath>$(SolutionDir)\..\bin\SMAPI installer for developers</PackageDevPath> <PackageDevPath>$(SolutionDir)\..\bin\SMAPI installer for developers</PackageDevPath>
<PlatformName>windows</PlatformName> <PlatformName>windows</PlatformName>
<PlatformName Condition="$(OS) != 'Windows_NT'">unix</PlatformName> <PlatformName Condition="$(OS) != 'Windows_NT'">unix</PlatformName>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<CompiledMods Include="$(SolutionDir)\..\bin\$(Configuration)\Mods\**\*.*" />
</ItemGroup>
<!-- reset package directory --> <!-- reset package directory -->
<RemoveDir Directories="$(PackagePath)" /> <RemoveDir Directories="$(PackagePath)" />
@ -48,12 +46,19 @@
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" /> <Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.pdb" DestinationFolder="$(PackagePath)\bundle\smapi-internal" /> <Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.pdb" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.xml" DestinationFolder="$(PackagePath)\bundle\smapi-internal" /> <Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.xml" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="@(CompiledMods)" DestinationFolder="$(PackagePath)\bundle\Mods\%(RecursiveDir)" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(TargetDir)\unix-launcher.sh" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI" /> <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(TargetDir)\unix-launcher.sh" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" /> <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" /> <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(TargetDir)\windows-exe-config.xml" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI.exe.config" /> <Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(TargetDir)\windows-exe-config.xml" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI.exe.config" />
<!--copy bundled mods-->
<Copy SourceFiles="$(CompiledModsPath)\ConsoleCommands\ConsoleCommands.dll" DestinationFolder="$(PackagePath)\bundle\Mods\ConsoleCommands" />
<Copy SourceFiles="$(CompiledModsPath)\ConsoleCommands\ConsoleCommands.pdb" DestinationFolder="$(PackagePath)\bundle\Mods\ConsoleCommands" />
<Copy SourceFiles="$(CompiledModsPath)\ConsoleCommands\manifest.json" DestinationFolder="$(PackagePath)\bundle\Mods\ConsoleCommands" />
<Copy SourceFiles="$(CompiledModsPath)\SaveBackup\SaveBackup.dll" DestinationFolder="$(PackagePath)\bundle\Mods\SaveBackup" />
<Copy SourceFiles="$(CompiledModsPath)\SaveBackup\SaveBackup.pdb" DestinationFolder="$(PackagePath)\bundle\Mods\SaveBackup" />
<Copy SourceFiles="$(CompiledModsPath)\SaveBackup\manifest.json" DestinationFolder="$(PackagePath)\bundle\Mods\SaveBackup" />
<!-- fix errors on Linux/Mac (sample: https://log.smapi.io/mMdFUpgB) --> <!-- fix errors on Linux/Mac (sample: https://log.smapi.io/mMdFUpgB) -->
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(RootPath)\build\lib\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" /> <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(RootPath)\build\lib\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(RootPath)\build\lib\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" /> <Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(RootPath)\build\lib\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />

View File

@ -5,7 +5,7 @@
package files to the bin\Pathoschild.Stardew.ModBuildConfig folder. package files to the bin\Pathoschild.Stardew.ModBuildConfig folder.
--> -->
<Target Name="AfterBuild"> <Target Name="PreparePackage" AfterTargets="AfterBuild">
<PropertyGroup> <PropertyGroup>
<PackagePath>$(SolutionDir)\..\bin\Pathoschild.Stardew.ModBuildConfig</PackagePath> <PackagePath>$(SolutionDir)\..\bin\Pathoschild.Stardew.ModBuildConfig</PackagePath>
</PropertyGroup> </PropertyGroup>

View File

@ -1,10 +1,29 @@
# Release notes # Release notes
## 2.11.2 ## 2.11.3
Released 22 April 2019 for Stardew Valley 1.3.36. Released 13 September 2019 for Stardew Valley 1.3.36.
* For players: * For players:
* Fixed error when a custom map references certain vanilla tilesheets on MacOS. * SMAPI now prevents invalid items from breaking menus on hover.
* Fixed compatibility with Arch Linux. * SMAPI now prevents invalid event preconditions from crashing the game (thanks to berkayylmao!).
* SMAPI now prevents more invalid dialogue from crashing the game.
* Fixed errors during early startup not shown before exit.
* Fixed various error messages and inconsistent spelling.
* For the web UI:
* When filtering the mod list, clicking a mod link now automatically adds it to the visible mods.
* Added log parser instructions for Android.
* Fixed log parser failing in some cases due to time format localisation.
* For modders:
* `this.Monitor.Log` now defaults to the `Trace` log level instead of `Debug`. The change will only take effect when you recompile the mod.
* Fixed 'location list changed' verbose log not correctly listing changes.
## 2.11.2
Released 23 April 2019 for Stardew Valley 1.3.36.
* For players:
* Fixed error when a custom map references certain vanilla tilesheets on Linux/Mac.
* Fixed compatibility with some Linux distros.
## 2.11.1 ## 2.11.1
Released 17 March 2019 for Stardew Valley 1.3.36. Released 17 March 2019 for Stardew Valley 1.3.36.
@ -15,8 +34,10 @@ Released 17 March 2019 for Stardew Valley 1.3.36.
* Updated mod compatibility list. * Updated mod compatibility list.
* Fixed `world_clear` console command removing chests edited to have a debris name. * Fixed `world_clear` console command removing chests edited to have a debris name.
* For the web UI: * For modders:
* Added support for suppressing false-positive warnings in rare cases. * Added support for suppressing false-positive warnings in rare cases.
* For the web UI:
* The log parser now collapses redundant sections by default. * The log parser now collapses redundant sections by default.
* Fixed log parser column resize bug. * Fixed log parser column resize bug.

View File

@ -1,62 +1,32 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{443DDF81-6AAF-420A-A610-3459F37E5575}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StardewModdingAPI.Installer</RootNamespace> <RootNamespace>StardewModdingAPI.Installer</RootNamespace>
<AssemblyName>StardewModdingAPI.Installer</AssemblyName> <AssemblyName>StardewModdingAPI.Installer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFramework>net45</TargetFramework>
<FileAlignment>512</FileAlignment> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> <OutputType>Exe</OutputType>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols> <OutputPath>$(SolutionDir)\..\bin\$(Configuration)\Installer</OutputPath>
<DebugType>full</DebugType> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Debug\Installer</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Release\Installer</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs"> <ProjectReference Include="..\SMAPI.Toolkit\StardewModdingAPI.Toolkit.csproj" />
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Enums\ScriptAction.cs" />
<Compile Include="Framework\InstallerPaths.cs" />
<Compile Include="InteractiveInstaller.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="README.txt"> <None Update="README.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="windows-exe-config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content> </None>
<None Include="windows-exe-config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="windows-install.bat"> <None Include="windows-install.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
@ -67,14 +37,9 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit\StardewModdingAPI.Toolkit.csproj">
<Project>{ea5cfd2e-9453-4d29-b80f-8e0ea23f4ac6}</Project>
<Name>StardewModdingAPI.Toolkit</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" /> <Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\common.targets" /> <Import Project="..\..\build\common.targets" />
<Import Project="..\..\build\prepare-install-package.targets" /> <Import Project="..\..\build\prepare-install-package.targets" />
</Project> </Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netstandard1.3</TargetFramework> <TargetFramework>netstandard1.3</TargetFramework>

View File

@ -1,73 +1,34 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{EA4F1E80-743F-4A1D-9757-AE66904A196A}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StardewModdingAPI.ModBuildConfig</RootNamespace> <RootNamespace>StardewModdingAPI.ModBuildConfig</RootNamespace>
<AssemblyName>StardewModdingAPI.ModBuildConfig</AssemblyName> <AssemblyName>StardewModdingAPI.ModBuildConfig</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFramework>net45</TargetFramework>
<FileAlignment>512</FileAlignment> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<PlatformTarget>x86</PlatformTarget>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <ItemGroup>
<DebugType>full</DebugType> <ProjectReference Include="..\SMAPI.Toolkit\StardewModdingAPI.Toolkit.csproj" />
<Optimize>false</Optimize> </ItemGroup>
<OutputPath>bin\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants> <ItemGroup>
<ErrorReport>prompt</ErrorReport> <None Include="..\..\docs\mod-build-config.md">
<WarningLevel>4</WarningLevel> <Link>mod-build-config.md</Link>
</PropertyGroup> </None>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> </ItemGroup>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="Microsoft.Build" /> <Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build.Framework" /> <Reference Include="Microsoft.Build.Framework" />
<Reference Include="Microsoft.Build.Utilities.v4.0" /> <Reference Include="Microsoft.Build.Utilities.v4.0" />
<Reference Include="System" />
<Reference Include="System.IO.Compression" /> <Reference Include="System.IO.Compression" />
<Reference Include="System.Web.Extensions" /> <Reference Include="System.Web.Extensions" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Compile Include="DeployModTask.cs" />
<Compile Include="Framework\UserErrorException.cs" />
<Compile Include="Framework\ModFileManager.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="assets\nuget-icon.pdn" />
<None Include="build\smapi.targets">
<SubType>Designer</SubType>
</None>
<None Include="package.nuspec">
<SubType>Designer</SubType>
</None>
</ItemGroup>
<ItemGroup>
<Content Include="assets\nuget-icon.png" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj">
<Project>{d5cfd923-37f1-4bc3-9be8-e506e202ac28}</Project>
<Name>StardewModdingAPI.Toolkit.CoreInterfaces</Name>
</ProjectReference>
<ProjectReference Include="..\StardewModdingAPI.Toolkit\StardewModdingAPI.Toolkit.csproj">
<Project>{ea5cfd2e-9453-4d29-b80f-8e0ea23f4ac6}</Project>
<Name>StardewModdingAPI.Toolkit</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" /> <Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\common.targets" /> <Import Project="..\..\build\common.targets" />
<Import Project="..\..\build\prepare-nuget-package.targets" />
</Project> </Project>

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using StardewModdingAPI.Events;
using StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands; using StardewModdingAPI.Mods.ConsoleCommands.Framework.Commands;
namespace StardewModdingAPI.Mods.ConsoleCommands namespace StardewModdingAPI.Mods.ConsoleCommands

View File

@ -1,92 +1,35 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{28480467-1A48-46A7-99F8-236D95225359}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StardewModdingAPI.Mods.ConsoleCommands</RootNamespace> <RootNamespace>StardewModdingAPI.Mods.ConsoleCommands</RootNamespace>
<AssemblyName>ConsoleCommands</AssemblyName> <AssemblyName>ConsoleCommands</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFramework>net45</TargetFramework>
<FileAlignment>512</FileAlignment> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> <OutputPath>$(SolutionDir)\..\bin\$(Configuration)\Mods\ConsoleCommands</OutputPath>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Debug\Mods\ConsoleCommands\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>x86</PlatformTarget>
<Prefer32Bit>false</Prefer32Bit>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Release\Mods\ConsoleCommands\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
<PlatformTarget>x86</PlatformTarget> <PlatformTarget>x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <ProjectReference Include="..\SMAPI\StardewModdingAPI.csproj">
<Reference Include="System.Xml" /> <Private>False</Private>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs"> <Compile Include="..\..\build\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link> <Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile> </Compile>
<Compile Include="Framework\Commands\ArgumentParser.cs" />
<Compile Include="Framework\Commands\Other\ShowDataFilesCommand.cs" />
<Compile Include="Framework\Commands\Other\ShowGameFilesCommand.cs" />
<Compile Include="Framework\Commands\Other\DebugCommand.cs" />
<Compile Include="Framework\Commands\Player\ListItemTypesCommand.cs" />
<Compile Include="Framework\Commands\Player\ListItemsCommand.cs" />
<Compile Include="Framework\Commands\Player\AddCommand.cs" />
<Compile Include="Framework\Commands\Player\SetStyleCommand.cs" />
<Compile Include="Framework\Commands\Player\SetColorCommand.cs" />
<Compile Include="Framework\Commands\Player\SetMaxHealthCommand.cs" />
<Compile Include="Framework\Commands\Player\SetMaxStaminaCommand.cs" />
<Compile Include="Framework\Commands\Player\SetHealthCommand.cs" />
<Compile Include="Framework\Commands\Player\SetImmunityCommand.cs" />
<Compile Include="Framework\Commands\Player\SetStaminaCommand.cs" />
<Compile Include="Framework\Commands\Player\SetNameCommand.cs" />
<Compile Include="Framework\Commands\Player\SetMoneyCommand.cs" />
<Compile Include="Framework\Commands\TrainerCommand.cs" />
<Compile Include="Framework\Commands\World\SetMineLevelCommand.cs" />
<Compile Include="Framework\Commands\World\DownMineLevelCommand.cs" />
<Compile Include="Framework\Commands\World\ClearCommand.cs" />
<Compile Include="Framework\Commands\World\SetYearCommand.cs" />
<Compile Include="Framework\Commands\World\SetSeasonCommand.cs" />
<Compile Include="Framework\Commands\World\SetDayCommand.cs" />
<Compile Include="Framework\Commands\World\SetTimeCommand.cs" />
<Compile Include="Framework\Commands\World\FreezeTimeCommand.cs" />
<Compile Include="Framework\ItemData\ItemType.cs" />
<Compile Include="Framework\Commands\ITrainerCommand.cs" />
<Compile Include="Framework\ItemData\SearchableItem.cs" />
<Compile Include="Framework\ItemRepository.cs" />
<Compile Include="ModEntry.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="manifest.json"> <None Update="manifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\SMAPI\StardewModdingAPI.csproj"> <Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<Project>{9898b56e-51eb-40cf-8b1f-aceb4b6397a7}</Project>
<Name>StardewModdingAPI</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\common.targets" /> <Import Project="..\..\build\common.targets" />
</Project> </Project>

View File

@ -1,9 +1,9 @@
{ {
"Name": "Console Commands", "Name": "Console Commands",
"Author": "SMAPI", "Author": "SMAPI",
"Version": "2.11.2", "Version": "2.11.3",
"Description": "Adds SMAPI console commands that let you manipulate the game.", "Description": "Adds SMAPI console commands that let you manipulate the game.",
"UniqueID": "SMAPI.ConsoleCommands", "UniqueID": "SMAPI.ConsoleCommands",
"EntryDll": "ConsoleCommands.dll", "EntryDll": "ConsoleCommands.dll",
"MinimumApiVersion": "2.11.2" "MinimumApiVersion": "2.11.3"
} }

View File

@ -46,7 +46,7 @@ namespace StardewModdingAPI.Mods.SaveBackup
} }
catch (Exception ex) catch (Exception ex)
{ {
this.Monitor.Log($"Error backing up saves: {ex}"); this.Monitor.Log($"Error backing up saves: {ex}", LogLevel.Error);
} }
} }
@ -87,7 +87,7 @@ namespace StardewModdingAPI.Mods.SaveBackup
catch (Exception ex) when (ex is TypeLoadException || ex.InnerException is TypeLoadException) catch (Exception ex) when (ex is TypeLoadException || ex.InnerException is TypeLoadException)
{ {
// create uncompressed backup if compression fails // create uncompressed backup if compression fails
this.Monitor.Log("Couldn't zip the save backup, creating uncompressed backup instead."); this.Monitor.Log("Couldn't zip the save backup, creating uncompressed backup instead.", LogLevel.Debug);
this.Monitor.Log(ex.ToString(), LogLevel.Trace); this.Monitor.Log(ex.ToString(), LogLevel.Trace);
this.RecursiveCopy(new DirectoryInfo(Constants.SavesPath), fallbackDir, copyRoot: false); this.RecursiveCopy(new DirectoryInfo(Constants.SavesPath), fallbackDir, copyRoot: false);
} }
@ -137,7 +137,7 @@ namespace StardewModdingAPI.Mods.SaveBackup
} }
catch (Exception ex) catch (Exception ex)
{ {
this.Monitor.Log($"Error deleting old save backup '{file.Name}': {ex}"); this.Monitor.Log($"Error deleting old save backup '{file.Name}': {ex}", LogLevel.Error);
} }
} }
} }

View File

@ -1,57 +1,35 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{E272EB5D-8C57-417E-8E60-C1079D3F53C4}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StardewModdingAPI.Mods.SaveBackup</RootNamespace> <RootNamespace>StardewModdingAPI.Mods.SaveBackup</RootNamespace>
<AssemblyName>SaveBackup</AssemblyName> <AssemblyName>SaveBackup</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFramework>net45</TargetFramework>
<FileAlignment>512</FileAlignment> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<OutputPath>$(SolutionDir)\..\bin\$(Configuration)\Mods\SaveBackup</OutputPath>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Debug\Mods\SaveBackup\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Release\Mods\SaveBackup\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="System" /> <ProjectReference Include="..\SMAPI\StardewModdingAPI.csproj">
<Private>False</Private>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs"> <Compile Include="..\..\build\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link> <Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile> </Compile>
<Compile Include="ModEntry.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="manifest.json"> <None Update="manifest.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None> </None>
</ItemGroup> </ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj"> <Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<Project>{d5cfd923-37f1-4bc3-9be8-e506e202ac28}</Project>
<Name>StardewModdingAPI.Toolkit.CoreInterfaces</Name>
<Private>False</Private>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\common.targets" /> <Import Project="..\..\build\common.targets" />
</Project> </Project>

View File

@ -1,9 +1,9 @@
{ {
"Name": "Save Backup", "Name": "Save Backup",
"Author": "SMAPI", "Author": "SMAPI",
"Version": "2.11.2", "Version": "2.11.3",
"Description": "Automatically backs up all your saves once per day into its folder.", "Description": "Automatically backs up all your saves once per day into its folder.",
"UniqueID": "SMAPI.SaveBackup", "UniqueID": "SMAPI.SaveBackup",
"EntryDll": "SaveBackup.dll", "EntryDll": "SaveBackup.dll",
"MinimumApiVersion": "2.11.2" "MinimumApiVersion": "2.11.3"
} }

View File

@ -1,35 +1,20 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{36CCB19E-92EB-48C7-9615-98EEFD45109B}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StardewModdingAPI.Tests</RootNamespace> <RootNamespace>StardewModdingAPI.Tests</RootNamespace>
<AssemblyName>StardewModdingAPI.Tests</AssemblyName> <AssemblyName>StardewModdingAPI.Tests</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion> <TargetFramework>net45</TargetFramework>
<FileAlignment>512</FileAlignment> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<PlatformTarget>x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols> <ItemGroup>
<DebugType>full</DebugType> <ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj" />
<Optimize>false</Optimize> <ProjectReference Include="..\SMAPI.Toolkit\StardewModdingAPI.Toolkit.csproj" />
<OutputPath>bin\Debug\</OutputPath> <ProjectReference Include="..\SMAPI\StardewModdingAPI.csproj" />
<DefineConstants>DEBUG;TRACE</DefineConstants> </ItemGroup>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Castle.Core" Version="4.3.1" /> <PackageReference Include="Castle.Core" Version="4.3.1" />
<PackageReference Include="Moq" Version="4.10.0" /> <PackageReference Include="Moq" Version="4.10.0" />
@ -39,38 +24,17 @@
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" /> <PackageReference Include="System.Threading.Tasks.Extensions" Version="4.5.1" />
<PackageReference Include="System.ValueTuple" Version="4.5.0" /> <PackageReference Include="System.ValueTuple" Version="4.5.0" />
</ItemGroup> </ItemGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs"> <Compile Include="..\..\build\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link> <Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile> </Compile>
<Compile Include="Toolkit\PathUtilitiesTests.cs" />
<Compile Include="Utilities\SemanticVersionTests.cs" />
<Compile Include="Utilities\SDateTests.cs" />
<Compile Include="Core\TranslationTests.cs" />
<Compile Include="Core\ModResolverTests.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Sample.cs" />
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj">
<Project>{d5cfd923-37f1-4bc3-9be8-e506e202ac28}</Project>
<Name>StardewModdingAPI.Toolkit.CoreInterfaces</Name>
</ProjectReference>
<ProjectReference Include="..\StardewModdingAPI.Toolkit\StardewModdingAPI.Toolkit.csproj">
<Project>{ea5cfd2e-9453-4d29-b80f-8e0ea23f4ac6}</Project>
<Name>StardewModdingAPI.Toolkit</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" /> <Service Include="{82A7F48D-3B50-4B1E-B82E-3ADA8210C358}" />
</ItemGroup> </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\common.targets" /> <Import Project="..\..\build\common.targets" />
</Project> </Project>

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net4.5;netstandard2.0</TargetFrameworks> <TargetFrameworks>net4.5;netstandard2.0</TargetFrameworks>

View File

@ -40,14 +40,6 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi
/// <summary>The custom mod page URL (if applicable).</summary> /// <summary>The custom mod page URL (if applicable).</summary>
public string CustomUrl { get; set; } public string CustomUrl { get; set; }
/****
** SMAPI 3.0 readiness
****/
/// <summary>Whether the mod is ready for the upcoming SMAPI 3.0.</summary>
public WikiSmapi3Status Smapi3Status { get; set; }
/// <summary>A URL related to the <see cref="Smapi3Status"/>.</summary>
public string Smapi3Url { get; set; }
/**** /****
** Stable compatibility ** Stable compatibility
@ -59,6 +51,9 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi
/// <summary>The human-readable summary of the compatibility status or workaround, without HTML formatitng.</summary> /// <summary>The human-readable summary of the compatibility status or workaround, without HTML formatitng.</summary>
public string CompatibilitySummary { get; set; } public string CompatibilitySummary { get; set; }
/// <summary>The game or SMAPI version which broke this mod, if applicable.</summary>
public string BrokeIn { get; set; }
/**** /****
** Beta compatibility ** Beta compatibility
@ -70,6 +65,9 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi
/// <summary>The human-readable summary of the compatibility status or workaround for the Stardew Valley beta (if any), without HTML formatitng.</summary> /// <summary>The human-readable summary of the compatibility status or workaround for the Stardew Valley beta (if any), without HTML formatitng.</summary>
public string BetaCompatibilitySummary { get; set; } public string BetaCompatibilitySummary { get; set; }
/// <summary>The beta game or SMAPI version which broke this mod, if applicable.</summary>
public string BetaBrokeIn { get; set; }
/********* /*********
** Public methods ** Public methods
@ -94,14 +92,13 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.WebApi
this.CustomSourceUrl = wiki.CustomSourceUrl; this.CustomSourceUrl = wiki.CustomSourceUrl;
this.CustomUrl = wiki.CustomUrl; this.CustomUrl = wiki.CustomUrl;
this.Smapi3Status = wiki.Smapi3Status;
this.Smapi3Url = wiki.Smapi3Url;
this.CompatibilityStatus = wiki.Compatibility.Status; this.CompatibilityStatus = wiki.Compatibility.Status;
this.CompatibilitySummary = wiki.Compatibility.Summary; this.CompatibilitySummary = wiki.Compatibility.Summary;
this.BrokeIn = wiki.Compatibility.BrokeIn;
this.BetaCompatibilityStatus = wiki.BetaCompatibility?.Status; this.BetaCompatibilityStatus = wiki.BetaCompatibility?.Status;
this.BetaCompatibilitySummary = wiki.BetaCompatibility?.Summary; this.BetaCompatibilitySummary = wiki.BetaCompatibility?.Summary;
this.BetaBrokeIn = wiki.BetaCompatibility?.BrokeIn;
} }
// internal DB data // internal DB data

View File

@ -127,10 +127,6 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
} }
} }
// parse SMAPI 3.0 readiness status
WikiSmapi3Status smapi3Status = this.GetAttributeAsEnum<WikiSmapi3Status>(node, "data-smapi-3-status") ?? WikiSmapi3Status.Unknown;
string smapi3Url = this.GetAttribute(node, "data-smapi-3-url");
// yield model // yield model
yield return new WikiModEntry yield return new WikiModEntry
{ {
@ -146,8 +142,6 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
ContentPackFor = contentPackFor, ContentPackFor = contentPackFor,
Compatibility = compatibility, Compatibility = compatibility,
BetaCompatibility = betaCompatibility, BetaCompatibility = betaCompatibility,
Smapi3Status = smapi3Status,
Smapi3Url = smapi3Url,
Warnings = warnings, Warnings = warnings,
Anchor = anchor Anchor = anchor
}; };

View File

@ -42,12 +42,6 @@ namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
/// <summary>The mod's compatibility with the latest beta version of the game (if any).</summary> /// <summary>The mod's compatibility with the latest beta version of the game (if any).</summary>
public WikiCompatibilityInfo BetaCompatibility { get; set; } public WikiCompatibilityInfo BetaCompatibility { get; set; }
/// <summary>Whether the mod is ready for the upcoming SMAPI 3.0.</summary>
public WikiSmapi3Status Smapi3Status { get; set; }
/// <summary>A URL related to the <see cref="Smapi3Status"/>.</summary>
public string Smapi3Url { get; set; }
/// <summary>Whether a Stardew Valley or SMAPI beta which affects mod compatibility is in progress. If this is true, <see cref="BetaCompatibility"/> should be used for beta versions of SMAPI instead of <see cref="Compatibility"/>.</summary> /// <summary>Whether a Stardew Valley or SMAPI beta which affects mod compatibility is in progress. If this is true, <see cref="BetaCompatibility"/> should be used for beta versions of SMAPI instead of <see cref="Compatibility"/>.</summary>
public bool HasBetaInfo => this.BetaCompatibility != null; public bool HasBetaInfo => this.BetaCompatibility != null;

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFrameworks>net4.5;netstandard2.0</TargetFrameworks> <TargetFrameworks>net4.5;netstandard2.0</TargetFrameworks>
@ -6,6 +6,7 @@
<OutputPath>..\..\bin\$(Configuration)\SMAPI.Toolkit</OutputPath> <OutputPath>..\..\bin\$(Configuration)\SMAPI.Toolkit</OutputPath>
<DocumentationFile>..\..\bin\$(Configuration)\SMAPI.Toolkit\$(TargetFramework)\StardewModdingAPI.Toolkit.xml</DocumentationFile> <DocumentationFile>..\..\bin\$(Configuration)\SMAPI.Toolkit\$(TargetFramework)\StardewModdingAPI.Toolkit.xml</DocumentationFile>
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
<PlatformTarget Condition="'$(TargetFramework)' == 'net4.5'">x86</PlatformTarget>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
@ -19,7 +20,7 @@
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj" /> <ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj" />
</ItemGroup> </ItemGroup>
<Import Project="..\..\build\common.targets" /> <Import Project="..\..\build\common.targets" />

View File

@ -141,7 +141,7 @@ namespace StardewModdingAPI.Web.Controllers
foreach (GitAsset asset in release.Assets) foreach (GitAsset asset in release.Assets)
{ {
if (asset.FileName.StartsWith("Z_OLD")) if (asset.FileName.StartsWith("Z_"))
continue; continue;
Match match = Regex.Match(asset.FileName, @"SMAPI-(?<version>[\d\.]+(?:-.+)?)-installer(?<forDevs>-for-developers)?.zip"); Match match = Regex.Match(asset.FileName, @"SMAPI-(?<version>[\d\.]+(?:-.+)?)-installer(?<forDevs>-for-developers)?.zip");

View File

@ -15,7 +15,7 @@ namespace StardewModdingAPI.Web.Framework.LogParsing
** Fields ** Fields
*********/ *********/
/// <summary>A regex pattern matching the start of a SMAPI message.</summary> /// <summary>A regex pattern matching the start of a SMAPI message.</summary>
private readonly Regex MessageHeaderPattern = new Regex(@"^\[(?<time>\d\d:\d\d:\d\d) (?<level>[a-z]+) +(?<modName>[^\]]+)\] ", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly Regex MessageHeaderPattern = new Regex(@"^\[(?<time>\d\d[:\.]\d\d[:\.]\d\d) (?<level>[a-z]+) +(?<modName>[^\]]+)\] ", RegexOptions.Compiled | RegexOptions.IgnoreCase);
/// <summary>A regex pattern matching SMAPI's initial platform info message.</summary> /// <summary>A regex pattern matching SMAPI's initial platform info message.</summary>
private readonly Regex InfoLinePattern = new Regex(@"^SMAPI (?<apiVersion>.+) with Stardew Valley (?<gameVersion>.+) on (?<os>.+)", RegexOptions.Compiled | RegexOptions.IgnoreCase); private readonly Regex InfoLinePattern = new Regex(@"^SMAPI (?<apiVersion>.+) with Stardew Valley (?<gameVersion>.+) on (?<os>.+)", RegexOptions.Compiled | RegexOptions.IgnoreCase);

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework> <TargetFramework>netcoreapp2.0</TargetFramework>
@ -6,6 +6,10 @@
<LangVersion>latest</LangVersion> <LangVersion>latest</LangVersion>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<Content Remove="aws-beanstalk-tools-defaults.json" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" /> <Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
@ -25,7 +29,7 @@
</ItemGroup> </ItemGroup>
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" /> <Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit\StardewModdingAPI.Toolkit.csproj" /> <ProjectReference Include="..\SMAPI.Toolkit\StardewModdingAPI.Toolkit.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Content Update="Views\Index\Privacy.cshtml"> <Content Update="Views\Index\Privacy.cshtml">

View File

@ -31,12 +31,6 @@ namespace StardewModdingAPI.Web.ViewModels
/// <summary>The compatibility status for the beta version of the game.</summary> /// <summary>The compatibility status for the beta version of the game.</summary>
public ModCompatibilityModel BetaCompatibility { get; set; } public ModCompatibilityModel BetaCompatibility { get; set; }
/// <summary>Whether the mod is ready for the upcoming SMAPI 3.0.</summary>
public string Smapi3Status { get; set; }
/// <summary>A URL related to the <see cref="Smapi3Status"/>.</summary>
public string Smapi3Url { get; set; }
/// <summary>Links to the available mod pages.</summary> /// <summary>Links to the available mod pages.</summary>
public ModLinkModel[] ModPages { get; set; } public ModLinkModel[] ModPages { get; set; }
@ -65,8 +59,6 @@ namespace StardewModdingAPI.Web.ViewModels
this.SourceUrl = this.GetSourceUrl(entry); this.SourceUrl = this.GetSourceUrl(entry);
this.Compatibility = new ModCompatibilityModel(entry.Compatibility); this.Compatibility = new ModCompatibilityModel(entry.Compatibility);
this.BetaCompatibility = entry.BetaCompatibility != null ? new ModCompatibilityModel(entry.BetaCompatibility) : null; this.BetaCompatibility = entry.BetaCompatibility != null ? new ModCompatibilityModel(entry.BetaCompatibility) : null;
this.Smapi3Status = entry.Smapi3Status.ToString().ToLower();
this.Smapi3Url = entry.Smapi3Url;
this.ModPages = this.GetModPageUrls(entry).ToArray(); this.ModPages = this.GetModPageUrls(entry).ToArray();
this.Warnings = entry.Warnings; this.Warnings = entry.Warnings;
this.Slug = entry.Anchor; this.Slug = entry.Anchor;

View File

@ -6,9 +6,9 @@
ViewData["Title"] = "SMAPI"; ViewData["Title"] = "SMAPI";
} }
@section Head { @section Head {
<link rel="stylesheet" href="~/Content/css/index.css?r=20180615" /> <link rel="stylesheet" href="~/Content/css/index.css?r=20190620" />
<script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" crossorigin="anonymous"></script>
<script src="~/Content/js/index.js?r=20180615"></script> <script src="~/Content/js/index.js?r=20190620"></script>
} }
<p id="blurb"> <p id="blurb">
@ -79,27 +79,32 @@ else
<p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@SiteConfig.Value.ModListUrl">mod compatibility list</a> for more info.</p> <p>See the <a href="https://github.com/Pathoschild/SMAPI/blob/develop/docs/release-notes.md#release-notes">release notes</a> and <a href="@SiteConfig.Value.ModListUrl">mod compatibility list</a> for more info.</p>
} }
<h2 id="donate">Donate to support SMAPI ♥</h2> <h2 id="donate">Support SMAPI ♥</h2>
<p> <p>
SMAPI is an open-source project by Pathoschild. It will always be free, but donations SMAPI is an open-source project by Pathoschild. It will always be free, but donations
are much appreciated to help pay for development, server hosting, domain fees, coffee, etc. are much appreciated to help pay for development, server hosting, domain fees, coffee, etc.
</p> </p>
<ul id="support-links">
<li><a href="https://www.paypal.me/pathoschild">Donate once</a></li> <ul id="donate-links">
<li> <li>
<a href="https://www.patreon.com/pathoschild">Donate $1 per month (or more)</a><br /> <a href="https://www.patreon.com/pathoschild" class="donate-button">
<small> <img src="Content/images/patreon.png" /> Become a patron
You can cancel anytime. You'll have access to all private posts with behind-the-scenes </a>
info, upcoming features, and early previews of SMAPI updates. You can optionally </li>
provide early feedback on SMAPI features to influence development. Donate $5/month and <li>
you'll be publicly credited (with optional link) below! <a href="https://ko-fi.com/pathoschild" class="donate-button">
</small> <img src="Content/images/ko-fi.png"/> Buy me a coffee
</a>
</li>
<li>
<a href="https://www.paypal.me/pathoschild" class="donate-button">
<img src="Content/images/paypal.png"/> Donate via PayPal
</a>
</li> </li>
</ul> </ul>
<p> <p>
Special thanks to Special thanks to
acerbicon,
<a href="https://www.nexusmods.com/stardewvalley/users/31393530">ChefRude</a>, <a href="https://www.nexusmods.com/stardewvalley/users/31393530">ChefRude</a>,
<a href="https://github.com/dittusch">dittusch</a>, <a href="https://github.com/dittusch">dittusch</a>,
hawkfalcon, hawkfalcon,
@ -108,7 +113,7 @@ else
<a href="https://www.nexusmods.com/users/12252523">Karmylla</a>, <a href="https://www.nexusmods.com/users/12252523">Karmylla</a>,
Pucklynn, Pucklynn,
Robby LaFarge, Robby LaFarge,
and a few anonymous users for their ongoing support; you're awesome! 🏅 and a few anonymous users for their ongoing support on Patreon; you're awesome!
</p> </p>
<h2 id="modcreators">For mod creators</h2> <h2 id="modcreators">For mod creators</h2>

View File

@ -17,10 +17,10 @@
{ {
<meta name="robots" content="noindex" /> <meta name="robots" content="noindex" />
} }
<link rel="stylesheet" href="~/Content/css/log-parser.css?r=20190314" /> <link rel="stylesheet" href="~/Content/css/log-parser.css?r=20190515" />
<script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.min.js" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/vue@2.5.17/dist/vue.min.js" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" crossorigin="anonymous"></script> <script src="https://cdn.jsdelivr.net/npm/jquery@3.3.1/dist/jquery.min.js" crossorigin="anonymous"></script>
<script src="~/Content/js/log-parser.js?r=20190310"></script> <script src="~/Content/js/log-parser.js?r=20190515"></script>
<script> <script>
$(function() { $(function() {
smapi.logParser({ smapi.logParser({
@ -67,10 +67,20 @@ else if (Model.ParsedLog?.IsValid == true)
<h2>Where do I find my SMAPI log?</h2> <h2>Where do I find my SMAPI log?</h2>
<div>What system do you use?</div> <div>What system do you use?</div>
<ul id="os-list"> <ul id="os-list">
<li><input type="radio" name="os" value="android" id="os-android" /> <label for="os-android">Android</label></li>
<li><input type="radio" name="os" value="linux" id="os-linux" /> <label for="os-linux">Linux</label></li> <li><input type="radio" name="os" value="linux" id="os-linux" /> <label for="os-linux">Linux</label></li>
<li><input type="radio" name="os" value="mac" id="os-mac" /> <label for="os-mac">Mac</label></li> <li><input type="radio" name="os" value="mac" id="os-mac" /> <label for="os-mac">Mac</label></li>
<li><input type="radio" name="os" value="windows" id="os-windows" /> <label for="os-windows">Windows</label></li> <li><input type="radio" name="os" value="windows" id="os-windows" /> <label for="os-windows">Windows</label></li>
</ul> </ul>
<div data-os="android">
On Android:
<ol>
<li>Open a file app (like My Files or MT Manager).</li>
<li>Find the <code>StardewValley</code> folder on your internal storage.</li>
<li>Open the <code>ErrorLogs</code> subfolder.</li>
<li>The log file is <code>SMAPI-crash.txt</code> if it exists, otherwise <code>SMAPI-latest.txt</code>.</li>
</ol>
</div>
<div data-os="linux"> <div data-os="linux">
On Linux: On Linux:
<ol> <ol>

View File

@ -18,18 +18,18 @@
</script> </script>
} }
<div id="intro"> <div id="app">
<div id="intro">
<p>This page shows all known SMAPI mods and (incompatible) content packs, whether they work with the latest versions of Stardew Valley and SMAPI, and how to fix them if not. If a mod doesn't work after following the instructions below, check <a href="https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting">the troubleshooting guide</a> or <a href="https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting#Ask_for_help">ask for help</a>.</p> <p>This page shows all known SMAPI mods and (incompatible) content packs, whether they work with the latest versions of Stardew Valley and SMAPI, and how to fix them if not. If a mod doesn't work after following the instructions below, check <a href="https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting">the troubleshooting guide</a> or <a href="https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting#Ask_for_help">ask for help</a>.</p>
<p>The list is updated every few days (you can help <a href="https://stardewvalleywiki.com/Modding:Mod_compatibility">update it</a>!). It doesn't include XNB mods (see <a href="https://stardewvalleywiki.com/Modding:Using_XNB_mods"><em>using XNB mods</em> on the wiki</a> instead) or compatible content packs.</p> <p>The list is updated every few days (you can help <a href="https://stardewvalleywiki.com/Modding:Mod_compatibility">update it</a>!). It doesn't include XNB mods (see <a href="https://stardewvalleywiki.com/Modding:Using_XNB_mods"><em>using XNB mods</em> on the wiki</a> instead) or compatible content packs.</p>
@if (Model.BetaVersion != null) @if (Model.BetaVersion != null)
{ {
<p id="beta-blurb"><strong>Note:</strong> "SDV beta only" means Stardew Valley @Model.BetaVersion-beta; if you didn't opt in to the beta, you have the stable version and can ignore that line. If a mod doesn't have a "SDV beta only" line, the compatibility applies to both versions of the game.</p> <p id="beta-blurb" v-show="showAdvanced"><strong>Note:</strong> "SDV @Model.BetaVersion only" lines are for an unreleased version of the game, not the stable version most players have. If a mod doesn't have that line, the info applies to both versions of the game.</p>
} }
</div> </div>
<div id="app">
<div id="options"> <div id="options">
<div> <div>
<label for="search-box">Search: </label> <label for="search-box">Search: </label>
@ -47,8 +47,7 @@
</div> </div>
<div id="mod-count" v-show="showAdvanced"> <div id="mod-count" v-show="showAdvanced">
<div v-if="visibleStats.total > 0"> <div v-if="visibleStats.total > 0">
{{visibleStats.total}} mods shown ({{Math.round((visibleStats.compatible + visibleStats.workaround) / visibleStats.total * 100)}}% compatible or have a workaround, {{Math.round((visibleStats.soon + visibleStats.broken) / visibleStats.total * 100)}}% broken, {{Math.round(visibleStats.abandoned / visibleStats.total * 100)}}% obsolete).<br /> {{visibleStats.total}} mods shown ({{Math.round((visibleStats.compatible + visibleStats.workaround) / visibleStats.total * 100)}}% compatible or have a workaround, {{Math.round((visibleStats.soon + visibleStats.broken) / visibleStats.total * 100)}}% broken, {{Math.round(visibleStats.abandoned / visibleStats.total * 100)}}% obsolete).
SMAPI 3.0 (upcoming): {{Math.round(visibleStats.smapi3_ok / visibleStats.total * 100)}}% ready, {{Math.round(visibleStats.smapi3_soon / visibleStats.total * 100)}}% soon, {{Math.round(visibleStats.smapi3_broken / visibleStats.total * 100)}}% broken, {{Math.round(visibleStats.smapi3_unknown / visibleStats.total * 100)}}% unknown.
</div> </div>
<span v-else>No matching mods found.</span> <span v-else>No matching mods found.</span>
</div> </div>
@ -61,12 +60,11 @@
<th>compatibility</th> <th>compatibility</th>
<th v-show="showAdvanced">broke in</th> <th v-show="showAdvanced">broke in</th>
<th v-show="showAdvanced">code</th> <th v-show="showAdvanced">code</th>
<th><small><a href="http://smapi.io/3.0">3.0 ready</a></small></th>
<th>&nbsp;</th> <th>&nbsp;</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.LatestCompatibility.Status" v-show="mod.Visible"> <tr v-for="mod in mods" :key="mod.Name" v-bind:id="mod.Slug" :key="mod.Slug" v-bind:data-status="mod.Compatibility.Status" v-show="mod.Visible">
<td> <td>
{{mod.Name}} {{mod.Name}}
<small class="mod-alt-names" v-if="mod.AlternateNames">(aka {{mod.AlternateNames}})</small> <small class="mod-alt-names" v-if="mod.AlternateNames">(aka {{mod.AlternateNames}})</small>
@ -82,8 +80,8 @@
</td> </td>
<td> <td>
<div v-html="mod.Compatibility.Summary"></div> <div v-html="mod.Compatibility.Summary"></div>
<div v-if="mod.BetaCompatibility"> <div v-if="mod.BetaCompatibility" v-show="showAdvanced">
<strong v-if="mod.BetaCompatibility">SDV beta only:</strong> <strong v-if="mod.BetaCompatibility">SDV @Model.BetaVersion only:</strong>
<span v-html="mod.BetaCompatibility.Summary"></span> <span v-html="mod.BetaCompatibility.Summary"></span>
</div> </div>
<div v-for="(warning, i) in mod.Warnings">⚠ {{warning}}</div> <div v-for="(warning, i) in mod.Warnings">⚠ {{warning}}</div>
@ -93,12 +91,6 @@
<span v-if="mod.SourceUrl"><a v-bind:href="mod.SourceUrl">source</a></span> <span v-if="mod.SourceUrl"><a v-bind:href="mod.SourceUrl">source</a></span>
<span v-else class="mod-closed-source">no source</span> <span v-else class="mod-closed-source">no source</span>
</td> </td>
<td class="smapi-3-col">
<small v-if="mod.LatestCompatibility.Status == 'ok' || mod.LatestCompatibility.Status == 'unofficial' || mod.LatestCompatibility.Status == 'optional' || mod.Smapi3Status == 'ok' || mod.Smapi3Status == 'soon' || mod.Smapi3Url">
<a v-if="mod.Smapi3Url" v-bind:href="mod.Smapi3Url" v-bind:title="mod.Smapi3Tooltip">{{mod.Smapi3DisplayText}}</a>
<span v-else v-bind:title="mod.Smapi3Tooltip">{{mod.Smapi3DisplayText}}</span>
</small>
</td>
<td> <td>
<small><a v-bind:href="'#' + mod.Slug">#</a></small> <small><a v-bind:href="'#' + mod.Slug">#</a></small>
</td> </td>

View File

@ -48,7 +48,7 @@
}, },
"ModCompatibilityList": { "ModCompatibilityList": {
"WikiCacheMinutes": 10 "CacheMinutes": 10
}, },
"ModUpdateCheck": { "ModUpdateCheck": {

View File

@ -106,7 +106,25 @@ h1 {
padding-left: 1em; padding-left: 1em;
} }
#support-links li small { #donate-links li {
display: block; list-style: none;
width: 50em; margin-bottom: 5px;
}
#donate-links .donate-button {
display: inline-block;
min-width: 10em;
background: #2A413B;
padding: 6px 12px;
font-family: Quicksand, Helvetica, Century Gothic, sans-serif;
text-decoration: none;
font-weight: 700;
color: #FFF;
border-radius: 8px;
}
#donate-links .donate-button img {
vertical-align: middle;
max-height: 15px;
max-width: 15px;
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

View File

@ -11,11 +11,7 @@ smapi.modList = function (mods, enableBeta) {
soon: 0, soon: 0,
broken: 0, broken: 0,
abandoned: 0, abandoned: 0,
invalid: 0, invalid: 0
smapi3_unknown: 0,
smapi3_ok: 0,
smapi3_broken: 0,
smapi3_soon: 0
}; };
var data = { var data = {
mods: mods, mods: mods,
@ -52,16 +48,6 @@ smapi.modList = function (mods, enableBeta) {
nexus: { value: true, label: "Nexus" }, nexus: { value: true, label: "Nexus" },
custom: { value: true } custom: { value: true }
} }
},
smapi3: {
label: "SMAPI 3.0",
value: {
// note: keys must match status returned by the API
ok: { value: true, label: "ready" },
soon: { value: true },
broken: { value: true },
unknown: { value: true }
}
} }
}, },
search: "" search: ""
@ -87,8 +73,6 @@ smapi.modList = function (mods, enableBeta) {
else else
delete data.filters.betaStatus; delete data.filters.betaStatus;
window.boop = data.filters;
// init mods // init mods
for (var i = 0; i < data.mods.length; i++) { for (var i = 0; i < data.mods.length; i++) {
var mod = mods[i]; var mod = mods[i];
@ -99,24 +83,6 @@ smapi.modList = function (mods, enableBeta) {
// set overall compatibility // set overall compatibility
mod.LatestCompatibility = mod.BetaCompatibility || mod.Compatibility; mod.LatestCompatibility = mod.BetaCompatibility || mod.Compatibility;
// set SMAPI 3.0 display text
switch (mod.Smapi3Status) {
case "ok":
mod.Smapi3DisplayText = "✓ yes";
mod.Smapi3Tooltip = "The latest version of this mod is compatible with SMAPI 3.0.";
break;
case "broken":
mod.Smapi3DisplayText = "✖ no";
mod.Smapi3Tooltip = "This mod will break in SMAPI 3.0; consider notifying the author.";
break;
default:
mod.Smapi3DisplayText = "↻ " + mod.Smapi3Status;
mod.Smapi3Tooltip = "This mod has a pending update for SMAPI 3.0 which hasn't been released yet.";
break;
}
// concatenate searchable text // concatenate searchable text
mod.SearchableText = [mod.Name, mod.AlternateNames, mod.Author, mod.AlternateAuthors, mod.Compatibility.Summary, mod.BrokeIn]; mod.SearchableText = [mod.Name, mod.AlternateNames, mod.Author, mod.AlternateAuthors, mod.Compatibility.Summary, mod.BrokeIn];
if (mod.Compatibility.UnofficialVersion) if (mod.Compatibility.UnofficialVersion)
@ -173,7 +139,6 @@ smapi.modList = function (mods, enableBeta) {
if (mod.Visible) { if (mod.Visible) {
stats.total++; stats.total++;
stats[this.getCompatibilityGroup(mod)]++; stats[this.getCompatibilityGroup(mod)]++;
stats["smapi3_" + mod.Smapi3Status]++;
} }
} }
}, },
@ -188,6 +153,10 @@ smapi.modList = function (mods, enableBeta) {
matchesFilters: function(mod, searchWords) { matchesFilters: function(mod, searchWords) {
var filters = data.filters; var filters = data.filters;
// check hash
if (location.hash === "#" + mod.Slug)
return true;
// check source // check source
if (!filters.source.value.open.value && mod.SourceUrl) if (!filters.source.value.open.value && mod.SourceUrl)
return false; return false;
@ -206,10 +175,6 @@ smapi.modList = function (mods, enableBeta) {
return false; return false;
} }
// check SMAPI 3.0 compatibility
if (filters.smapi3.value[mod.Smapi3Status] && !filters.smapi3.value[mod.Smapi3Status].value)
return false;
// check download sites // check download sites
var ignoreSites = []; var ignoreSites = [];
@ -281,4 +246,7 @@ smapi.modList = function (mods, enableBeta) {
} }
}); });
app.applyFilters(); app.applyFilters();
window.addEventListener("hashchange", function () {
app.applyFilters();
});
}; };

View File

@ -20,7 +20,7 @@ namespace StardewModdingAPI
** Public ** Public
****/ ****/
/// <summary>SMAPI's current semantic version.</summary> /// <summary>SMAPI's current semantic version.</summary>
public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.11.2"); public static ISemanticVersion ApiVersion { get; } = new Toolkit.SemanticVersion("2.11.3");
/// <summary>Android SMAPI's current semantic version.</summary> /// <summary>Android SMAPI's current semantic version.</summary>
public static ISemanticVersion AndroidApiVersion { get; } = new Toolkit.SemanticVersion("0.9.0"); public static ISemanticVersion AndroidApiVersion { get; } = new Toolkit.SemanticVersion("0.9.0");

View File

@ -139,7 +139,7 @@ namespace StardewModdingAPI.Framework.ContentManagers
throw GetContentError($"can't read unpacked map file directly from the underlying content manager. It must be loaded through the mod's {typeof(IModHelper)}.{nameof(IModHelper.Content)} helper."); throw GetContentError($"can't read unpacked map file directly from the underlying content manager. It must be loaded through the mod's {typeof(IModHelper)}.{nameof(IModHelper.Content)} helper.");
default: default:
throw GetContentError($"unknown file extension '{file.Extension}'; must be one of '.png', '.tbin', or '.xnb'."); throw GetContentError($"unknown file extension '{file.Extension}'; must be one of '.json', '.png', '.tbin', or '.xnb'.");
} }
} }
catch (Exception ex) when (!(ex is SContentLoadException)) catch (Exception ex) when (!(ex is SContentLoadException))

View File

@ -132,7 +132,7 @@ namespace StardewModdingAPI.Framework
else else
{ {
this.Monitor.Log(message, level); this.Monitor.Log(message, level);
this.Monitor.Log(warning.StackTrace); this.Monitor.Log(warning.StackTrace, LogLevel.Debug);
} }
} }
} }

View File

@ -78,7 +78,7 @@ namespace StardewModdingAPI.Framework
/// <summary>Log a message for the player or developer.</summary> /// <summary>Log a message for the player or developer.</summary>
/// <param name="message">The message to log.</param> /// <param name="message">The message to log.</param>
/// <param name="level">The log severity level.</param> /// <param name="level">The log severity level.</param>
public void Log(string message, LogLevel level = LogLevel.Debug) public void Log(string message, LogLevel level = LogLevel.Trace)
{ {
this.LogImpl(this.Source, message, (ConsoleLogLevel)level); this.LogImpl(this.Source, message, (ConsoleLogLevel)level);
} }

View File

@ -778,8 +778,8 @@ namespace StardewModdingAPI.Framework
if (this.Monitor.IsVerbose) if (this.Monitor.IsVerbose)
{ {
string addedText = this.Watchers.LocationsWatcher.Added.Any() ? string.Join(", ", added.Select(p => p.Name)) : "none"; string addedText = added.Any() ? string.Join(", ", added.Select(p => p.Name)) : "none";
string removedText = this.Watchers.LocationsWatcher.Removed.Any() ? string.Join(", ", removed.Select(p => p.Name)) : "none"; string removedText = removed.Any() ? string.Join(", ", removed.Select(p => p.Name)) : "none";
this.Monitor.Log($"Context: location list changed (added {addedText}; removed {removedText}).", LogLevel.Trace); this.Monitor.Log($"Context: location list changed (added {addedText}; removed {removedText}).", LogLevel.Trace);
} }

View File

@ -19,7 +19,7 @@ namespace StardewModdingAPI
/// <summary>Log a message for the player or developer.</summary> /// <summary>Log a message for the player or developer.</summary>
/// <param name="message">The message to log.</param> /// <param name="message">The message to log.</param>
/// <param name="level">The log severity level.</param> /// <param name="level">The log severity level.</param>
void Log(string message, LogLevel level = LogLevel.Debug); void Log(string message, LogLevel level = LogLevel.Trace);
/// <summary>Log a message that only appears when <see cref="IsVerbose"/> is enabled.</summary> /// <summary>Log a message that only appears when <see cref="IsVerbose"/> is enabled.</summary>
/// <param name="message">The message to log.</param> /// <param name="message">The message to log.</param>

View File

@ -13,7 +13,7 @@ namespace StardewModdingAPI.Patches
internal class DialogueErrorPatch : IHarmonyPatch internal class DialogueErrorPatch : IHarmonyPatch
{ {
/********* /*********
** Private methods ** Fields
*********/ *********/
/// <summary>Writes messages to the console and log file on behalf of the game.</summary> /// <summary>Writes messages to the console and log file on behalf of the game.</summary>
private static IMonitor MonitorForGame; private static IMonitor MonitorForGame;
@ -21,6 +21,9 @@ namespace StardewModdingAPI.Patches
/// <summary>Simplifies access to private code.</summary> /// <summary>Simplifies access to private code.</summary>
private static Reflector Reflection; private static Reflector Reflection;
/// <summary>Whether the <see cref="NPC.CurrentDialogue"/> getter is currently being intercepted.</summary>
private static bool IsInterceptingCurrentDialogue;
/********* /*********
** Accessors ** Accessors
@ -46,10 +49,14 @@ namespace StardewModdingAPI.Patches
/// <param name="harmony">The Harmony instance.</param> /// <param name="harmony">The Harmony instance.</param>
public void Apply(HarmonyInstance harmony) public void Apply(HarmonyInstance harmony)
{ {
ConstructorInfo constructor = AccessTools.Constructor(typeof(Dialogue), new[] { typeof(string), typeof(NPC) }); harmony.Patch(
MethodInfo prefix = AccessTools.Method(this.GetType(), nameof(DialogueErrorPatch.Prefix)); original: AccessTools.Constructor(typeof(Dialogue), new[] { typeof(string), typeof(NPC) }),
prefix: new HarmonyMethod(this.GetType(), nameof(DialogueErrorPatch.Before_Dialogue_Constructor))
harmony.Patch(constructor, new HarmonyMethod(prefix), null); );
harmony.Patch(
original: AccessTools.Property(typeof(NPC), nameof(NPC.CurrentDialogue)).GetMethod,
prefix: new HarmonyMethod(this.GetType(), nameof(DialogueErrorPatch.Before_NPC_CurrentDialogue))
);
} }
@ -63,7 +70,7 @@ namespace StardewModdingAPI.Patches
/// <returns>Returns whether to execute the original method.</returns> /// <returns>Returns whether to execute the original method.</returns>
/// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks> /// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")] [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
private static bool Prefix(Dialogue __instance, string masterDialogue, NPC speaker) private static bool Before_Dialogue_Constructor(Dialogue __instance, string masterDialogue, NPC speaker)
{ {
// get private members // get private members
bool nameArraysTranslated = DialogueErrorPatch.Reflection.GetField<bool>(typeof(Dialogue), "nameArraysTranslated").GetValue(); bool nameArraysTranslated = DialogueErrorPatch.Reflection.GetField<bool>(typeof(Dialogue), "nameArraysTranslated").GetValue();
@ -96,5 +103,35 @@ namespace StardewModdingAPI.Patches
return false; return false;
} }
/// <summary>The method to call instead of <see cref="NPC.CurrentDialogue"/>.</summary>
/// <param name="__instance">The instance being patched.</param>
/// <param name="__result">The return value of the original method.</param>
/// <param name="__originalMethod">The method being wrapped.</param>
/// <returns>Returns whether to execute the original method.</returns>
/// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
private static bool Before_NPC_CurrentDialogue(NPC __instance, ref Stack<Dialogue> __result, MethodInfo __originalMethod)
{
if (DialogueErrorPatch.IsInterceptingCurrentDialogue)
return true;
try
{
DialogueErrorPatch.IsInterceptingCurrentDialogue = true;
__result = (Stack<Dialogue>)__originalMethod.Invoke(__instance, new object[0]);
return false;
}
catch (TargetInvocationException ex)
{
DialogueErrorPatch.MonitorForGame.Log($"Failed loading current dialogue for NPC {__instance.Name}:\n{ex.InnerException ?? ex}", LogLevel.Error);
__result = new Stack<Dialogue>();
return false;
}
finally
{
DialogueErrorPatch.IsInterceptingCurrentDialogue = false;
}
}
} }
} }

View File

@ -0,0 +1,84 @@
using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using Harmony;
using StardewModdingAPI.Framework.Patching;
using StardewValley;
namespace StardewModdingAPI.Patches
{
/// <summary>A Harmony patch for the <see cref="Dialogue"/> constructor which intercepts invalid dialogue lines and logs an error instead of crashing.</summary>
internal class EventErrorPatch : IHarmonyPatch
{
/*********
** Fields
*********/
/// <summary>Writes messages to the console and log file on behalf of the game.</summary>
private static IMonitor MonitorForGame;
/// <summary>Whether the method is currently being intercepted.</summary>
private static bool IsIntercepted;
/*********
** Accessors
*********/
/// <summary>A unique name for this patch.</summary>
public string Name => $"{nameof(EventErrorPatch)}";
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
/// <param name="monitorForGame">Writes messages to the console and log file on behalf of the game.</param>
public EventErrorPatch(IMonitor monitorForGame)
{
EventErrorPatch.MonitorForGame = monitorForGame;
}
/// <summary>Apply the Harmony patch.</summary>
/// <param name="harmony">The Harmony instance.</param>
public void Apply(HarmonyInstance harmony)
{
harmony.Patch(
original: AccessTools.Method(typeof(GameLocation), "checkEventPrecondition"),
prefix: new HarmonyMethod(this.GetType(), nameof(EventErrorPatch.Before_GameLocation_CheckEventPrecondition))
);
}
/*********
** Private methods
*********/
/// <summary>The method to call instead of the GameLocation.CheckEventPrecondition.</summary>
/// <param name="__instance">The instance being patched.</param>
/// <param name="__result">The return value of the original method.</param>
/// <param name="precondition">The precondition to be parsed.</param>
/// <param name="__originalMethod">The method being wrapped.</param>
/// <returns>Returns whether to execute the original method.</returns>
/// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
private static bool Before_GameLocation_CheckEventPrecondition(GameLocation __instance, ref int __result, string precondition, MethodInfo __originalMethod)
{
if (EventErrorPatch.IsIntercepted)
return true;
try
{
EventErrorPatch.IsIntercepted = true;
__result = (int)__originalMethod.Invoke(__instance, new object[] { precondition });
return false;
}
catch (TargetInvocationException ex)
{
__result = -1;
EventErrorPatch.MonitorForGame.Log($"Failed parsing event precondition ({precondition}):\n{ex.InnerException}", LogLevel.Error);
return false;
}
finally
{
EventErrorPatch.IsIntercepted = false;
}
}
}
}

View File

@ -1,7 +1,6 @@
using System; using System;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Collections.Specialized; using System.Collections.Specialized;
using System.Reflection;
using Harmony; using Harmony;
using StardewModdingAPI.Enums; using StardewModdingAPI.Enums;
using StardewModdingAPI.Framework.Patching; using StardewModdingAPI.Framework.Patching;
@ -13,10 +12,10 @@ namespace StardewModdingAPI.Patches
{ {
/// <summary>A Harmony patch for <see cref="Game1.loadForNewGame"/> which notifies SMAPI for save creation load stages.</summary> /// <summary>A Harmony patch for <see cref="Game1.loadForNewGame"/> which notifies SMAPI for save creation load stages.</summary>
/// <remarks>This patch hooks into <see cref="Game1.loadForNewGame"/>, checks if <c>TitleMenu.transitioningCharacterCreationMenu</c> is true (which means the player is creating a new save file), then raises <see cref="LoadStage.CreatedBasicInfo"/> after the location list is cleared twice (the second clear happens right before locations are created), and <see cref="LoadStage.CreatedLocations"/> when the method ends.</remarks> /// <remarks>This patch hooks into <see cref="Game1.loadForNewGame"/>, checks if <c>TitleMenu.transitioningCharacterCreationMenu</c> is true (which means the player is creating a new save file), then raises <see cref="LoadStage.CreatedBasicInfo"/> after the location list is cleared twice (the second clear happens right before locations are created), and <see cref="LoadStage.CreatedLocations"/> when the method ends.</remarks>
internal class LoadForNewGamePatch : IHarmonyPatch internal class LoadContextPatch : IHarmonyPatch
{ {
/********* /*********
** Accessors ** Fields
*********/ *********/
/// <summary>Simplifies access to private code.</summary> /// <summary>Simplifies access to private code.</summary>
private static Reflector Reflection; private static Reflector Reflection;
@ -28,14 +27,14 @@ namespace StardewModdingAPI.Patches
private static bool IsCreating; private static bool IsCreating;
/// <summary>The number of times that <see cref="Game1.locations"/> has been cleared since <see cref="Game1.loadForNewGame"/> started.</summary> /// <summary>The number of times that <see cref="Game1.locations"/> has been cleared since <see cref="Game1.loadForNewGame"/> started.</summary>
private static int TimesLocationsCleared = 0; private static int TimesLocationsCleared;
/********* /*********
** Accessors ** Accessors
*********/ *********/
/// <summary>A unique name for this patch.</summary> /// <summary>A unique name for this patch.</summary>
public string Name => $"{nameof(LoadForNewGamePatch)}"; public string Name => $"{nameof(LoadContextPatch)}";
/********* /*********
@ -44,21 +43,21 @@ namespace StardewModdingAPI.Patches
/// <summary>Construct an instance.</summary> /// <summary>Construct an instance.</summary>
/// <param name="reflection">Simplifies access to private code.</param> /// <param name="reflection">Simplifies access to private code.</param>
/// <param name="onStageChanged">A callback to invoke when the load stage changes.</param> /// <param name="onStageChanged">A callback to invoke when the load stage changes.</param>
public LoadForNewGamePatch(Reflector reflection, Action<LoadStage> onStageChanged) public LoadContextPatch(Reflector reflection, Action<LoadStage> onStageChanged)
{ {
LoadForNewGamePatch.Reflection = reflection; LoadContextPatch.Reflection = reflection;
LoadForNewGamePatch.OnStageChanged = onStageChanged; LoadContextPatch.OnStageChanged = onStageChanged;
} }
/// <summary>Apply the Harmony patch.</summary> /// <summary>Apply the Harmony patch.</summary>
/// <param name="harmony">The Harmony instance.</param> /// <param name="harmony">The Harmony instance.</param>
public void Apply(HarmonyInstance harmony) public void Apply(HarmonyInstance harmony)
{ {
MethodInfo method = AccessTools.Method(typeof(Game1), nameof(Game1.loadForNewGame)); harmony.Patch(
MethodInfo prefix = AccessTools.Method(this.GetType(), nameof(LoadForNewGamePatch.Prefix)); original: AccessTools.Method(typeof(Game1), nameof(Game1.loadForNewGame)),
MethodInfo postfix = AccessTools.Method(this.GetType(), nameof(LoadForNewGamePatch.Postfix)); prefix: new HarmonyMethod(this.GetType(), nameof(LoadContextPatch.Before_Game1_LoadForNewGame)),
postfix: new HarmonyMethod(this.GetType(), nameof(LoadContextPatch.After_Game1_LoadForNewGame))
harmony.Patch(method, new HarmonyMethod(prefix), new HarmonyMethod(postfix)); );
} }
@ -68,15 +67,15 @@ namespace StardewModdingAPI.Patches
/// <summary>The method to call instead of <see cref="Game1.loadForNewGame"/>.</summary> /// <summary>The method to call instead of <see cref="Game1.loadForNewGame"/>.</summary>
/// <returns>Returns whether to execute the original method.</returns> /// <returns>Returns whether to execute the original method.</returns>
/// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks> /// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
private static bool Prefix() private static bool Before_Game1_LoadForNewGame()
{ {
LoadForNewGamePatch.IsCreating = Game1.activeClickableMenu is TitleMenu menu && LoadForNewGamePatch.Reflection.GetField<bool>(menu, "transitioningCharacterCreationMenu").GetValue(); LoadContextPatch.IsCreating = Game1.activeClickableMenu is TitleMenu menu && LoadContextPatch.Reflection.GetField<bool>(menu, "transitioningCharacterCreationMenu").GetValue();
LoadForNewGamePatch.TimesLocationsCleared = 0; LoadContextPatch.TimesLocationsCleared = 0;
if (LoadForNewGamePatch.IsCreating) if (LoadContextPatch.IsCreating)
{ {
// raise CreatedBasicInfo after locations are cleared twice // raise CreatedBasicInfo after locations are cleared twice
ObservableCollection<GameLocation> locations = (ObservableCollection<GameLocation>)Game1.locations; ObservableCollection<GameLocation> locations = (ObservableCollection<GameLocation>)Game1.locations;
locations.CollectionChanged += LoadForNewGamePatch.OnLocationListChanged; locations.CollectionChanged += LoadContextPatch.OnLocationListChanged;
} }
return true; return true;
@ -84,16 +83,16 @@ namespace StardewModdingAPI.Patches
/// <summary>The method to call instead after <see cref="Game1.loadForNewGame"/>.</summary> /// <summary>The method to call instead after <see cref="Game1.loadForNewGame"/>.</summary>
/// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks> /// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
private static void Postfix() private static void After_Game1_LoadForNewGame()
{ {
if (LoadForNewGamePatch.IsCreating) if (LoadContextPatch.IsCreating)
{ {
// clean up // clean up
ObservableCollection<GameLocation> locations = (ObservableCollection<GameLocation>) Game1.locations; ObservableCollection<GameLocation> locations = (ObservableCollection<GameLocation>)Game1.locations;
locations.CollectionChanged -= LoadForNewGamePatch.OnLocationListChanged; locations.CollectionChanged -= LoadContextPatch.OnLocationListChanged;
// raise stage changed // raise stage changed
LoadForNewGamePatch.OnStageChanged(LoadStage.CreatedLocations); LoadContextPatch.OnStageChanged(LoadStage.CreatedLocations);
} }
} }
@ -102,8 +101,8 @@ namespace StardewModdingAPI.Patches
/// <param name="e">The event arguments.</param> /// <param name="e">The event arguments.</param>
private static void OnLocationListChanged(object sender, NotifyCollectionChangedEventArgs e) private static void OnLocationListChanged(object sender, NotifyCollectionChangedEventArgs e)
{ {
if (++LoadForNewGamePatch.TimesLocationsCleared == 2) if (++LoadContextPatch.TimesLocationsCleared == 2)
LoadForNewGamePatch.OnStageChanged(LoadStage.CreatedBasicInfo); LoadContextPatch.OnStageChanged(LoadStage.CreatedBasicInfo);
} }
} }
} }

View File

@ -1,8 +1,8 @@
using System.Diagnostics.CodeAnalysis; using System.Diagnostics.CodeAnalysis;
using System.Reflection;
using Harmony; using Harmony;
using StardewModdingAPI.Framework.Patching; using StardewModdingAPI.Framework.Patching;
using StardewValley; using StardewValley;
using StardewValley.Menus;
using SObject = StardewValley.Object; using SObject = StardewValley.Object;
namespace StardewModdingAPI.Patches namespace StardewModdingAPI.Patches
@ -24,10 +24,17 @@ namespace StardewModdingAPI.Patches
/// <param name="harmony">The Harmony instance.</param> /// <param name="harmony">The Harmony instance.</param>
public void Apply(HarmonyInstance harmony) public void Apply(HarmonyInstance harmony)
{ {
MethodInfo method = AccessTools.Method(typeof(SObject), nameof(SObject.getDescription)); // object.getDescription
MethodInfo prefix = AccessTools.Method(this.GetType(), nameof(ObjectErrorPatch.Prefix)); harmony.Patch(
original: AccessTools.Method(typeof(SObject), nameof(SObject.getDescription)),
prefix: new HarmonyMethod(this.GetType(), nameof(ObjectErrorPatch.Before_Object_GetDescription))
);
harmony.Patch(method, new HarmonyMethod(prefix), null); // IClickableMenu.drawToolTip
harmony.Patch(
original: AccessTools.Method(typeof(IClickableMenu), nameof(IClickableMenu.drawToolTip)),
prefix: new HarmonyMethod(this.GetType(), nameof(ObjectErrorPatch.Before_IClickableMenu_DrawTooltip))
);
} }
@ -40,7 +47,7 @@ namespace StardewModdingAPI.Patches
/// <returns>Returns whether to execute the original method.</returns> /// <returns>Returns whether to execute the original method.</returns>
/// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks> /// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")] [SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
private static bool Prefix(SObject __instance, ref string __result) private static bool Before_Object_GetDescription(SObject __instance, ref string __result)
{ {
// invalid bigcraftables crash instead of showing '???' like invalid non-bigcraftables // invalid bigcraftables crash instead of showing '???' like invalid non-bigcraftables
if (!__instance.IsRecipe && __instance.bigCraftable.Value && !Game1.bigCraftablesInformation.ContainsKey(__instance.ParentSheetIndex)) if (!__instance.IsRecipe && __instance.bigCraftable.Value && !Game1.bigCraftablesInformation.ContainsKey(__instance.ParentSheetIndex))
@ -51,5 +58,20 @@ namespace StardewModdingAPI.Patches
return true; return true;
} }
/// <summary>The method to call instead of <see cref="IClickableMenu.drawToolTip"/>.</summary>
/// <param name="__instance">The instance being patched.</param>
/// <param name="hoveredItem">The item for which to draw a tooltip.</param>
/// <returns>Returns whether to execute the original method.</returns>
/// <remarks>This method must be static for Harmony to work correctly. See the Harmony documentation before renaming arguments.</remarks>
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Argument names are defined by Harmony.")]
private static bool Before_IClickableMenu_DrawTooltip(IClickableMenu __instance, Item hoveredItem)
{
// invalid edible item cause crash when drawing tooltips
if (hoveredItem is SObject obj && obj.Edibility != -300 && !Game1.objectInformation.ContainsKey(obj.ParentSheetIndex))
return false;
return true;
}
} }
} }

View File

@ -0,0 +1,77 @@
/*
This file contains advanced configuration for SMAPI. You generally shouldn't change this file.
*/
{
/**
* The console color theme to use. The possible values are:
* - AutoDetect: SMAPI will assume a light background on Mac, and detect the background color automatically on Linux or Windows.
* - LightBackground: use darker text colors that look better on a white or light background.
* - DarkBackground: use lighter text colors that look better on a black or dark background.
*/
"ColorScheme": "AutoDetect",
/**
* Whether SMAPI should check for newer versions of SMAPI and mods when you load the game. If new
* versions are available, an alert will be shown in the console. This doesn't affect the load
* time even if your connection is offline or slow, because it happens in the background.
*/
"CheckForUpdates": true,
/**
* Whether to enable features intended for mod developers. Currently this only makes TRACE-level
* messages appear in the console.
*/
"DeveloperMode": true,
/**
* Whether to add a section to the 'mod issues' list for mods which directly use potentially
* sensitive .NET APIs like file or shell access. Note that many mods do this legitimately as
* part of their normal functionality, so these warnings are meaningless without further
* investigation. When this is commented out, it'll be true for local debug builds and false
* otherwise.
*/
//"ParanoidWarnings": true,
/**
* Whether SMAPI should show newer beta versions as an available update. When this is commented
* out, it'll be true if the current SMAPI version is beta, and false otherwise.
*/
//"UseBetaChannel": true,
/**
* SMAPI's GitHub project name, used to perform update checks.
*/
"GitHubProjectName": "Pathoschild/SMAPI",
/**
* The base URL for SMAPI's web API, used to perform update checks.
* Note: the protocol will be changed to http:// on Linux/Mac due to OpenSSL issues with the
* game's bundled Mono.
*/
"WebApiBaseUrl": "https://api.smapi.io",
/**
* Whether SMAPI should log more information about the game context.
*/
"VerboseLogging": false,
/**
* Whether to generate a 'SMAPI-latest.metadata-dump.json' file in the logs folder with the full mod
* metadata for detected mods. This is only needed when troubleshooting some cases.
*/
"DumpMetadata": false,
/**
* The mod IDs SMAPI should ignore when performing update checks or validating update keys.
*/
"SuppressUpdateChecks": [
"SMAPI.ConsoleCommands",
"SMAPI.SaveBackup"
]
}

View File

@ -1,425 +1,60 @@
<?xml version="1.0" encoding="utf-8"?> <Project Sdk="Microsoft.NET.Sdk">
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup> <PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{9898B56E-51EB-40CF-8B1F-ACEB4B6397A7}</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> <RootNamespace>StardewModdingAPI</RootNamespace>
<AssemblyName>StardewModdingAPI</AssemblyName> <AssemblyName>StardewModdingAPI</AssemblyName>
<FileAlignment>512</FileAlignment> <TargetFramework>net45</TargetFramework>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile> <GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies> <LangVersion>latest</LangVersion>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk> <PlatformTarget>x86</PlatformTarget>
<TargetFrameworkVersion>v9.0</TargetFrameworkVersion> <OutputType>Exe</OutputType>
</PropertyGroup> <OutputPath>$(SolutionDir)\..\bin\$(Configuration)\SMAPI</OutputPath>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> <DocumentationFile>$(SolutionDir)\..\bin\$(Configuration)\SMAPI\StardewModdingAPI.xml</DocumentationFile>
<DebugSymbols>true</DebugSymbols> <AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
<DebugType>portable</DebugType> <LargeAddressAware Condition="'$(OS)' == 'Windows_NT'">true</LargeAddressAware>
<Optimize>false</Optimize> <ApplicationIcon>icon.ico</ApplicationIcon>
<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> </PropertyGroup>
<ItemGroup> <ItemGroup>
<Reference Include="0Harmony"> <PackageReference Include="LargeAddressAware" Version="1.0.3" />
<HintPath>..\..\..\..\..\..\..\SteamLibrary\steamapps\common\Stardew Valley\smapi-internal\0Harmony.dll</HintPath> <PackageReference Include="Lib.Harmony" Version="1.2.0.1" />
</Reference> <PackageReference Include="Mono.Cecil" Version="0.10.1" />
<Reference Include="BmFont"> <PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\BmFont.dll</HintPath> </ItemGroup>
</Reference>
<Reference Include="Google.Android.Vending.Expansion.Downloader"> <ItemGroup>
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Google.Android.Vending.Expansion.Downloader.dll</HintPath> <Reference Include="System.Numerics">
</Reference>
<Reference Include="Google.Android.Vending.Expansion.ZipFile">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Google.Android.Vending.Expansion.ZipFile.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" />
<Reference Include="Microsoft.AppCenter">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Microsoft.AppCenter.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AppCenter.Analytics">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Microsoft.AppCenter.Analytics.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AppCenter.Analytics.Android.Bindings">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Microsoft.AppCenter.Analytics.Android.Bindings.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AppCenter.Android.Bindings">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Microsoft.AppCenter.Android.Bindings.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AppCenter.Crashes">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Microsoft.AppCenter.Crashes.dll</HintPath>
</Reference>
<Reference Include="Microsoft.AppCenter.Crashes.Android.Bindings">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\Microsoft.AppCenter.Crashes.Android.Bindings.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Mono.Android" />
<Reference Include="Mono.Cecil">
<HintPath>..\..\..\..\..\..\..\SteamLibrary\steamapps\common\Stardew Valley\smapi-internal\Mono.Cecil.dll</HintPath>
</Reference>
<Reference Include="Mono.Security" />
<Reference Include="MonoGame.Framework">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\MonoGame.Framework.dll</HintPath>
</Reference>
<Reference Include="MonoMod.RuntimeDetour">
<HintPath>..\..\..\..\..\Downloads\MonoMod.RuntimeDetour.dll</HintPath>
</Reference>
<Reference Include="MonoMod.Utils">
<HintPath>..\..\..\..\..\Downloads\MonoMod.Utils.dll</HintPath>
</Reference>
<Reference Include="mscorlib" />
<Reference Include="StardewValley">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\StardewValley.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Core">
<Private>True</Private> <Private>True</Private>
</Reference> </Reference>
<Reference Include="System.Xml.Linq" /> <Reference Include="System.Runtime.Caching">
<Reference Include="System.Xml" /> <Private>True</Private>
<Reference Include="xTile">
<HintPath>..\..\..\..\..\Downloads\com.chucklefish.stardewvalley_1.322\assemblies\xTile.dll</HintPath>
</Reference> </Reference>
<Reference Include="System.Windows.Forms" Condition="$(OS) == 'Windows_NT'" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Include="Constants.cs" /> <ProjectReference Include="..\SMAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj" />
<Compile Include="ContentSource.cs" /> <ProjectReference Include="..\SMAPI.Toolkit\StardewModdingAPI.Toolkit.csproj" />
<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\ContentEvents.cs" />
<Compile Include="Events\ControlEvents.cs" />
<Compile Include="Events\CursorMovedEventArgs.cs" />
<Compile Include="Events\DayEndingEventArgs.cs" />
<Compile Include="Events\DayStartedEventArgs.cs" />
<Compile Include="Events\DebrisListChangedEventArgs.cs" />
<Compile Include="Events\EventArgsClickableMenuChanged.cs" />
<Compile Include="Events\EventArgsClickableMenuClosed.cs" />
<Compile Include="Events\EventArgsControllerButtonPressed.cs" />
<Compile Include="Events\EventArgsControllerButtonReleased.cs" />
<Compile Include="Events\EventArgsControllerTriggerPressed.cs" />
<Compile Include="Events\EventArgsControllerTriggerReleased.cs" />
<Compile Include="Events\EventArgsInput.cs" />
<Compile Include="Events\EventArgsIntChanged.cs" />
<Compile Include="Events\EventArgsInventoryChanged.cs" />
<Compile Include="Events\EventArgsKeyboardStateChanged.cs" />
<Compile Include="Events\EventArgsKeyPressed.cs" />
<Compile Include="Events\EventArgsLevelUp.cs" />
<Compile Include="Events\EventArgsLocationBuildingsChanged.cs" />
<Compile Include="Events\EventArgsLocationObjectsChanged.cs" />
<Compile Include="Events\EventArgsLocationsChanged.cs" />
<Compile Include="Events\EventArgsMineLevelChanged.cs" />
<Compile Include="Events\EventArgsMouseStateChanged.cs" />
<Compile Include="Events\EventArgsPlayerWarped.cs" />
<Compile Include="Events\EventArgsValueChanged.cs" />
<Compile Include="Events\GameEvents.cs" />
<Compile Include="Events\GameLaunchedEventArgs.cs" />
<Compile Include="Events\GraphicsEvents.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\InputEvents.cs" />
<Compile Include="Events\InventoryChangedEventArgs.cs" />
<Compile Include="Events\IPlayerEvents.cs" />
<Compile Include="Events\ISpecialisedEvents.cs" />
<Compile Include="Events\ItemStackChange.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\LocationEvents.cs" />
<Compile Include="Events\LocationListChangedEventArgs.cs" />
<Compile Include="Events\MenuChangedEventArgs.cs" />
<Compile Include="Events\MenuEvents.cs" />
<Compile Include="Events\MineEvents.cs" />
<Compile Include="Events\ModMessageReceivedEventArgs.cs" />
<Compile Include="Events\MouseWheelScrolledEventArgs.cs" />
<Compile Include="Events\MultiplayerEvents.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\PlayerEvents.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\SaveEvents.cs" />
<Compile Include="Events\SaveLoadedEventArgs.cs" />
<Compile Include="Events\SavingEventArgs.cs" />
<Compile Include="Events\SpecialisedEvents.cs" />
<Compile Include="Events\TerrainFeatureListChangedEventArgs.cs" />
<Compile Include="Events\TimeChangedEventArgs.cs" />
<Compile Include="Events\TimeEvents.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\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\ManagedEventBase.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\ModFolderExport.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\TypeFieldToAnotherTypeFieldRewriter.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\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">
<SubType>Code</SubType>
</Compile>
<Compile Include="Framework\RewriteFacades\GameLocationMethods.cs" />
<Compile Include="Framework\RewriteFacades\ItemGrabMenuMethods.cs" />
<Compile Include="Framework\RewriteFacades\NPCMethods.cs" />
<Compile Include="Framework\RewriteFacades\SpriteTextMethods.cs" />
<Compile Include="Framework\RewriteFacades\TextBoxMethods.cs" />
<Compile Include="Framework\RewriteFacades\MapPageMethods.cs" />
<Compile Include="Framework\RewriteFacades\IClickableMenuMethods.cs" />
<Compile Include="Framework\RewriteFacades\HUDMessageMethods.cs" />
<Compile Include="Framework\RewriteFacades\Game1Methods.cs" />
<Compile Include="Framework\RewriteFacades\FarmerRenderMethods.cs" />
<Compile Include="Framework\RewriteFacades\FarmerMethods.cs" />
<Compile Include="Framework\RewriteFacades\SpriteBatchMethods.cs" />
<Compile Include="Framework\RewriteFacades\WeatherDebrisMethods.cs" />
<Compile Include="Framework\SCore.cs" />
<Compile Include="Framework\Serialisation\ColorConverter.cs" />
<Compile Include="Framework\Serialisation\PointConverter.cs" />
<Compile Include="Framework\Serialisation\RectangleConverter.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\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\NetCollectionWatcher.cs" />
<Compile Include="Framework\StateTracking\FieldWatchers\NetDictionaryWatcher.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\WorldLocationsTracker.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\LoadForNewGamePatch.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">
<SubType>Code</SubType>
</Compile>
<Compile Include="SMainActivity.cs" />
<Compile Include="Translation.cs" />
<Compile Include="Utilities\SDate.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="Resources\AboutResources.txt" /> <Compile Include="..\..\build\GlobalAssemblyInfo.cs" Link="Properties\GlobalAssemblyInfo.cs" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.1" /> <Content Include="StardewModdingAPI.config.json">
</ItemGroup> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<ItemGroup> </Content>
<AndroidResource Include="Resources\values\strings.xml" /> <Content Include="..\SMAPI.Web\wwwroot\StardewModdingAPI.metadata.json">
</ItemGroup> <Link>StardewModdingAPI.metadata.json</Link>
<ItemGroup> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Folder Include="Resources\drawable\" /> </Content>
</ItemGroup> <None Update="steam_appid.txt">
<ItemGroup> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
<Content Include="icon.ico" /> </None>
<Content Include="steam_appid.txt" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit.CoreInterfaces\StardewModdingAPI.Toolkit.CoreInterfaces.csproj">
<Project>{d5cfd923-37f1-4bc3-9be8-e506e202ac28}</Project>
<Name>StardewModdingAPI.Toolkit.CoreInterfaces</Name>
</ProjectReference>
<ProjectReference Include="..\StardewModdingAPI.Toolkit\StardewModdingAPI.Toolkit.csproj">
<Project>{ea5cfd2e-9453-4d29-b80f-8e0ea23f4ac6}</Project>
<Name>StardewModdingAPI.Toolkit</Name>
</ProjectReference>
</ItemGroup> </ItemGroup>
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" /> <Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" /> <Import Project="..\..\build\common.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> </Project>

View File

@ -1,18 +0,0 @@
namespace StardewModdingAPI.Toolkit.Framework.Clients.Wiki
{
/// <summary>Whether a mod is ready for the upcoming SMAPI 3.0.</summary>
public enum WikiSmapi3Status
{
/// <summary>The mod's compatibility status is unknown.</summary>
Unknown = 0,
/// <summary>The mod is compatible with the upcoming SMAPI 3.0.</summary>
Ok = 1,
/// <summary>The mod will break in SMAPI 3.0.</summary>
Broken = 2,
/// <summary>The mod has a pull request submitted for SMAPI 3.0 compatibility.</summary>
Soon = 3
}
}