Skip to content

Commit 09dd92a

Browse files
committed
Merge branch 'develop' into stable
2 parents 2f98438 + a915f6d commit 09dd92a

File tree

10 files changed

+52
-10
lines changed

10 files changed

+52
-10
lines changed

build/common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ repo. It imports the other MSBuild files as needed.
77
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
88
<PropertyGroup>
99
<!--set general build properties -->
10-
<Version>4.1.5</Version>
10+
<Version>4.1.6</Version>
1111
<Product>SMAPI</Product>
1212
<LangVersion>latest</LangVersion>
1313
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>

docs/release-notes.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,16 @@
11
[README](README.md)
22

33
# Release notes
4+
## 4.1.6
5+
Released 07 November 2024 for Stardew Valley 1.6.10 or later.
6+
7+
* For players:
8+
* Revamped message shown after a game update to avoid confusion.
9+
* Added option to disable content integrity checks in `smapi-internal/config.json`. When disabled, SMAPI will log a warning for visibility when someone helps you troubleshoot game issues.
10+
11+
* For mod authors:
12+
* Fixed `translation.ApplyGenderSwitchBlocks(false)` not applied correctly.
13+
414
## 4.1.5
515
Released 07 November 2024 for Stardew Valley 1.6.10 or later.
616

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"Name": "Console Commands",
33
"Author": "SMAPI",
4-
"Version": "4.1.5",
4+
"Version": "4.1.6",
55
"Description": "Adds SMAPI console commands that let you manipulate the game.",
66
"UniqueID": "SMAPI.ConsoleCommands",
77
"EntryDll": "ConsoleCommands.dll",
8-
"MinimumApiVersion": "4.1.5"
8+
"MinimumApiVersion": "4.1.6"
99
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"Name": "Save Backup",
33
"Author": "SMAPI",
4-
"Version": "4.1.5",
4+
"Version": "4.1.6",
55
"Description": "Automatically backs up all your saves once per day into its folder.",
66
"UniqueID": "SMAPI.SaveBackup",
77
"EntryDll": "SaveBackup.dll",
8-
"MinimumApiVersion": "4.1.5"
8+
"MinimumApiVersion": "4.1.6"
99
}

src/SMAPI/Constants.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ internal static class EarlyConstants
4949
internal static int? LogScreenId { get; set; }
5050

5151
/// <summary>SMAPI's current raw semantic version.</summary>
52-
internal static string RawApiVersion = "4.1.5";
52+
internal static string RawApiVersion = "4.1.6";
5353
}
5454

5555
/// <summary>Contains SMAPI's constants and assumptions.</summary>

