Skip to content

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pathoschild committed May 24, 2024
2 parents 1ca1411 + 8cce961 commit 55aee0f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ContentPatcher/ContentPatcher.csproj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>2.1.1</Version>
<Version>2.1.2</Version>
<RootNamespace>ContentPatcher</RootNamespace>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion ContentPatcher/Framework/Migrations/AggregateMigration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public bool TryMigrate(Condition condition, [NotNullWhen(false)] out string? err
IAssetName? target = null;

foreach (IRuntimeMigration migration in this.RuntimeMigrations)
target = migration.RedirectTarget(target ?? assetName, patch);
target = migration.RedirectTarget(target ?? assetName, patch) ?? target;

return target;
}
Expand Down
2 changes: 1 addition & 1 deletion ContentPatcher/Framework/Migrations/Migration_2_1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ namespace ContentPatcher.Framework.Migrations
{
/// <summary>Migrates patches to format version 2.1.</summary>
[SuppressMessage("ReSharper", "InconsistentNaming", Justification = "Named for clarity.")]
internal partial class Migration_2_1 : BaseRuntimeMigration
internal partial class Migration_2_1 : BaseMigration
{
/*********
** Public methods
Expand Down
6 changes: 5 additions & 1 deletion ContentPatcher/Framework/PatchManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,11 @@ public IEnumerable<IPatch> GetCurrentEditors(AssetRequestedEventArgs request)
.Where(patch =>
patch.Type == patchType
&& patch.IsReady
&& (patch.TargetLocale is null || string.Equals(patch.TargetLocale, request.Name.LocaleCode, StringComparison.InvariantCultureIgnoreCase))
&& (
patch.PredatesTargetLocale
|| patch.TargetLocale is null
|| string.Equals(patch.TargetLocale, request.Name.LocaleCode, StringComparison.InvariantCultureIgnoreCase)
)
);
}

Expand Down
5 changes: 5 additions & 0 deletions ContentPatcher/docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ When releasing a format change, don't forget to update the smapi.io/json schema!
-->
## 2.1.2
Released 23 May 2024 for SMAPI 4.0.0 or later.

* Fixed some older content packs broken in Content Patcher 2.1.0+.

## 2.1.1
Released 23 May 2024 for SMAPI 4.0.0 or later.

Expand Down
2 changes: 1 addition & 1 deletion ContentPatcher/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"Name": "Content Patcher",
"Author": "Pathoschild",
"Version": "2.1.1",
"Version": "2.1.2",
"MinimumApiVersion": "4.0.0",
"Description": "Loads content packs which edit game data, images, and maps without changing the game files.",
"UniqueID": "Pathoschild.ContentPatcher",
Expand Down

0 comments on commit 55aee0f

Please sign in to comment.