Skip to content

Commit 5919337

Browse files
committed
Merge branch 'develop' into stable
2 parents 31777f0 + 0f72611 commit 5919337

File tree

11 files changed

+96
-21
lines changed

11 files changed

+96
-21
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>3.18.5</Version>
10+
<Version>3.18.6</Version>
1111
<Product>SMAPI</Product>
1212
<LangVersion>latest</LangVersion>
1313
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>

docs/release-notes.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,19 @@
77
_If needed, you can update to SMAPI 3.16.0 first and then install the latest version._
88
-->
99

10+
## 3.18.6
11+
Released 05 October 2023 for Stardew Valley 1.5.6 or later.
12+
13+
* For players:
14+
* Fixed SpriteMaster compatibility in SMAPI 3.18.5+ with temporary workaround.
15+
* Fixed `player_add` and `list_items` console commands not including Pickled Ginger, and returning Honey instead of Wild Honey _(in Console Commands)_.
16+
17+
* For mod authors:
18+
* Added asset propagation for `LooseSprites/chatBox` and `LooseSprites/emojis`.
19+
20+
* For the web UI:
21+
* Fixed uploaded log/JSON file expiry alway shown as renewed.
22+
1023
## 3.18.5
1124
Released 26 August 2023 for Stardew Valley 1.5.6 or later.
1225

@@ -77,7 +90,7 @@ Released 09 January 2023 for Stardew Valley 1.5.6 or later.
7790

7891
* For players:
7992
* Fixed empty save backups for some macOS players.
80-
* Fixed `player_add` console command not handling custom slingshots correctly (thanks too DaLion!).
93+
* Fixed `player_add` console command not handling custom slingshots correctly (thanks to DaLion!).
8194

8295
* For mod authors:
8396
* Added `DelegatingModHooks` utility for mods which need to override SMAPI's mod hooks directly.

src/SMAPI.Mods.ConsoleCommands/Framework/ItemRepository.cs

Lines changed: 32 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -171,21 +171,31 @@ public IEnumerable<SearchableItem> GetAll(ItemType[]? itemTypes = null, bool inc
171171
else if (ShouldGet(ItemType.Object))
172172
{
173173
// spawn main item
174-
SObject? item = null;
175-
yield return this.TryCreate(ItemType.Object, id, p =>
174+
SearchableItem? mainItem = this.TryCreate(ItemType.Object, id, p =>
176175
{
177-
return item = (p.ID == 812 // roe
178-
? new ColoredObject(p.ID, 1, Color.White)
179-
: new SObject(p.ID, 1)
180-
);
176+
// roe
177+
if (p.ID == 812)
178+
return new ColoredObject(p.ID, 1, Color.White);
179+
180+
// Wild Honey
181+
if (p.ID == 340)
182+
{
183+
return new SObject(Vector2.Zero, 340, "Wild Honey", false, true, false, false)
184+
{
185+
Name = "Wild Honey",
186+
preservedParentSheetIndex = { -1 }
187+
};
188+
}
189+
190+
// else plain item
191+
return new SObject(p.ID, 1);
181192
});
182-
if (item == null)
183-
continue;
193+
yield return mainItem;
184194

185195
// flavored items
186-
if (includeVariants)
196+
if (includeVariants && mainItem?.Item != null)
187197
{
188-
foreach (SearchableItem? variant in this.GetFlavoredObjectVariants(item))
198+
foreach (SearchableItem? variant in this.GetFlavoredObjectVariants((SObject)mainItem.Item))
189199
yield return variant;
190200
}
191201
}
@@ -356,6 +366,18 @@ select item
356366
}
357367
break;
358368
}
369+
370+
// ginger => pickled ginger
371+
if (id == 829 && item.Category != SObject.VegetableCategory)
372+
{
373+
yield return this.TryCreate(ItemType.Object, this.CustomIDOffset * 5 + id, _ => new SObject(342, 1)
374+
{
375+
Name = $"Pickled {item.Name}",
376+
Price = 50 + item.Price * 2,
377+
preserve = { SObject.PreserveType.Pickle },
378+
preservedParentSheetIndex = { id }
379+
});
380+
}
359381
}
360382

