Skip to content

Commit 90a5c79

Browse files
committed
fix cross-play errors due to Android version format
1 parent 3cb37d9 commit 90a5c79

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

docs/release-notes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
## Upcoming release
55
* For players:
66
* Updated for Stardew Valley 1.6.15.
7+
* Fixed mod communication errors when cross-playing between PC and Android.
78

89
* For mod authors:
910
* Improved [Content Patcher JSON schema](technical/web.md#using-a-schema-file-directly) to allow boolean and numeric values in dynamic tokens.

src/SMAPI/Framework/Networking/RemoteContextModel.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using System;
2+
using Newtonsoft.Json;
3+
using StardewModdingAPI.Toolkit.Serialization.Converters;
24

35
namespace StardewModdingAPI.Framework.Networking;
46

@@ -15,9 +17,11 @@ internal class RemoteContextModel
1517
public GamePlatform Platform { get; }
1618

1719
/// <summary>The installed version of Stardew Valley.</summary>
20+
[JsonConverter(typeof(NonStandardSemanticVersionConverter))] // versions from Android players may have a fourth number for the platform-specific build
1821
public ISemanticVersion? GameVersion { get; }
1922

2023
/// <summary>The installed version of SMAPI.</summary>
24+
[JsonConverter(typeof(NonStandardSemanticVersionConverter))]
2125
public ISemanticVersion? ApiVersion { get; }
2226

2327
/// <summary>The installed mods.</summary>

0 commit comments

Comments
 (0)