Commit Graph

4000 Commits

Author SHA1 Message Date
Jesse Plamondon-Willard 26d29a1070
minor refactoring 2022-04-09 15:44:17 -04:00
Jesse Plamondon-Willard 650af7ef1a
enable nullable annotations in log parser (#837) 2022-04-09 13:59:56 -04:00
Jesse Plamondon-Willard ad4d065fe7
simplify code with generic Enum.GetValues 2022-04-09 13:10:54 -04:00
Jesse Plamondon-Willard ccf760452d
pass data directly to script instead of serializing & deserializing it 2022-04-09 13:08:38 -04:00
Jesse Plamondon-Willard 260dbbf205
standardize quote style 2022-04-09 13:02:25 -04:00
Jesse Plamondon-Willard b3519f3cc1
rename 'data' to 'state' for upcoming changes 2022-04-09 12:59:21 -04:00
Jesse Plamondon-Willard 288ef5dc07
add environment variable form of new CLI args, update docs 2022-04-09 12:03:30 -04:00
Jesse Plamondon-Willard 283e7d1132
Merge pull request #836 from Tondorian/feature/CommandLineArgs
Add command-line arguments to toggle developer mode

# Conflicts:
#	src/SMAPI/Program.cs
2022-04-09 11:56:48 -04:00
Jesse Plamondon-Willard 6161cc9129
fix config.user.json overriding new CLI arguments 2022-04-09 11:54:23 -04:00
Jesse Plamondon-Willard 092f0aa4ea
simplify format for new CLI arguments 2022-04-09 11:52:20 -04:00
Jesse Plamondon-Willard 5ae87fbc01
fix deprecation warning when a mod uses LoadFromModFile 2022-04-09 11:42:49 -04:00
Khloe Leclair 631d0375c3 Simplify visible section checking by abusing Vue behavior, since the proper way is being buggy. 2022-04-08 15:26:35 -04:00
Khloe Leclair 0beff189d1 Implement client-side log rendering, better filtering, and pagination to improve performance and enhance the user experience with using the log parser. 2022-04-08 14:59:52 -04:00
Jesse Plamondon-Willard 238045ba9c
reverse mod build package migration to .NET 5 (#837)
The migrated package didn't work consistently in VIsual Studio, so this suppresses nullable annotations in .NET Standard instead.
2022-04-07 22:19:48 -04:00
Jesse Plamondon-Willard df955c0d3e
enable asset caching for GameContentHelper 2022-04-07 18:46:29 -04:00
Jesse Plamondon-Willard d706a25053
enable nullable annotations for most of the SMAPI toolkit (#837) 2022-04-07 02:33:23 -04:00
Jesse Plamondon-Willard 6b05296e71
migrate mod build package to .NET 5 to allow full nullable annotations (#837) 2022-04-07 01:51:50 -04:00
Jesse Plamondon-Willard e58e8a2283
enable nullable annotations for manifests (#837) 2022-04-07 01:38:02 -04:00
Jesse Plamondon-Willard ab6cf45b03
enable nullable annotations for semantic versions (#837) 2022-04-07 00:56:00 -04:00
Jesse Plamondon-Willard 3f9b412bed
expand & reorganize 3.14.0 release notes 2022-04-07 00:26:28 -04:00
Jesse Plamondon-Willard d1a7194bf6
allow null values in ISemanticVersion compare methods (#837) 2022-04-06 23:47:12 -04:00
Jesse Plamondon-Willard b4e979cc99
fix all warnings to simplify migration to nullable annotations (#837) 2022-04-06 22:46:19 -04:00
Jesse Plamondon-Willard 2e7c233f6c
enable nullable annotations by default (#837)
This adds `#nullable disable` to all existing code (except where null is impossible like enum files), so it can be migrated incrementally.
2022-04-06 21:48:55 -04:00
Jesse Plamondon-Willard 215a863945
drop update checks for Stardew64Installer 2022-04-06 18:34:58 -04:00
Jesse Plamondon-Willard 077d8e4f40
remove some unused/redundant code 2022-04-06 18:25:00 -04:00
Jesse Plamondon-Willard 0539bb8f37
simplify with newer pattern features 2022-04-06 18:25:00 -04:00
Jesse Plamondon-Willard b6c8cfc28b
simplify 'is not' patterns 2022-04-06 18:24:59 -04:00
Jesse Plamondon-Willard a593eda30f
use target-typed new 2022-04-06 18:24:59 -04:00
Jesse Plamondon-Willard 29f909a8d5
fix asset name truncation when loading XNB mod file without file extension 2022-04-06 00:37:10 -04:00
Jesse Plamondon-Willard a20413664b
split mod content load method, make error-handling more consistent 2022-04-03 21:17:40 -04:00
Jesse Plamondon-Willard c9af1c452a
fix incorrect deprecation warnings for helper.Content 2022-04-03 15:44:26 -04:00
Jesse Plamondon-Willard 627472c506
add temporary hack to fix compatibility between old & new APIs for some mods 2022-04-02 21:43:56 -04:00
Jesse Plamondon-Willard 546b58778c
switch to 'processing tick' for tick caching
This is incremented on each low-level tick (whether it's a game update, synchronized async operation, etc). That mainly avoids the cache persisting across the entire save loading process while it's being synchronized.
2022-04-02 19:13:27 -04:00
Jesse Plamondon-Willard f58cdde981
fix errors due to null asset names in asset propagation 2022-04-02 15:12:05 -04:00
Jesse Plamondon-Willard 6292b21f22
fix tick cache using game ticks instead of SMAPI ticks
The game ticks aren't incremented consistently in some cases (e.g. while loading a save), which leads to the cache values being kept too long.
2022-04-02 14:59:09 -04:00
Jesse Plamondon-Willard 4e2d7f2550
make mod file paths case-insensitive in all SMAPI APIs 2022-04-01 23:42:37 -04:00
Jesse Plamondon-Willard bac1f34f65
fix local file path asset name parsing locale codes in rare cases (#766)
Mod file paths can't be localized through the content pipeline. Normally the locale would be ignored anyway due to the file extension, but it'd be incorrectly parsed if the file name ended with a locale and no file extension (like "assets/example.fr-FR").
2022-04-01 22:59:50 -04:00
Patrick Müssig 61d857c41f
Added support for `--developer-mode true|false`
Minimal changes required to enable/disable developer mode  via command
line argument. This commit does not include any error handling for
invalid values how ever they will be ignored and not crash the game.
2022-04-02 04:08:49 +02:00
Jesse Plamondon-Willard 6ad8ca932e
keep old XNB file extension behavior for backwards compatibility (#766) 2022-04-01 00:33:35 -04:00
Jesse Plamondon-Willard 1d3c99cc25
split helper.Content API into game/mod content APIs 2022-03-27 13:42:14 -04:00
Jesse Plamondon-Willard d864f2ed77
add asset type to AssetRequested event (#766) 2022-03-27 12:16:28 -04:00
Jesse Plamondon-Willard 03efea2667
add LocaleChanged content event (#766) 2022-03-26 19:08:25 -04:00
Jesse Plamondon-Willard eebd8d54dc
expand obsolete attributes (#766) 2022-03-26 18:34:49 -04:00
Jesse Plamondon-Willard 5683bc9c7d
give Content Patcher internals access
This makes some of its low-level logic safer by avoiding unvalidated reflection.
2022-03-26 17:46:10 -04:00
Jesse Plamondon-Willard bacb851d7b
add IContentHelper.ParseAssetName (#766) 2022-03-26 17:44:48 -04:00
Jesse Plamondon-Willard 3a9ea66a20
update asset propagation for new content API (#766) 2022-03-26 17:37:01 -04:00
Jesse Plamondon-Willard 8d70415376
add deprecation notices for SMAPI 4.0.0 (#766) 2022-03-26 15:02:11 -04:00
Jesse Plamondon-Willard 4c64f9f644
rewrite content loading to allow handling locale variants (#766, #786, #812)
The game's content pipeline automatically loads localized variants if present. For example, it will try to load "Maps/cave.fr-FR", then "Maps/cave_international", then "Maps/cave". The old content API obfuscates this logic and treats them as interchangeable, which causes edge cases like bundle corruption (#812). This commit rewrites the loading logic to match the game logic when using the new content events, while maintaining the legacy behavior for the old IAssetLoader/IAssetEditor interfaces that'll be removed in SMAPI 4.0.0.
2022-03-26 14:07:16 -04:00
Jesse Plamondon-Willard ad8912047b
add asset edit priority (#766) 2022-03-26 01:43:40 -04:00
Jesse Plamondon-Willard e40907ab8b
add NameWithoutLocale fields (#766) 2022-03-26 01:19:44 -04:00