summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesse Plamondon-Willard <github@jplamondonw.com>2017-11-01 17:42:18 -0400
committerJesse Plamondon-Willard <github@jplamondonw.com>2017-11-01 17:42:18 -0400
commite0b72374cd14298aacc6f71dc391fdc9814be37c (patch)
tree2e5d85937c34539c1a0df48423b5136508693ca8
parent79118316065a01322d8ea12a14589ec016794c32 (diff)
parent089e6de749ae7cb109af00164d2597c6644c255e (diff)
downloadSMAPI-e0b72374cd14298aacc6f71dc391fdc9814be37c.tar.gz
SMAPI-e0b72374cd14298aacc6f71dc391fdc9814be37c.tar.bz2
SMAPI-e0b72374cd14298aacc6f71dc391fdc9814be37c.zip
Merge branch 'develop' into stable
-rw-r--r--.gitignore3
-rw-r--r--build/GlobalAssemblyInfo.cs4
-rw-r--r--build/common.targets10
-rw-r--r--docs/release-notes.md30
-rw-r--r--docs/technical-docs.md107
-rw-r--r--src/SMAPI.Common/SemanticVersionImpl.cs13
-rw-r--r--src/SMAPI.Installer/InteractiveInstaller.cs39
-rw-r--r--src/SMAPI.Installer/StardewModdingAPI.Installer.csproj3
-rw-r--r--src/SMAPI.Installer/readme.txt22
-rw-r--r--src/SMAPI.ModBuildConfig/Properties/AssemblyInfo.cs4
-rw-r--r--src/SMAPI.ModBuildConfig/StardewModdingAPI.ModBuildConfig.csproj2
-rw-r--r--src/SMAPI.ModBuildConfig/package.nuspec5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/ConsoleCommandsMod.cs (renamed from src/TrainerMod/TrainerMod.cs)11
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ArgumentParser.cs (renamed from src/TrainerMod/Framework/Commands/ArgumentParser.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/ITrainerCommand.cs (renamed from src/TrainerMod/Framework/Commands/ITrainerCommand.cs)6
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Other/DebugCommand.cs (renamed from src/TrainerMod/Framework/Commands/Other/DebugCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Other/ShowDataFilesCommand.cs (renamed from src/TrainerMod/Framework/Commands/Other/ShowDataFilesCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Other/ShowGameFilesCommand.cs (renamed from src/TrainerMod/Framework/Commands/Other/ShowGameFilesCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/AddCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/AddCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/ListItemTypesCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/ListItemTypesCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/ListItemsCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/ListItemsCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetColorCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetColorCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetHealthCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetHealthCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetImmunityCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetImmunityCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetLevelCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetLevelCommand.cs)32
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetMaxHealthCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetMaxHealthCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetMaxStaminaCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetMaxStaminaCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetMoneyCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetMoneyCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetNameCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetNameCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetSpeedCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetSpeedCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetStaminaCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetStaminaCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/Player/SetStyleCommand.cs (renamed from src/TrainerMod/Framework/Commands/Player/SetStyleCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/TrainerCommand.cs (renamed from src/TrainerMod/Framework/Commands/TrainerCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/DownMineLevelCommand.cs (renamed from src/TrainerMod/Framework/Commands/World/DownMineLevelCommand.cs)5
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/FreezeTimeCommand.cs (renamed from src/TrainerMod/Framework/Commands/World/FreezeTimeCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetDayCommand.cs (renamed from src/TrainerMod/Framework/Commands/World/SetDayCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetMineLevelCommand.cs (renamed from src/TrainerMod/Framework/Commands/World/SetMineLevelCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetSeasonCommand.cs (renamed from src/TrainerMod/Framework/Commands/World/SetSeasonCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetTimeCommand.cs (renamed from src/TrainerMod/Framework/Commands/World/SetTimeCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/Commands/World/SetYearCommand.cs (renamed from src/TrainerMod/Framework/Commands/World/SetYearCommand.cs)3
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/ItemType.cs (renamed from src/TrainerMod/Framework/ItemData/ItemType.cs)2
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemData/SearchableItem.cs (renamed from src/TrainerMod/Framework/ItemData/SearchableItem.cs)2
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs (renamed from src/TrainerMod/Framework/ItemRepository.cs)4
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/Properties/AssemblyInfo.cs6
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/StardewModdingAPI.Mods.ConsoleCommands.csproj (renamed from src/TrainerMod/TrainerMod.csproj)11
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/manifest.json (renamed from src/TrainerMod/manifest.json)6
-rw-r--r--src/SMAPI.Mods.ConsoleCommands/packages.config (renamed from src/TrainerMod/packages.config)0
-rw-r--r--src/SMAPI.Tests/Utilities/SemanticVersionTests.cs23
-rw-r--r--src/SMAPI.Web/Controllers/LogParserController.cs158
-rw-r--r--src/SMAPI.Web/Controllers/ModsApiController.cs (renamed from src/SMAPI.Web/Controllers/ModsController.cs)6
-rw-r--r--src/SMAPI.Web/Framework/AllowLargePostsAttribute.cs52
-rw-r--r--src/SMAPI.Web/Framework/BeanstalkEnvPropsConfigProvider.cs54
-rw-r--r--src/SMAPI.Web/Framework/ConfigModels/LogParserConfig.cs24
-rw-r--r--src/SMAPI.Web/Framework/ConfigModels/ModUpdateCheckConfig.cs2
-rw-r--r--src/SMAPI.Web/Framework/LogParser/GetPasteResponse.cs15
-rw-r--r--src/SMAPI.Web/Framework/LogParser/PastebinClient.cs117
-rw-r--r--src/SMAPI.Web/Framework/LogParser/SavePasteResponse.cs15
-rw-r--r--src/SMAPI.Web/Framework/RewriteRules/ConditionalRedirectToHttpsRule.cs62
-rw-r--r--src/SMAPI.Web/Framework/RewriteRules/ConditionalRewriteSubdomainRule.cs48
-rw-r--r--src/SMAPI.Web/Framework/RewriteRules/RedirectToUrlRule.cs61
-rw-r--r--src/SMAPI.Web/Framework/RewriteSubdomainRule.cs30
-rw-r--r--src/SMAPI.Web/Properties/launchSettings.json11
-rw-r--r--src/SMAPI.Web/Startup.cs33
-rw-r--r--src/SMAPI.Web/ViewModels/LogParserModel.cs31
-rw-r--r--src/SMAPI.Web/Views/LogParser/Index.cshtml119
-rw-r--r--src/SMAPI.Web/Views/Shared/_Layout.cshtml30
-rw-r--r--src/SMAPI.Web/Views/_ViewStart.cshtml3
-rw-r--r--src/SMAPI.Web/appsettings.Development.json20
-rw-r--r--src/SMAPI.Web/appsettings.json19
-rw-r--r--src/SMAPI.Web/wwwroot/Content/css/log-parser.css348
-rw-r--r--src/SMAPI.Web/wwwroot/Content/css/main.css107
-rw-r--r--src/SMAPI.Web/wwwroot/Content/images/sidebar-bg.gifbin0 -> 1104 bytes
-rw-r--r--src/SMAPI.Web/wwwroot/Content/js/log-parser.js278
-rw-r--r--src/SMAPI.Web/wwwroot/favicon.icobin0 -> 15086 bytes
-rw-r--r--src/SMAPI.sln6
-rw-r--r--src/SMAPI/Constants.cs2
-rw-r--r--src/SMAPI/Events/EventArgsInput.cs20
-rw-r--r--src/SMAPI/Events/InputEvents.cs15
-rw-r--r--src/SMAPI/Framework/Content/ContentCache.cs150
-rw-r--r--src/SMAPI/Framework/GameVersion.cs3
-rw-r--r--src/SMAPI/Framework/ModHelpers/ContentHelper.cs236
-rw-r--r--src/SMAPI/Framework/ModHelpers/ReflectionHelper.cs99
-rw-r--r--src/SMAPI/Framework/Reflection/PrivateProperty.cs30
-rw-r--r--src/SMAPI/Framework/Reflection/Reflector.cs16
-rw-r--r--src/SMAPI/Framework/SContentManager.cs618
-rw-r--r--src/SMAPI/Framework/SGame.cs20
-rw-r--r--src/SMAPI/Framework/Serialisation/JsonHelper.cs7
-rw-r--r--src/SMAPI/Framework/Serialisation/SelectiveStringEnumConverter.cs37
-rw-r--r--src/SMAPI/Framework/Serialisation/StringEnumConverter.cs22
-rw-r--r--src/SMAPI/IContentHelper.cs8
-rw-r--r--src/SMAPI/Program.cs31
-rw-r--r--src/SMAPI/SButton.cs12
-rw-r--r--src/SMAPI/SemanticVersion.cs6
-rw-r--r--src/SMAPI/StardewModdingAPI.csproj3
-rw-r--r--src/TrainerMod/Properties/AssemblyInfo.cs6
95 files changed, 2765 insertions, 661 deletions
diff --git a/.gitignore b/.gitignore
index f2d50778..7e0c1e9d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -23,3 +23,6 @@ _ReSharper*/
**/packages/*
*.nuget.props
*.nuget.targets
+
+# sensitive files
+appsettings.Development.json
diff --git a/build/GlobalAssemblyInfo.cs b/build/GlobalAssemblyInfo.cs
index 196d67c5..9af704e0 100644
--- a/build/GlobalAssemblyInfo.cs
+++ b/build/GlobalAssemblyInfo.cs
@@ -2,5 +2,5 @@ using System.Reflection;
using System.Runtime.InteropServices;
[assembly: ComVisible(false)]
-[assembly: AssemblyVersion("2.0.0.0")]
-[assembly: AssemblyFileVersion("2.0.0.0")]
+[assembly: AssemblyVersion("2.1.0.0")]
+[assembly: AssemblyFileVersion("2.1.0.0")]
diff --git a/build/common.targets b/build/common.targets
index ee138524..aa11344e 100644
--- a/build/common.targets
+++ b/build/common.targets
@@ -78,7 +78,7 @@
<!-- copy files into game directory and enable debugging (only in debug mode) -->
<Target Name="AfterBuild">
- <CallTarget Targets="CopySMAPI;CopyTrainerMod" Condition="'$(Configuration)' == 'Debug'" />
+ <CallTarget Targets="CopySMAPI;CopyDefaultMod" Condition="'$(Configuration)' == 'Debug'" />
</Target>
<Target Name="CopySMAPI" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI'">
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" />
@@ -89,10 +89,10 @@
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)" />
</Target>
- <Target Name="CopyTrainerMod" Condition="'$(MSBuildProjectName)' == 'TrainerMod'">
- <Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\Mods\TrainerMod" />
- <Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\Mods\TrainerMod" Condition="Exists('$(TargetDir)\$(TargetName).pdb')" />
- <Copy SourceFiles="$(TargetDir)\manifest.json" DestinationFolder="$(GamePath)\Mods\TrainerMod" />
+ <Target Name="CopyDefaultMod" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.ConsoleCommands'">
+ <Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\Mods\ConsoleCommands" />
+ <Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\Mods\ConsoleCommands" Condition="Exists('$(TargetDir)\$(TargetName).pdb')" />
+ <Copy SourceFiles="$(TargetDir)\manifest.json" DestinationFolder="$(GamePath)\Mods\ConsoleCommands" />
</Target>
<!-- launch SMAPI on debug -->
diff --git a/docs/release-notes.md b/docs/release-notes.md
index 99e771ce..1a9e4681 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -1,4 +1,32 @@
# Release notes
+## 2.1
+* For players:
+ * Added a log parser at [log.smapi.io](https://log.smapi.io).
+ * Added better Steam instructions to the SMAPI installer.
+ * Renamed the bundled _TrainerMod_ to _ConsoleCommands_ to make its purpose clearer.
+ * Removed the game's test messages from the console log.
+ * Improved update-check errors when playing offline.
+ * Fixed compatibility check for players with Stardew Valley 1.08.
+ * Fixed `player_setlevel` command not setting XP too.
+
+* For modders:
+ * The reflection API now works with public code to simplify mod integrations.
+ * The content API now lets you invalidated multiple assets at once.
+ * The `InputEvents` have been improved:
+ * Added `e.IsActionButton` and `e.IsUseToolButton`.
+ * Added `ToSButton()` extension for the game's `Game1.options` button type.
+ * Deprecated `e.IsClick`, which is limited and unclear. Use `IsActionButton` or `IsUseToolButton` instead.
+ * Fixed `e.SuppressButton()` not correctly suppressing keyboard buttons.
+ * Fixed `e.IsClick` (now `e.IsActionButton`) ignoring custom key bindings.
+ * `SemanticVersion` can now be constructed from a `System.Version`.
+ * Fixed reflection API blocking access to some non-SMAPI members.
+ * Fixed content API allowing absolute paths as asset keys.
+ * Fixed content API failing to load custom map tilesheets that aren't preloaded.
+ * Fixed content API incorrectly detecting duplicate loaders when a mod implements `IAssetLoader` directly.
+
+* For SMAPI developers:
+ * Added the installer version and platform to the installer window title to simplify troubleshooting.
+
## 2.0
### Release highlights
* **Mod update checks**
@@ -18,7 +46,7 @@
SMAPI 2.0 adds several features to enable new kinds of mods (see
[API documentation](https://stardewvalleywiki.com/Modding:SMAPI_APIs)).
- The **content API** lets you edit, inject, and reload XNB data loaded by the game at any time. This let SMAPI mods do
+ The **content API** lets you edit, inject, and reload XNB data loaded by the game at any time. This lets SMAPI mods do
anything previously only possible with XNB mods, and enables new mod scenarios not possible with XNB mods (e.g.
seasonal textures, NPC clothing that depend on the weather or location, etc).
diff --git a/docs/technical-docs.md b/docs/technical-docs.md
index d37d327d..37ec7f69 100644
--- a/docs/technical-docs.md
+++ b/docs/technical-docs.md
@@ -3,16 +3,25 @@
This file provides more technical documentation about SMAPI. If you only want to use or create
mods, this section isn't relevant to you; see the main README to use or create mods.
-## Contents
-* [Development](#development)
- * [Compiling from source](#compiling-from-source)
- * [Debugging a local build](#debugging-a-local-build)
- * [Preparing a release](#preparing-a-release)
-* [Customisation](#customisation)
- * [Configuration file](#configuration-file)
- * [Command-line arguments](#command-line-arguments)
- * [Compile flags](#compile-flags)
-
+# Contents
+* [SMAPI](#smapi)
+ * [Development](#development)
+ * [Compiling from source](#compiling-from-source)
+ * [Debugging a local build](#debugging-a-local-build)
+ * [Preparing a release](#preparing-a-release)
+ * [Customisation](#customisation)
+ * [Configuration file](#configuration-file)
+ * [Command-line arguments](#command-line-arguments)
+ * [Compile flags](#compile-flags)
+* [SMAPI web services](#smapi-web-services)
+ * [Overview](#overview)
+ * [Log parser](#log-parser)
+ * [Mods API](#mods-api)
+ * [Development](#development-2)
+ * [Local development](#local-development)
+ * [Deploying to Amazon Beanstalk](#deploying-to-amazon-beanstalk)
+
+# SMAPI
## Development
### Compiling from source
Using an official SMAPI release is recommended for most users.
@@ -135,3 +144,81 @@ SMAPI uses a small number of conditional compilation constants, which you can se
flag | purpose
---- | -------
`SMAPI_FOR_WINDOWS` | Indicates that SMAPI is being compiled on Windows for players on Windows. Set automatically in `crossplatform.targets`.
+
+
+# SMAPI web services
+## Overview
+The `StardewModdingAPI.Web` project provides an API and web UI hosted at `*.smapi.io`.
+
+### Log parser
+The log parser provides a web UI for uploading, parsing, and sharing SMAPI logs. The logs are
+persisted in a compressed form to Pastebin.
+
+The log parser lives at https://log.smapi.io.
+
+### Mods API
+The mods API provides version info for mods hosted by Chucklefish, GitHub, or Nexus Mods. It's used
+by SMAPI to perform update checks. The `{version}` URL token is the version of SMAPI making the
+request; it doesn't do anything currently, but lets us version breaking changes if needed.
+
+Each mod is identified by a repository key and unique identifier (like `nexus:541`). The following
+repositories are supported:
+
+key | repository
+------------- | ----------
+`chucklefish` | A mod page on the [Chucklefish mod site](https://community.playstarbound.com/resources/categories/22), identified by the mod I