Ongoing development#3
Open
Pathoschild wants to merge 17 commits into
Open
Conversation
The new package version... - adds support for SMAPI 3.0 and Stardew Valley 1.4; - deploys 'assets' folders automatically; - adds a Harmony reference automatically using <EnableHarmony>.
This commit rewrites the logic for applying processor logic to machines. Instead of replacing the in-world machine instances, the mod now uses Harmony to intercept machine methods and invoke singleton processors with the machine instance. This is much less error-prone, fixes save errors when machines are in some custom locations due to race conditions, fixes other mod compatibility issues, and fixes a machine duplication bug.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR has ongoing development to maintain compatibility with the latest versions, update for new SMAPI features, and make minor improvements. Once this is merged, I can provide compiled zips to release if you'd like.
Changes
Rewrite
The mod replaces in-game machines with temporary processor instances, but that's error-prone and breaks compatibility with some mods (particularly custom-location mods). This PR rewrites the mod to intercept machine methods using Harmony instead, and calls singleton processors to run the mod logic. That means it doesn't need to add/remove any custom instances to the world, automatically works for all machines, and works fine even if other mods add/remove machines/locations.
Fixes
config.jsonnot auto-generated correctly. It can now be left out of the release, to avoid overwriting player's configuration.Internal refactoring
assetsfolder from the release (so they're included in the build automatically)..gitattributesto keep line endings consistent between Linux/Mac/Windows..csprojformat.Modsfolder directly (no longer need to copy it into aLibfolder).Testing
These changes are part of unofficial updates which a number of players have been using. See download counts for the most recent releases: unofficial.4, unofficial.3, unofficial.2, unofficial.1.
Let me know if you want me to change anything!