fix RewriteMods option ignored when rewriting mod for OS
This commit is contained in:
parent
699a07ecf7
commit
5a2258f419
|
@ -13,6 +13,7 @@
|
||||||
|
|
||||||
* For mod authors:
|
* For mod authors:
|
||||||
* Added three stages to the `LoadStageChanged` event: `CreatedInitialLocations`/`SaveAddedLocations` (raised immediately after the game adds locations but before they're initialized), and `ReturningToTitle` (raised before exiting to the title screen).
|
* Added three stages to the `LoadStageChanged` event: `CreatedInitialLocations`/`SaveAddedLocations` (raised immediately after the game adds locations but before they're initialized), and `ReturningToTitle` (raised before exiting to the title screen).
|
||||||
|
* Fixed `RewriteMods` option in `smapi-internal/config.json` ignored when rewriting mod for OS compatibility.
|
||||||
* Fixed edge case when playing as a farmhand in non-English where translatable assets loaded via `IAssetLoader` weren't reapplied immediately when the server disconnects.
|
* Fixed edge case when playing as a farmhand in non-English where translatable assets loaded via `IAssetLoader` weren't reapplied immediately when the server disconnects.
|
||||||
|
|
||||||
## 3.9.2
|
## 3.9.2
|
||||||
|
|
|
@ -276,6 +276,8 @@ namespace StardewModdingAPI.Framework.ModLoading
|
||||||
|
|
||||||
// swap assembly references if needed (e.g. XNA => MonoGame)
|
// swap assembly references if needed (e.g. XNA => MonoGame)
|
||||||
bool platformChanged = false;
|
bool platformChanged = false;
|
||||||
|
if (this.RewriteMods)
|
||||||
|
{
|
||||||
for (int i = 0; i < module.AssemblyReferences.Count; i++)
|
for (int i = 0; i < module.AssemblyReferences.Count; i++)
|
||||||
{
|
{
|
||||||
// remove old assembly reference
|
// remove old assembly reference
|
||||||
|
@ -311,6 +313,7 @@ namespace StardewModdingAPI.Framework.ModLoading
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// find or rewrite code
|
// find or rewrite code
|
||||||
IInstructionHandler[] handlers = new InstructionMetadata().GetHandlers(this.ParanoidMode, platformChanged, this.RewriteMods).ToArray();
|
IInstructionHandler[] handlers = new InstructionMetadata().GetHandlers(this.ParanoidMode, platformChanged, this.RewriteMods).ToArray();
|
||||||
|
|
Loading…
Reference in New Issue