361383
/// <summary>Get optimized lookups to match items which produce roe in a fish pond.</summary>
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": "3.18.5",
4+
"Version": "3.18.6",
55
"Description": "Adds SMAPI console commands that let you manipulate the game.",
66
"UniqueID": "SMAPI.ConsoleCommands",
77
"EntryDll": "ConsoleCommands.dll",
8-
"MinimumApiVersion": "3.18.5"
8+
"MinimumApiVersion": "3.18.6"
99
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"Name": "Error Handler",
33
"Author": "SMAPI",
4-
"Version": "3.18.5",
4+
"Version": "3.18.6",
55
"Description": "Handles some common vanilla errors to log more useful info or avoid breaking the game.",
66
"UniqueID": "SMAPI.ErrorHandler",
77
"EntryDll": "ErrorHandler.dll",
8-
"MinimumApiVersion": "3.18.5"
8+
"MinimumApiVersion": "3.18.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": "3.18.5",
4+
"Version": "3.18.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": "3.18.5"
8+
"MinimumApiVersion": "3.18.6"
99
}

src/SMAPI.Web/Framework/Storage/StorageProvider.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,12 @@ public async Task<StoredFileInfo> GetAsync(string id, bool forceRenew)
107107
string content = this.GzipHelper.DecompressString(await reader.ReadToEndAsync());
108108

109109
// extend expiry if needed
110+
DateTimeOffset newExpiry = oldExpiry;
110111
if (forceRenew || this.IsWithinAutoRenewalWindow(result.Details.LastModified))
112+
{
111113
await blob.SetMetadataAsync(new Dictionary<string, string> { ["expiryRenewed"] = DateTime.UtcNow.ToString("O") }); // change the blob's last-modified date (the specific property set doesn't matter)
112-
DateTimeOffset newExpiry = this.GetExpiry(DateTimeOffset.UtcNow);
114+
newExpiry = this.GetExpiry(DateTimeOffset.UtcNow);
115+
}
113116

114117
// build model
115118
return new StoredFileInfo(content, oldExpiry, newExpiry);

src/SMAPI/Constants.cs

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

5454
/// <summary>SMAPI's current raw semantic version.</summary>
55-
internal static string RawApiVersion = "3.18.5";
55+
internal static string RawApiVersion = "3.18.6";
5656
}
5757

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

src/SMAPI/Events/AssetEditPriority.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
namespace StardewModdingAPI.Events
22
{
33
/// <summary>The priority for an asset edit when multiple apply for the same asset.</summary>
4-
/// <remarks>You can also specify arbitrary intermediate values, like <c>AssetLoadPriority.Low + 5</c>.</remarks>
4+
/// <remarks>You can also specify arbitrary intermediate values, like <c>AssetEditPriority.Early + 5</c>.</remarks>
55
public enum AssetEditPriority
66
{
77
/// <summary>This edit should be applied before (i.e. 'under') <see cref="Default"/> edits.</summary>
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#if SMAPI_DEPRECATED
2+
using System;
3+
using System.Diagnostics.CodeAnalysis;
4+
using StardewModdingAPI.Framework.ModLoading.Framework;
5+
6+
namespace StardewModdingAPI.Framework.ModLoading.RewriteFacades
7+
{
8+
/// <summary>Stub version of <see cref="StardewModdingAPI.Framework.ModLoading.Rewriters.StardewValley_1_5.AccessToolsFacade"/> to avoid breaking SpriteMaster.</summary>
9+
[Obsolete("This only exists for compatibility with older versions of SpriteMaster.")]
10+
[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = SuppressReasons.UsedViaRewriting)]
11+
public class AccessToolsFacade { }
12+
}
13+
#endif

0 commit comments

Comments
 (0)