src/SMAPI/Framework/Models/SConfig.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ internal class SConfig
1616
private static readonly IDictionary<string, object> DefaultValues = new Dictionary<string, object>
1717
{
1818
[nameof(CheckForUpdates)] = true,
19+
[nameof(CheckContentIntegrity)] = true,
1920
[nameof(ListenForConsoleInput)] = true,
2021
[nameof(ParanoidWarnings)] = Constants.IsDebugBuild,
2122
[nameof(UseBetaChannel)] = Constants.ApiVersion.IsPrerelease(),
@@ -50,6 +51,9 @@ internal class SConfig
5051
/// <summary>Whether to check for newer versions of SMAPI and mods on startup.</summary>
5152
public bool CheckForUpdates { get; set; }
5253

54+
/// <summary>Whether SMAPI should check whether the content files are present and unmodified.</summary>
55+
public bool CheckContentIntegrity { get; set; }
56+
5357
/// <summary>Whether SMAPI should listen for console input to support console commands.</summary>
5458
public bool ListenForConsoleInput { get; set; }
5559

@@ -106,6 +110,7 @@ internal class SConfig
106110
/// <summary>Construct an instance.</summary>
107111
/// <param name="developerMode"><inheritdoc cref="DeveloperMode" path="/summary" /></param>
108112
/// <param name="checkForUpdates"><inheritdoc cref="CheckForUpdates" path="/summary" /></param>
113+
/// <param name="checkContentIntegrity"><inheritdoc cref="CheckContentIntegrity" path="/summary" /></param>
109114
/// <param name="listenForConsoleInput"><inheritdoc cref="ListenForConsoleInput" path="/summary" /></param>
110115
/// <param name="paranoidWarnings"><inheritdoc cref="ParanoidWarnings" path="/summary" /></param>
111116
/// <param name="useBetaChannel"><inheritdoc cref="UseBetaChannel" path="/summary" /></param>
@@ -122,10 +127,11 @@ internal class SConfig
122127
/// <param name="suppressUpdateChecks"><inheritdoc cref="SuppressUpdateChecks" path="/summary" /></param>
123128
/// <param name="modsToLoadEarly"><inheritdoc cref="ModsToLoadEarly" path="/summary" /></param>
124129
/// <param name="modsToLoadLate"><inheritdoc cref="ModsToLoadLate" path="/summary" /></param>
125-
public SConfig(bool developerMode, bool? checkForUpdates, bool? listenForConsoleInput, bool? paranoidWarnings, bool? useBetaChannel, string gitHubProjectName, string webApiBaseUrl, string[]? verboseLogging, bool? rewriteMods, bool? fixHarmony, bool? useCaseInsensitivePaths, bool? logNetworkTraffic, bool? logTechnicalDetailsForBrokenMods, ColorSchemeConfig consoleColors, bool? suppressHarmonyDebugMode, string[]? suppressUpdateChecks, string[]? modsToLoadEarly, string[]? modsToLoadLate)
130+
public SConfig(bool developerMode, bool? checkForUpdates, bool? checkContentIntegrity, bool? listenForConsoleInput, bool? paranoidWarnings, bool? useBetaChannel, string gitHubProjectName, string webApiBaseUrl, string[]? verboseLogging, bool? rewriteMods, bool? fixHarmony, bool? useCaseInsensitivePaths, bool? logNetworkTraffic, bool? logTechnicalDetailsForBrokenMods, ColorSchemeConfig consoleColors, bool? suppressHarmonyDebugMode, string[]? suppressUpdateChecks, string[]? modsToLoadEarly, string[]? modsToLoadLate)
126131
{
127132
this.DeveloperMode = developerMode;
128133
this.CheckForUpdates = checkForUpdates ?? (bool)SConfig.DefaultValues[nameof(this.CheckForUpdates)];
134+
this.CheckContentIntegrity = checkContentIntegrity ?? (bool)SConfig.DefaultValues[nameof(this.CheckContentIntegrity)];
129135
this.ListenForConsoleInput = listenForConsoleInput ?? (bool)SConfig.DefaultValues[nameof(this.ListenForConsoleInput)];
130136
this.ParanoidWarnings = paranoidWarnings ?? (bool)SConfig.DefaultValues[nameof(this.ParanoidWarnings)];
131137
this.UseBetaChannel = useBetaChannel ?? (bool)SConfig.DefaultValues[nameof(this.UseBetaChannel)];

src/SMAPI/Framework/SCore.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1704,6 +1704,12 @@ private async Task CheckForUpdatesAsync(IModMetadata[] mods)
17041704
/// <summary>Verify the game's content files and log a warning if any are missing or modified.</summary>
17051705
public void LogContentIntegrityIssues()
17061706
{
1707+
if (!this.Settings.CheckContentIntegrity)
1708+
{
1709+
this.Monitor.Log("You disabled content integrity checks, so you won't be notified if a game content file is missing or corrupted.", LogLevel.Warn);
1710+
return;
1711+
}
1712+
17071713
string contentPath = Constants.ContentPath;
17081714

17091715
// get file

src/SMAPI/Program.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,15 @@ private static void AssertDepsJson()
175175
if (!File.Exists(targetPath) || FileUtilities.GetFileHash(sourcePath) != FileUtilities.GetFileHash(targetPath))
176176
{
177177
File.Copy(sourcePath, targetPath, overwrite: true);
178-
Program.PrintErrorAndExit($"The '{Path.GetFileName(targetPath)}' file didn't match the game's version. SMAPI fixed it automatically, but you must restart SMAPI for the change to take effect.");
178+
179+
Console.WriteLine("A new game version was installed, so SMAPI needs to update its settings.");
180+
181+
Console.ForegroundColor = ConsoleColor.DarkGreen;
182+
Console.WriteLine("Please exit this window and re-launch SMAPI to play.");
183+
Console.ResetColor();
184+
185+
Thread.Sleep(2500);
186+
Environment.Exit(0);
179187
}
180188
}
181189

src/SMAPI/SMAPI.config.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,15 @@ in future SMAPI versions.
3535
*/
3636
"CheckForUpdates": true,
3737

38+
/**
39+
* Whether SMAPI should check whether the content files are present and unmodified. This should
40+
* nearly always be enabled.
41+
*
42+
* If disabled, SMAPI will log a warning that it's disabled for visibility when someone helps
43+
* you troubleshoot game issues.
44+
*/
45+
"CheckContentIntegrity": true,
46+
3847
/**
3948
* Whether to enable features intended for mod developers. Currently this only makes TRACE-level
4049
* messages appear in the console.

src/SMAPI/Translation.cs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,11 @@ public static implicit operator string(Translation translation)
213213
}
214214

215215
// apply gender switches
216-
Gender gender = this.ForceGender?.Invoke() ?? Game1.player?.Gender ?? default;
217-
text = Dialogue.applyGenderSwitchBlocks(gender, text);
216+
if (this.ShouldApplyGenderSwitchBlocks)
217+
{
218+
Gender gender = this.ForceGender?.Invoke() ?? Game1.player?.Gender ?? default;
219+
text = Dialogue.applyGenderSwitchBlocks(gender, text);
220+
}
218221
}
219222

220223
return text;

0 commit comments

Comments
 (0)