Compare commits

...

2041 Commits

Author SHA1 Message Date
yangzhi bfb0adb849 Merge remote-tracking branch 'pathoschild/stable' into develop
# Conflicts:
#	src/SMAPI.Toolkit/SMAPI.Toolkit.csproj
#	src/SMAPI/Framework/SCore.cs
2023-07-18 09:58:29 +08:00
yangzhi 24a0af3d58 Compatibility fix 2023-07-11 20:32:40 +08:00
yangzhi a5a10e60cb Minor fix 2023-07-11 08:06:06 +08:00
yangzhi fc6dc349da Fix String.Split methods 2023-07-10 16:47:39 +08:00
yangzhi 0de3a3ad41 1. improve performance 2023-07-10 15:20:12 +08:00
yangzhi 4317b930aa Fix for CJBCheatsMenu 2023-07-08 17:02:20 +08:00
yangzhi 77c15400b8 1. Fix save error when create new game
2. Compatibility fix
2023-07-08 10:12:57 +08:00
yangzhi ac1465bedf Fix serialization/deserialization bug in System.Xml 2023-07-07 10:43:35 +08:00
yangzhi 917eaf48c4 Fix save load/save error 2023-06-29 09:00:23 +08:00
yangzhi bf0903b173 Compatibility fix 2023-06-26 16:41:39 +08:00
yangzhi 68a88ef3ba 1. Fix virtual keyboard mod
2. Fix game console
2023-06-26 09:40:49 +08:00
yangzhi f628466adb Fix content patch logic 2023-06-25 09:27:26 +08:00
Jesse Plamondon-Willard 0ce39e2330
Merge branch 'develop' into stable 2023-06-24 16:53:42 -04:00
Jesse Plamondon-Willard 4e27841fb2
prepare for release 2023-06-24 16:53:13 -04:00
Jesse Plamondon-Willard eeb4e12f75
fix Linux/macOS build error 2023-06-24 15:48:21 -04:00
Jesse Plamondon-Willard 7d96f29aff
remove test_input time limit 2023-06-24 14:20:37 -04:00
Jesse Plamondon-Willard db33481dff
update release notes 2023-06-24 12:57:12 -04:00
Jesse Plamondon-Willard f52b2a5ad4
Merge pull request #908 from romangraef/feat/wezterm
Add wezterm terminal support for linux
2023-06-24 12:50:01 -04:00
Jesse Plamondon-Willard 421dfbe912
Merge pull request #907 from atravita-mods/error-missing-imagesource
Add validation for missing tilesheet image sources
2023-06-24 12:49:56 -04:00
Jesse Plamondon-Willard dd352d409f
Merge pull request #906 from NyCodeGHG/feature/headless-option
Add --no-prompt installer argument for unattended execution
2023-06-24 12:49:49 -04:00
Jesse Plamondon-Willard 36606e4a4a
Merge pull request #904 from boneskull/patch-1
Fix examples field in manifest schema
2023-06-24 12:49:41 -04:00
nea ebdb17bf81
Add wezterm terminal support for linux 2023-06-24 12:45:44 -04:00
Jesse Plamondon-Willard ae36b9b166
tweak new validation error text 2023-06-24 12:43:44 -04:00
atravita-mods 7c6da8e5ec
adds validation for missing image sources on tilesheets 2023-06-24 12:39:29 -04:00
Jesse Plamondon-Willard 5196c3bad9
rename `--headless` to `--no-prompt`, and parse with the other args 2023-06-24 12:36:02 -04:00
Jesse Plamondon-Willard 05695be390
remove unrelated `set -ex` in build script 2023-06-24 12:36:02 -04:00
Marie Ramlow 654ad4b4b2
Add headless flag for unattended execution 2023-06-24 12:06:10 -04:00
Christopher Hiller 15ab3ccd09
fix invalid field in manifest.json
VS is complaining that this line should be an array.
2023-06-24 12:04:09 -04:00
Jesse Plamondon-Willard 251d83472c
update dependencies 2023-06-24 12:01:49 -04:00
Jesse Plamondon-Willard 2f1f274b2d
fix Context.HasRemotePlayers being true when there's no farmhands 2023-06-24 11:58:25 -04:00
Jesse Plamondon-Willard 3c46bdaeb3
fix install error if a game folder has an invalid symlink 2023-06-24 11:53:04 -04:00
Jesse Plamondon-Willard 5d2afc0aa4
fix error deserializing null semantic version 2023-06-24 11:52:48 -04:00
Jesse Plamondon-Willard 76a0497684
fix ModFolder not being JSON-serializable 2023-06-24 11:51:29 -04:00
Jesse Plamondon-Willard 342b91ff80
add multiplayer player type to window titles 2023-06-24 11:50:51 -04:00
Jesse Plamondon-Willard 445370b75b
embed debug symbols for Linux/macOS compatibility in mod build package 2023-06-24 11:50:05 -04:00
Jesse Plamondon-Willard 9dd702a162
embed debug symbols for Linux/macOS compatibility
This fixes error stack traces not having line numbers on Linux/macOS.
2023-06-24 11:49:04 -04:00
yangzhi bdd506b0db Optimize migration logic 2023-06-21 08:05:41 +08:00
yangzhi f59c4f194b Imporve compatibility 2023-06-20 14:48:34 +08:00
yangzhi 18f34debcc Merge remote-tracking branch 'pathoschild/stable' into develop
# Conflicts:
#	src/SMAPI.Toolkit/SMAPI.Toolkit.csproj
#	src/SMAPI/SMAPI.csproj
2023-06-19 10:46:03 +08:00
yangzhi 8dbd00eade Fix loader's link error problem 2023-06-16 16:19:45 +08:00
zhiyang7 4ebf03ee48 1. Fix for saf access
2. Fix virtual keyboard
2023-04-10 14:31:34 +08:00
Jesse Plamondon-Willard 53e0e8cd24
Merge branch 'develop' into stable 2023-04-09 13:09:47 -04:00
Jesse Plamondon-Willard 46947683cd
prepare for release 2023-04-09 13:08:06 -04:00
ZaneYork d9440155ca Initial logic fix 2023-04-08 10:05:21 +08:00
zhiyang7 2801638122 Bug fix 2023-04-04 11:22:32 +08:00
Jesse Plamondon-Willard 2e618672aa
update schema for Content Patcher 1.29.0 2023-04-02 15:44:05 -04:00
Jesse Plamondon-Willard c2e9aad698
adjust ModContentManager.HandleUnknownFileTypes to let mods patch it 2023-04-02 15:44:02 -04:00
Jesse Plamondon-Willard c0ac58f277
fix IsWorldReady being editable by mods 2023-04-02 15:43:58 -04:00
Jesse Plamondon-Willard d2134f0f70
update release notes & tweak recent changes 2023-04-02 15:43:50 -04:00
Jesse Plamondon-Willard d13046edb6
Merge pull request #901 from atravita-mods/develop
Avoid resolving empty folders
2023-04-02 15:39:46 -04:00
Jesse Plamondon-Willard 45903dbf3e
Merge pull request #899 from freyacoded/portable-shell-scripts
Use more portable shebangs
2023-04-02 15:38:58 -04:00
Jesse Plamondon-Willard dc027f4eff
Merge pull request #895 from stylemate/patch-2
Update Korean translations
2023-04-02 15:38:36 -04:00
atravita-mods c12e9d788e
as per comments, remove where in favor of nullchecking id instead 2023-04-02 15:37:40 -04:00
atravita-mods 58ccaf9a1e
avoid resolving empty folders. 2023-04-02 15:37:37 -04:00
Freya Arbjerg fe43ec51d0
Use more portable shebangs 2023-04-02 15:37:17 -04:00
ORMEEHYUNGKEUN CHA 5e578725bf
Update ko.json
fixed blatantly wrong translation
2023-04-02 15:36:44 -04:00
Jesse Plamondon-Willard 7b5566d075
add PerScreen.IsActiveForScreen() 2023-04-02 15:31:15 -04:00
Jesse Plamondon-Willard 7f7561469f
update to FluentHttpClient 4.3.0 2023-04-02 15:30:31 -04:00
Jesse Plamondon-Willard 072efba6dc
add NuGet package readme note about using constants before they're defined 2023-04-02 15:30:26 -04:00
Jesse Plamondon-Willard eb2a9b69bc
remove LargeAddressAware flag
This isn't needed anymore since SMAPI is 64-bit now.
2023-04-02 15:30:14 -04:00
zhiyang7 e618785e93 Fix require permission logic 2023-02-09 17:29:42 +08:00
zhiyang7 3c59a5fc6a Compatibility fix 2023-02-08 18:04:24 +08:00
zhiyang7 48fd5a490b Fix assemblies ref rewrite logic 2023-02-08 13:38:15 +08:00
zhiyang7 a406411a04 Fix Virtual Keyboard mod 2023-02-06 16:09:33 +08:00
zhiyang7 0f94f4609d Update drawImpl logic 2023-02-04 18:01:46 +08:00
zhiyang7 a797608622 Make it bootable 2023-02-04 14:45:02 +08:00
zhiyang7 7c6fc4cd19 Minor fix 2023-02-02 15:56:19 +08:00
zhiyang7 ab67f2b233 Fix Loader project link behavior 2023-02-02 10:23:27 +08:00
zhiyang7 8fcb6e9041 Upgrade to .net5.0-adnroid framework 2023-02-02 09:40:04 +08:00
zhiyang7 a42acb8176 Merge with latest branch 2023-01-30 16:58:14 +08:00
Jesse Plamondon-Willard b9fe45b091
rework GitHub issue templates to further discourage creating support issues 2023-01-28 16:40:52 -05:00
Jesse Plamondon-Willard 8ee555c07a
suppress findstr installer error for some players 2023-01-22 10:18:37 -05:00
zhiyang7 3e43d69745 Merge remote-tracking branch 'pathoschild/stable' into develop
# Conflicts:
#	.gitignore
#	build/common.targets
#	src/SMAPI.Mods.ConsoleCommands/SMAPI.Mods.ConsoleCommands.csproj
#	src/SMAPI.Mods.SaveBackup/SMAPI.Mods.SaveBackup.csproj
#	src/SMAPI.Tests/SMAPI.Tests.csproj
#	src/SMAPI.Toolkit/ModToolkit.cs
#	src/SMAPI.Toolkit/SMAPI.Toolkit.csproj
#	src/SMAPI.sln
#	src/SMAPI/Constants.cs
#	src/SMAPI/Framework/ContentManagers/ModContentManager.cs
#	src/SMAPI/Framework/Input/GamePadStateBuilder.cs
#	src/SMAPI/Framework/Logging/LogManager.cs
#	src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
#	src/SMAPI/Framework/ModLoading/Framework/RewriteHelper.cs
#	src/SMAPI/Framework/Models/SConfig.cs
#	src/SMAPI/Framework/Patching/GamePatcher.cs
#	src/SMAPI/Framework/Reflection/Reflector.cs
#	src/SMAPI/Framework/SCore.cs
#	src/SMAPI/Framework/SGame.cs
#	src/SMAPI/Framework/SMultiplayer.cs
#	src/SMAPI/Framework/StateTracking/LocationTracker.cs
#	src/SMAPI/Metadata/CoreAssetPropagator.cs
#	src/SMAPI/Metadata/InstructionMetadata.cs
#	src/SMAPI/SMAPI.csproj
2023-01-16 17:28:55 +08:00
Jesse Plamondon-Willard b4e95a92b3
Merge branch 'develop' into stable 2023-01-09 12:27:49 -05:00
Jesse Plamondon-Willard 25b8e13ba8
prepare for release 2023-01-09 12:27:29 -05:00
Jesse Plamondon-Willard e5407417a0
add delegating mod hooks for mod use 2023-01-08 22:05:22 -05:00
Jesse Plamondon-Willard 5518b8d461
update packages 2023-01-08 16:48:30 -05:00
Jesse Plamondon-Willard b246fe6145
update web to .NET 7 2023-01-08 16:43:23 -05:00
Jesse Plamondon-Willard d35f45fc32
fix game assemblies not excluded from release zip when bundle type not set 2023-01-07 17:55:15 -05:00
Jesse Plamondon-Willard 81d3baa3b5
simplify Save Backup compression
We don't need special handling for macOS anymore, since all platforms have .NET 5 now.
2022-12-28 11:35:05 -05:00
Jesse Plamondon-Willard d438e49f76
Merge pull request #889 from daleao/develop
Replace slingshot ID check with type field check
2022-12-28 11:33:31 -05:00
Jesse Plamondon-Willard 45979c57dd
defer weapon data parsing until needed, handle invalid formats 2022-12-28 11:30:35 -05:00
DaLion 8660742391 Replaced slingshot ID check with Type check. 2022-12-07 18:13:17 -03:00
Jesse Plamondon-Willard 368b25b541
Merge branch 'develop' into stable 2022-12-01 20:24:22 -05:00
Jesse Plamondon-Willard a2944eed5c
prepare for release 2022-12-01 19:43:56 -05:00
Jesse Plamondon-Willard 4c66aa63c5
update release notes 2022-11-14 17:45:43 -05:00
Jesse Plamondon-Willard 0f7026c1b1
Merge pull request #886 from atravita-mods/develop
Fix overlay transparency crop not always starting at end of pixel area
2022-11-14 17:34:40 -05:00
Jesse Plamondon-Willard ae5829a3ee
tweak variables for clarity 2022-11-14 17:28:59 -05:00
atravita-mods e2c1d2b1c9 more indexing errors joy 2022-11-14 11:38:10 -05:00
Jesse Plamondon-Willard 72f5df2d20
update release notes 2022-11-13 12:17:07 -05:00
Jesse Plamondon-Willard 0fbf99cd83
Merge pull request #885 from AnotherPillow/develop
Only check for Error Handler when on SMAPI 3.9+
2022-11-13 12:15:19 -05:00
AnotherPillow d521c20e8a Only check for Error Handler on SMAPI 3.9+ 2022-11-13 17:06:10 +00:00
Jesse Plamondon-Willard b95d2a3f93
Merge branch 'develop' into stable 2022-11-12 15:15:56 -05:00
Jesse Plamondon-Willard 613946003d
prepare for release 2022-11-12 15:14:59 -05:00
Jesse Plamondon-Willard 57d3e2b98e
also update multiplayer map cache for host player 2022-11-12 13:50:02 -05:00
Jesse Plamondon-Willard c1e3b25dca
fix load-early/late mods not correctly sorted relative to others in the same list 2022-11-11 21:43:42 -05:00
Jesse Plamondon-Willard 9771cefa6a
update release notes 2022-11-11 21:42:49 -05:00
Jesse Plamondon-Willard 1894cd831e
Merge pull request #884 from atravita-mods/develop
AssetName.StartsWith - fix yet another case with the trailing slash
2022-11-11 21:25:01 -05:00
Jesse Plamondon-Willard ad2dcc2879
expand code comments for clarity 2022-11-11 21:22:52 -05:00
Jesse Plamondon-Willard a52f888c3f
Merge pull request #883 from SinZ163/feature/sinz/farmhand-mapedit
Add logic to remove from the multiplayer map cache for asset propagation
2022-11-11 20:56:35 -05:00
Jesse Plamondon-Willard 286c2d2449
pass multiplayer into asset propagator to avoid reflection 2022-11-11 20:55:24 -05:00
atravita-mods 2bccdd9737 edit comment. 2022-11-11 06:52:46 -05:00
atravita-mods 4ca546a7a8 directly add tests over the trailing slash. 2022-11-11 06:38:35 -05:00
SinZ be84248a9a Add logic to remove from the multiplayer map cache for asset propagation 2022-11-11 22:01:48 +11:00
Jesse Plamondon-Willard 42bcd3068f
add unit test for assumption about HashSet<T> order
This will let us detect if the behavior ever changes in a future version of .NET, so we need to change the new ModsToLoadEarly/Late config fields.
2022-11-11 02:33:28 -05:00
Jesse Plamondon-Willard 28ba3408bc
raise all deprecation messages to the final level 2022-11-11 01:47:12 -05:00
Jesse Plamondon-Willard cefd9e23b0
set max game version 2022-11-11 01:38:45 -05:00
Jesse Plamondon-Willard e44562c9c5
update release notes 2022-11-11 01:35:42 -05:00
Jesse Plamondon-Willard 133aeab3fc
Merge pull request #882 from Shockah/mod-load-order
Add options to override mod load order

# Conflicts:
#	src/SMAPI/Framework/Models/SConfig.cs
2022-11-11 01:29:30 -05:00
Jesse Plamondon-Willard dbf7750f3e
only validate & apply custom load order if there is one 2022-11-11 01:22:46 -05:00
Jesse Plamondon-Willard 3059794622
adjust warning messages & log header when load order is edited 2022-11-11 01:22:46 -05:00
Jesse Plamondon-Willard 0629f19698
change new fields to hash sets & simplify sorting
This makes the mod IDs case-insensitive (like the 'SuppressUpdateChecks' field), fixes a build error in unit tests, and avoids re-scanning the mod list multiple times.
2022-11-11 01:22:45 -05:00
Jesse Plamondon-Willard eaacfd04b8
Merge pull request #881 from tylergibbs2/detailed-manifest-errors
Add detailed manifest validation errors at build time
2022-11-10 23:34:50 -05:00
Jesse Plamondon-Willard 867afdd96f
tweak new code 2022-11-10 23:27:38 -05:00
Jesse Plamondon-Willard 6ee0d2f93d
don't validate manifest if we're not deploying or zipping the mod
That would break cases like unit test projects, which don't have a manifest.json file.
2022-11-10 23:27:38 -05:00
Jesse Plamondon-Willard 346fddda67
move validation logic out of Manifest model
This avoids tightly coupling higher logic to the implementation class, since we can validate the interface.
2022-11-10 23:27:38 -05:00
Jesse Plamondon-Willard 2a8cb8c636
Merge pull request #878 from atravita-mods/develop
Rewrite asset name comparison to stop at the first mismatch
2022-11-10 21:52:00 -05:00
Jesse Plamondon-Willard 303b3924ae
fix case where prefix ends with a path separator 2022-11-10 21:50:01 -05:00
Jesse Plamondon-Willard 76e5588f02
add option to disable console input 2022-11-09 21:41:04 -05:00
Jesse Plamondon-Willard beb0b0aaf4
fix & improve split-screen column in log parser 2022-11-09 20:03:41 -05:00
Michał Dolaś 9fd8c35b46 Actually taking order into consideration 2022-11-09 20:26:50 +01:00
Michał Dolaś 42b4b6b6a4 Renamed first/last to early/late; ignoring mods declared as both and warning about those 2022-11-09 19:50:32 +01:00
Michał Dolaś bb2fde1829 Added ModsToLoadFirst/Last to SMAPI config, along with the implementation 2022-11-09 17:25:25 +01:00
Jesse Plamondon-Willard 9ae69245b3
Merge branch 'develop' into stable 2022-10-21 20:12:18 -04:00
Jesse Plamondon-Willard 8090b30c6e
prepare for release 2022-10-21 20:12:02 -04:00
Tyler 55eec58eaf
simplify ContentPackFor validation check 2022-10-19 10:21:19 -05:00
Tyler 61d6ec12da
add detailed manifest validation errors at build time 2022-10-18 20:03:28 -05:00
atravita-mods b99dbf53bd fix this case. 2022-10-18 18:58:41 -04:00
Jesse Plamondon-Willard 0e4dd8a7b4
prevent Steam vdf read errors from crashing the installer 2022-10-17 20:02:19 -04:00
atravita-mods 4dcc6904b9 fix issues with subfolders 2022-10-16 18:04:19 -04:00
Jesse Plamondon-Willard 4e91174b3e
update release notes 2022-10-16 15:17:03 -04:00
Jesse Plamondon-Willard ff9a955c8b
Merge pull request #879 from atravita-mods/FixIndexingAgain
Fix image patching index math
2022-10-16 15:12:17 -04:00
Jesse Plamondon-Willard e31c96d5b8
add missing test adapter package 2022-10-16 15:08:39 -04:00
Jesse Plamondon-Willard 573f732c2a
reduce sequential bool checks a bit 2022-10-16 14:41:46 -04:00
Jesse Plamondon-Willard 5d30b47e1e
fix IsEquivalentTo no longer ignoring surrounding whitespace 2022-10-16 14:41:46 -04:00
Jesse Plamondon-Willard 4e3b2810e6
fix index-out-of-range error when StartsWith prefix is empty 2022-10-16 14:41:45 -04:00
Jesse Plamondon-Willard eed1deb3c7
apply conventions to asset part enumerator 2022-10-16 14:41:45 -04:00
Jesse Plamondon-Willard 70cde89480
tweak naming in new code 2022-10-16 14:41:45 -04:00
atravita-mods 72ee547e1e And fixing the indexing math again. 2022-10-15 11:03:39 -04:00
atravita-mods 0c191eb32c make asset name comparing lazy. 2022-10-15 08:36:24 -04:00
Jesse Plamondon-Willard ce00f8ff87
Merge branch 'develop' into stable 2022-10-10 20:03:16 -04:00
Jesse Plamondon-Willard 5739745b76
prepare for release 2022-10-10 20:03:01 -04:00
Jesse Plamondon-Willard 474c76183b
fix error when Steam .vdf file doesn't exist 2022-10-10 13:36:11 -04:00
Jesse Plamondon-Willard 93a748996c
Merge branch 'develop' into stable 2022-10-09 20:11:34 -04:00
Jesse Plamondon-Willard ee77efcc97
prepare for release 2022-10-09 19:42:24 -04:00
Jesse Plamondon-Willard 4d2ad379b4
fix package error 2022-10-09 19:29:18 -04:00
Jesse Plamondon-Willard 27856ebea2
drop UseRawImageLoading option
Raw image loading is now always enabled, except in PyTK compatibility mode.
2022-10-09 18:03:05 -04:00
Jesse Plamondon-Willard b78b269cf5
split PyTK raw-image-load check into a separate method so it can be patched by mods like SpriteMaster 2022-10-09 17:56:33 -04:00
Jesse Plamondon-Willard 037d7e357b
set texture name earlier to support mods like SpriteMaster 2022-10-09 17:39:11 -04:00
Jesse Plamondon-Willard 9a15da5a17
add 'strict mode' release with deprecated APIs stripped out 2022-10-09 16:59:05 -04:00
Jesse Plamondon-Willard 42ff20cd92
suppress Harmony debug mode by default 2022-10-09 15:01:25 -04:00
Jesse Plamondon-Willard d143ab1077
update to Harmony 2.2.2 2022-10-09 14:45:50 -04:00
Jesse Plamondon-Willard d0704ef6f0
fix nullability warnings 2022-10-09 14:34:31 -04:00
Jesse Plamondon-Willard 8dc12fd01c
optimize string splits 2022-10-09 14:30:40 -04:00
Jesse Plamondon-Willard 3d10d08a1a
make deprecation warnings a bit stronger for the upcoming 4.0.0 release 2022-10-09 14:08:16 -04:00
Jesse Plamondon-Willard a220e14f2d
polish recent changes & update release notes 2022-10-09 13:50:24 -04:00
Jesse Plamondon-Willard fce1b1bd0b
Merge pull request #875 from pizzaoverhead/steamLibrarySupport
Find installs in alternate Steam library locations
2022-10-08 21:33:26 -04:00
Jesse Plamondon-Willard ab66266b4b
update installer for VdfConverter & rework avoid custom models 2022-10-08 21:32:10 -04:00
Jesse Plamondon-Willard 5ef726be92
Merge pull request #874 from KhloeLeclair/specific_apis
Add `IMod.GetApi(IManifest manifest)`
2022-10-08 20:45:49 -04:00
Jesse Plamondon-Willard 8d6670cfc8
pass mod info to GetApi instead 2022-10-08 20:33:01 -04:00
Jesse Plamondon-Willard a565ac9405
make GetApi methods mutually exclusive & improve docs 2022-10-08 19:59:21 -04:00
Jesse Plamondon-Willard 4323758c7c
Merge pull request #873 from atravita-mods/patch-1
Ignore more file extensions when scanning for mods
2022-10-08 18:14:32 -04:00
Jesse Plamondon-Willard 0cce2d701d
Merge pull request #872 from tylergibbs2/fix-comparablelistwatcher-memleak
Fix ComparableListWatcher not removing items in zero case
2022-10-08 18:13:13 -04:00
Jesse Plamondon-Willard 2e918823ba
Merge pull request #870 from atravita-mods/arraypooling
Use array pooling and various optimizations to reduce allocations
2022-10-08 18:03:14 -04:00
Jesse Plamondon-Willard 2e0bc5ddfe
tweak new code 2022-10-08 17:45:50 -04:00
Jesse Plamondon-Willard 40d5cd7c05
use try..finally to make sure rented arrays are returned 2022-10-08 17:42:32 -04:00
atravita-mods 48d0f70ffd
fix indexing math again. 2022-10-08 13:27:08 -04:00
atravita-mods 798a56bd2e
Avoid copying memory for contingous buffers. 2022-10-08 13:27:07 -04:00
atravita-mods 496c438be2
fix indexing again, because apparently I'm bad at math now? 2022-10-08 13:27:07 -04:00
atravita-mods a3b8546ec8
cleanup and comments 2022-10-08 13:27:07 -04:00
atravita-mods 09fd12ddfe
use startindex/endindex since I've already calculated those... 2022-10-08 13:27:07 -04:00
atravita-mods c1d5d19e43
Skip transparent rows at the start and end when doing a patch overlay. 2022-10-08 13:27:06 -04:00
atravita-mods ce63efa2f4
Avoid making copy if the source image is just taller than the sourceArea. 2022-10-08 13:27:06 -04:00
atravita-mods ff523c619a
fix fast-track array copying 2022-10-08 13:27:06 -04:00
atravita-mods d29c01b815
Partially revert "Favor record structs when there are four or fewer elements."
This reverts commit f5d49515c4eddfb415903a89d70654cf9b6de299.
2022-10-08 13:27:06 -04:00
atravita-mods 627100509c
hide throwhelper from stack trace in dotnet 6 2022-10-08 13:27:06 -04:00
atravita-mods 0a2a1a08de
Favor record structs when there are four or fewer elements. 2022-10-08 13:27:05 -04:00
atravita-mods 581763c363
Skip math if above is fully opaque. 2022-10-08 13:27:05 -04:00
atravita-mods 4a1055e573
arraypool in the modcontentmanager, a bit of fussing 2022-10-08 13:27:05 -04:00
atravita-mods 78643710ce
Use array pools in editing images. 2022-10-08 13:27:05 -04:00
atravita-mods 7c90385d8d
Pre-calculate the strings for log levels. 2022-10-08 13:27:04 -04:00
Jesse Plamondon-Willard a7f03abe25
change square brackets to round ones in manifest name 2022-10-08 13:16:38 -04:00
Jesse Plamondon-Willard 5a0d337fcf
update FluentHttpClient 2022-10-07 00:21:09 -04:00
Jesse Plamondon-Willard 2c25426578
fix issues with BundleExtraAssemblies 2022-10-07 00:16:00 -04:00
pizzaoverhead c6b3446e9c Added checking for alternative Steam library install locations when looking for the Stardew Valley install. 2022-09-29 13:33:45 +01:00
Jesse Plamondon-Willard c0e31d17a6
fix handling of GitHub prerelease versions marked as non-prerelease 2022-09-28 23:21:12 -04:00
Khloe Leclair e8da8fff51 Initial work on a way for mods to return specific API instances to specific mods. 2022-09-26 15:18:36 -04:00
atravita-mods 715b9b09ba
Update ModScanner.cs
Add a few more files to the ignored files like .7z
2022-09-18 12:05:46 -04:00
Tyler f0e52061e3
fix ComparableListWatcher not removing items in zero case 2022-09-05 13:11:36 -05:00
Jesse Plamondon-Willard e7d29a2f7d
Merge branch 'develop' into stable 2022-08-31 17:16:17 -04:00
Jesse Plamondon-Willard 41e95642f0
prepare for release 2022-08-31 17:15:58 -04:00
Jesse Plamondon-Willard 5af87fc3be
remove compatibility section in the new app manifest
This apparently leads to NoSuitableGraphicsDeviceException errors when launching SMAPI for some players.
2022-08-31 17:08:30 -04:00
Jesse Plamondon-Willard e0838a28c0
Merge branch 'develop' into stable 2022-08-29 18:25:45 -04:00
Jesse Plamondon-Willard 8b6c732d71
prepare for release 2022-08-29 18:18:21 -04:00
Jesse Plamondon-Willard 47a68fbb7b
deprecate PyTK compatibility mode 2022-08-29 18:17:53 -04:00
Jesse Plamondon-Willard 2bb8e8353b
update compatibility workaround for the recent PyTK update 2022-08-29 18:00:41 -04:00
Jesse Plamondon-Willard c2f474bf88
distinguish empty/XNB folders from invalid manifest for error-tracking 2022-08-24 17:49:17 -04:00
Jesse Plamondon-Willard 1d5017f119
fix broken mods with no ID listed as duplicate 2022-08-24 17:49:12 -04:00
Jesse Plamondon-Willard a1bc96d365
Merge branch 'develop' into stable 2022-08-20 17:01:59 -04:00
Jesse Plamondon-Willard f3a79219e8
prepare for release 2022-08-20 17:01:07 -04:00
Jesse Plamondon-Willard f780d140f0
fix early mod load errors incorrectly suppressed 2022-08-20 16:36:15 -04:00
Jesse Plamondon-Willard 263130bafc
fix deprecation notices split into two messages unnecessarily 2022-08-20 16:15:29 -04:00
Jesse Plamondon-Willard b2103bbfa6
update schema for Content Patcher 1.28.0 2022-08-18 22:39:37 -04:00
Jesse Plamondon-Willard c51a593e93
fix log parser error if a mod logged a null character 2022-08-16 22:03:22 -04:00
Jesse Plamondon-Willard f23cd450a0
clarify docs 2022-08-16 22:03:22 -04:00
Jesse Plamondon-Willard 5ab87efaa0
log error if mod files are detected directly under Mods folder 2022-08-16 22:03:21 -04:00
Jesse Plamondon-Willard 4d9384b828
switch SMAPI to portable PDB format 2022-08-14 19:17:21 -04:00
Jesse Plamondon-Willard d813c4e2c8
fix log parsing for invalid content packs (#860) 2022-08-08 22:27:07 -04:00
Jesse Plamondon-Willard e376386d25
set error code on exit (#868) 2022-08-08 21:43:46 -04:00
Jesse Plamondon-Willard 352fa4759e
fix error when a mod is both duplicated and missing the DLL 2022-08-08 19:54:07 -04:00
Jesse Plamondon-Willard 1749a82947
update release notes 2022-08-08 19:50:29 -04:00
Jesse Plamondon-Willard f3ff334c08
Merge pull request #869 from atravita-mods/patch-1
Add error message for invalid PNG
2022-08-08 19:46:30 -04:00
Jesse Plamondon-Willard e7b93e2ec2
Merge pull request #867 from lanturnalis/develop
Add condition to DebugType to allow for overriding
2022-08-08 19:46:01 -04:00
Jesse Plamondon-Willard 08eafe7d89
tweak new error text 2022-08-08 19:42:40 -04:00
Jesse Plamondon-Willard 8c58bdae6f
remove DebugType build property
The 'portable' format is preferred in newer .NET versions, but it's set by default now so we don't need to override it anymore.
2022-08-08 19:32:58 -04:00
atravita-mods 7a3b0e180f
Adds an error message for an invaild png 2022-08-05 17:21:53 -04:00
Jesse Plamondon-Willard ab34b6142d
undo $@ to $* change per discussion 2022-07-28 21:47:21 -04:00
Jesse Plamondon-Willard 5371dc3fce
Merge pull request #865 from ishanjalan/unix-launcher-changes
Apply suggested fixes from Rider in Unix launcher

* [error] Argument mixes string and array. Use * or separate argument.
* [warn] Declare and assign separately to avoid masking return values.
* [warn] Quote to prevent word splitting.
* [hint] echo may not expand escape sequences. Use printf.
* [hint] read without -r will mangle backslashes.
* [hint] Double quote to prevent globbing and word splitting.
2022-07-28 21:28:41 -04:00
Jesse Plamondon-Willard 1095ce6682
Merge pull request #864 from KediDili/develop
Fix Turkish translation
2022-07-28 21:09:49 -04:00
Jesse Plamondon-Willard 7c1388a843
Merge pull request #863 from Pathoschild/dependabot/nuget/src/SMAPI.Web/Azure.Storage.Blobs-12.13.0
Bump Azure.Storage.Blobs from 12.12.0 to 12.13.0
2022-07-28 21:07:43 -04:00
Jesse Plamondon-Willard 227a1e72e8
Merge pull request #862 from ishanjalan/default-shell-macOS
Tweak macOS launcher to use the default terminal
2022-07-28 21:04:08 -04:00
lanturnalis edf2c5dbea
Add condition to DebugType to allow for overriding 2022-07-25 21:31:09 -05:00
Ishan Jalan dd2e3e9d93 Jetbrains Rider suggestions
I ran the file on Rider and it had a few suggestions

<img width="506" alt="image" src="https://user-images.githubusercontent.com/44338423/180635394-cb45defa-47f4-444c-ad10-e0fc89522fe7.png">
2022-07-24 12:07:38 +05:30
Ishan Jalan a50a730886 unix-launcher.sh optimisations
I ran the file through Rider which used Intellisense(?) to suggest changes in addition to moving from .sh to .command
2022-07-24 12:01:34 +05:30
KediDili fd3850add9 Fix for mistranslation in tr.json
Somebody accidentally translated tr.json to Russian. This PR fixes that.
2022-07-22 21:24:15 +03:00
dependabot[bot] ea4664856d
Bump Azure.Storage.Blobs from 12.12.0 to 12.13.0 in /src/SMAPI.Web
Bumps [Azure.Storage.Blobs](https://github.com/Azure/azure-sdk-for-net) from 12.12.0 to 12.13.0.
- [Release notes](https://github.com/Azure/azure-sdk-for-net/releases)
- [Commits](https://github.com/Azure/azure-sdk-for-net/compare/Azure.Storage.Blobs_12.12.0...Azure.Storage.Blobs_12.13.0)

---
updated-dependencies:
- dependency-name: Azure.Storage.Blobs
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-07-21 22:46:05 +00:00
Ishan Jalan ea4307a282 Update unix-launcher.sh
This will open the default shell. Works for me after testing.
2022-07-20 22:30:09 +05:30
Jesse Plamondon-Willard 3da5917eed
update Pintail 2022-07-17 11:29:50 -04:00
Jesse Plamondon-Willard 1b7dfb28f2
update release notes 2022-07-17 11:07:53 -04:00
Jesse Plamondon-Willard b30281774c
Merge pull request #859 from ishanjalan/svg-sidebar
Replace web sidebar GIF with SVG
2022-07-17 11:05:44 -04:00
Jesse Plamondon-Willard 88517715a3
update image reference 2022-07-17 11:04:45 -04:00
Ishan Jalan da1eca3696 Moving Sidebar GIF to SVG 2022-07-17 09:53:52 +05:30
Jesse Plamondon-Willard 830d2c57cc
update log parser for new update alert format 2022-07-09 01:06:32 -04:00
Jesse Plamondon-Willard 62da7abfd2
Merge pull request #858 from ishanjalan/develop
Fix pufferchick SVG icons having different sizes
2022-07-09 01:00:22 -04:00
Ishan Jalan 6d9dcdc2f8
Update pufferchick-cool.svg 2022-07-09 00:58:26 -04:00
Jesse Plamondon-Willard 521129ad21
raise deprecation levels 2022-07-09 00:53:11 -04:00
Jesse Plamondon-Willard 9435711216
update release notes 2022-07-08 19:40:54 -04:00
Jesse Plamondon-Willard fbca048fcb
Merge pull request #857 from ishanjalan/develop
Change pufferchick web icons to SVG
2022-07-08 19:38:03 -04:00
Jesse Plamondon-Willard 477ecbab6e
bypass browser cache & delete unused images 2022-07-08 19:36:32 -04:00
Jesse Plamondon-Willard 72ba455d5a
simplify .gitignore 2022-07-08 19:36:09 -04:00
Ishan Jalan 5da690cbef
Update pufferchick-cool.svg 2022-07-08 19:31:44 -04:00
Ishan Jalan a52f24307b
pufferchick-cool updated [2] 2022-07-08 19:31:41 -04:00
Ishan Jalan 173bc4f517
Updated pufferchick cool 2022-07-08 19:31:37 -04:00
Ishan Jalan 8eeda8b4c4
SVGs for pufferchick and pufferchick-cool
SVG > PNG
2022-07-08 19:31:28 -04:00
Jesse Plamondon-Willard 4850e80e56
Merge pull request #855 from spacechase0/appmanifest
Add app.manifest, fixing DPI awareness
2022-07-08 19:15:33 -04:00
Jesse Plamondon-Willard 0c787de2df
match settings used by the game 2022-07-08 19:13:45 -04:00
Jesse Plamondon-Willard bc71665c1c
apply editorconfig 2022-07-08 19:11:40 -04:00
Jesse Plamondon-Willard 795e808063
Merge pull request #852 from TehPers/TehPers/search-local-deps
Search assembly directory for dependencies
2022-07-08 19:03:59 -04:00
Jesse Plamondon-Willard 1b3a1a48d0
refactor assembly resolver to avoid repeatedly copying search directory list 2022-07-08 19:02:33 -04:00
Jesse Plamondon-Willard 1b25710cf2
fix installer partly applying color theme before it's selected 2022-07-08 17:48:01 -04:00
Jesse Plamondon-Willard dcb3a97727
add log parser warning for PyTK compatibility mode 2022-07-08 17:44:27 -04:00
Jesse Plamondon-Willard d51ffe58f7
Merge branch 'develop' into stable 2022-07-06 22:26:09 -04:00
Jesse Plamondon-Willard bcb9e25d86
prepare for release 2022-07-06 22:25:45 -04:00
Jesse Plamondon-Willard 9c9552531f
fix build warnings 2022-07-06 19:25:15 -04:00
Jesse Plamondon-Willard 4d9fd63d9e
update code annotations 2022-07-06 19:24:49 -04:00
Jesse Plamondon-Willard 2347644a1f
update compatibility list for broken CFAutomate unofficial update 2022-07-06 18:36:29 -04:00
Jesse Plamondon-Willard 60b4a10d0f
update release notes 2022-07-05 23:30:09 -04:00
Jesse Plamondon-Willard ed1705d4d7
Merge pull request #854 from ishanjalan/develop
Current version in mod check
2022-07-05 23:23:26 -04:00
Jesse Plamondon-Willard 543e45f9bd
remove artifacts, tweak text 2022-07-05 23:21:51 -04:00
Jesse Plamondon-Willard 454f3a45ba
fix trace logs not tracking reloaded map tilesheets as asset propagation 2022-07-05 23:19:53 -04:00
Jesse Plamondon-Willard 42099f24ee
improve log parser's 'suggested fixes' styles 2022-07-05 22:36:02 -04:00
Jesse Plamondon-Willard 0ba4fd1785
detect missing/outdated Error Handler for 'suggested fixes' section 2022-07-05 22:09:46 -04:00
Jesse Plamondon-Willard f3a4b316b7
fix PyTK compatibility mode not handling some edge cases 2022-07-05 19:01:28 -04:00
Chase Warrington f44a2fbfcf Add app.manifest, fixing DPI awareness 2022-07-04 20:42:27 -04:00
Ishan Jalan d717e246b6 Current version in mod check
Added "(You have x.x.x)" to the mod update check.
2022-07-02 08:42:35 +05:30
Jesse Plamondon-Willard bd88727948
remove obsolete override
SMAPI no longer raises UsesDynamic warnings.
2022-06-28 20:48:58 -04:00
Jesse Plamondon-Willard 6b411d1dee
fix deprecation check 2022-06-28 20:48:28 -04:00
TehPers 0c0f7898f4 Search assembly directory for dependencies 2022-06-28 16:37:58 -07:00
Jesse Plamondon-Willard 6d11c41fac
migrate update checks to FluentHttpClient
WebClient isn't needed for compatibility with macOS after the .NET 5 update in Stardew Valley 1.5.5, and causes noticeable lag for some players even when running on a background thread.
2022-06-28 18:17:27 -04:00
Jesse Plamondon-Willard 5e1212e99a
update schema for Content Patcher 1.27.0 2022-06-28 01:13:11 -04:00
Jesse Plamondon-Willard 8254a821cc
copy .NET metadata files on local deploy 2022-06-26 15:03:25 -04:00
Jesse Plamondon-Willard bbc476a2cf
split local deploy into its own targets file 2022-06-26 14:41:35 -04:00
Jesse Plamondon-Willard ca9efad7a7
avoid cancellation token for tracking exit state
This apparently causes noticeable lag for a minority of players.
2022-06-24 17:00:39 -04:00
Jesse Plamondon-Willard 525ca7c9c9
fix config.user.json overrides no longer applied 2022-06-24 02:06:25 -04:00
Jesse Plamondon-Willard 1021c32910
update fluent HTTP client 2022-06-22 20:15:25 -04:00
Jesse Plamondon-Willard be086cf005
avoid unneeded overhead of ConcurrentQueue 2022-06-22 01:53:37 -04:00
Jesse Plamondon-Willard c91fbc82f8
deprecate support for updating ancient versions of SMAPI 2022-06-20 18:02:41 -04:00
Jesse Plamondon-Willard dab1ef6acc
add flag to disable deprecated code 2022-06-20 18:01:48 -04:00
Jesse Plamondon-Willard e0ef8a20a5
fix mod count in log parser metadata 2022-06-19 17:21:53 -04:00
Jesse Plamondon-Willard 8e9237bdd7
Merge branch 'develop' into stable 2022-06-16 22:14:44 -04:00
Jesse Plamondon-Willard 011aa4c9d0
prepare for release 2022-06-16 22:14:09 -04:00
Jesse Plamondon-Willard 525351e905
fix case-sensitive mod ID check 2022-06-16 19:21:38 -04:00
Jesse Plamondon-Willard e8bcbf7e5a
update compatibility list 2022-06-12 20:29:56 -04:00
Jesse Plamondon-Willard 15f829e48c
patch PyTK temporarily to fix scale-up compatibility in SMAPI 3.15 2022-06-12 12:26:51 -04:00
Jesse Plamondon-Willard 0189b282f4
add image compatibility mode for PyTK 2022-06-10 22:14:28 -04:00
Jesse Plamondon-Willard 11a497c1f6
update Pintail 2022-06-10 00:05:23 -04:00
Jesse Plamondon-Willard 0bb9fc4293
update Newtonsoft.Json 2022-06-10 00:05:22 -04:00
Jesse Plamondon-Willard b6d15ec57f
update unit test & web dependencies 2022-06-10 00:04:27 -04:00
Jesse Plamondon-Willard 62328e4384
tweak new code, update release notes 2022-06-10 00:04:26 -04:00
Ameisen 03897776e0
Cleaning up and optimizing `ContentCache.cs` 2022-06-10 00:04:26 -04:00
Jesse Plamondon-Willard 43e9e2cfe2
fix accidental case-sensitivity change 2022-06-10 00:04:26 -04:00
Jesse Plamondon-Willard 565677c18c
use IRawTextureData instead of intermediate tuple 2022-06-10 00:04:26 -04:00
Jesse Plamondon-Willard ba7f5701de
simplify asset type validaiton 2022-06-10 00:04:25 -04:00
Jesse Plamondon-Willard 87c7095e8d
apply style conventions 2022-06-10 00:04:25 -04:00
Ameisen 5585f5e876
Refactored ModContentManager.cs so it actually fit on my 1440p screens.
Changed LocalTilesheetExtensions into an array.
Marked 'CreateTemporary' as 'Obsolete' which is conventional for methods that only throw.
Moved the type validation logic into its own method as it's largely shared for each loader.
Changed allocators to use `GC.AllocateUninitializedArray`, as the data does not need to be initialized.
Changed `LoadRawImageData` to use a `ValueTuple` return instead of returning with multiple `out`s, which is bad practice.
Preferred rethrowing handlers rather than exception filters (which generate bizarre and _very difficult to patch_ code).
Marked GetLoadError as debugger step through and hidden, as it's just an exception generator.
Marked PremultiplyTransparency, GetContentKeyForTilesheetImageSource, and LoadRawImageData as static as they have no dependency on instance data (nor should they).
Fixed `.xnb` extension search to properly use OrdinalIgnoreCase.
2022-06-10 00:04:25 -04:00
Jesse Plamondon-Willard 9d21e0bbec
simplify pixel conversion loop 2022-06-10 00:04:25 -04:00
Jesse Plamondon-Willard 4f6965eef3
encapsulate loading the raw image data for mod patching 2022-06-10 00:04:24 -04:00
Jesse Plamondon-Willard 2134cef74f
link to SMAPI 3.15 release highlights 2022-06-10 00:04:24 -04:00
Jesse Plamondon-Willard 5ffa260e02
add validation error when loading XNB file as IRawTextureData 2022-06-10 00:04:24 -04:00
Jesse Plamondon-Willard b6a8dcdd46
update to Harmony 2.2.1 2022-06-10 00:04:24 -04:00
Jesse Plamondon-Willard db578c389e
drop support for pre-Pintail proxying 2022-06-10 00:04:23 -04:00
Jesse Plamondon-Willard 769475166a
enable raw image loading by default, rename setting 2022-06-10 00:04:23 -04:00
Jesse Plamondon-Willard 4708385f69
add IRawTextureData asset type 2022-06-10 00:04:23 -04:00
Jesse Plamondon-Willard a546fd113f
add experimental image load rewrite 2022-06-10 00:04:22 -04:00
Jesse Plamondon-Willard cb6fcb0450
rework VerboseLogging option to allow enabling for specific mods 2022-06-10 00:04:22 -04:00
Jesse Plamondon-Willard 8713914a1a
avoid NPC pathfinding rebuild if reachable locations didn't change 2022-06-08 23:33:09 -04:00
Jesse Plamondon-Willard fdb74df8a4
simplify repeated hash set creation 2022-06-06 21:28:57 -04:00
Jesse Plamondon-Willard e10147e7bd
Merge branch 'develop' into stable 2022-06-01 19:59:00 -04:00
Jesse Plamondon-Willard 1cded44f7a
prepare for release 2022-06-01 19:58:35 -04:00
Jesse Plamondon-Willard bf960ce283
add backwards compatibility for mods using now-unused dependencies 2022-05-31 21:23:44 -04:00
Jesse Plamondon-Willard 9992915f56
replace MemoryCache with custom cache
This was causing significant frame stutters for some players since the migration to .NET 5 in Stardew Valley 1.5.5.
2022-05-31 18:32:23 -04:00
Jesse Plamondon-Willard 9ef3f7edb1
remove `System.Reflection.Metadata.MetadataUpdater.IsSupported: false` in runtime config
This doesn't seem to be needed, and was probably added as part of the early experimenting with self-contained .NET.
2022-05-31 18:25:12 -04:00
Jesse Plamondon-Willard 0209e70695
Merge branch 'develop' into stable 2022-05-27 18:09:04 -04:00
Jesse Plamondon-Willard e4cd7c8eb0
prepare for release 2022-05-27 18:08:30 -04:00
Jesse Plamondon-Willard e8c6221d96
fix typo 2022-05-27 18:04:39 -04:00
Jesse Plamondon-Willard 064346594d
fix split-screen error when a mod provides a localized asset in one screen but not another 2022-05-24 18:12:06 -04:00
Jesse Plamondon-Willard 5083b65c87
fix readme headings for mod build package 2022-05-23 14:33:01 -04:00
Jesse Plamondon-Willard 5675f9fceb
add watcher names to simplify troubleshooting 2022-05-23 12:57:33 -04:00
Jesse Plamondon-Willard 87ac7fc403
fix nullable annotations in NetListWatcher 2022-05-23 12:57:33 -04:00
Jesse Plamondon-Willard 9933acad35
use <inheritdoc/> in watchers 2022-05-23 12:57:33 -04:00
Jesse Plamondon-Willard 62665649bd
shortcut common cases in hot code paths 2022-05-23 12:19:06 -04:00
Jesse Plamondon-Willard 2ab2182645
Merge branch 'develop' into stable 2022-05-22 14:38:57 -04:00
Jesse Plamondon-Willard 336cc1cc0f
prepare for release 2022-05-22 14:38:33 -04:00
Jesse Plamondon-Willard 7e7ac459a5
fix error when mod localizes an unlocalizable asset and then stops doing so 2022-05-21 18:06:23 -04:00
Jesse Plamondon-Willard e6ef71bae1
add tick cache to asset propagation 2022-05-20 17:39:05 -04:00
Jesse Plamondon-Willard 7332879351
defer asset reload during propagation when possible 2022-05-19 21:04:32 -04:00
Jesse Plamondon-Willard 0a050622f6
tweak asset propagator to avoid assumption that assets must be reloaded 2022-05-19 21:04:32 -04:00
Jesse Plamondon-Willard 1ddf70697e
simplify asset propagation a bit to prepare for the upcoming SDV 1.6 2022-05-18 20:13:09 -04:00
Jesse Plamondon-Willard f8b62e271e
fix asset type when checking if a mod asset exists 2022-05-18 20:04:51 -04:00
Jesse Plamondon-Willard cb11f1e2ca
re-add internal content manager for asset propagation
This will be used by the new asset propagation in SMAPI 4.0 & Stardew Valley 1.6.
2022-05-18 20:02:12 -04:00
Jesse Plamondon-Willard 3a161a30a7
update for the new CurseForge API 2022-05-18 19:23:26 -04:00
Jesse Plamondon-Willard 5731b015a0
Merge branch 'develop' into stable 2022-05-15 19:14:40 -04:00
Jesse Plamondon-Willard cd843dc10b
prepare for release 2022-05-15 19:14:28 -04:00
Jesse Plamondon-Willard 3253797cba
fix wiki client not being disposed 2022-05-15 19:13:32 -04:00
Jesse Plamondon-Willard 8505f4ae4d
fix typo 2022-05-15 15:07:52 -04:00
Jesse Plamondon-Willard 048f41244f
reduce performance impact of deprecation warnings
Creating a stack is *very* slow, so it should be avoided if possible until after the duplicate-warning check.
2022-05-15 01:54:01 -04:00
Jesse Plamondon-Willard 3a4758dfa6
remove warning for mods which use `dynamic` 2022-05-14 13:32:13 -04:00
Jesse Plamondon-Willard a9cadc7f32
Merge branch 'develop' into stable 2022-05-12 00:21:52 -04:00
Jesse Plamondon-Willard e943ae8413
prepare for release 2022-05-12 00:21:46 -04:00
Jesse Plamondon-Willard 5a7422b312
log time change in verbose mode 2022-05-11 22:32:33 -04:00
Jesse Plamondon-Willard bbe5983acd
rewrite asset operations to reduce allocations
• When raising AssetRequested, SMAPI now creates a single event args model and reuses it for each handler.
• There's now a single AssetOperationGroup per asset, which tracks the loaders/editors registered by every mod for that asset.
• The operation group's loader/editor lists are now used directly instead of querying them.
2022-05-11 21:36:45 -04:00
Jesse Plamondon-Willard 42a797a012
don't raise events that have no listeners
This mainly avoids allocating event arg objects unnecessarily.
2022-05-11 19:56:45 -04:00
Jesse Plamondon-Willard 077c897d53
replace event.HasListeners() with property 2022-05-11 19:29:57 -04:00
Jesse Plamondon-Willard 05b39b7cd9
cache verbose flag in main update method 2022-05-11 19:26:28 -04:00
Jesse Plamondon-Willard cae1063ad9
move filtering only used in one place out of managed event 2022-05-11 19:15:22 -04:00
Jesse Plamondon-Willard 45f6743034
optimize raising events for the most common cases 2022-05-11 17:59:44 -04:00
Jesse Plamondon-Willard d097825c84
fix error when mod loads XNB mod file without extension 2022-05-11 17:25:06 -04:00
Jesse Plamondon-Willard e14916f962
add error code to SContentLoadException 2022-05-11 17:12:58 -04:00
Jesse Plamondon-Willard 8c8ec6a457
remove unused IsPerformanceCritical event field 2022-05-10 23:05:24 -04:00
Jesse Plamondon-Willard eb01aa275b
fix asset propagation for player sprite recolor masks 2022-05-10 18:51:37 -04:00
Jesse Plamondon-Willard 7a91cf1cd8
update schema for Content Patcher 1.26.0 2022-05-09 00:18:37 -04:00
Jesse Plamondon-Willard 09f69d986f
Merge branch 'develop' into stable 2022-05-08 20:18:06 -04:00
Jesse Plamondon-Willard cbe8b597cb
prepare for release 2022-05-08 20:11:02 -04:00
Jesse Plamondon-Willard f8f8b23799
use records for asset edit operations 2022-05-08 18:50:07 -04:00
Jesse Plamondon-Willard 5f2e83969a
only build AssetWithoutLocale when it's used 2022-05-08 18:37:23 -04:00
Jesse Plamondon-Willard e2a3fc4f99
avoid [Obsolete] without message for clarity 2022-05-08 18:28:02 -04:00
Jesse Plamondon-Willard 26f95bca63
optimize case where there's no legacy IAssetLoader/IAssetEditor instances 2022-05-08 18:22:35 -04:00
Jesse Plamondon-Willard b924fbae4b
fix default settings 2022-05-08 12:24:52 -04:00
Jesse Plamondon-Willard 37617e9c26
tweak default settings logic 2022-05-07 23:34:30 -04:00
Jesse Plamondon-Willard e286e5591b
enable case-insensitive file paths by default for Android/Linux players 2022-05-07 23:26:34 -04:00
Jesse Plamondon-Willard ecdda9b077
update filenames for case-insensitive path rewrite 2022-05-07 23:13:59 -04:00
Jesse Plamondon-Willard 3db0353126
simplify and rewrite case-insensitive file path feature 2022-05-07 23:12:33 -04:00
Jesse Plamondon-Willard d4ff9f3f5c
log fake content packs created by mods 2022-05-07 21:53:18 -04:00
Jesse Plamondon-Willard 709638f197
fix assets loaded through fake content pack using parent mod's path info 2022-05-07 21:21:02 -04:00
Jesse Plamondon-Willard f973b4c518
move CreateFakeContentPack into its own method 2022-05-07 21:18:09 -04:00
Jesse Plamondon-Willard e7e6327b3c
Merge branch 'develop' into stable 2022-05-06 20:58:19 -04:00
Jesse Plamondon-Willard b45f50b57e
prepare for release 2022-05-06 19:40:13 -04:00
Jesse Plamondon-Willard 09c52fb3f5
cache legacy asset operations by target type 2022-05-06 19:39:51 -04:00
Jesse Plamondon-Willard a969828e93
cache asset operation instances created legacy interceptors 2022-05-06 18:26:35 -04:00
Jesse Plamondon-Willard b834ed7ef5
fix errors reading empty JSON files 2022-05-06 18:06:47 -04:00
Jesse Plamondon-Willard 87d5288287
fix content managers' LoadBaseString not recognizing localized mod assets 2022-05-06 18:05:40 -04:00
Jesse Plamondon-Willard 295ad29b8d
remove aggressive memory optimizations option 2022-05-04 21:02:41 -04:00
Jesse Plamondon-Willard c1342bd4cd
disable case-insensitive paths by default pending performance rework 2022-05-04 20:35:08 -04:00
Jesse Plamondon-Willard 42bf82d870
update compatibility list 2022-05-01 22:46:56 -04:00
Jesse Plamondon-Willard c8ad50dad1
Merge branch 'develop' into stable 2022-05-01 18:16:09 -04:00
Jesse Plamondon-Willard f78093bdb5
prepare for release 2022-05-01 17:39:57 -04:00
Jesse Plamondon-Willard 0e4aa65708
fix crossplatform build scripts 2022-05-01 17:33:41 -04:00
Jesse Plamondon-Willard ea9324586d
fix warnings for model-binding hack 2022-05-01 17:31:54 -04:00
Jesse Plamondon-Willard db43fc22a4
update Pintail to fix proxy type name conflict edge case 2022-05-01 01:34:44 -04:00
Jesse Plamondon-Willard 7bb7a7522f
omit stack trace for deprecated code not called directly by the mod 2022-04-30 12:57:28 -04:00
Jesse Plamondon-Willard ed337ab964
fix model binding for mod update-check API 2022-04-30 12:33:33 -04:00
Jesse Plamondon-Willard f507bd0f9c
set SMAPI version from main build script 2022-04-29 22:55:12 -04:00
Jesse Plamondon-Willard a340c8b8ce
enable some disabled steps in Windows build script
This simplifies preparing test Windows-only installers.
2022-04-29 22:46:37 -04:00
Jesse Plamondon-Willard d7d8cdaa5a
add backwards compatibility for loading content assets with .xnb extension 2022-04-27 20:09:43 -04:00
Jesse Plamondon-Willard 8425c82033
fix locale change for legacy IAssetEditor/Loader implementations 2022-04-26 23:54:48 -04:00
Jesse Plamondon-Willard 6a43171e92
re-enable Pintail by default 2022-04-26 23:38:16 -04:00
Jesse Plamondon-Willard 55c254deb8
fix null reference error when implicitly converting null translation to string 2022-04-25 00:15:31 -04:00
Jesse Plamondon-Willard 4a14792e4d
fix ReplaceWith not working for legacy IAssetEditor implementations 2022-04-23 16:47:24 -04:00
Jesse Plamondon-Willard 4fa414c2bd
set page/perPage URL args together
Since there's no UI to set the page size, this makes the argument more discoverable.
2022-04-21 20:59:35 -04:00
Jesse Plamondon-Willard c055056460
update Pintail to fix out parameter issue 2022-04-19 22:11:43 -04:00
Jesse Plamondon-Willard f0645c5993
fix null reference when adding new layers in a map patch 2022-04-19 22:08:34 -04:00
Jesse Plamondon-Willard 9939061615
fix typo 2022-04-19 19:26:12 -04:00
Jesse Plamondon-Willard d4d378bff3
don't add default pagination values to log URL 2022-04-19 19:25:10 -04:00
Jesse Plamondon-Willard 5c819662f8
suppress some duplicate deprecation notices 2022-04-19 19:14:53 -04:00
Jesse Plamondon-Willard e6c696fa6b
add immutable stack trace to cache stack info 2022-04-19 19:11:58 -04:00
Jesse Plamondon-Willard 889004f1eb
move deprecation code into namespace 2022-04-19 19:03:47 -04:00
Jesse Plamondon-Willard a8a4d314df
simplify ExtendMap usage 2022-04-17 22:12:17 -04:00
Jesse Plamondon-Willard b25e30a896
fix model binding error 2022-04-17 01:07:18 -04:00
Jesse Plamondon-Willard 7b79703de6
tweak code style 2022-04-16 21:07:34 -04:00
Jesse Plamondon-Willard 36af2cf8ac
Merge pull request #841 from KhloeLeclair/safe-regex
[Website] Improve regex safety for the log viewer
2022-04-16 20:15:24 -04:00
Jesse Plamondon-Willard d486d940ba
temporarily disable Pintail by default pending out parameter fix 2022-04-16 19:17:16 -04:00
Jesse Plamondon-Willard 0a69cb4bf7
allow switching between Pintail & original API proxying 2022-04-16 19:15:50 -04:00
Jesse Plamondon-Willard 7dec519234
fix broken unit tests 2022-04-16 18:29:52 -04:00
Jesse Plamondon-Willard 20224d293d
add unit test for proxied out parameters 2022-04-16 16:59:53 -04:00
Jesse Plamondon-Willard 559d763756
remove unused subfolder manifest scanning
This isn't needed anymore with the current is-mod-folder scanning.
2022-04-16 14:34:52 -04:00
Jesse Plamondon-Willard f93c41f55c
make manifest.json filename case-insensitive 2022-04-16 14:28:20 -04:00
Jesse Plamondon-Willard 95d7ba8935
move case-insensitive path lookup into toolkit for reuse 2022-04-16 14:07:09 -04:00
Khloe Leclair 446205c7bd Add regex error checking, and display a message to the user when their regular expression has a syntax error. Additionally, use a non-capturing group to surround the user input when `Match whole word` is enabled in case alternates are being used. Finally, add a safety check to highlighting to avoid an infinite loop when zero-length matches happen. 2022-04-16 13:55:54 -04:00
Jesse Plamondon-Willard 1974324c43
make EntryDll manifest field case-insensitive 2022-04-16 13:41:37 -04:00
Jesse Plamondon-Willard e7fd95aafd
update release notes 2022-04-16 13:04:16 -04:00
Jesse Plamondon-Willard c3f6983009
Merge pull request #840 from KhloeLeclair/log-cleanup
[Website] Cleanup log filtering a bit more, save state to URL
2022-04-16 12:59:21 -04:00
Jesse Plamondon-Willard 64b9da560f
minor refactoring & code style 2022-04-16 12:56:38 -04:00
Jesse Plamondon-Willard 9ba0670407
fix Nexus API key needed to launch web project locally 2022-04-16 11:21:44 -04:00
Jesse Plamondon-Willard 2dc20be5f7
use specified nullability in reflection API (#837) 2022-04-16 11:10:13 -04:00
Jesse Plamondon-Willard c0d0ad0282
show simplified stack trace for deprecation notices 2022-04-14 23:55:08 -04:00
Jesse Plamondon-Willard fd136d34c5
track full mod & stack metadata in queued deprecation warnings 2022-04-14 23:11:41 -04:00
Jesse Plamondon-Willard 1a3befa93e
track mod metadata reference in APIs for upcoming deprecation changes 2022-04-14 23:00:30 -04:00
Jesse Plamondon-Willard 43c875c4c2
prepare mod build package 4.0.1 for release 2022-04-14 19:21:18 -04:00
Jesse Plamondon-Willard 3a777a511d
update release notes 2022-04-14 18:15:02 -04:00
Jesse Plamondon-Willard eb125f1994
fix assembly version conflict error in mod build package 2022-04-14 18:14:08 -04:00
Jesse Plamondon-Willard 4de18b516f
fix nullable annotation (#837) 2022-04-14 18:13:27 -04:00
Jesse Plamondon-Willard 66272cbe46
fix false-positive deprecation notice (#837) 2022-04-13 23:40:47 -04:00
Jesse Plamondon-Willard 045e4ddf2d
update release notes (#837) 2022-04-13 22:58:47 -04:00
Jesse Plamondon-Willard ff1b4cd323
remove reflection no longer needed after migration to MonoGame 2022-04-13 22:19:45 -04:00
Jesse Plamondon-Willard 3078ae2a8e
fix typos in recent changes (#837) 2022-04-13 22:17:26 -04:00
Jesse Plamondon-Willard 2765e3f9b3
enable nullable annotations in bundled mods (#837) 2022-04-13 22:06:07 -04:00
Jesse Plamondon-Willard aa7b0caf46
fix helpers not disposed if the mod is finalized 2022-04-13 21:08:07 -04:00
Jesse Plamondon-Willard 7c411b29bb
fix spelling warnings 2022-04-13 21:07:58 -04:00
Jesse Plamondon-Willard 4adf861113
enable nullable annotations in the rest of SMAPI core (#837) 2022-04-13 21:07:43 -04:00
Jesse Plamondon-Willard 5b24fff477
remove unused code (#837) 2022-04-13 20:41:34 -04:00
Jesse Plamondon-Willard f39da383a1
enable nullable annotations in SMAPI where no logic changes are needed (#837) 2022-04-13 20:24:14 -04:00
Jesse Plamondon-Willard 6e9e8aef1e
enable nullable annotations in SMAPI where no changes are needed (#837) 2022-04-13 19:00:24 -04:00
Jesse Plamondon-Willard 40aebb74c6
enable nullable annotations in installer (#837) 2022-04-12 21:01:13 -04:00
Jesse Plamondon-Willard 5f7a92a745
enable nullable annotations in unit tests (#837) 2022-04-12 20:52:01 -04:00
Jesse Plamondon-Willard c3851ae2e6
enable nullable annotations in shared projects (#837) 2022-04-12 19:56:52 -04:00
Jesse Plamondon-Willard 4e0e928c94
remove `#nullable disable` in mod build package (#837)
Since it targets .NET Standard 2.0, they're not available anyway.
2022-04-12 19:19:37 -04:00
Jesse Plamondon-Willard 0b48c1748b
enable nullable annotations in the web project & related code (#837) 2022-04-12 19:15:39 -04:00
Khloe Leclair 4f54f517ce Use an optional section for rendering quick navigation links on the mod viewer, containing them within the #sidebar element. 2022-04-12 13:50:51 -04:00
Khloe Leclair 0b92275649 Make horizontal scrolling with the quick navigation links less bad. Probably need to move them into the actual sidebar element though for proper sorting. 2022-04-12 02:18:51 -04:00
Khloe Leclair a21d24f4b7 Replace bitfields for state and just use comma-separated strings. Add a note that numbers may be inaccurate if filtering is used when sections are collapsed. Add quick navigation links. 2022-04-12 02:07:21 -04:00
Jesse Plamondon-Willard 9fbed0fa1f
Merge pull request #839 from nuztalgia/develop
Ignore dot-prefixed files when scanning for mods
2022-04-11 23:20:20 -04:00
Jesse Plamondon-Willard 1e61309d3d
add IAssetDataForMap.ExtendMap 2022-04-11 22:56:14 -04:00
Khloe Leclair 94b8507a47 Add more documentation strings. Use shallow equality checking to decide whether to include a filter in the URL or not to avoid unnecessarily large URLs. 2022-04-11 15:01:59 -04:00
Khloe Leclair 0babc3e446 Cleanup log filtering a bit, with a clearer string for the number of total messages. Additionally, save and restore filter state from the URL for better linking. 2022-04-11 14:29:33 -04:00
Nuz / Lovegood 25e0b4b8ad Make IsRelevant return false for any files starting with "." 2022-04-10 23:34:50 -07:00
Nuz / Lovegood 2a05e28782 Revert "Make ModScanner ignore .gitignore files."
This reverts commit c92efc65ce.
2022-04-10 23:33:32 -07:00
Jesse Plamondon-Willard 761f2d952b
enable nullable annotations in mod data models (#837) 2022-04-10 21:34:18 -04:00
Nuz / Lovegood c92efc65ce Make ModScanner ignore .gitignore files.
This is helpful for cases like this: https://cdn.discordapp.com/attachments/156109690059751424/962879339739885578/unknown.png
2022-04-10 18:20:11 -07:00
Jesse Plamondon-Willard 0336fb2524
add temporary cachebusting queries for log parser 2022-04-09 17:04:39 -04:00
Jesse Plamondon-Willard 376dadd341
fix misplaced attribute (#837) 2022-04-09 16:58:52 -04:00
Jesse Plamondon-Willard 85c769d2a2
update release notes 2022-04-09 16:57:41 -04:00
Jesse Plamondon-Willard 0971a10ea4
Merge pull request #838 from KhloeLeclair/clientlog
Improve log parser
2022-04-09 16:52:57 -04:00
Jesse Plamondon-Willard ae7567674d
restore data element unloading 2022-04-09 16:05:34 -04:00
Jesse Plamondon-Willard 07d07c79e0
load raw data from JSON per discussion
This avoids loading the data synchronously as a JavaScript snippet, which improves performance when opening the page.
2022-04-09 16:01:32 -04:00
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
Jesse Plamondon-Willard 4da38e1317
add missing [Obsolete] tag 2022-03-26 00:52:04 -04:00
Jesse Plamondon-Willard 3707f481a5
extend load conflict resolution into load priority (#766) 2022-03-25 23:53:30 -04:00
Jesse Plamondon-Willard 021891ff0c
add load conflict resolution option (#766) 2022-03-25 22:49:14 -04:00
Jesse Plamondon-Willard 0e0c135604
add content pack label to more logs (#766) 2022-03-25 22:42:22 -04:00
Jesse Plamondon-Willard 9025b0dcc5
fix asset load conflict always showing multiple-mod form 2022-03-25 22:16:49 -04:00
Jesse Plamondon-Willard e1fc566e0a
add content pack labels (#766) 2022-03-25 21:46:37 -04:00
Jesse Plamondon-Willard b0011bf65c
use immutable set for invalidated asset names (#766) 2022-03-25 01:02:26 -04:00
Jesse Plamondon-Willard e88666f5b2
mark build scripts executable 2022-03-25 01:01:57 -04:00
Jesse Plamondon-Willard b77eab6e0a
add AssetReady content event (#766) 2022-03-25 00:35:31 -04:00
Jesse Plamondon-Willard 2b0ce2bb4d
add AssetInvalidated content event (#766) 2022-03-24 22:55:55 -04:00
Jesse Plamondon-Willard 6a43e6dfad
fix unneeded cloning (#766) 2022-03-23 01:16:42 -04:00
Jesse Plamondon-Willard 584725bb8e
add initial AssetRequested content event (#766) 2022-03-23 01:06:11 -04:00
Jesse Plamondon-Willard b07d2340a9
encapsulate & cache asset operation groups (#766)
This is needed for the upcoming Stardew Valley 1.6 to avoid duplicate checks between DoesAssetExist and Load calls, and to make sure the answer doesn't change between them.
2022-03-22 23:00:18 -04:00
Jesse Plamondon-Willard d3fbdf484a
reduce duplicated doc blocks 2022-03-22 20:46:21 -04:00
Jesse Plamondon-Willard a42926868a
encapsulate editor/loader operations (#766)
These will be used by the new content API, and allow handling the old one the same way.
2022-03-20 12:53:27 -04:00
Jesse Plamondon-Willard d96cec88e4
fix set_farm_type not updating warps 2022-03-10 23:24:01 -05:00
Jesse Plamondon-Willard 2216e37726
rework launch script argument parsing (#832)
This commit...

* replaces the internal `--no-reopen-terminal` arg with a documented `--use-current-shell` arg that works on Linux too;
* replaces the new SKIP_TERMINAL environment variable with the existing SMAPI_NO_TERMINAL one;
* moves argument parsing out of the 'initial setup' section (so it's easier for players to edit if needed);
* simplfies argument parsing (no need to support short opt names or add arguments for the default behavior);
* fixes arguments not parsed after the first unrecognized argument, so `--unknown --no-terminal` would still open a terminal.
2022-03-06 19:55:32 -05:00
Jesse Plamondon-Willard a4bd5cccd5
Merge pull request #832 from Ryhon0/develop
Make SKIP_TERMINAL default to false if not set
2022-03-06 18:37:13 -05:00
Jesse Plamondon-Willard debe177241
handle vanilla assets in DoesAssetExist (#766) 2022-03-05 18:12:00 -05:00
Jesse Plamondon-Willard b68b301b71
add DoesAssetExist to support the upcoming Stardew Valley 1.6 (#766) 2022-03-05 15:38:05 -05:00
Jesse Plamondon-Willard b0d8b23c2c
migrate more internal code to IAssetName (#766) 2022-03-05 15:31:06 -05:00
Jesse Plamondon-Willard e82406a845
fix error loading locale code cache when a mod adds custom languages (#766) 2022-03-05 15:30:51 -05:00
Jesse Plamondon-Willard 2f279708b3
fix regression with mod XNB files in the content pipeline (#766) 2022-03-05 15:30:17 -05:00
Jesse Plamondon-Willard c2086216fa
add Pintail to install package (#830) 2022-03-05 15:27:00 -05:00
Ryhon bb31f09977
Command line options 2022-03-05 20:40:01 +01:00
Ryhon 30d63f0a11
Make SKIP_TERMINAL default to false if not set 2022-03-04 19:20:39 +01:00
Jesse Plamondon-Willard 8429485e69
update schema for Content Patcher 1.25.0 2022-02-27 20:40:49 -05:00
Jesse Plamondon-Willard f36b4e06ef
update release notes 2022-02-25 23:50:52 -05:00
Jesse Plamondon-Willard 0f987c0578
restore InterfaceProxyFactory to encapsulate Pintail (#830) 2022-02-25 23:40:52 -05:00
Jesse Plamondon-Willard 512c2b9fb7
Merge pull request #830 from Shockah/api-proxy-tryproxy-object
API proxy improvements
2022-02-25 23:21:45 -05:00
Shockah 5e3237d000 update Pintail 2022-02-24 12:58:16 +01:00
Jesse Plamondon-Willard 6fc3be52bc
avoid SetData when premultiplying texture with no semi-transparency 2022-02-22 17:38:59 -05:00
Shockah 28f78d1a29 update Pintail 2022-02-20 00:38:42 +01:00
Shockah e9321ba6f9 change proxy prepare behavior 2022-02-19 22:08:05 +01:00
Shockah e24c0db7b1 update Pintail 2022-02-19 21:27:13 +01:00
Jesse Plamondon-Willard 3c29ae6a1e
add Constants.ContentPath 2022-02-19 11:26:24 -05:00
Jesse Plamondon-Willard 2d52681b10
add Constants.GamePath & deprecate Constants.ExecutionPath 2022-02-19 11:07:26 -05:00
Jesse Plamondon-Willard a2190df08c
add AssetName to encapsulate asset name handling (#766) 2022-02-18 15:39:49 -05:00
Jesse Plamondon-Willard 065859408f
Fix support for custom locale codes in asset names (#766) 2022-02-18 12:31:14 -05:00
Jesse Plamondon-Willard 28d7372880
tweak types in content coordinator 2022-02-18 12:13:53 -05:00
Shockah 5706d91dd9 update Pintail 2022-02-18 12:16:02 +01:00
Shockah e41dbd49ca update Pintail 2022-02-17 19:59:36 +01:00
Shockah 8ecca56816 update Pintail 2022-02-16 21:10:23 +01:00
Shockah ba42bb97d1 move proxying to a separate NuGet library 2022-02-16 19:08:40 +01:00
Jesse Plamondon-Willard 315926de25
flip slashes in asset propagator to match MonoGame
The game now uses MonoGame on all platforms.
2022-02-13 00:43:35 -05:00
Jesse Plamondon-Willard f53ace6235
simplify and standardize key comparison in asset propagator 2022-02-13 00:41:44 -05:00
Jesse Plamondon-Willard b0cc403098
add data-* attributes to log parser for external tools 2022-02-12 12:07:13 -05:00
Jesse Plamondon-Willard 4a1174cd50
fix thumbstick input overrides 2022-02-11 20:56:25 -05:00
Jesse Plamondon-Willard 4da9e954df
use Array.Empty to avoid unneeded array allocations 2022-02-11 00:49:49 -05:00
Jesse Plamondon-Willard 233a7d57e6
Merge pull request #829 from SpriteMaster-Ext/perf-patchimage
Simplify and optimize PatchImage
2022-02-11 00:43:52 -05:00
Jesse Plamondon-Willard 3064b58719
add basic unit tests for API interface proxying 2022-02-10 22:03:09 -05:00
Shockah a54d58d064 add TryProxy for any objects 2022-02-10 16:26:43 +01:00
Shockah 467375a7a3 add reverse API proxying (and unproxying) 2022-02-10 14:15:06 +01:00
Shockah 0725945217 add proxy instance caching 2022-02-10 11:43:35 +01:00
Shockah 61415e41eb use Call/Callvirt depending on target 2022-02-10 11:21:41 +01:00
Shockah 9557908425 fix code style warning 2022-02-10 10:18:31 +01:00
Shockah 55723f91d2 implement `out` parameter proxying 2022-02-10 10:08:14 +01:00
Ameisen 51b7b9fe06 Cleanup and performance/allocation improvement for AssetDataForImage.PatchImage 2022-02-09 18:00:15 -06:00
Shockah f920ed59d6 add WIP proxying of methods with `out` parameters 2022-02-09 23:26:26 +01:00
Shockah d9599a3a0a simplifies proxy method IL a bit 2022-02-09 21:10:20 +01:00
Shockah 354527bb81 stop proxying nulls 2022-02-09 21:02:41 +01:00
Shockah 688fccc024 add missing documentation 2022-02-09 20:40:54 +01:00
Shockah ee78ab3c37 fix stack overflow for proxied types referencing each other 2022-02-09 20:38:14 +01:00
Shockah 43ad219b75 support proxying return values in API proxies 2022-02-09 20:07:01 +01:00
Shockah 5a92b0cd35 uses `proxy.Name` instead of `target.Name` (which makes more sense in this context) 2022-02-08 22:36:34 +01:00
Shockah 5b5304403b oops old code 2022-02-08 22:19:16 +01:00
Shockah 3135925982 allow generic methods and any assignable types in API proxies 2022-02-08 21:54:53 +01:00
Shockah 0ff82c38e7 allow default interface method implementations in API proxies 2022-02-08 20:02:13 +01:00
Jesse Plamondon-Willard 25a9f54ecf
fix manifest JSON schema's update key pattern 2022-01-29 20:43:45 -05:00
Jesse Plamondon-Willard 3431f486a2
normalize season names in SDate constructor 2022-01-29 18:15:42 -05:00
Jesse Plamondon-Willard 6dd4a8a12b
fix item repo's handling of Journal Scraps and Secret Notes 2022-01-29 17:46:45 -05:00
Jesse Plamondon-Willard 6b9c9be2b6
move item repo secret note + flavored object logic into methods 2022-01-29 17:33:12 -05:00
Jesse Plamondon-Willard bca9e599cc
remove unneeded dictionary patch
The dictionary errors were improved in .NET 5, so they include the key automatically.
2022-01-29 17:27:42 -05:00
Jesse Plamondon-Willard 53ed5f4faa
update release notes 2022-01-24 21:55:30 -05:00
Jesse Plamondon-Willard e2f5861e31
Merge pull request #826 from ChulkyBow/patch-1
Update Ukrainian translations
2022-01-24 21:54:05 -05:00
ChulkyBow d8bbf3c441
Update Ukrainian translation for SMAPI 2022-01-18 16:25:36 +02:00
Jesse Plamondon-Willard 451b70953f
Merge branch 'develop' into stable 2022-01-16 23:43:01 -05:00
Jesse Plamondon-Willard dbed0289d7
prepare for release 2022-01-16 22:57:40 -05:00
Jesse Plamondon-Willard 95f4513727
rewrite fallback assembly resolution
* SMAPI now also searches the root game folder for unresolved assemblies. This fixes an issue resolving the game DLL when the player's DLL version doesn't match the one used to compile SMAPI.
* The DLL search folders are now scanned once and cached to avoid repeated iterations on startup.
2022-01-16 22:56:48 -05:00
Jesse Plamondon-Willard 85f8631bee
fix typo 2022-01-16 18:54:00 -05:00
Jesse Plamondon-Willard 1b9ff9cd10
Merge branch 'develop' into stable 2022-01-16 18:01:19 -05:00
Jesse Plamondon-Willard ad0e6b315d
prepare for release 2022-01-16 17:13:28 -05:00
Jesse Plamondon-Willard 230f119205
merge field rewriters to reduce rewrite iterations 2022-01-16 17:08:08 -05:00
Jesse Plamondon-Willard 1ea8d75235
improve console interception logic 2022-01-16 14:05:02 -05:00
Jesse Plamondon-Willard 00bd9d19a1
bump min game version to 1.5.6
That avoids error reports on mods when pirated players have an older 1.5.5 build that break mods, and ensures that the new build number shown in the SMAPI log is available.
2022-01-16 00:15:03 -05:00
Jesse Plamondon-Willard 7e8d11ca3a
add Xbox app log instructions, redesign UI to fit 2022-01-15 23:41:01 -05:00
Jesse Plamondon-Willard 6f05580191
add detection for Xbox app game folders 2022-01-15 20:39:32 -05:00
Jesse Plamondon-Willard d029dd652f
fix JSON validator not recognizing manifest update subkeys 2022-01-15 18:04:33 -05:00
Jesse Plamondon-Willard 4cffd6c2c0
add save recovery for missing custom farm type 2022-01-15 17:21:11 -05:00
Jesse Plamondon-Willard 8ebb9ce8d4
fix backspaces ignored on Linux/macOS in SDV 1.5.5+ 2022-01-15 13:27:23 -05:00
Jesse Plamondon-Willard a8985e122e
fix suppressed console output not suppressing newlines 2022-01-15 12:21:22 -05:00
Jesse Plamondon-Willard e30e427628
add download option to log view 2022-01-02 19:59:38 -05:00
Jesse Plamondon-Willard 1fab386ab1
add Ukrainian translations (#823) 2022-01-02 13:57:14 -05:00
Jesse Plamondon-Willard 92f35837ad
fix syntax, update release notes 2022-01-02 13:48:53 -05:00
Jesse Plamondon-Willard adb3926609
Merge pull request #820 from bruce2409/update-launcher-sh
Added shell shebang to MacOS Launcher code
2022-01-02 13:45:38 -05:00
Jesse Plamondon-Willard aad77242f0
fix uninstaller not removing StardewModdingAPI.deps.json file 2021-12-23 23:08:49 -05:00
Jesse Plamondon-Willard 02831503dd
remove content pack from compatibility blacklist
It's no longer broken with the auto-fixes in the upcoming SMAPI update.
2021-12-23 18:59:14 -05:00
bruce2409 5712116879 Added shell shebang to MacOS Launcher code 2021-12-22 17:41:11 +00:00
Jesse Plamondon-Willard 52f4df3f30
add new game build number to the SMAPI log 2021-12-21 20:33:08 -05:00
Jesse Plamondon-Willard 0d7d447600
auto-fix maps broken due to missing vanilla tilesheet 2021-12-20 22:18:09 -05:00
Jesse Plamondon-Willard 95f658014e
simplify running SMAPI without a terminal on Linux/macOS 2021-12-18 23:07:33 -05:00
Jesse Plamondon-Willard beb1acd4f8
update Steam error message 2021-12-18 22:21:31 -05:00
Jesse Plamondon-Willard e0abac8dfb
update compatibility list 2021-12-18 00:48:55 -05:00
Jesse Plamondon-Willard aa5d1d4a20
update compatibility list 2021-12-09 19:57:57 -05:00
Jesse Plamondon-Willard 4e17716fa2
fix log parser handling when multiple mods have the exact same name 2021-12-09 19:56:46 -05:00
Jesse Plamondon-Willard 8a2618d812
Merge branch 'develop' into stable 2021-12-05 19:10:39 -05:00
Jesse Plamondon-Willard 5b5dd47c22
prepare for release 2021-12-05 19:10:28 -05:00
Jesse Plamondon-Willard f4ca7dd228
add Windows build process to fix application icon until .NET bug is fixed 2021-12-05 18:55:10 -05:00
Jesse Plamondon-Willard c05fdf65cf
mark UI Info Suite incompatible 2021-12-05 18:39:08 -05:00
Jesse Plamondon-Willard 6a45640dd7
add known issue to release notes for missing pufferchick icon 2021-12-05 02:19:17 -05:00
Jesse Plamondon-Willard 98d01d522d
improve error when installer is pointed at a compatibility-branch game folder 2021-12-05 00:51:24 -05:00
Jesse Plamondon-Willard cb9d6ae5ad
improve error when installer is pointed at a SDV 1.5.4 folder 2021-12-04 23:47:27 -05:00
Jesse Plamondon-Willard 0f37c0f92d
update JSON validator for Content Patcher's new .fnt support 2021-12-04 22:41:59 -05:00
Jesse Plamondon-Willard cc35dbdb3d
fix self-contained install on Windows 2021-12-04 20:25:53 -05:00
Jesse Plamondon-Willard c80d07fddf
migrate SMAPI to self-contained install
This removes the need to have .NET 5 installed to run SMAPI. Note that there's no need to actually bundle the .NET files, since they're already bundled into the game folder.
2021-12-04 15:55:29 -05:00
Jesse Plamondon-Willard 711e17a4f9
suppress non-applicable code warnings 2021-12-04 15:55:16 -05:00
Jesse Plamondon-Willard 1d7340f598
fix code warnings 2021-12-04 15:43:01 -05:00
Jesse Plamondon-Willard 6df3b0b814
update for Stardew Valley 1.5.5 hotfix 2021-12-03 19:53:22 -05:00
Jesse Plamondon-Willard e4416925f9
add build script to set the release version 2021-12-03 02:16:27 -05:00
Jesse Plamondon-Willard 181508084b
make installer self-contained
This lets players run the installer without manually installing .NET 5, which was causing a lot of support requests.
2021-12-03 00:26:46 -05:00
Jesse Plamondon-Willard bf5a9b8762
switch to scripted release package process 2021-12-02 20:48:00 -05:00
Jesse Plamondon-Willard c10685b035
update mod build package release notes 2021-12-01 17:19:21 -05:00
Jesse Plamondon-Willard 42e878e77d
Merge branch 'develop' into stable 2021-11-30 21:54:37 -05:00
Jesse Plamondon-Willard 25ebcc1ea7
prepare for release 2021-11-30 21:54:29 -05:00
Jesse Plamondon-Willard 05b06e7a9f
improve installer's .NET 5 validation to explain how to fix it 2021-11-30 21:53:09 -05:00
Jesse Plamondon-Willard f5a0dd1578
fix error running installer from folder paths containing parentheses 2021-11-30 20:18:17 -05:00
Jesse Plamondon-Willard 3342502993
Merge branch 'develop' into stable 2021-11-30 17:14:03 -05:00
Jesse Plamondon-Willard b294ac1203
prepare for release 2021-11-30 17:13:53 -05:00
Jesse Plamondon-Willard 919bbe94aa
Merge branch 'beta' into develop 2021-11-30 17:12:49 -05:00
Jesse Plamondon-Willard d1d09ae1df
add support for loading BmFont files for custom languages 2021-11-28 00:01:52 -05:00
Jesse Plamondon-Willard f87e65caf5
update 'set_farm_type' console command for custom farm types 2021-11-28 00:01:52 -05:00
Jesse Plamondon-Willard fe675540b5
add map overlay patches 2021-11-28 00:01:51 -05:00
Jesse Plamondon-Willard cb378a1c55
keep installer window open if it crashes 2021-11-28 00:01:51 -05:00
Jesse Plamondon-Willard 51c6ef9443
fix .NET 5 precheck passing if player has .NET Core installed 2021-11-28 00:01:51 -05:00
Jesse Plamondon-Willard 32ccc8e872
fix installer file precheck failing for some users 2021-11-28 00:01:51 -05:00
Jesse Plamondon-Willard b791e854c1
fix installer precheck errors showing quotes, tweak readability 2021-11-28 00:01:50 -05:00
Jesse Plamondon-Willard 65046c3c40
remove outdated note in config.json 2021-11-28 00:01:50 -05:00
Jesse Plamondon-Willard f3626992cf
remove walls_and_floors asset propagation
This is now added as a regular map tilesheet, so it'll be handled by the tilesheet asset propagation.
2021-11-28 00:01:50 -05:00
Jesse Plamondon-Willard 50a492f6e9
bump upcoming mod build package version 2021-11-28 00:01:49 -05:00
Jesse Plamondon-Willard 3beb2a9940
remove package workaround no longer needed with MonoGame 2021-11-28 00:01:49 -05:00
Jesse Plamondon-Willard f5807e22be
add BundleExtraAssemblies package option for new .NET 5 reference model 2021-11-28 00:01:49 -05:00
Jesse Plamondon-Willard bf10aeef0a
remove GameFramework build property from package 2021-11-28 00:01:48 -05:00
Jesse Plamondon-Willard 4a26c96fbe
remove GameExecutableName build property from package 2021-11-28 00:01:48 -05:00
Jesse Plamondon-Willard 217cc7af21
add IgnoreModFilePaths option to package 2021-11-28 00:01:48 -05:00
Jesse Plamondon-Willard 60c0e4fc31
ignore reference assemblies and *.deps.json when building a mod
These aren't useful for mods since they aren't the entry app.
2021-11-28 00:01:47 -05:00
Jesse Plamondon-Willard 32dcdfe18c
tweak assembly ignore logic in mod build package 2021-11-28 00:01:47 -05:00
Jesse Plamondon-Willard 25384ce6bc
update for custom languages 2021-11-28 00:01:47 -05:00
Jesse Plamondon-Willard 1ab0420b6d
update compatibility list 2021-11-28 00:01:46 -05:00
Jesse Plamondon-Willard 294f2a311e
fix error resolving native DLLs like libSkiaSharp 2021-11-28 00:01:46 -05:00
Jesse Plamondon-Willard 89c98223eb
remove path-too-long exception handling
The path length limit no longer applies in .NET 5.
2021-11-28 00:01:46 -05:00
Jesse Plamondon-Willard b349e956c6
remove handling for exception no longer thrown by the game 2021-11-28 00:01:46 -05:00
Jesse Plamondon-Willard 3c6549db3e
remove reference no longer needed in .NET 5 2021-11-28 00:01:45 -05:00
Jesse Plamondon-Willard 33c7a0392c
remove libgdiplus workaround on macOS
This is no longer needed after the .NET 5 migration.
2021-11-28 00:01:45 -05:00
Jesse Plamondon-Willard 0f508c755a
reorganize install script
This fixes an issue where Steam messes with the PATH, so dotnet isn't available until the terminal window is opened.
2021-11-28 00:01:45 -05:00
Jesse Plamondon-Willard 7c5c63d684
fix SMAPI not working on macOS, improve installer validation 2021-11-28 00:01:44 -05:00
Jesse Plamondon-Willard f6479ea2b6
restructure installer for .NET 5 changes 2021-11-28 00:01:44 -05:00
Jesse Plamondon-Willard ce80c68135
fix segfault on Linux/macOS after .NET 5 update
Harmony doesn't seem to support tiered compilation on Linux/macOS, but the vanilla game disables that too anyway. The bundled runtimeconfig files match the ones used by the vanilla game. Thanks to 0x0ade for identifying the cause!
2021-11-28 00:01:44 -05:00
Jesse Plamondon-Willard 897edd7ff0
update for accessibility change in Stardew Valley 1.5.5 2021-11-28 00:01:43 -05:00
Jesse Plamondon-Willard e10a7858a0
fix error reading console title on Linux with .NET 5
The console title is now write-only on Linux.
2021-11-28 00:01:43 -05:00
Jesse Plamondon-Willard 3a3688e094
use new mod hooks to synchronize tasks 2021-11-28 00:01:43 -05:00
Jesse Plamondon-Willard e16d6e98dc
update to .NET 5 build of Harmony 2.1.0 2021-11-28 00:01:42 -05:00
Jesse Plamondon-Willard b2520feeae
update for other changes in SDV 1.5.5 2021-11-28 00:01:42 -05:00
Jesse Plamondon-Willard 8321cbf6eb
update for asset name format change
MonoGame uses Linux-style paths for assets on all platforms, which breaks the previous equivalence between path and asset name formats.
2021-11-28 00:01:42 -05:00
Jesse Plamondon-Willard 727d75ae72
update to .NET 5 and official 64-bit 2021-11-28 00:01:41 -05:00
Jesse Plamondon-Willard 40b74398ac
update for game assembly name now consistent on all platforms 2021-11-28 00:01:41 -05:00
Jesse Plamondon-Willard 2b922a71a2
update for Netcode now merged into game assembly on all platforms 2021-11-28 00:01:41 -05:00
Jesse Plamondon-Willard 6efaa651cb
drop support for XNA Framework
Stardew Valley 1.5.5 migrates to MonoGame on all platforms.
2021-11-28 00:01:40 -05:00
Jesse Plamondon-Willard c8c6b3897c
update versions for Stardew Valley 1.5.5 and remove 1.5.4-specific checks 2021-11-28 00:01:40 -05:00
Jesse Plamondon-Willard 3ca6fb5624
automatically include beta versions on Nexus for SMAPI update checks 2021-11-27 23:59:13 -05:00
Jesse Plamondon-Willard b64cec918d
remove direct download for beta versions
With this change, only the main version has a direct download.

Showing beta info here caused a few issues:
* The vast majority of players don't use the game beta, so they were often confused about which version to download.
* Beta versions typically have much longer release info (e.g. detailed summary, release notes, caveats and warnings, etc), and the extra download button made the player guide button under it less prominent and visible. Those both contributed to information overload and the above confusion.
* Unlike main versions, beta versions aren't permanently archived on GitHub (since the beta branch is routinely rebased onto the latest stable update). That makes it messy to manage beta releases through GitHub.

Instead there's now a message under the download button which clearly links to where the beta version can be downloaded.
2021-11-27 22:45:14 -05:00
Jesse Plamondon-Willard 12e0c15196
migrate web project to .NET 6, update web & unit test packages 2021-11-27 22:37:21 -05:00
Jesse Plamondon-Willard 01f59000e9
ignore WebDeploy files 2021-10-31 14:37:51 -04:00
Jesse Plamondon-Willard 96db1d9315
update Content Patcher schema for 1.24.0 2021-10-31 14:14:21 -04:00
Jesse Plamondon-Willard e89de6316d
add set_farm_type console command 2021-10-30 19:53:28 -04:00
Jesse Plamondon-Willard 68c58a4777
move release note 2021-10-18 17:17:54 -04:00
Jesse Plamondon-Willard d578345cfd
Merge branch 'develop' into stable 2021-10-17 19:53:40 -04:00
Jesse Plamondon-Willard f8c9a2929b
prepare for release 2021-10-17 19:53:24 -04:00
Jesse Plamondon-Willard 6bb156b318
update release process to use Windows 11 WSL instead of a Linux VM 2021-10-17 19:50:39 -04:00
Jesse Plamondon-Willard ccbf589a5b
update for new build path 2021-10-17 19:28:14 -04:00
Jesse Plamondon-Willard 6268abed37
update translation docs 2021-10-17 19:01:01 -04:00
Jesse Plamondon-Willard 0d5c86d750
Merge pull request #808 from Zangorr/beta
Add Polish translations
2021-10-17 18:53:21 -04:00
Zangorr db89ff0fcd
Add Polish translation 2021-10-17 18:51:48 -04:00
Zangorr 65e0de3920
Add Polish translation 2021-10-17 18:51:36 -04:00
Jesse Plamondon-Willard 50fdc7bb34
update translation docs 2021-10-09 21:06:32 -04:00
Jesse Plamondon-Willard 8bb0703909
Merge pull request #807 from ellipszist/develop
Add Thai translations
2021-10-09 20:59:16 -04:00
Jesse Plamondon-Willard 2b76309b53
fix compile errors on Linux 2021-10-08 19:53:43 -04:00
Jesse Plamondon-Willard 08ba5dc520
bump to .NET Framework 4.5.2 2021-10-08 19:41:26 -04:00
Jesse Plamondon-Willard 52758e4e43
fix build error with Stardew Valley 1.5.4 2021-10-07 18:47:28 -04:00
Jesse Plamondon-Willard 8263a4406b
add key to duplicate-dictionary-key exceptions 2021-10-07 18:46:41 -04:00
Jesse Plamondon-Willard 2a0a7191a7
fix barn/coop map edits resetting the exit warp 2021-10-06 23:37:48 -04:00
Jesse Plamondon-Willard 307c2919f4
fix error performing update check for mods with no wiki entry 2021-10-02 19:55:37 -04:00
Jesse Plamondon-Willard 2e9a26c439
restore toolkit method used by external tools 2021-10-02 17:53:45 -04:00
Jesse Plamondon-Willard b5c88d87d2
add support for unified mod data overrides on the wiki 2021-10-02 16:40:23 -04:00
Jesse Plamondon-Willard 0888f71a5c
show separate beta stats in mod compatibility list 2021-09-29 20:48:51 -04:00
Jesse Plamondon-Willard ab8599583e
fix SMAPI's display device not hooked correctly in split-screen mode 2021-09-27 17:06:15 -04:00
Jesse Plamondon-Willard 31e31538f1
fix farmhouse edits shifting player down one tile 2021-09-25 20:22:26 -04:00
Jesse Plamondon-Willard 0e3e4f565a
add redirect for SMAPI release notes 2021-09-25 00:52:21 -04:00
Jesse Plamondon-Willard 87536fbd9a
remove obsolete buildmsg redirect 2021-09-25 00:52:08 -04:00
Jesse Plamondon-Willard ebe41180c4
Merge branch 'develop' into stable 2021-09-18 13:08:38 -04:00
Jesse Plamondon-Willard 6643da4574
prepare for release 2021-09-18 13:06:50 -04:00
Jesse Plamondon-Willard 6ac5ca090d
simplify exception logs 2021-09-18 12:43:31 -04:00
Jesse Plamondon-Willard 8a11774460
add simpler error when an asset isn't found 2021-09-18 11:48:20 -04:00
Jesse Plamondon-Willard 54a7c1f9bd
add more visible log output for players during early startup 2021-09-18 11:07:06 -04:00
ELL 1a8bb63e0d Add Thai translations 2021-09-16 11:41:13 +07:00
Jesse Plamondon-Willard 4a7eb97306
add asset propagation for giftbox texture 2021-09-13 18:48:22 -04:00
Jesse Plamondon-Willard f6f4470d95
enable beta info on the mod compatibility list by default 2021-09-13 18:30:59 -04:00
Jesse Plamondon-Willard a40ef854f3
fix JSON validator line numbers sometimes incorrect 2021-09-13 18:20:36 -04:00
Jesse Plamondon-Willard 4fccaa3570
add nullable support in JSON converters 2021-09-13 00:01:14 -04:00
Jesse Plamondon-Willard a9fcbc686d
fix error when loading corrupted translation files 2021-09-08 19:01:40 -04:00
Jesse Plamondon-Willard c5b8cd6264
Merge branch 'develop' into stable 2021-09-03 18:36:39 -04:00
Jesse Plamondon-Willard 6d4ea7f0bd
prepare for release 2021-09-03 18:36:12 -04:00
Jesse Plamondon-Willard 9f1c454934
remove asset propagation for Data/Bundles 2021-09-03 18:35:23 -04:00
Jesse Plamondon-Willard bbaa260007
drop support for unofficial 64-bit mode 2021-09-02 23:01:40 -04:00
Jesse Plamondon-Willard 169ce01810
fix build errors on Linux 2021-09-02 21:24:10 -04:00
Jesse Plamondon-Willard 0ce8939988
avoid duplicate update key parsing logic, fix unit tests 2021-09-02 19:27:49 -04:00
Jesse Plamondon-Willard 8789b7efa8
prepare path utilities for the upcoming Stardew Valley 1.5.5
The game will use Linux-style paths for assets on all platforms, which will break the current equivalence between path and asset name formats.
2021-09-02 18:54:56 -04:00
Jesse Plamondon-Willard 5848a355ba
add friendly errors when using SMAPI 3.12.x with Stardew Valley 1.5.5+ 2021-09-01 21:48:08 -04:00
Jesse Plamondon-Willard cf1d800b58
add Big Silo to compatibility list 2021-09-01 21:03:02 -04:00
Jesse Plamondon-Willard 1240cb2102
fix translations not initialized for temporary content packs 2021-09-01 20:58:21 -04:00
Jesse Plamondon-Willard 8bfab94213
reduce unneeded operations when scanning/rewriting mod DLLs 2021-09-01 20:02:58 -04:00
Jesse Plamondon-Willard c6cc1513c5
update release notes 2021-09-01 19:57:24 -04:00
Jesse Plamondon-Willard 9153ebf5e9
Merge branch 'rewrite-x86-flag' into develop 2021-09-01 19:56:33 -04:00
Jesse Plamondon-Willard 789b62bcd6
adjust rewriter for backport to Stardew Valley 1.5.4 2021-09-01 19:56:17 -04:00
Jesse Plamondon-Willard 6edcfb1358
tweak new code 2021-09-01 19:36:43 -04:00
Chase Warrington ec5fbb0611
Rewrite 32-bit assemblies for 64-bit 2021-09-01 19:35:18 -04:00
Jesse Plamondon-Willard 9316fe3038
add hurry_all console command 2021-09-01 19:32:23 -04:00
Jesse Plamondon-Willard 4ee96a20bb
Merge branch 'develop' into stable 2021-08-26 01:13:36 -04:00
Jesse Plamondon-Willard c065675604
prepare for release 2021-08-26 01:13:24 -04:00
Jesse Plamondon-Willard 22a895d27c
only check 64-bit compatibility if an assembly fails to load
Apparently some 32-bit-only DLLs load successfully with the unofficial 64-bit version of the game.
2021-08-26 01:12:37 -04:00
Jesse Plamondon-Willard c95de4e109
Merge branch 'develop' into stable 2021-08-25 23:58:02 -04:00
Jesse Plamondon-Willard 69b1c229de
prepare for release 2021-08-25 23:57:13 -04:00
Jesse Plamondon-Willard 08b180ca89
add failsafe when loading symbols 2021-08-25 23:56:46 -04:00
Jesse Plamondon-Willard fd7f81ac9c
fix assembly resolver not tracking loaded mods correctly 2021-08-25 23:19:47 -04:00
Jesse Plamondon-Willard 211f89821e
Merge branch 'develop' into stable 2021-08-25 21:54:00 -04:00
Jesse Plamondon-Willard 31ac964a8b
prepare for release 2021-08-25 21:53:45 -04:00
Jesse Plamondon-Willard 2b14524280
migrate web project to .NET 5 2021-08-25 20:53:05 -04:00
Jesse Plamondon-Willard 8f77c1d1ef
update release notes 2021-08-25 20:46:57 -04:00
Jesse Plamondon-Willard 0ad0339082
Merge pull request #801 from spacechase0/fix-crash-rewritten-assemblies
Fix assembly rewriting causing VS to error/crash when debugging
2021-08-25 20:45:24 -04:00
Jesse Plamondon-Willard 11ecd578e9
fix error when no symbols are found 2021-08-25 20:03:06 -04:00
Jesse Plamondon-Willard 687a396e9c
fix error when reading a duplicate assembly 2021-08-25 20:02:51 -04:00
Jesse Plamondon-Willard 0b29eb3bc3
minor refactoring in new symbol code 2021-08-25 20:01:59 -04:00
Jesse Plamondon-Willard e3b38a70f8
reorganize new classes 2021-08-25 19:17:29 -04:00
Chase Warrington 5030e965dc
Fix for loading both types of PDBs 2021-08-25 18:33:00 -04:00
Chase Warrington c5c7201151
Fix assembly rewriting causing VS to error/crash when debugging 2021-08-25 18:32:52 -04:00
Jesse Plamondon-Willard b8dac41da8
fix beta label in web UI 2021-08-25 18:26:15 -04:00
Jesse Plamondon-Willard 911843e1be
fix console encoding issues (#798) 2021-08-25 18:26:02 -04:00
Jesse Plamondon-Willard f8c76bde39
add 64-bit compatibility check before loading mods
That reduces time spent trying to rewrite them (which won't work anyway), and shows a more informative message than the default 'DLL couldn't be loaded' error.
2021-08-25 18:25:17 -04:00
Jesse Plamondon-Willard e1d8838587
fix update checks not recommending prerelease mod versions for SMAPI beta 2021-08-25 18:21:42 -04:00
Jesse Plamondon-Willard 3804ae6284
fix some installer errors not showing info header 2021-08-25 18:21:26 -04:00
Jesse Plamondon-Willard 26a629f41b
fix prerelease update alerts shown for non-prerelease players 2021-08-25 18:20:15 -04:00
Jesse Plamondon-Willard 596a4616b3
no longer abort input thread when exiting
`thread.Abort` is unimplemented in .NET 5, but it's not needed anyway since all threads will be aborted when the game exits.
2021-08-25 18:19:24 -04:00
Jesse Plamondon-Willard 68e629f17c
fix data helper's WriteJsonFile not deleting file if data is null (#799) 2021-08-25 18:18:37 -04:00
Jesse Plamondon-Willard c20fcec169
expand data helper docs (#799) 2021-08-25 18:17:45 -04:00
Jesse Plamondon-Willard 6cf7c49f34
add GetInAllLocales to translation API 2021-08-25 18:17:09 -04:00
Jesse Plamondon-Willard a4c6c61684
enable parallel analyzer execution 2021-08-08 00:32:19 -04:00
Jesse Plamondon-Willard 976c66537c
fix edge case where Netcode references aren't rewritten correctly 2021-08-08 00:24:20 -04:00
Jesse Plamondon-Willard 885808fb66
move assembly resolver setup into Constants to centralize hardcoded logic 2021-08-08 00:21:28 -04:00
Jesse Plamondon-Willard 5e16ed0eea
prevent weird null reference exception in error-handling 2021-08-05 14:28:29 -04:00
Jesse Plamondon-Willard 94d41cd67a
correct release date 2021-08-05 12:21:18 -04:00
Jesse Plamondon-Willard 80d3dd1f78
Merge branch 'develop' into stable 2021-08-05 11:56:10 -04:00
Jesse Plamondon-Willard b6e058c322
prepare for release 2021-08-04 18:34:29 -04:00
Jesse Plamondon-Willard b6f3ecc143
fix error when error-handling invalid ReflectionTypeLoadException errors 2021-08-04 18:05:05 -04:00
Jesse Plamondon-Willard 807dcfec77
undo Constants.Save* changes in 3.12.1 2021-08-04 18:02:15 -04:00
Jesse Plamondon-Willard 2e442bf2ee
Merge branch 'develop' into stable 2021-08-03 19:11:39 -04:00
Jesse Plamondon-Willard 1bb51b2c41
prepare for release 2021-08-03 19:11:26 -04:00
Jesse Plamondon-Willard e73f5a10c7
add PlatoTK to compatibility list 2021-08-03 19:04:15 -04:00
Jesse Plamondon-Willard 6b0d13be7c
fix Mono.Cecil failing to resolve references to SMAPI in some edge cases 2021-08-03 19:03:51 -04:00
Jesse Plamondon-Willard ef1eff669d
update compatibility list 2021-08-03 13:05:48 -04:00
Jesse Plamondon-Willard cf261ff36e
increase software conflict message to warning level to simplify troubleshooting 2021-08-03 12:00:15 -04:00
Jesse Plamondon-Willard 848460a34e
update compatibility list 2021-08-02 21:30:59 -04:00
Jesse Plamondon-Willard 5256b738b4
use more reliable method to get save folder name
SMAPI now tracks the actual folder name being loaded to avoid edge cases where the folder name doesn't match the save ID.
2021-08-02 21:14:22 -04:00
Jesse Plamondon-Willard 5b31be76dd
Merge branch 'develop' into stable 2021-08-01 13:11:51 -04:00
Jesse Plamondon-Willard d688cdf8c3
prepare for release 2021-08-01 13:11:27 -04:00
Jesse Plamondon-Willard edfb3c9929
Merge pull request #794 from bladeoflight16/monoandprojectfixes
Fix Mono build error and duplicate targets import
2021-08-01 13:10:36 -04:00
Jesse Plamondon-Willard c15d43049a
fix map reload not correctly reloading interior doors 2021-07-31 19:22:14 -04:00
bladeoflight16 db06291fdb Removing duplicate import of common.targets, eliminates several warnings 2021-07-31 15:30:27 -04:00
bladeoflight16 f7f49aa8df Target typed constructors are not yet supported by Mono. Adding explicit class name to resolve build error. 2021-07-31 15:28:22 -04:00
Jesse Plamondon-Willard 80d5672cdb
fix crash when farm name contains invalid-in-file-path characters (#791) 2021-07-31 01:50:31 -04:00
Jesse Plamondon-Willard dc78d944e8
recover save when mods leave null objects in the world 2021-07-30 01:48:22 -04:00
Jesse Plamondon-Willard 940bf92241
refactor save game patcher to minimize repeated iterations 2021-07-30 01:40:43 -04:00
Jesse Plamondon-Willard 10b7758bd2
fix build error on Linux 2021-07-30 00:56:37 -04:00
Jesse Plamondon-Willard 948c800a98
migrate to the new Harmony patch pattern used in my mods
That improves validation and error-handling.
2021-07-30 00:54:15 -04:00
Jesse Plamondon-Willard 4074f697d7
rename patch classes for consistency 2021-07-30 00:40:12 -04:00
Jesse Plamondon-Willard aa65b2e2f6
split patch classes which target multiple types 2021-07-30 00:34:53 -04:00
Jesse Plamondon-Willard 737a434ad6
reduce ErrorHandler's direct references to internal SMAPI code
That will allow removing the InternalsVisibleTo attribute to avoid namespace conflicts in an upcoming commit.
2021-07-29 22:50:50 -04:00
Jesse Plamondon-Willard 880cd7b8ba
fix handling of Unicode characters in console 2021-07-28 21:20:44 -04:00
Jesse Plamondon-Willard e8ad5d0a24
fix Data\Movies error regression when patching dictionary (#711) 2021-07-28 18:03:49 -04:00
Jesse Plamondon-Willard b4f307e1ba
fix rewritten Harmony 1.x code not raising 'detected game patch' flag (#711) 2021-07-28 00:51:45 -04:00
Jesse Plamondon-Willard 6a6c484b98
add accessed key to dictionary KeyNotFoundException message 2021-07-28 00:49:54 -04:00
Jesse Plamondon-Willard b2a1a51dea
Merge pull request #793 from bladeoflight16/clearremoveable
Add an option to world_clear that leaves permanent objects alone
2021-07-28 00:38:26 -04:00
Jesse Plamondon-Willard e3010f7c41
refactor new code a bit 2021-07-28 00:36:34 -04:00
Jesse Plamondon-Willard 507154bf34
Merge pull request #792 from bladeoflight16/monofix
Fix build error in MonoDevelop
2021-07-28 00:28:23 -04:00
bladeoflight16 428f0c5880 world_clear: Adding 'removeable' option that includes everything except permanent bushes 2021-07-27 17:23:54 -04:00
bladeoflight16 ec7af3e2ee world_clear: Lining up parameter descriptions 2021-07-27 17:23:54 -04:00
bladeoflight16 97710d6f47 Fixing mono incompatibility (case exception type statement without variable) 2021-07-27 17:17:56 -04:00
Jesse Plamondon-Willard bdae52c9ae
fix rewriting for Harmony ExceptionBlock type (#711) 2021-07-26 22:28:32 -04:00
Jesse Plamondon-Willard 175eaad683
remove now-unneeded Mono.Cecil aliases (#711) 2021-07-23 20:37:26 -04:00
Jesse Plamondon-Willard 167d5831d1
use unmerged Harmony assembly (#711)
Harmony merges Mono.Cecil and MonoMod.Common into its DLL, and keeps some (but not all) of the merged types public. That causes type conflicts in SMAPI's code since it uses both Harmony and Mono.Cecil, and extern aliases break on Linux due to IDE/compiler limitations. This commit uses a custom build of Harmony without the assembly merging, so SMAPI can use and manage Mono.Cecil itself.
2021-07-23 20:29:44 -04:00
Jesse Plamondon-Willard 88be0cee94
fix new validation checks 2021-07-21 23:28:18 -04:00
Jesse Plamondon-Willard 163511e68e
merge release note sections 2021-07-21 23:08:18 -04:00
Jesse Plamondon-Willard 92bcb8405c
Merge branch 'harmony-2' into develop 2021-07-21 22:49:53 -04:00
Jesse Plamondon-Willard 7e5d77fb8c
add error if some SMAPI DLLs have mismatched versions 2021-07-21 00:43:43 -04:00
Jesse Plamondon-Willard c74702b027
fix error loading .xnb files from the local mod folder since SMAPI 3.0 2021-07-20 22:18:57 -04:00
Jesse Plamondon-Willard defa1b9a95
fix concurrency issue in interface proxying 2021-07-20 18:43:56 -04:00
Jesse Plamondon-Willard 735893c1d5
add error if player manually installs wrong SMAPI bitness 2021-07-17 18:52:06 -04:00
Jesse Plamondon-Willard 72b3c9d143
add workaround for Harmony 2.x breaking XNA content pipeline for some assets (#711, #722) 2021-07-14 18:02:13 -04:00
Jesse Plamondon-Willard 8df578edb6
migrate to Harmony 2.1 (#711) 2021-07-13 09:14:07 -04:00
Jesse Plamondon-Willard bd20c2e137
alias Mono.Cecil references (#711)
This is needed to migrate to Harmony 2.0 because it uses MonoMod, which has a copy of Mono.Cecil merged into its assembly, which leads to "type X exists in both 0Harmony.dll and Mono.Cecil.dll" errors. We can't use the version bundled with MonoMod since only some of the types are publicly accessible.
2021-07-11 01:44:02 -04:00
Jesse Plamondon-Willard 8f96a97f07
Merge branch 'develop' into stable 2021-07-09 22:30:13 -04:00
Jesse Plamondon-Willard 60af28760a
prepare for release 2021-07-09 22:29:43 -04:00
Jesse Plamondon-Willard 40a4992170
update launch script on macOS for 1.4.5 multiplayer hotfix (#789)
Thanks to Mr. Podunkian for his help investigating this on macOS!
2021-07-07 13:10:55 -04:00
Jesse Plamondon-Willard 7b097c4f6f
update launch script on Linux for 1.4.5 multiplayer hotfix (#789) 2021-07-02 20:52:22 -04:00
Jesse Plamondon-Willard 5e3a1abbd4
improve error if SMAPI fails to dispose on exit 2021-06-26 11:16:12 -04:00
Jesse Plamondon-Willard 66f8920c29
log trace message if conflicting software is detected 2021-06-24 20:17:34 -04:00
Jesse Plamondon-Willard 4df8f4a656
fix edge case where save constants aren't set correctly 2021-06-11 19:14:59 -04:00
Jesse Plamondon-Willard c212ff15d2
fix installer error for some Windows players 2021-06-11 18:39:38 -04:00
Jesse Plamondon-Willard dfa3beb6a6
fix i18n schema requiring wrong $schema value 2021-05-28 20:24:29 -04:00
Jesse Plamondon-Willard 03f8777afd
add asset propagation for paint masks 2021-05-27 22:59:06 -04:00
Jesse Plamondon-Willard be93327a80
update release notes 2021-05-26 20:11:01 -04:00
Jesse Plamondon-Willard ce84bbd9ae
Merge pull request #779 from DiscipleOfEris/develop
Add `World.FurnitureListChanged` event
2021-05-26 20:04:46 -04:00
DiscipleOfEris 9d7b31afc4 Update FurnitureListChangedEventArgs.cs
Prune unnecessary `using` statements
2021-05-26 11:57:52 -07:00
DiscipleOfEris b149e11338 Add `World.FurnitureListChanged` event
Create a new event available to SMAPI mods to track furniture changes. To facilitate the event, a `FurnitureListChangedEventArgs` class is added as well.

Fixes #778
2021-05-26 11:50:49 -07:00
Jesse Plamondon-Willard 112b505118
update schema for Content Patcher 1.23 2021-05-25 17:42:24 -04:00
Jesse Plamondon-Willard 38a76b5108
allow comments and trailing commas in schemas for VSCode
The `allowComments` and `allowTrailingCommas` fields are VSCode-specific extensions to JSON Schema.
2021-05-22 11:24:34 -04:00
Jesse Plamondon-Willard c310875f90
fix 'loaded with custom settings' message shown with default settings 2021-05-19 23:38:10 -04:00
Jesse Plamondon-Willard 75d7c10144
add support for filtering the item repo
This isn't used by SMAPI itself, but is used by some mods like Lookup Anything that copy this code.
2021-05-17 20:52:01 -04:00
Jesse Plamondon-Willard fe25a122f4
fix some vanilla shirts not returned by item repo 2021-05-17 20:45:46 -04:00
Jesse Plamondon-Willard 3c3920b86e
clarify common mistake when setting game path 2021-05-12 20:57:23 -04:00
Jesse Plamondon-Willard 9b09941bd5
set script path in Windows launch script (#777) 2021-05-10 22:40:13 -04:00
Jesse Plamondon-Willard 4ac04ee3ac
fix error if a mod has a 'Dependencies' entry with no ID 2021-05-09 12:19:30 -04:00
Jesse Plamondon-Willard 7c76c5cad2
add validation for the manifest 'Dependencies' field 2021-05-09 12:13:39 -04:00
Jesse Plamondon-Willard 4b391d631c
normalize manifest array fields 2021-05-09 12:12:03 -04:00
Jesse Plamondon-Willard d9c001a39f
fix version zero validation 2021-05-09 12:06:18 -04:00
Jesse Plamondon-Willard 7dd3e37dec
Merge branch 'develop' into stable 2021-05-03 20:16:20 -04:00
Jesse Plamondon-Willard 6b1c4589e9
prepare for release 2021-05-03 19:49:44 -04:00
Jesse Plamondon-Willard 8d9d8341cd
fix installer leaving unneeded StardewModdingAPI-x64.exe file in installer 2021-05-03 19:42:30 -04:00
Jesse Plamondon-Willard 5d3d919d49
Merge branch 'develop' into stable 2021-05-03 18:11:31 -04:00
Jesse Plamondon-Willard 3447e2f575
prepare for release 2021-05-03 18:11:06 -04:00
Jesse Plamondon-Willard 2cc5509e98
add verbose logs for map tilesheet changes 2021-05-02 18:35:34 -04:00
Jesse Plamondon-Willard eef6a9c2e8
add support for dot-ignoring local map tilesheet files (#732) 2021-05-02 18:34:26 -04:00
Jesse Plamondon-Willard 0f27d6f4c1
fix new executable check in Linux launcher, update release notes (#775) 2021-05-02 18:26:02 -04:00
Jesse Plamondon-Willard b8b120b759
rename variables in Linux launcher for clarity 2021-05-02 18:11:58 -04:00
Jesse Plamondon-Willard bc9b5a84f0
use POSIX command directly in Linux launcher 2021-05-02 18:07:05 -04:00
Jesse Plamondon-Willard 7516acfadd
Merge pull request #776 from kuesji/patch-1
Fix strict Linux sandbox support in launcher
2021-05-02 14:35:21 -04:00
Jesse Plamondon-Willard f067b33ee4
let user install to a custom path even if a game folder was detected 2021-05-02 12:11:28 -04:00
kuesji koesnu ec9914efad
launcher strict sandbox fix on linux
i added a check for is found terminal is executable.
game will launch with standart exec if found terminal is not exist or executable.

( fix for issue #775 )
2021-05-02 17:37:08 +03:00
Jesse Plamondon-Willard 28c5cb79d4
add error-handling for seasonal tilesheet crash 2021-05-01 17:39:34 -04:00
Jesse Plamondon-Willard 99f70f9634
match tilesheets without extension to .png files automatically if possible 2021-05-01 12:33:09 -04:00
Jesse Plamondon-Willard 621b989c24
update web and unit test packages 2021-04-30 19:16:52 -04:00
Jesse Plamondon-Willard 3de9858c9b
fix update subkeys for Nexus mods marked as adult content 2021-04-30 18:52:19 -04:00
Jesse Plamondon-Willard 9e8a7fa986
ignore *.ico files when scanning for mods (#773) 2021-04-24 11:10:53 -04:00
Jesse Plamondon-Willard fa72198d1d
add [64-bit] tag to window titles (#767) 2021-04-23 22:12:41 -04:00
Jesse Plamondon-Willard 47a806533b
add 64-bit support to the SMAPI installer (#767) 2021-04-23 02:05:14 -04:00
Jesse Plamondon-Willard 665c6806d3
add update alerts for Stardew64Installer (#767) 2021-04-22 21:52:09 -04:00
Jesse Plamondon-Willard 13a3c8fbdd
add SMAPI version and bitness to console title earlier 2021-04-22 18:13:45 -04:00
Jesse Plamondon-Willard ed47c2a0ce
update schema for Content Patcher 1.22 2021-04-17 22:11:21 -04:00
Jesse Plamondon-Willard 9174e17f53
mark field readonly 2021-04-17 22:10:51 -04:00
Jesse Plamondon-Willard f961a376ee
log Stardew64Installer patch version if applicable (#767) 2021-04-15 21:17:19 -04:00
Jesse Plamondon-Willard bca1e63c3e
fix error when mod edits bundle data while a split-screen player is joining 2021-04-04 12:11:06 -04:00
Jesse Plamondon-Willard c7db35818b
fix Context.IsMainPlayer incorrectly true when split-screen player is joining 2021-04-04 12:09:07 -04:00
Jesse Plamondon-Willard 2b1b3b19a5
improve error-handling during asset propagation 2021-04-04 11:40:08 -04:00
Jesse Plamondon-Willard 222183c651
standardize spelling of 'macOS' 2021-04-04 11:37:11 -04:00
Jesse Plamondon-Willard 2d8f916053
log failed root dependencies in their own group 2021-04-03 11:39:58 -04:00
Jesse Plamondon-Willard 60b563267e
fix asset key normalization for 64-bit hack (#767) 2021-04-02 21:30:55 -04:00
Jesse Plamondon-Willard 3fa0433c98
add initial support for 64-bit Windows hack (#767) 2021-04-02 21:30:55 -04:00
Jesse Plamondon-Willard 62c1f11109
remove unneeded compile switch (#767)
This was originally added to reduce antivirus false positives, but they do it anyway at this point.
2021-04-02 21:30:55 -04:00
Jesse Plamondon-Willard 1a4cdd71a5
fix asset propagation for localized movie data 2021-04-02 21:18:18 -04:00
Jesse Plamondon-Willard 3dc344054a
don't overwrite .bin.osx file unnecessarily to avoid resetting file permissions (#768) 2021-04-02 20:35:02 -04:00
Jesse Plamondon-Willard 0d5b4e9983
update resource clump logic for SDV 1.5 (#770) 2021-04-02 20:13:23 -04:00
Jesse Plamondon-Willard c48f6d78cc
Merge branch 'develop' into stable 2021-03-30 20:12:44 -04:00
Jesse Plamondon-Willard 58dde207af
prepare for release 2021-03-30 20:11:49 -04:00
Jesse Plamondon-Willard 551153bb00
prepare mod build package for 64-bit SMAPI (#767) 2021-03-30 20:10:55 -04:00
Jesse Plamondon-Willard 75f3600ab1
Merge branch 'develop' into stable 2021-03-21 16:38:23 -04:00
Jesse Plamondon-Willard 74215e844a
prepare for release 2021-03-21 16:37:43 -04:00
Jesse Plamondon-Willard b93e3cf522
Drop hardcoded 32-bit restrictions on most SMAPI assemblies (#767)
SMAPI itself needs to be 32-bit to avoid errors trying to load the 32-bit game.
2021-03-21 16:07:09 -04:00
Jesse Plamondon-Willard ca67dcc920
add Constants.GameFramework field (#767) 2021-03-21 16:06:52 -04:00
Jesse Plamondon-Willard 73321eceb9
split compile flag into separate Windows + XNA flags (#767) 2021-03-21 16:05:15 -04:00
Jesse Plamondon-Willard fdfb060795
remove unused code (#767) 2021-03-21 16:04:48 -04:00
Jesse Plamondon-Willard d61bb78b2a
simplify creating keybind list for single key 2021-03-21 15:18:30 -04:00
Jesse Plamondon-Willard c070e34c2f
fix double-localization issue in regenerated bundles 2021-03-21 00:44:42 -04:00
Jesse Plamondon-Willard c39b2b1766
update NPC pathfinding cache when map warps change 2021-03-19 20:16:13 -04:00
Jesse Plamondon-Willard bb88e42f54
add console command to regenerate bundles 2021-03-16 19:20:37 -04:00
Jesse Plamondon-Willard 749f0321f0
avoid asset propagation into the world if it's unloaded
Propagating changes into world locations has no effect at this point (since they'll just be recreated when a save is loaded), and can noticeably impact performance.
2021-03-16 18:56:56 -04:00
Jesse Plamondon-Willard 6805c90e2c
add asset propagation for interior door sprites 2021-03-14 14:17:09 -04:00
Jesse Plamondon-Willard 04388fe7e3
fix some assets not reapplied correctly when playing in non-English and returning to title 2021-03-14 04:43:28 -04:00
Jesse Plamondon-Willard 77629a528a
disable aggressive memory optimizations by default 2021-03-13 23:51:55 -05:00
Jesse Plamondon-Willard fc5fc54ab1
Merge branch 'develop' into stable 2021-03-08 00:08:28 -05:00
Jesse Plamondon-Willard b8309e9017
prepare for release 2021-03-08 00:08:15 -05:00
Jesse Plamondon-Willard 35ba5cc585
fix installer error when Mods folder doesn't exist in 3.9.3 (#764) 2021-03-08 00:05:58 -05:00
Jesse Plamondon-Willard 00969f3b48
update the JSON schema for Content Patcher 1.21 2021-03-07 21:43:23 -05:00
Jesse Plamondon-Willard 5399239c2b
Merge branch 'develop' into stable 2021-03-07 20:15:10 -05:00
Jesse Plamondon-Willard a571f459f5
prepare for release 2021-03-07 20:02:25 -05:00
Jesse Plamondon-Willard 7914734375
get patcher names automatically if needed 2021-03-07 19:48:47 -05:00
Jesse Plamondon-Willard 0ed46c0910
add descriptive error for PathTooLongException which crashes SMAPI or the installer 2021-03-07 18:04:48 -05:00
Jesse Plamondon-Willard 36cb8e8fcb
keep window open when installer crashes 2021-03-07 17:42:55 -05:00
Jesse Plamondon-Willard 5a2258f419
fix RewriteMods option ignored when rewriting mod for OS 2021-03-04 21:59:49 -05:00
Jesse Plamondon-Willard 699a07ecf7
fix broken references to LoadStage enum in previously compiled mods 2021-02-28 20:12:39 -05:00
Jesse Plamondon-Willard 5ce096c89a
fix edge case for non-English farmhands where content coordinator handled return to title too late 2021-02-28 14:22:30 -05:00
Jesse Plamondon-Willard b2d47e29ff
add ReturningToTitle stage 2021-02-28 14:17:41 -05:00
Jesse Plamondon-Willard 403616b07c
fix mods with suppressed warnings counted for showing the log section 2021-02-28 12:39:37 -05:00
Jesse Plamondon-Willard 944c03737e
add load stages immediately after game adds initial locations 2021-02-28 12:01:11 -05:00
Jesse Plamondon-Willard db011ee751
Merge branch 'develop' into stable 2021-02-21 23:05:17 -05:00
Jesse Plamondon-Willard 9c4c10d2d2
prepare for release 2021-02-21 21:58:37 -05:00
Jesse Plamondon-Willard 27accf55a5
update ambient light when setting game time 2021-02-21 18:29:14 -05:00
Jesse Plamondon-Willard 033b385641
add detailed error message when Stardew Valley.exe can't be loaded 2021-02-21 17:33:37 -05:00
Jesse Plamondon-Willard 8205b4bd35
use 'mod authors' instead of 'modders' in release notes for clarity 2021-02-21 13:54:29 -05:00
Jesse Plamondon-Willard ad80f8b078
use inheritdoc, minor cleanup 2021-02-21 13:50:08 -05:00
Jesse Plamondon-Willard 79aee3fba7
reduce performance impact of new cache fix 2021-02-21 13:45:10 -05:00
Jesse Plamondon-Willard 50d7e95920
fix errors parsing the mod compatibility list on the new wiki 2021-02-19 22:54:01 -05:00
Jesse Plamondon-Willard b1876dec7a
fix asset propagation for map seats 2021-02-13 16:54:57 -05:00
Jesse Plamondon-Willard fa3305e1d8
add error details when an event command fails 2021-02-08 19:32:48 -05:00
Jesse Plamondon-Willard 5173ddf535
fix compat list error if mod has no name field due to wiki rendering issues 2021-02-08 18:07:38 -05:00
Jesse Plamondon-Willard 67c52af72d
add early detection of disposed assets in error handler mod 2021-02-06 21:12:01 -05:00
Jesse Plamondon-Willard 97d3501e20
improve ErrorHandler's error handling if it can't access log manager 2021-02-06 20:47:04 -05:00
Jesse Plamondon-Willard 5ea871fee5
update schema for Content Patcher 1.20 2021-02-06 19:46:34 -05:00
Jesse Plamondon-Willard efec870657
fix edge case in non-English asset cache after returning to title screen 2021-02-06 13:03:37 -05:00
ZaneYork c00f1b3438 Rewrite for Android 11, music fix 2021-02-05 16:08:15 +08:00
Jesse Plamondon-Willard 54e7b5b846
enable aggressive memory optimizations by default (#757)
The new approach should be safe, and no errors were reported so far by alpha testers.
2021-02-03 20:24:25 -05:00
Jesse Plamondon-Willard e81e07594c
extend aggressive memory optimization to a few more common textures (#757) 2021-01-31 22:12:36 -05:00
Jesse Plamondon-Willard 423f2352af
rework aggressive memory optimization to minimize mod impact (#757) 2021-01-31 22:08:03 -05:00
Jesse Plamondon-Willard 7e8f451876
add experimental 'aggressive memory optimization' flag (#757) 2021-01-31 15:37:00 -05:00
Jesse Plamondon-Willard b2a6933efb
fix mod type defaulted incorrectly in SMAPI toolkit 2021-01-28 21:21:18 -05:00
Jesse Plamondon-Willard 822cc71619
fix error running 'install on Windows.bat' for one user 2021-01-28 19:51:30 -05:00
ZaneYork e1ad4d7b9c Merge branch 'stable376' into develop
# Conflicts:
#	src/SMAPI.Tests/SMAPI.Tests.csproj
#	src/SMAPI.Toolkit/SMAPI.Toolkit.csproj
#	src/SMAPI/Constants.cs
#	src/SMAPI/Framework/Logging/LogManager.cs
#	src/SMAPI/Framework/SCore.cs
2021-01-27 14:58:25 +08:00
ZaneYork 73ab864a51 Migrate to Mono Android 10 (for SDV Android 1.4.5.148 and later) 2021-01-26 22:16:41 +08:00
Jesse Plamondon-Willard f1505b0ebe
Merge branch 'develop' into stable 2021-01-25 21:53:11 -05:00
Jesse Plamondon-Willard 0820280169
prepare for release 2021-01-25 21:52:51 -05:00
Jesse Plamondon-Willard 0058267c36
minor cleanup 2021-01-24 01:05:40 -05:00
Jesse Plamondon-Willard 5129c361c9
fix interior door errors when reloading maps 2021-01-24 00:32:26 -05:00
Jesse Plamondon-Willard 4c0272c0aa
remove unused AlternativeUrl field in metadata model 2021-01-23 12:01:46 -05:00
Jesse Plamondon-Willard 66017a39d9
disable 'patched game code' warning for ErrorHandler
It doesn't really make sense for SMAPI to show a warning about itself.
2021-01-23 11:59:36 -05:00
Jesse Plamondon-Willard 6cd6eb43a1
link to 3.9 release highlights 2021-01-22 23:08:26 -05:00
Jesse Plamondon-Willard d0dc3ea6f6
Merge branch 'develop' into stable 2021-01-22 21:05:04 -05:00
Jesse Plamondon-Willard 733750fdc4
prepare for release 2021-01-22 21:04:48 -05:00
Jesse Plamondon-Willard 4b5dd0f2c9
rename TrainerCommand to ConsoleCommand to match the rest of the code 2021-01-22 20:29:08 -05:00
Jesse Plamondon-Willard cea8e557ef
remove inf options for player_sethealth/money/stamina 2021-01-22 20:24:13 -05:00
Jesse Plamondon-Willard 8fd2a6fd3a
update for new map override logic in SDV 1.5.4
Special thanks to the Stardew Valley developers for making the requested changes!
2021-01-22 20:17:01 -05:00
Jesse Plamondon-Willard 546012da8c
add clearer error for empty Vortex folders to reduce confusion 2021-01-21 19:04:34 -05:00
Jesse Plamondon-Willard 7fc7a45102
fix some broken mods incorrectly listed as XNB mods 2021-01-21 19:01:57 -05:00
Jesse Plamondon-Willard ebc8cd4c7f
add ErrorHandler to bundled mod list 2021-01-20 23:28:48 -05:00
Jesse Plamondon-Willard 342fc80394
rewrite C# 9 code not supported in Linux build tools yet 2021-01-20 23:22:24 -05:00
Jesse Plamondon-Willard 49666ac5bc
fix SDV 1.5 compatibility with content packs that still load XNB maps 2021-01-20 22:13:12 -05:00
Jesse Plamondon-Willard 4d95030ee9
correct links 2021-01-20 09:31:18 -05:00
Jesse Plamondon-Willard 48f6857892
fix null handling in keybind list parsing (#744) 2021-01-20 01:22:29 -05:00
Jesse Plamondon-Willard 587d60495e
add unit tests for KeybindList (#744) 2021-01-20 01:02:49 -05:00
Jesse Plamondon-Willard e40483aab1
add method to suppress active keybindings (#744) 2021-01-19 23:50:46 -05:00
Jesse Plamondon-Willard f251f0d06c
make buttonState.IsDown() extension public (#744) 2021-01-19 23:14:03 -05:00
Jesse Plamondon-Willard 7e90b1c60a
add shortcut method to create a keybind list for a single default keybind (#744) 2021-01-19 21:47:31 -05:00
Jesse Plamondon-Willard 7e280a066d
add Input.ButtonsChanged event (#744) 2021-01-19 21:47:05 -05:00
Jesse Plamondon-Willard ff16a6567b
add multi-key binding API (#744) 2021-01-19 21:20:25 -05:00
Jesse Plamondon-Willard 5676d94fe6
reset some missed map cache fields (#751) 2021-01-19 01:05:15 -05:00
Jesse Plamondon-Willard 00e545715d
reset map overrides when reloading a map (#751) 2021-01-18 23:19:34 -05:00
Jesse Plamondon-Willard 9fb6d67417
add asset propagation for Strings\StringsFromCSFiles 2021-01-18 18:52:31 -05:00
Jesse Plamondon-Willard 47df90f67c
merge sections in asset propagator 2021-01-18 18:19:46 -05:00
Jesse Plamondon-Willard bc71f994ec
improve game path detection 2021-01-17 15:11:45 -05:00
Jesse Plamondon-Willard cfe2c3975f
prefer GOG/Steam registry paths when scanning for game folder 2021-01-17 15:06:04 -05:00
Jesse Plamondon-Willard 516b2fc010
don't send multiplayer broadcasts to players without SMAPI 2021-01-17 14:57:41 -05:00
Jesse Plamondon-Willard b58d432a22
subclass chatbox to log game errors 2021-01-17 12:21:33 -05:00
Jesse Plamondon-Willard a5ba931770
improve JSON validator schema for manifest update keys 2021-01-15 21:18:15 -05:00
Jesse Plamondon-Willard 1b52adb4fb
fix build order for new ErrorHandler project 2021-01-15 18:48:32 -05:00
Jesse Plamondon-Willard 56ca0f5e81
add split-screen info to multiplayer peer 2021-01-15 18:48:32 -05:00
Jesse Plamondon-Willard 812251e7ae
allow getting all active values from a PerScreen<T> field 2021-01-15 18:48:31 -05:00
Jesse Plamondon-Willard a9b99c1206
allow resetting a PerScreen<T> field 2021-01-15 18:48:31 -05:00
Jesse Plamondon-Willard 95ad954fa4
allow get/setting PerScreen<T> values by screen ID 2021-01-15 18:48:30 -05:00
Jesse Plamondon-Willard 70edec6567
add detailed message for game error when parsing an item text description 2021-01-15 18:48:30 -05:00
Jesse Plamondon-Willard 666f7ad8f9
tweak recent changes, update release notes 2021-01-15 18:48:29 -05:00
David Camp f945349ed4
(feat) Disable Mod rewrites if requested 2021-01-15 18:48:29 -05:00
Jesse Plamondon-Willard 8a475b3579
move error-handling Harmony patches into a new Error Handler bundled mod 2021-01-15 18:48:29 -05:00
Jesse Plamondon-Willard 5953fc3bd0
Merge branch 'develop' into stable 2021-01-15 18:34:05 -05:00
Jesse Plamondon-Willard 415047bf8e
prepare for release 2021-01-15 18:33:52 -05:00
Jesse Plamondon-Willard 5db9b049a6
update for draw code changes in SDV 1.5.3 2021-01-15 18:30:59 -05:00
Jesse Plamondon-Willard de789fb3e8
fix semantic version comparison returning wrong value in rare cases 2021-01-15 18:21:28 -05:00
Jesse Plamondon-Willard d31370b1d7
group mods in solution 2021-01-15 18:20:31 -05:00
Jesse Plamondon-Willard d47d850753
tuck location map reload into method (#751) 2021-01-12 20:00:40 -05:00
Jesse Plamondon-Willard aab4ddf05e
fix title screen music not stopping after save is loaded 2021-01-10 13:12:34 -05:00
Jesse Plamondon-Willard bdb7b04b3e
Merge branch 'develop' into stable 2021-01-08 21:18:15 -05:00
Jesse Plamondon-Willard df25368300
prepare for release 2021-01-08 21:01:17 -05:00
Jesse Plamondon-Willard d100681be7
update for draw changes in SDV 1.5.2 2021-01-08 20:48:15 -05:00
Jesse Plamondon-Willard c6b40fb591
add more helpful `help` command output 2021-01-07 00:05:27 -05:00
Jesse Plamondon-Willard 51de495ae4
add a way to send console commands to a specific screen 2021-01-06 23:43:48 -05:00
Jesse Plamondon-Willard d5b00bec84
simplify tilesheet order warning 2021-01-06 02:14:44 -05:00
Jesse Plamondon-Willard a179466e6b
remove experimental performance counters
Unfortunately this impacted SMAPI's memory usage and the data was often misinterpreted by players.
2021-01-06 00:44:24 -05:00
Jesse Plamondon-Willard c5be446701
rework vanilla tilesheet checking to avoid keeping a copy of the vanilla maps in memory 2021-01-06 00:29:39 -05:00
Jesse Plamondon-Willard 04c6733ada
Merge branch 'develop' into stable 2021-01-03 14:31:27 -05:00
Jesse Plamondon-Willard 2b3f0506a1
prepare for release 2021-01-03 14:31:10 -05:00
Jesse Plamondon-Willard 8b9fc0dce7
update compatibility list 2021-01-02 22:25:10 -05:00
Jesse Plamondon-Willard 397f338394
detect and block map replacements that would crash the game due to tilesheet changes 2021-01-02 22:24:45 -05:00
Jesse Plamondon-Willard 68bcf28e6c
update error text linking to renamed wiki section 2021-01-02 18:22:30 -05:00
Jesse Plamondon-Willard 76e08fc58b
detect flatpak Steam install paths (#739) 2021-01-02 15:49:25 -05:00
Jesse Plamondon-Willard 456480ef91
fix cursor position incorrectly handling UI mode (#741) 2021-01-02 15:02:58 -05:00
Jesse Plamondon-Willard 251ee2121a
fix players in split-screen mode sharing peer state (#747) 2021-01-02 12:33:19 -05:00
Jesse Plamondon-Willard 0fdb09f5f9
fix network messages not using same JSON serializer settings (#745) 2021-01-01 11:51:57 -05:00
Jesse Plamondon-Willard f95292953f
fix repeated mods in 'skipped mods' section of console 2020-12-30 19:38:48 -05:00
Jesse Plamondon-Willard fd37253dc3
update compatibility list 2020-12-30 00:26:39 -05:00
Jesse Plamondon-Willard 847826198f
add status reason details to past mods, clean out some old blacklist entries 2020-12-30 00:25:32 -05:00
Jesse Plamondon-Willard 06c7e4e2b9
show details in TRACE logs when a mod is blocked by compatibility list 2020-12-29 23:58:54 -05:00
Jesse Plamondon-Willard 48bb1581a6
Merge branch 'develop' into stable 2020-12-26 11:22:45 -05:00
Jesse Plamondon-Willard 5ac46b7ab2
prepare for release 2020-12-26 11:22:09 -05:00
Jesse Plamondon-Willard 5cc069476e
deprecate ConsoleCommands.Trigger method 2020-12-26 11:20:47 -05:00
Jesse Plamondon-Willard 8895021696
rewrite migration to avoid repeating game checks 2020-12-26 10:41:39 -05:00
Jesse Plamondon-Willard 49c192fc47
detect & fix broken community center bundles 2020-12-26 02:08:53 -05:00
Jesse Plamondon-Willard 5a8a684e22
add apply_save_fix command 2020-12-26 01:30:27 -05:00
Jesse Plamondon-Willard 2406380495
fix SMAPI using a cached translation when the game asks for an untranslated asset
This mainly affects community center bundles in Stardew Valley 1.5,
2020-12-26 01:28:00 -05:00
Jesse Plamondon-Willard 9215f89825
fix edge cases in SMAPI log parsing (#743) 2020-12-23 21:38:19 -05:00
Jesse Plamondon-Willard 63111621c9
fix world events not raised for volcano levels 2020-12-23 19:11:41 -05:00
Jesse Plamondon-Willard bbf2c3b020
link to 3.8 release highlights 2020-12-21 15:14:18 -05:00
Jesse Plamondon-Willard 71284e7176
Merge branch 'develop' into stable 2020-12-21 12:25:27 -05:00
Jesse Plamondon-Willard 872a1d5627
prepare for release 2020-12-21 12:24:43 -05:00
Jesse Plamondon-Willard 77002d3e99
Merge branch 'stardew-valley-1.5' into develop
# Conflicts:
#	docs/release-notes.md
2020-12-20 22:35:58 -05:00
Jesse Plamondon-Willard 5e2f6f565d
update mod compatibility list 2020-12-20 22:35:02 -05:00
Jesse Plamondon-Willard 93f00b115e
add mod rewriters for SDV 1.5 2020-12-20 22:35:02 -05:00
Jesse Plamondon-Willard 1e8a07e333
update for debug log changes 2020-12-20 22:35:02 -05:00
Jesse Plamondon-Willard fb244dc936
update for location furniture changes 2020-12-20 22:35:01 -05:00
Jesse Plamondon-Willard 1870336f4c
update for item changes 2020-12-20 22:35:01 -05:00
Jesse Plamondon-Willard 8d29899182
update for new save naming logic 2020-12-20 22:35:01 -05:00
Jesse Plamondon-Willard 7268cae65c
update for localized asset changes 2020-12-20 22:35:00 -05:00
Jesse Plamondon-Willard ff167e6838
update for map tilesheet changes 2020-12-20 22:35:00 -05:00
Jesse Plamondon-Willard ffe74869ca
update patches and asset propagation 2020-12-20 22:34:59 -05:00
Jesse Plamondon-Willard 85cb824c3b
update for draw changes
That includes child menus, UI draw mode, and UI scaling.
2020-12-20 22:34:59 -05:00
Jesse Plamondon-Willard 2e8c7e06c5
update for split-screen mode
This includes splitting GameRunner (the main game instance) from Game1 (now a per-screen game state), adding a PerScreen<T> utility to simplify per-screen values, adding separate per-screen input handling and events, adding new Context fields for split-screen, and logging the screen ID in split-screen mode to distinguish log entries.
2020-12-20 22:34:59 -05:00
Jesse Plamondon-Willard 50a146d1c9
update game version 2020-12-20 22:34:58 -05:00
Jesse Plamondon-Willard 1c70736c00
clarify not-a-mod error when SMAPI installer is in mods folder 2020-12-08 08:23:16 -05:00
Jesse Plamondon-Willard 1e2000126d
update schema for Content Patcher 1.19 2020-12-05 12:49:06 -05:00
Jesse Plamondon-Willard c627348c25
let players specify game path by running the installer from within it 2020-11-23 18:20:52 -05:00
Jesse Plamondon-Willard 85b947dced
Merge branch 'develop' into stable 2020-11-21 14:10:09 -05:00
Jesse Plamondon-Willard a0cb83ed40
prepare for release 2020-11-21 14:08:04 -05:00
Jesse Plamondon-Willard cfdf783c2d
split older release notes into a separate file 2020-11-21 14:04:58 -05:00
Jesse Plamondon-Willard 8a66532e74
update to TMXTile 1.5.8 2020-11-21 12:40:44 -05:00
Jesse Plamondon-Willard 91289de74f
update internal dependencies 2020-11-17 19:09:55 -05:00
Jesse Plamondon-Willard 03506fc72a
update to TMXTile 1.5.7 2020-11-17 19:09:00 -05:00
Jesse Plamondon-Willard 947d4545b1
fix 'collection was modified' error when using 'harmony summary' command in rare cases 2020-11-10 20:11:52 -05:00
Jesse Plamondon-Willard ec84ba07cc
apply fish pond rules for roe spawning 2020-10-30 20:46:46 -04:00
Jesse Plamondon-Willard 90f49af275
reduce brace warning level 2020-10-28 18:21:48 -04:00
Jesse Plamondon-Willard 2831b1e75a
add SearchableItem copy constructor
This is for convenience in mods which copy this code; SMAPI itself doesn't use it.
2020-10-28 18:21:33 -04:00
Jesse Plamondon-Willard 295c34d5cd
fix a captured loop variable 2020-10-28 18:20:41 -04:00
Jesse Plamondon-Willard f9f3db7db0
add character-customization-only shirts to item repo 2020-10-24 18:28:43 -04:00
Jesse Plamondon-Willard 7c652b0924
update item repo to allow creating instances later 2020-10-24 18:26:41 -04:00
ZaneYork 855d427d3b Bug fix 2020-10-19 11:07:00 +08:00
ZaneYork 5702bd335d Merge branch 'stable' of https://github.com/Pathoschild/SMAPI into develop
 Conflicts:
	src/SMAPI/Constants.cs
2020-10-19 10:27:57 +08:00
ZaneYork e6933110a5 Minor fix 2020-10-19 10:25:35 +08:00
Jesse Plamondon-Willard 70cf63c907
use update URL from server instead of hardcoding it 2020-10-18 15:33:27 -04:00
Jesse Plamondon-Willard 1cac389284
fix error in heuristic rewriting 2020-10-17 22:03:43 -04:00
Jesse Plamondon-Willard e20d26adcf
Merge branch 'develop' into stable 2020-10-16 20:14:35 -04:00
Jesse Plamondon-Willard 4aecc2aaba
prepare for release 2020-10-16 20:09:03 -04:00
Jesse Plamondon-Willard 534142009d
reapply the game's town map changes in asset propagation 2020-10-16 17:42:13 -04:00
ZaneYork 1df011accb Merge branch 'stable' of https://github.com/Pathoschild/SMAPI into develop
 Conflicts:
	src/SMAPI.Tests/SMAPI.Tests.csproj
	src/SMAPI.sln
	src/SMAPI/Constants.cs
2020-10-09 10:13:17 +08:00
Jesse Plamondon-Willard c87cd3b002
Merge branch 'develop' into stable 2020-10-03 20:49:03 -04:00
Jesse Plamondon-Willard 68e9733a85
prepare for release 2020-10-03 20:27:29 -04:00
Jesse Plamondon-Willard d8f5e0bdf2
update dependencies 2020-10-03 20:24:54 -04:00
Jesse Plamondon-Willard 6e7ebc0097
fix typo in CP schema 2020-10-03 10:55:00 -04:00
ZaneYork 867c013771 Bump version and minor fix 2020-10-02 17:16:10 +08:00
ZaneYork 52dbb52b0d Fix the bug of accessibility rewriter 2020-10-02 16:40:18 +08:00
ZaneYork 82d19fa84a 1. Legacy support for SDV version before 1.4.5.137 2020-09-30 10:27:56 +08:00
ZaneYork 304e08965b 1. Bug fix 2020-09-29 17:17:54 +08:00
Jesse Plamondon-Willard 5c733af747
fix update-check error for Chucklefish mods due to site change 2020-09-27 13:23:48 -04:00
Jesse Plamondon-Willard 4eff88fe73
fix error in case-insensitive content pack code when mod passes in a null path 2020-09-24 19:41:36 -04:00
Jesse Plamondon-Willard 9edd3b901a
prepare mod build package for release 2020-09-23 20:38:01 -04:00
Jesse Plamondon-Willard 947d9c87e0
add SMAPI-ModTranslationClassBuilder files to mod build config ignore list 2020-09-23 20:33:38 -04:00
Jesse Plamondon-Willard 819b796e8d
streamline mod build config package creation 2020-09-23 20:32:21 -04:00
Jesse Plamondon-Willard 05727acb9b
fix reference to nonexistent field
It's not really needed anyway, since managed threads will end when SMAPI exits.
2020-09-22 18:40:07 -04:00
Jesse Plamondon-Willard b5573a9331
update release notes, format code 2020-09-22 18:27:08 -04:00
Jesse Plamondon-Willard 64d4e1d3da
Merge pull request #734 from millerscout/feature/performanceTuning
Improve performance of exit handler
2020-09-22 18:24:02 -04:00
Marcos Miller Dantas d5c98bf2df Performance tuning
on an old laptop i've noticed that the thread was consuming alot of resources.
2020-09-22 19:07:40 -03:00
ZaneYork d43d783acc 1. General rewriter for missing reference
2. Fix for TMX Loader
2020-09-22 21:27:55 +08:00
Jesse Plamondon-Willard e0b3f97f9e
fix asset propagation for Data\MoviesReactions 2020-09-19 12:46:32 -04:00
Jesse Plamondon-Willard 01c2824b5c
update JSON schema for Content Patcher 1.18 2020-09-18 21:16:22 -04:00
Jesse Plamondon-Willard 00fee3ff43
Merge pull request #731 from Platonymous/patch-1
Allow for negative values in Rectangle
2020-09-17 19:21:04 -04:00
David daa6ad3b95
Allow for negative values in Rectangle 2020-09-17 23:50:30 +02:00
ZaneYork db5a742756 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into develop
 Conflicts:
	src/SMAPI/Constants.cs
2020-09-17 10:23:39 +08:00
ZaneYork d284caf459 1. Toggle with hardware key feature
2. Bug fix
2020-09-17 10:21:48 +08:00
Jesse Plamondon-Willard de84adb477
Merge branch 'develop' into stable 2020-09-16 21:33:53 -04:00
Jesse Plamondon-Willard 59974c18a6
prepare for release 2020-09-16 21:32:45 -04:00
ZaneYork 7eb1b9e372 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into develop
 Conflicts:
	src/SMAPI/Framework/SCore.cs
2020-09-17 09:10:01 +08:00
Jesse Plamondon-Willard 5a10cf3506
fix error when a mod rewrite adds instructions that break a short jump 2020-09-16 18:03:25 -04:00
Jesse Plamondon-Willard f06b4dd610
fix conflict with PyTK's map display device 2020-09-16 17:35:25 -04:00
Jesse Plamondon-Willard 436eb95a86
fix typo in error messages 2020-09-16 17:26:20 -04:00
ZaneYork 675b9886d5 Fix short form jump issue, minor fix 2020-09-16 20:10:15 +08:00
ZaneYork d80028e8a8 Fix short form jump issue 2020-09-16 18:05:12 +08:00
Jesse Plamondon-Willard 57bc71c7eb
make IContentPack file paths case-insensitive 2020-09-15 17:34:14 -04:00
ZaneYork 62d90ab7e0 Merge branch 'stable' of https://github.com/Pathoschild/SMAPI into develop
 Conflicts:
	src/SMAPI/Constants.cs
	src/SMAPI/Framework/SGame.cs
	src/SMAPI/Metadata/CoreAssetPropagator.cs
2020-09-14 20:55:56 +08:00
Jesse Plamondon-Willard 4189e2f3fa
add support for renewing uploaded JSON/log files 2020-09-13 11:59:17 -04:00
Jesse Plamondon-Willard 98dbc68396
add column guidelines in markdown files 2020-09-12 22:39:40 -04:00
Jesse Plamondon-Willard 44e91ca5e1
Merge branch 'develop' into stable 2020-09-11 17:38:20 -04:00
Jesse Plamondon-Willard 39b9f363db
prepare for release 2020-09-11 17:38:04 -04:00
Jesse Plamondon-Willard 0b6b9b3766
fix default mods folder path in build package 2020-09-11 17:36:02 -04:00
Jesse Plamondon-Willard 1abc76a224
improve logging in mod build package 2020-09-11 17:25:38 -04:00
Jesse Plamondon-Willard 5433f9023e
Merge branch 'develop' into stable 2020-09-08 18:17:09 -04:00
Jesse Plamondon-Willard d53e033163
prepare for release 2020-09-08 18:16:41 -04:00
Jesse Plamondon-Willard 8a319e94c8
delete redundant unit tests 2020-09-08 18:14:04 -04:00
Jesse Plamondon-Willard 7580f87029
rename PathUtilities.NormalizePathSeparator, add normalization for more cases 2020-09-08 18:12:57 -04:00
Jesse Plamondon-Willard 8a51279ce9
Merge branch 'develop' into stable 2020-09-08 00:16:13 -04:00
Jesse Plamondon-Willard 1b5e7da184
prepare for release 2020-09-08 00:15:27 -04:00
Jesse Plamondon-Willard 398c7d66cb
fix input handling issues in SMAPI 3.7
This commit reverses one of the input handling changes in 3.7 to fix...

* input being handled twice in some cases (e.g. a left-click to drop a shop item with Better Shop Menu would instantly sell it);
* an issue where Harvest With Scythe would cause the player to skid forward more than usual when scything crops;
* possibly other reported issues including gamepad input lag.
2020-09-08 00:10:24 -04:00
Jesse Plamondon-Willard 5e43bdbf5c
Merge branch 'develop' into stable 2020-09-07 13:06:27 -04:00
Jesse Plamondon-Willard f9fac11028
Add 'release highlights' links to release notes 2020-09-07 13:05:34 -04:00
Jesse Plamondon-Willard 2022836b81
prepare for release 2020-09-06 20:59:19 -04:00
Jesse Plamondon-Willard 0b21357e37
fix asset propagation for title menu buttons 2020-09-06 16:40:32 -04:00
Jesse Plamondon-Willard a627453309
move title menu asset propagation into method 2020-09-06 16:39:47 -04:00
Jesse Plamondon-Willard d7209e438d
fix code docs 2020-09-05 20:08:01 -04:00
Jesse Plamondon-Willard 55cd31f4f7
minor cleanup 2020-09-05 15:41:21 -04:00
Jesse Plamondon-Willard 4f3d7eaafc
make PathUtilities available to mods 2020-09-05 15:00:38 -04:00
Jesse Plamondon-Willard a9ec5a6e91
copyedit package readme 2020-09-05 14:55:40 -04:00
Jesse Plamondon-Willard be1df8e705
simplify path separator normalization
It no longer tries to clean up the path (e.g. "path/to///file/" => "path/to/file"), which means it can more intuitively handle cases like this:
     asset.AssetName.StartsWith(PathUtilities.NormalizePathSeparators("Characters/Dialogue/"))
2020-09-05 14:51:52 -04:00
Jesse Plamondon-Willard 5d1c77884f
add unit tests for PathUtilities, fix some edge cases 2020-09-05 13:37:40 -04:00
Jesse Plamondon-Willard 9ff6126a66
add dates to package release notes, add missing notes 2020-09-05 11:31:15 -04:00
Jesse Plamondon-Willard 220f3bc578
set max game version to prepare for upcoming SDV 1.5 update 2020-09-05 00:51:32 -04:00
Jesse Plamondon-Willard 4ce572fca6
add mod build package option to change the Mods path 2020-09-05 00:14:13 -04:00
Jesse Plamondon-Willard e40e8dd42b
reorganize mod build package readme for readability 2020-09-04 23:40:16 -04:00
Jesse Plamondon-Willard 4088f4cb2b
simplify error shown for duplicate mods 2020-09-04 22:02:59 -04:00
Jesse Plamondon-Willard f57feb7319
extend game's input logic instead of replacing it 2020-09-04 20:56:27 -04:00
ZaneYork b9bc502f40 Bug fix 2020-09-02 11:26:02 +08:00
Jesse Plamondon-Willard 685d56894f
switch SGame back to callbacks
Callbacks are simpler and more efficient in this case.
2020-08-31 20:43:03 -04:00
ZaneYork 1bb82139ed Bug fix 2020-08-31 16:44:48 +08:00
ZaneYork 1195928c19 Minor fix 2020-08-31 15:41:13 +08:00
ZaneYork f5eaf8d27a Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into develop
 Conflicts:
	src/SMAPI/Framework/SCore.cs
2020-08-31 15:19:18 +08:00
ZaneYork cd087e9f57 HeuristicFieldAccessibilityRewriter and bug fix 2020-08-31 15:13:05 +08:00
Jesse Plamondon-Willard 828be405e1
use inheritdoc 2020-08-30 22:53:19 -04:00
Zane.Y e296d1d807
Merge pull request #1 from Pathoschild/android-tweaks
Slightly reduce changes from origin, fix menu changes logged twice
2020-08-30 06:52:02 -05:00
Jesse Plamondon-Willard 9edff95dd5
minor tweaks to reduce changes from origin 2020-08-29 23:10:29 -04:00
Jesse Plamondon-Willard 3a4606164c
tweaks to reduce differences in Android port 2020-08-29 23:06:52 -04:00
Jesse Plamondon-Willard a13c994e8b
format code 2020-08-29 23:06:08 -04:00
Jesse Plamondon-Willard 097df9076d
fix build error on Linux/Mac 2020-08-29 23:04:25 -04:00
Jesse Plamondon-Willard a1e1b7d103
fix map tile rotation broken when you return to title 2020-08-28 20:03:12 -04:00
ZaneYork 4b53ee366b Bug fix 2020-08-27 21:24:00 +08:00
ZaneYork 626e028b69 Reduce difference between PC and mobile version 2020-08-27 17:41:45 +08:00
ZaneYork c84e4d078f Minor fix 2020-08-27 15:58:41 +08:00
ZaneYork 20802f7ad9 Remove method rewrite not needed anymore 2020-08-27 14:38:31 +08:00
ZaneYork 0b4ea4a22a Remove method rewrite(implemented by HeuristicMethodRewriter) 2020-08-27 14:38:26 +08:00
ZaneYork dc85fd99b8 Add conditional compilation symbols to switch code between desktop and mobile platform 2020-08-27 14:38:20 +08:00
ZaneYork 21205e0fdd Make patch logic more clearly 2020-08-27 14:38:01 +08:00
ZaneYork 468b88fa85 Migrate to Harmony2 2020-08-27 14:37:45 +08:00
ZaneYork 872e463d92 Fix dialog issue 2020-08-27 14:37:28 +08:00
ZaneYork 1ce930f55e Handler of save load error. 2020-08-27 14:37:13 +08:00
ZaneYork bac63a5099 Using rider as IDE and select VS2015 build tools 2020-08-27 14:37:06 +08:00
ZaneYork c5c0b21f7d 1.Compatibility fix, for ChestInventoryChangedEvent
2.Add disable MonoMod settings(for Android version that not support it)
3.Add log file size settings
2020-08-27 14:36:53 +08:00
ZaneYork ad25186847 1.Compatibility fix
2.Update SMAPI to 3.4.1.5
3.Compatible with some of device of Android L
2020-08-27 14:36:25 +08:00
ZaneYork 4597aea163 Compatibility improvement, bug fix 2020-08-27 14:35:44 +08:00
ZaneYork 7472853d6b Compatibility fix for mods with input box 2020-08-27 14:34:22 +08:00
ZaneYork 9de08f81b1 Bug fix,for Immersive Farm 2 Remastered 2020-08-27 14:34:13 +08:00
ZaneYork 85179c7e97 1.Compatibility fix
2.Fix potential error on rewriter.
3.Update virtual keyboard for upcoming SMAPI3.4 feature
2020-08-27 14:34:08 +08:00
ZaneYork a60dde2f43 1.Fix crash bug
2.Adapt to latest logic
2020-08-27 14:33:58 +08:00
yangzhi d20de32f66 1.Render logic sync
2.Improve crash report logic
2020-08-27 14:33:48 +08:00
yangzhi 5449a1fe3d Redirect bug report to our account. 2020-08-27 14:33:39 +08:00
yangzhi 0a7adf2c42 Update for 1.4.5.138, rewrite for it isSnowing field, draw logic sync 2020-08-27 14:32:34 +08:00
yangzhi f6b31a0ec7 Rewrite for AnimalQueryMenu 2020-08-27 14:32:23 +08:00
yangzhi 02e2de3ce6 Remove Linq patch,which may cause some error 2020-08-27 14:32:10 +08:00
yangzhi 6e788d91b0 Rewrites 2020-08-27 14:32:07 +08:00
yangzhi f3bd259707 Compatibility improvement. 2020-08-27 14:32:04 +08:00
yangzhi 304885a101 1.Fix isRaining and isDebrisWeather.
2.Fix a critical error of SpriteTextMethods.getWidthOfString (infinite self recursion)
2020-08-27 14:31:58 +08:00
yangzhi e753f87626 1.More rewrites.
2,Give detailed message when mod's assemblies can't load.
2020-08-27 14:31:51 +08:00
yangzhi e5fb317220 Update to latest 1.4.5.136 game version 2020-08-27 14:31:14 +08:00
yangzhi 297cadb252 Fix for the bug? of MonoMod( Patch a specified generic method but all type of these method was patched) 2020-08-27 14:30:49 +08:00
yangzhi 135a0f4798 1.Fix for Ldtoken IL
2.Fix shop menu list logic for Json Assets
3.Some method rewrite for compatibility
2020-08-27 14:30:46 +08:00
yangzhi bdad516ee5 SpriteText.drawStringWithScrollBackground rewrite 2020-08-27 14:30:42 +08:00
yangzhi 54516557cd Rewrite for missing Utility.getRandomItemFromSeason method 2020-08-27 14:30:34 +08:00
yangzhi 5d25997570 1.CraftingPage to CraftingPageMobile rewriter, which made Custom Farming Redux Mod works
2.Fix TypeReferenceRewriter's BUG,which didn't support isinst IL.
3.SpriteFont.MeasureString bug fix,some stupid game code pass null to this method and crash down.
2020-08-27 14:30:28 +08:00
yangzhi a6c76a1e28 Fix for BetterJunimos and Chest.items null exception 2020-08-27 14:30:08 +08:00
yangzhi 36e1c40f56 Modify TypeFieldToAnotherTypeMethodRewriter to TypeFieldToAnotherTypePropertyRewriter, make it supports stsfld and stsfld IL. 2020-08-27 14:29:56 +08:00
yangzhi 416f5a6211 TypeFieldToAnotherTypeMethodRewriter, a much more flexible choice to deal with fields changes 2020-08-27 14:29:38 +08:00
yangzhi 68e4d5803e Adapt to 1.4.4.128 game version, onScreenMenus rewrite bug fix, PropertyToFieldRewriter 2020-08-27 14:29:33 +08:00
yangzhi 60b4a4de46 Modify TypeFieldToAnotherTypeMethodRewriter to TypeFieldToAnotherTypePropertyRewriter, make it supports stsfld and stsfld IL. 2020-08-27 14:29:15 +08:00
yangzhi 1bc88f2817 TypeFieldToAnotherTypeMethodRewriter, a much more flexible choice to deal with fields changes 2020-08-27 14:29:09 +08:00
yangzhi bc0cb5f5ed Adapt to 1.4.4.128 game version, onScreenMenus rewrite bug fix, PropertyToFieldRewriter 2020-08-27 14:29:04 +08:00
yangzhi d6d8a93edc Content 2020-08-27 14:28:59 +08:00
yangzhi a4a52d3092 Adapt project for vs2017(using vs2019 leads to an error 'Could not load type of field') 2020-08-27 14:28:47 +08:00
Chris 6a12013752 Add Utility Rewrites 2020-08-27 14:26:01 +08:00
Chris ca0d649148 Add IClickableMenu Rewrites 2020-08-27 14:26:01 +08:00
yangzhi 8b47ab571a Add scroll support for GameConsole, fix some compile error 2020-08-27 14:25:45 +08:00
Chris 8deff8408b Update to SMAPI 3.1 2020-08-27 14:25:16 +08:00
Chris 2d13819688 Added a warning message for mods that have new updates 2020-08-27 14:25:00 +08:00
Chris f683325480 Added template for quickly disabling Harmony 2020-08-27 14:25:00 +08:00
Chris f5f6499dde Some csproj changes 2020-08-27 14:24:44 +08:00
Jesse Plamondon-Willard fc56582e9a sync to match main repo in some cases 2020-08-27 14:24:32 +08:00
Chris 4fa0048b84 Add GamePlatform Android 2020-08-27 14:24:20 +08:00
Chris fc42ac55a1 Updates for Android 2.11.3 2020-08-27 14:24:02 +08:00
Chris 0e3c89aa02 Bump Version to 0.9.0 2020-08-27 14:23:20 +08:00
Chris de4555f90f Backport SMAPI 3.0 onLoadingFirstAsset to get mods loaded before the game starts 2020-08-27 14:21:59 +08:00
Chris b8bb721873 bump version to beta and hardcode platform for Android 2020-08-27 14:21:50 +08:00
Chris f524596879 Changes to the Should Trigger logic to support all devices 2020-08-27 14:21:31 +08:00
Chris 333f1a3f37 SGameConsole overlap fix, SGameConsole boot on app start, VK config added and bug fixes, HarmonyBridge.Init is open to all devices now. Commented out SMainActivity methods that I think get called twice. 2020-08-27 14:20:58 +08:00
Chris 00043ab756 Rewrites, added harmony patch, VK fix 2020-08-27 14:20:29 +08:00
Chris 5e2739672e Game Console, v0.86 2020-08-27 14:18:19 +08:00
Chris 1699ac5bd5 SMainActivity cleanup and Virtual Keyboard Reflection Fix 2020-08-27 14:10:01 +08:00
Chris c415b389f5 Virtual toggle 2020-08-27 14:10:00 +08:00
Chris aa2ff5bab9 Re-enable SMAPI Reflection checks and Updated SGame for Game loader Synching 2020-08-27 14:10:00 +08:00
Chris 91b1194901 Virtual Keyboard Mod + Updated SMainActivity, Some external Assembly references 2020-08-27 14:09:56 +08:00
Chris ec9894e973 Remove SMAPI folder 2020-08-27 14:09:39 +08:00
Chris 89f8be10b1 Upgrade 2020-08-27 14:08:41 +08:00
Chris 465ab19d42 android branch 2.11.2 Upgrade 2020-08-27 14:04:33 +08:00
ZaneYork 2860215391 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into android
 Conflicts:
	src/SMAPI/Metadata/InstructionMetadata.cs
2020-08-27 13:21:57 +08:00
ZaneYork 46f4058da9 Remove method rewrite not needed anymore 2020-08-27 11:37:33 +08:00
Jesse Plamondon-Willard e57fc0eb15
fix old comment 2020-08-26 23:27:32 -04:00
Jesse Plamondon-Willard 0bf692addc
add heuristic rewrite for field => const changes 2020-08-26 23:11:41 -04:00
ZaneYork d001d3b9a8 Minor fix 2020-08-27 11:06:07 +08:00
ZaneYork ac2eff81a5 Remove method rewrite(implemented by HeuristicMethodRewriter) 2020-08-27 10:53:51 +08:00
Jesse Plamondon-Willard 54e7fb7a0b
fix some broken field references not detected 2020-08-26 22:32:59 -04:00
ZaneYork 93135d61aa Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into android 2020-08-27 10:26:37 +08:00
ZaneYork a2cb256360 Add conditional compilation symbols to switch code between desktop and mobile platform 2020-08-27 10:24:24 +08:00
Jesse Plamondon-Willard d3c5fe0764
rename new heuristic rewriters for clarity 2020-08-26 22:14:25 -04:00
Jesse Plamondon-Willard 16161a214f
remove now-unused instruction replace callback 2020-08-26 21:55:08 -04:00
Jesse Plamondon-Willard fd6835555c
fix InvalidProgramException when replacing CIL instructions in some cases 2020-08-26 21:55:04 -04:00
ZaneYork 28ba6314a5 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into android
 Conflicts:
	src/SMAPI/Constants.cs
	src/SMAPI/Framework/Monitor.cs
	src/SMAPI/Framework/SCore.cs
	src/SMAPI/Framework/SGame.cs
	src/SMAPI/Program.cs
	src/SMAPI/Properties/AssemblyInfo.cs
	src/SMAPI/SMAPI.csproj
2020-08-26 15:40:42 +08:00
ZaneYork 6e2ace4fb7 Fix for MobileSpriteSheet patch support 2020-08-26 14:18:34 +08:00
Jesse Plamondon-Willard a4938fc465
tweak locale init so it doesn't depend on the game's internal load order 2020-08-25 23:13:55 -04:00
Jesse Plamondon-Willard ec4b81819a
use inheritdoc in rewriters 2020-08-25 22:59:08 -04:00
Jesse Plamondon-Willard abfe40bf69
fix some method references only partially rewritten
Thanks to Bepis on Discord for helping find the issue!
2020-08-25 22:49:00 -04:00
Jesse Plamondon-Willard b9a9fe36bb
fix missing-parameter rewriter not loading default values onto stack 2020-08-25 22:05:27 -04:00
Jesse Plamondon-Willard 915e6d22f1
minor tweaks 2020-08-24 22:23:02 -04:00
Jesse Plamondon-Willard 3a89040876
add rewriter for method references with missing optional parameters 2020-08-24 22:16:48 -04:00
Jesse Plamondon-Willard 1bd67baae1
support mapping fields to a different type in FieldReplaceRewriter 2020-08-24 21:39:50 -04:00
Jesse Plamondon-Willard 94b8262692
add heuristic field-to-property rewriter 2020-08-24 20:11:56 -04:00
Jesse Plamondon-Willard 046deb2d56
simplify console interception flow
The console interceptor now uses a marker in the string (instead of a state field) to track whether the message should intercepted. This makes each write more atomic, so it's less affected by multithreading in some cases.
2020-08-24 19:25:57 -04:00
Jesse Plamondon-Willard 46d63e11cc
switch to ILSpy for decompiled code 2020-08-24 18:35:51 -04:00
Jesse Plamondon-Willard 7f35e74ca1
fix object-disposed error 2020-08-23 22:11:11 -04:00
Jesse Plamondon-Willard c37280222d
minor cleanup 2020-08-23 20:53:09 -04:00
Jesse Plamondon-Willard 1ff4a0774e
remove unneeded access modifier 2020-08-23 19:00:46 -04:00
Jesse Plamondon-Willard 76c926c396
add EarlyConstants for constants needed before external DLLs are loaded 2020-08-23 18:51:01 -04:00
Jesse Plamondon-Willard 625c41c0ea
move file for upcoming change 2020-08-23 18:45:54 -04:00
Jesse Plamondon-Willard fd3bc77d81
centralise core SMAPI logic, decouple from Game1 where possible 2020-08-23 17:24:08 -04:00
Jesse Plamondon-Willard ad1b9a870b
move some console/logging logic out of SCore into a new LogManager 2020-08-23 14:22:27 -04:00
Jesse Plamondon-Willard cb37644291
move assembly attributes to match convention 2020-08-22 21:47:37 -04:00
Jesse Plamondon-Willard 58fd6c71a2
update release notes 2020-08-17 20:36:03 -04:00
Jesse Plamondon-Willard 92eff2519c
Merge pull request #729 from spacechase0/harmony-attribute-fix
Fix harmony attributes not working cross-platform
2020-08-17 20:34:14 -04:00
spacechase0 f012dae872 Fix harmony attributes not workign cross-platform 2020-08-17 20:28:51 -04:00
Jesse Plamondon-Willard 6afb80676b
fix CP validation for new 'Update' field 2020-08-16 23:01:19 -04:00
Jesse Plamondon-Willard d6dc1364be
update schema for Content Patcher 1.17 2020-08-16 11:28:13 -04:00
Jesse Plamondon-Willard 497192fab2
tweak update alert rules 2020-08-15 13:17:42 -04:00
Jesse Plamondon-Willard d6a830f7e8
fix broken URL in update alerts for unofficial versions 2020-08-15 13:05:32 -04:00
Jesse Plamondon-Willard 544919ad13
remove experimental RewriteInParallel option 2020-08-13 20:01:22 -04:00
Jesse Plamondon-Willard 48eb5e6be0
add support for read/writing SDate to JSON 2020-08-09 19:10:54 -04:00
Jesse Plamondon-Willard 066f1857a1
fix error when mods add/remove events asynchronously 2020-08-09 11:56:40 -04:00
Jesse Plamondon-Willard c03430ec7e
tweak release docs 2020-08-09 11:18:39 -04:00
ZaneYork 87b4f2fea8 update dependencies 2020-08-07 17:56:41 +08:00
ZaneYork 9f75690085 Merge branch 'stable' of https://github.com/Pathoschild/SMAPI into android
 Conflicts:
	src/SMAPI.Toolkit/SMAPI.Toolkit.csproj
	src/SMAPI/Framework/SCore.cs
	src/SMAPI/SMAPI.csproj
2020-08-05 10:02:01 +08:00
Jesse Plamondon-Willard e54a5d0569
update Content Patcher schema for 1.16 2020-08-03 22:35:51 -04:00
Jesse Plamondon-Willard 8da88b8fe5
Merge branch 'develop' into stable 2020-08-02 16:38:51 -04:00
Jesse Plamondon-Willard b96bcb2189
prepare for release 2020-08-02 16:38:02 -04:00
Jesse Plamondon-Willard 1cd55c34f0
fix compile error on Linux/Mac 2020-08-02 16:28:53 -04:00
Jesse Plamondon-Willard 849c6da9ca
update dependencies 2020-08-02 16:18:11 -04:00
Jesse Plamondon-Willard e96f4fb797
format new code, update release notes 2020-07-29 22:42:47 -04:00
Jesse Plamondon-Willard 778bcdfbe5
Merge pull request #728 from Spatterjaaay/terminals
avoid expanding arguments into quoted strings
2020-07-29 22:12:23 -04:00
Alena Messmer 1994eac81a avoid expanding arguments into quoted strings 2020-07-28 21:41:06 -07:00
Jesse Plamondon-Willard 7900a84bd6
use ordinal comparison/sorting instead of invariant 2020-07-26 02:50:20 -04:00
Jesse Plamondon-Willard ee4c88f601
log GPU info to simplify troubleshooting 2020-07-25 15:50:36 -04:00
Jesse Plamondon-Willard 6f9a1f1525
fix error when a mod adds/remove an event handler while handling the event 2020-07-21 13:57:28 -04:00
Jesse Plamondon-Willard 4b07e10520
ignore more content file types when detecting mods 2020-07-21 13:51:11 -04:00
Jesse Plamondon-Willard 4590b75bc3
add item repository fixes from CJB Cheats Menu code 2020-07-17 12:09:07 -04:00
Jesse Plamondon-Willard 16a37fc89f
fix other missing quotes 2020-07-05 19:38:51 -04:00
Jesse Plamondon-Willard f1e8e1eb8c
Merge pull request #727 from Jonqora/develop
Update smapi.targets so 0Harmony, MonoGame refs appear when intended
2020-07-05 19:34:39 -04:00
Ellen 02a9084301
Update smapi.targets so 0Harmony, MonoGame refs appear only when intended. 2020-07-05 03:15:14 -04:00
Jesse Plamondon-Willard 623684a3ad
update Content Patcher format version in schema 2020-07-04 12:59:03 -04:00
Jesse Plamondon-Willard 174f8cb24b
update release notes 2020-06-23 20:09:49 -04:00
Jesse Plamondon-Willard 35f15dfef3
Merge pull request #725 from jlaw/fix-misc-launcher
Update unix-launcher.sh
2020-06-23 20:04:42 -04:00
Jackson Law d561768246
Update unix-launcher.sh
$LAUNCHER does not evaluate when enclosed in single quotes. Changed to double quotes to run properly.
2020-06-22 22:36:59 -07:00
ZaneYork 41346a6160 Bug fix 2020-06-22 19:05:02 +08:00
ZaneYork 2bcee41151 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into harmony2
 Conflicts:
	src/SMAPI/Constants.cs
	src/SMAPI/Framework/SCore.cs
	src/SMAPI/SMAPI.csproj
2020-06-22 10:12:01 +08:00
Jesse Plamondon-Willard ba0dff819f
Merge branch 'develop' into stable 2020-06-21 11:39:37 -04:00
Jesse Plamondon-Willard 4f73fb5c33
prepare for release 2020-06-21 11:39:23 -04:00
Jesse Plamondon-Willard c8f7269966
fix event priority sorting 2020-06-21 11:36:35 -04:00
Jesse Plamondon-Willard e64ecc89f9
Merge branch 'develop' into stable 2020-06-20 12:43:08 -04:00
Jesse Plamondon-Willard cb9ff70199
prepare for release 2020-06-20 12:42:31 -04:00
Jesse Plamondon-Willard e9b8df4618
fix reload_i18n not reloading content pack translations 2020-06-20 12:29:08 -04:00
Jesse Plamondon-Willard 74defbfec6
remove special handling for SMAPI 3.6 beta 2020-06-20 12:08:57 -04:00
Jesse Plamondon-Willard ed3309e7bb
remember selected schema when editing a file 2020-06-20 11:36:22 -04:00
Jesse Plamondon-Willard d02a40de99
change default JSON validator schema to none 2020-06-20 11:31:01 -04:00
Jesse Plamondon-Willard b32cad4046
add i18n schema to JSON validator 2020-06-20 11:13:23 -04:00
Jesse Plamondon-Willard 067163da02
make parallel rewriting optional 2020-06-20 00:50:23 -04:00
Jesse Plamondon-Willard a9ca7dcdc0
tweak 3.6 release notes 2020-06-20 00:19:45 -04:00
Jesse Plamondon-Willard a7cf886b71
switch to custom build of Harmony 1.2.0.1 2020-06-20 00:13:23 -04:00
Jesse Plamondon-Willard aeab19f4ac
backport harmony_summary command to Harmony 1.x (#711) 2020-06-19 21:28:44 -04:00
ZaneYork db61312dc6 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into harmony2
 Conflicts:
	src/SMAPI.Installer/SMAPI.Installer.csproj
	src/SMAPI.Mods.ConsoleCommands/SMAPI.Mods.ConsoleCommands.csproj
	src/SMAPI.Mods.SaveBackup/SMAPI.Mods.SaveBackup.csproj
	src/SMAPI.Toolkit.CoreInterfaces/SMAPI.Toolkit.CoreInterfaces.csproj
	src/SMAPI.Toolkit/SMAPI.Toolkit.csproj
	src/SMAPI/SMAPI.csproj
2020-06-19 16:21:02 +08:00
Jesse Plamondon-Willard c41b92f721
improve new event code
This commit...
* debounces the has-custom-priorities check;
* fixes collection-modified-during-enumeration errors if an event handler is added or removed while the event is being raised;
* fixes Remove(handler) removing all instances of the handler instead of the last one.
2020-06-16 20:14:27 -04:00
Jesse Plamondon-Willard f63f14c703
fix typo 2020-06-16 18:53:29 -04:00
Jesse Plamondon-Willard dcd2c647a2
temporarily restore Harmony 1.x support with compile flag (#711) 2020-06-15 22:17:32 -04:00
Jesse Plamondon-Willard 6d1cd7d9b8
fix merge, update release notes 2020-06-15 22:14:17 -04:00
Jesse Plamondon-Willard e759332135
Merge pull request #723 from spacechase0/event-priority
Implement event priority attribute
2020-06-15 21:34:46 -04:00
Jesse Plamondon-Willard 02e7318d2b
merge inconsistent event raise methods 2020-06-15 19:08:02 -04:00
Jesse Plamondon-Willard da95a906bf
increase event priority range
This can be used in cases where more granular priority is needed.
2020-06-15 18:59:05 -04:00
Jesse Plamondon-Willard fc29fe918a
refactor & optimize event code a bit, drop old support for unknown event handlers 2020-06-15 18:58:05 -04:00
Chase W b395e92faa Implemented event priority attribute 2020-06-15 15:33:28 -04:00
Jesse Plamondon-Willard ff7b9a0251
update TMXTile 2020-06-14 23:30:35 -04:00
Jesse Plamondon-Willard 2d19095169
add support for using a custom Harmony build (#711) 2020-06-14 11:29:07 -04:00
Jesse Plamondon-Willard 79181012ee
tweak build files 2020-06-14 10:55:52 -04:00
ZaneYork ef854b288e Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into harmony2 2020-06-08 11:40:21 +08:00
Jesse Plamondon-Willard 8036bcdf00
improve premultiplication performance 2020-06-07 12:33:48 -04:00
ZaneYork 2c4090210f Merge branch 'develop' into harmony2 2020-06-05 14:25:18 +08:00
Jesse Plamondon-Willard 868eefb9a7
fix thread safety issue in new parallel rewriting 2020-06-04 21:08:12 -04:00
Jesse Plamondon-Willard 92aaf3fb8a
simplify parallel rewriting logic 2020-06-04 19:00:48 -04:00
Jesse Plamondon-Willard 74a8399b9c
Merge pull request #719 from ZaneYork/develop
Bug fix: Provide seed to Aggregate op
2020-06-04 18:56:27 -04:00
ZaneYork 2c9c4fbc65 Bug fix: Provide seed to Aggregate op(for Sequence contains no elements exception, all type was filtered by Where(type => type.BaseType != null) op) 2020-06-04 18:29:27 +08:00
ZaneYork 409e2f7c47 Merge branch 'develop' into harmony2 2020-06-04 13:18:47 +08:00
Jesse Plamondon-Willard 43a9ee42aa
don't prevent mods from accessing game methods/properties extended by SMAPI 2020-06-03 19:02:24 -04:00
Jesse Plamondon-Willard 80f882baf3
stop rewriting module at first error 2020-06-03 18:58:04 -04:00
Jesse Plamondon-Willard 8c4edc2765
tweak new code, add release note (#718) 2020-06-03 18:52:16 -04:00
Jesse Plamondon-Willard cfc7233a06
Merge pull request #718 from ZaneYork/develop
Parallel exception aggregate fix
2020-06-03 18:48:32 -04:00
ZaneYork 03b711a465 Merge branch 'develop' into harmony2 2020-06-03 11:46:27 +08:00
ZaneYork 9b41397a01 Remove take while op(does not return first none matched item) 2020-06-03 11:43:13 +08:00
ZaneYork b2464dfb01 Merge branch 'develop' into harmony2 2020-06-03 10:59:59 +08:00
ZaneYork 6b4e52febb Parallel exception aggregate fix 2020-06-03 10:56:31 +08:00
Jesse Plamondon-Willard 73e3735dcd
undo parallel loop (#716)
This caused errors during rewriting to be obfuscated with null reference exceptions.
2020-06-02 22:05:00 -04:00
Jesse Plamondon-Willard 6f4063cd86
add release note (#716) 2020-06-02 17:52:54 -04:00
Jesse Plamondon-Willard 23c6ef01c1
Merge pull request #716 from ZaneYork/develop
Rewrite code with multithreading support
2020-06-02 17:49:00 -04:00
ZaneYork 91415cbb5b Merge branch 'develop' into harmony2
# Conflicts:
#	src/SMAPI/SMAPI.csproj
2020-06-02 18:54:27 +08:00
ZaneYork 4fad1f8c0c 1.Multithread rewrite 2020-06-02 18:53:09 +08:00
ZaneYork 2353093611 1.Remove TypeFieldToAnotherTypeFieldRewriter(cannot work around with some of complex situation) 2020-06-02 18:50:33 +08:00
ZaneYork 4a29cceca7 Make patch logic more clearly 2020-06-01 18:22:47 +08:00
Jesse Plamondon-Willard 10367a3eae
update TMXTile to fix void map issue on Android 2020-05-31 17:41:17 -04:00
ZaneYork aac5f74f40 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into harmony2 2020-05-31 20:13:42 +08:00
ZaneYork 5ee6d5b685 Remove MonoMod dependency 2020-05-31 20:09:57 +08:00
Jesse Plamondon-Willard 7bbbef7687
simplify harmony_search output, tweak SMAPI's Harmony ID 2020-05-30 22:45:43 -04:00
Jesse Plamondon-Willard 5be3f14bf1
Merge pull request #715 from ZaneYork/develop
Bug fix: make it possible for multi patch
2020-05-29 21:27:00 -04:00
ZaneYork bd9c1dfcfe Migrate patches to Harmony2.0 2020-05-29 15:28:54 +08:00
ZaneYork 14e6521e7c Migrate patches to Harmony2.0 2020-05-29 14:48:33 +08:00
ZaneYork f817039a3a Bug fix: make it possible for multi patch(When one patch replace an instruction, another patch didn't aware it due to the variable capture) 2020-05-29 14:25:01 +08:00
ZaneYork c67506cd69 Migrate to Harmony2 2020-05-29 14:12:08 +08:00
ZaneYork 797a8e5485 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI into harmony2
 Conflicts:
	src/SMAPI.Toolkit/SMAPI.Toolkit.csproj
	src/SMAPI.sln
	src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
	src/SMAPI/Framework/ModLoading/Finders/TypeFinder.cs
	src/SMAPI/Framework/ModLoading/Framework/RewriteHelper.cs
	src/SMAPI/Framework/Patching/GamePatcher.cs
	src/SMAPI/Framework/SGame.cs
	src/SMAPI/SMAPI.csproj
2020-05-28 18:32:28 +08:00
ZaneYork 0a71d140d5 3.5.0.1 2020-05-28 09:32:56 +08:00
ZaneYork a85acf797f Fix dialog issue 2020-05-27 17:15:15 +08:00
Jesse Plamondon-Willard 01b6e4ac32
fix BadImageFormatException error handling
Thanks to mouse for pointing it out!
2020-05-27 00:44:26 -04:00
Jesse Plamondon-Willard d9c2d242b9
add update key overrides 2020-05-24 16:39:56 -04:00
Jesse Plamondon-Willard ea96fdf541
update ModDrop URLs 2020-05-24 14:35:16 -04:00
Jesse Plamondon-Willard bb9cde8f2e
ignore MacOS files starting with ._ 2020-05-24 00:31:15 -04:00
Jesse Plamondon-Willard d97b11060c
add update subkeys 2020-05-24 00:21:51 -04:00
Jesse Plamondon-Willard 786077340f
refactor update check API
This simplifies the logic for individual clients, centralises common logic, and prepares for upcoming features.
2020-05-23 21:55:11 -04:00
Jesse Plamondon-Willard d7add89441
drop MongoDB code
MongoDB support unnecessarily complicated the code and there's no need to run distributed servers in the foreseeable future. This keeps the abstract storage interface so we can wrap a distributed cache in the future.
2020-05-23 19:25:34 -04:00
Jesse Plamondon-Willard 9aba50451b
keep verb when redirecting api.smapi.io 2020-05-22 23:40:22 -04:00
Jesse Plamondon-Willard b074eb279a
add harmony_summary command 2020-05-22 20:00:33 -04:00
Jesse Plamondon-Willard 163eebd92e
move internal commands out of SCore 2020-05-22 19:57:22 -04:00
Jesse Plamondon-Willard 33da29b3e5
rewrite Harmony.Patch method to allow non-implemented virtual methods (#711) 2020-05-21 23:50:34 -04:00
Jesse Plamondon-Willard db0a46cb68
rewrite HarmonyMethod to allow null (#711) 2020-05-21 23:29:23 -04:00
Jesse Plamondon-Willard f52370f6fa
rename facade classes 2020-05-21 22:29:42 -04:00
Jesse Plamondon-Willard 4468f39098
improve facade annotations 2020-05-21 22:25:09 -04:00
Jesse Plamondon-Willard 7fdc3a2ab2
fix AccessTools facade constructor logic (#711) 2020-05-21 22:21:24 -04:00
Jesse Plamondon-Willard f8e0600672
load .pdb file when mod is loaded from bytes (#711) 2020-05-21 21:59:45 -04:00
Jesse Plamondon-Willard 1beee07a35
rewrite method overrides (#711) 2020-05-21 20:32:02 -04:00
Jesse Plamondon-Willard 310eb1fe9a
Merge branch 'mod/harmony-2.0' into develop
# Conflicts:
#	docs/release-notes.md
#	src/SMAPI/Framework/ModLoading/AssemblyLoader.cs
2020-05-20 19:38:08 -04:00
Jesse Plamondon-Willard c5c30189e4
fix error-handling when patch is called with a null target method (#711) 2020-05-20 02:14:30 -04:00
Jesse Plamondon-Willard 518bf7e3f1
rewrite renamed 'prioritiy' field (#711) 2020-05-20 02:00:16 -04:00
Jesse Plamondon-Willard b38b7af054
rewrite base types & interfaces (#711) 2020-05-20 00:56:28 -04:00
Jesse Plamondon-Willard 136a548fbb
rewrite methods without a body (#711) 2020-05-20 00:54:28 -04:00
Jesse Plamondon-Willard 71a11337d6
ignore special types (#711) 2020-05-20 00:53:46 -04:00
Jesse Plamondon-Willard b54d892abf
fix rewriting declaring type for a generic method (#711) 2020-05-19 22:50:33 -04:00
Jesse Plamondon-Willard 1838842bbc
rewrite assembly rewriting, merge Harmony rewriters (#711)
This reduces duplication, decouples it from the assembly loader, and makes it more flexible to handle Harmony rewriting.
2020-05-19 20:57:50 -04:00
Jesse Plamondon-Willard f96dde00f9
fix some type references not being rewritten (#711) 2020-05-18 23:11:17 -04:00
Jesse Plamondon-Willard d1bf3d5235
move facade namespace (#711) 2020-05-18 22:44:06 -04:00
Jesse Plamondon-Willard 21303a4e98
remove workaround no longer needed with Harmony 2.0.2 (#711) 2020-05-18 17:26:47 -04:00
Jesse Plamondon-Willard b34d7470e2
simplify patch facade (#711)
Thanks to 0x0ade for the suggestion!
2020-05-18 17:24:16 -04:00
Jesse Plamondon-Willard aa5cc2c9be
fix GitHub license images not using HTTPS 2020-05-16 20:03:08 -04:00
Jesse Plamondon-Willard 9d86f20ca7
migrate subdomain redirects to Azure 2020-05-16 20:01:52 -04:00
Jesse Plamondon-Willard 5e6f1640dc
simplify single-instance deployment and make MongoDB server optional 2020-05-16 14:30:07 -04:00
Jesse Plamondon-Willard a2cfb71d89
minor cleanup 2020-05-16 11:34:00 -04:00
Jesse Plamondon-Willard c776f6053b
update deprecated code 2020-05-16 11:33:17 -04:00
Jesse Plamondon-Willard a090b6c21c
use newer C# features 2020-05-16 11:29:40 -04:00
Jesse Plamondon-Willard 896f531f4f
fix broken action links after update to .NET Core 3.0 2020-05-14 19:25:51 -04:00
Jesse Plamondon-Willard e626e5817e
tweak Harmony patch error (#711) 2020-05-13 20:52:09 -04:00
Jesse Plamondon-Willard 2b9703f98f
fix Harmony issue when assembly is loaded from memory (#711) 2020-05-11 01:40:46 -04:00
Jesse Plamondon-Willard 10531e537f
rewrite AccessTools methods which changed in Harmony 2.0 (#711) 2020-05-10 11:50:35 -04:00
Jesse Plamondon-Willard b2334fda16
update compatibility list for SMAPI 3.6 & Harmony 2.0 tracking (#711) 2020-05-09 21:42:52 -04:00
Jesse Plamondon-Willard 0b5fa6bf86
add new 'unknown' compatibility status (#711) 2020-05-09 21:30:28 -04:00
Jesse Plamondon-Willard 1ff0968590
fixed generic types in method references not rewritten (#711) 2020-05-09 20:45:45 -04:00
Jesse Plamondon-Willard df84df5ff1
add GitHub licenses to mod compatibility list, update release notes 2020-05-09 14:06:10 -04:00
Jesse Plamondon-Willard f82a8e3c2d
update web scripts 2020-05-09 13:06:21 -04:00
Jesse Plamondon-Willard 719831c15a
sort mod warning lists 2020-05-09 10:58:10 -04:00
Jesse Plamondon-Willard d8d8cac2d8
simplify logged paranoid warnings 2020-05-09 10:43:05 -04:00
Jesse Plamondon-Willard 19397a89ff
log detailed error for rewritten patch failures (#711) 2020-05-09 09:23:27 -04:00
Jesse Plamondon-Willard 3110339649
add attribute type rewriting (#711) 2020-05-09 00:51:56 -04:00
Jesse Plamondon-Willard a500812e88
update web project to .NET Core 3.1 2020-05-07 22:41:37 -04:00
Jesse Plamondon-Willard c58d01d0cf
update packages 2020-05-07 21:15:29 -04:00
Jesse Plamondon-Willard f9eebff332
update Content Patcher format in schema 2020-05-06 21:43:20 -04:00
Jesse Plamondon-Willard f16e477fc2
add base instruction handler (#711) 2020-05-06 00:02:10 -04:00
Jesse Plamondon-Willard cfc07c1ee5
fix reference to old Harmony namespace (#711) 2020-05-05 23:31:06 -04:00
Jesse Plamondon-Willard 7a60e6d2a1
migrate to Harmony 2.0 finalizers (#711) 2020-05-05 22:15:38 -04:00
Jesse Plamondon-Willard 499cd8ab31
combine Harmony 1.x rewrite logs (#711) 2020-05-05 21:45:53 -04:00
Jesse Plamondon-Willard f4192663d7
add Harmony 2.0 rewriters (#711) 2020-05-05 21:02:33 -04:00
Jesse Plamondon-Willard 2d37fe6819
rename files for upcoming change (#711) 2020-05-05 20:54:25 -04:00
Jesse Plamondon-Willard e08979acd3
migrate to Harmony 2.0 (#711) 2020-05-05 20:49:05 -04:00
Jesse Plamondon-Willard 9728fe3f34
add Multiplayer.PeerConnected event 2020-05-04 17:53:48 -04:00
Jesse Plamondon-Willard 4eb68e96ed
fix asset propagation for Gil's portraits 2020-05-04 17:41:45 -04:00
ZaneYork d608774afe Prevent crash down from save error. 2020-04-28 23:05:33 +08:00
ZaneYork 6276eff2ca Merge branch 'stable' of https://github.com/Pathoschild/SMAPI into android
# Conflicts:
#	src/SMAPI.sln
#	src/SMAPI/Constants.cs
#	src/SMAPI/i18n/default.json
#	src/SMAPI/i18n/zh.json
2020-04-28 09:52:21 +08:00
ZaneYork e6c607afdb project prop 2020-04-28 09:35:28 +08:00
Jesse Plamondon-Willard df6e745c6b
Merge branch 'develop' into stable 2020-04-27 16:30:41 -04:00
Jesse Plamondon-Willard f44151dbb4
prepare for release, tweak readme 2020-04-27 16:30:20 -04:00
Jesse Plamondon-Willard cf7bba5453
fix asset propagation for maps loaded through a temporary content manager 2020-04-25 20:05:15 -04:00
Jesse Plamondon-Willard beccea7efd
add support for getting a patch helper for arbitrary data 2020-04-24 17:53:58 -04:00
Jesse Plamondon-Willard 4fae0158ed
add map patching API
Migrated from the Content Patcher code. I'm the main author, with tile property merging based on contributions by hatrat.
2020-04-24 17:49:25 -04:00
ZaneYork d7322c68fe Handler of save load error. 2020-04-24 21:29:01 +08:00
ZaneYork e1fdfa0843 Using rider as IDE and select VS2015 build tools 2020-04-20 18:39:02 +08:00
ZaneYork a814ac45e9 1.Compatibility fix, for ChestInventoryChangedEvent
2.Add disable MonoMod settings(for Android version that not support it)
3.Add log file size settings
2020-04-19 23:17:00 +08:00
Jesse Plamondon-Willard 06e2cb2e59
support lowercase season names in date translations 2020-04-17 17:23:24 -04:00
Jesse Plamondon-Willard 841f85a743
use better short date translations 2020-04-17 17:21:34 -04:00
Jesse Plamondon-Willard de4d4e0bcb
update unit test 2020-04-15 19:21:30 -04:00
Jesse Plamondon-Willard 3a247fa75c
tweak new code, update release notes 2020-04-15 19:20:53 -04:00
Jesse Plamondon-Willard 01b970c84a
Merge pull request #709 from kdau/develop
SDate: Add WorldDate conversions and features
2020-04-15 18:36:45 -04:00
Jesse Plamondon-Willard 97821362da
prevent object.loadDisplayName errors due to invalid/missing item data 2020-04-15 18:06:37 -04:00
ZaneYork fa8d24962f 1.Compatibility fix
2.Update SMAPI to 3.4.1.5
3.Compatible with some of device of Android L
2020-04-15 14:27:00 +08:00
Kevin Daughtridge 421bcfcd3e SDateTests: cover new field and methods 2020-04-14 00:31:47 -07:00
Kevin Daughtridge 7a60dc4ee9 SDate: fixes to new methods
- FromWorldDate: replace with explicit operator SDate
- ToWorldDate: replace with explicit operator WorldDate
- ToLocaleString: use Utility.getDateStringFor directly
- FromDaysSinceStart: reinterpret exception to an appropriate one
2020-04-14 00:19:20 -07:00
Kevin Daughtridge 49c2ee517d SDate: Add WorldDate conversions and features
- SeasonIndex
- FromWorldDate()
- FromDaysSinceStart()
- ToLocaleString()
- ToWorldDate()
2020-04-13 15:42:00 -07:00
Jesse Plamondon-Willard 5f73d47fb9
add config option to disable console colors (#707) 2020-04-12 12:35:34 -04:00
Jesse Plamondon-Willard f635c09095
update release notes 2020-04-11 22:57:52 -04:00
Jesse Plamondon-Willard 6437b7fa50
Merge pull request #708 from kdau/develop
Set daysPlayed in date console commands
2020-04-11 21:02:14 -04:00
Kevin Daughtridge e370b08483 use SDate to set DaysPlayed 2020-04-11 13:25:12 -07:00
Kevin Daughtridge b363e0b6b7 set daysPlayed in world_set{day,season,year} commands 2020-04-10 12:41:35 -07:00
ZaneYork 9619e5ecc5 1.Add SMAPI version to crash track
2.Bug fix, thread crash without broke the major app
2020-04-08 14:52:17 +08:00
Jesse Plamondon-Willard c9b6b04a75
fix rare intermittent "CGI application encountered an error" errors 2020-04-05 13:38:59 -04:00
Jesse Plamondon-Willard 96ec4de727
fix marriage dialogue left in invalid state after dialogue propagation 2020-04-01 20:09:44 -04:00
ZaneYork bce7021668 1.Add auto hidden feature to Virtual Keyboard
2.Bug fix
3.Disable smapi update check
2020-03-30 17:21:13 +08:00
Jesse Plamondon-Willard 6f8fb2a68b
fix AutoQualityPatch version in compatibility list 2020-03-29 14:40:17 -04:00
Jesse Plamondon-Willard 3e54ac8857
fix path segmenting on Linux/Mac in asset propagation 2020-03-29 12:08:56 -04:00
ZaneYork ffd5fa7832 Compatibility improvement, bug fix 2020-03-28 15:07:22 +08:00
Jesse Plamondon-Willard cecd17ec3c
update schema for Content Patcher 1.13 2020-03-27 21:03:47 -04:00
ZaneYork 399eec451f Merge branch 'stable' of https://github.com/Pathoschild/SMAPI.git into android 2020-03-26 15:10:15 +08:00
Jesse Plamondon-Willard d0dad43e24
Merge branch 'develop' into stable 2020-03-24 21:24:38 -04:00
Jesse Plamondon-Willard 31db04f4a0
prepare for release 2020-03-24 21:02:05 -04:00
Jesse Plamondon-Willard 68def4aa8a
fix mouse input suppression broken in SMAPI 3.4 (#705) 2020-03-24 19:16:51 -04:00
Jesse Plamondon-Willard 93475bab7f
fix asset changes not propagating to NPCs in an event 2020-03-23 22:32:57 -04:00
ZaneYork fbfcf26ef5 Merge remote-tracking branch 'Pathoschild/stable' into android
# Conflicts:
#	src/SMAPI/Constants.cs
#	src/SMAPI/Framework/ContentManagers/ModContentManager.cs
#	src/SMAPI/SMAPI.csproj
2020-03-23 19:04:24 +08:00
ZaneYork 6430bbf7ac Adapt for Galaxy Store Stardew Valley 2020-03-23 18:44:33 +08:00
Jesse Plamondon-Willard 7ca5efbbc5
Merge branch 'develop' into stable 2020-03-22 19:52:42 -04:00
Jesse Plamondon-Willard 6d1494a56c
prepare for release 2020-03-22 19:36:49 -04:00
Jesse Plamondon-Willard 737e31b531
remove invalid-location check now handled by the game 2020-03-22 19:27:08 -04:00
Jesse Plamondon-Willard 107232ae43
update packages 2020-03-22 19:26:09 -04:00
Jesse Plamondon-Willard a50e78efd8
add monitor.LogOnce method 2020-03-22 17:40:31 -04:00
Jesse Plamondon-Willard 8d88ce8a16
fix player_add error if the player has broken XNB mods 2020-03-22 14:22:16 -04:00
ZaneYork e948cac769 Fix toggle button logic 2020-03-22 21:43:15 +08:00
ZaneYork 43c02b4ee6 Compatibility fix for mods with input box 2020-03-19 18:20:40 +08:00
ZaneYork 6451102075 Mods location switch setting 2020-03-16 21:12:29 +08:00
Jesse Plamondon-Willard dfb1235133
fix semi-transparency issues on Linux/Mac
Apparently Mono no longer premultiplies loaded PNGs by default.
2020-03-14 18:47:19 -04:00
ZaneYork eeb960a0b8 Bug fix,for Immersive Farm 2 Remastered 2020-03-14 13:37:18 +08:00
ZaneYork 4c6fd76f0b 1.Compatibility fix
2.Fix potential error on rewriter.
3.Update virtual keyboard for upcoming SMAPI3.4 feature
2020-03-13 17:19:46 +08:00
ZaneYork f217392dab Merge branch 'develop' of https://github.com/Pathoschild/SMAPI.git into android
# Conflicts:
#	src/SMAPI/SMAPI.csproj
2020-03-12 22:57:01 +08:00
Jesse Plamondon-Willard e80b7712f7
encapsulate logic for each input type 2020-03-08 14:53:41 -04:00
Jesse Plamondon-Willard e39b9e0d69
fix log parse issues 2020-03-08 14:38:24 -04:00
Jesse Plamondon-Willard 5ba53cb390
optimize log parser for very long multi-line messages 2020-03-08 14:07:42 -04:00
Jesse Plamondon-Willard 29fdf9ae4a
rework input handling to allow sending custom input to the game/mods
That will let Virtual Keyboard on Android work with the future multi-key binding API, and with mods that check input state directly (e.g. Pathoschild/StardewMods#520). It might also be useful as a public API in future versions.
2020-03-08 11:45:55 -04:00
Jesse Plamondon-Willard 1b282f950a
update translation docs 2020-03-07 13:03:06 -05:00
Jesse Plamondon-Willard eec3f93434
Merge pull request #701 from Annosz/develop
Add Hungarian translations
2020-03-07 13:01:37 -05:00
Jesse Plamondon-Willard db4254513e
add support for flipped and rotated map tiles 2020-03-07 12:56:48 -05:00
ZaneYork 4f2da28395 Fix 2020-03-07 15:16:37 +08:00
Jesse Plamondon-Willard c6947682b0
update packages 2020-03-06 21:41:20 -05:00
Tóth Ádám 7adcc2fc21 Add Hungarian translations 2020-03-06 18:50:32 +01:00
ZaneYork aa1a71b66f Merge branch 'android' of https://github.com/Pathoschild/SMAPI.git into android
# Conflicts:
#	src/SMAPI/Constants.cs
#	src/SMAPI/Framework/ContentManagers/ModContentManager.cs
#	src/SMAPI/Framework/SGame.cs
#	src/SMAPI/SMAPI.csproj
2020-03-06 10:03:00 +08:00
ZaneYork de7aa34298 Disable Monomod for system build below Android M 2020-03-06 09:49:50 +08:00
Jesse Plamondon-Willard d074007d1d
Merge branch 'develop' into android
# Conflicts:
#	src/SMAPI/Constants.cs
#	src/SMAPI/Framework/ContentManagers/ModContentManager.cs
#	src/SMAPI/Framework/SGame.cs
#	src/SMAPI/SMAPI.csproj
2020-03-05 18:41:22 -05:00
ZaneYork aed072e926 1.Fix crash bug
2.Adapt to latest logic
2020-03-04 21:55:54 +08:00
Jesse Plamondon-Willard 7329d75ec8
enable detailed errors by default to simplify diagnosing issues 2020-03-02 20:24:56 -05:00
ZaneYork deafe14f1e Fix tapToMove null pointer error 2020-03-01 17:35:24 +08:00
ZaneYork feaffd4c7d Fix shadow render error on Android 2020-03-01 17:35:11 +08:00
yangzhi a71598b3b6 1.Render logic sync
2.Improve crash report logic
2020-02-28 21:54:29 +08:00
yangzhi 6d7058ab07 Bug fix 2020-02-26 23:17:58 +08:00
yangzhi 7fb4b95c1c Redirect bug report to our account. 2020-02-26 21:19:10 +08:00
yangzhi 471d0918d0 1.Fix render logic for snow weather.
2.Update to game 1.4.5.140
2020-02-26 14:02:23 +08:00
Jesse Plamondon-Willard a6b1103596
add file pickers to web UI for mobile users 2020-02-24 20:29:03 -05:00
yangzhi ada55ba8c7 Fix render logic for automate's overlay 2020-02-24 02:14:52 +08:00
yangzhi 56b207181b Merge branch 'android' of https://github.com/MartyrPher/SMAPI.git into android
# Conflicts:
#	src/SMAPI/Constants.cs
2020-02-23 23:16:03 +08:00
yangzhi 1b4cc0294c Constraint game version, old game version leads to crash, explicitly point out this error(instead of crash for no reason) 2020-02-23 23:14:52 +08:00
yangzhi 32ff5dff17 New feature, send instant command. 2020-02-23 23:13:24 +08:00
yangzhi dd58827a39 Command for modify android viewpoint zoom level 2020-02-23 23:12:34 +08:00
yangzhi 8afb72545f Merge branch 'develop' of https://github.com/Pathoschild/SMAPI.git into android
# Conflicts:
#	src/SMAPI/Constants.cs
#	src/SMAPI/Framework/SGame.cs
#	src/SMAPI/SMAPI.csproj
2020-02-23 21:37:17 +08:00
Jesse Plamondon-Willard 5ae640dc91
Merge branch 'develop' into stable 2020-02-22 23:03:26 -05:00
Jesse Plamondon-Willard d03f77dd35
prepare for release 2020-02-22 23:03:18 -05:00
Jesse Plamondon-Willard 02a96b54b5
fix mods receiving their own broadcasts 2020-02-22 23:01:43 -05:00
Jesse Plamondon-Willard f98f61e6d8
Merge branch 'develop' into stable 2020-02-22 17:55:00 -05:00
Jesse Plamondon-Willard f9ffde9a34
prepare for release 2020-02-22 17:54:37 -05:00
Jesse Plamondon-Willard e8bb80af26
fix errors loading spouse room content packs in SMAPI 3.3
The new logic for loading map tilesheets incorrectly changed vanilla tilesheets like "townInterior" to "Maps/townInterior". While the game itself handled that, mods like Content Patcher which compared tilesheet paths would incorrectly decide that "townInterior" and "Maps/townInterior" were different files, and add a new tilesheet for it; that in turn would cause errors when patching spouse rooms, since it doesn't copy tilesheets.
2020-02-22 17:53:22 -05:00
Jesse Plamondon-Willard 66079f2253
Merge branch 'develop' into stable 2020-02-22 12:03:39 -05:00
Jesse Plamondon-Willard 585b23797e
prepare for release 2020-02-22 12:03:09 -05:00
Jesse Plamondon-Willard b8636fdf2f
update draw logic for recent game updates 2020-02-22 11:59:10 -05:00
Jesse Plamondon-Willard d3ec98fec8
update packages 2020-02-22 11:26:05 -05:00
Jesse Plamondon-Willard 03c3ab3711
update SMAPI/game version mapping, add older versions 2020-02-22 10:39:54 -05:00
yangzhi 0603fd68b7 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI.git into android 2020-02-22 20:07:35 +08:00
yangzhi afc9dd8bb2 Game version 1.4.5.139 2020-02-22 20:04:59 +08:00
Chris eee8104ceb Update references to 1.4.5.139 and Bump version. 2020-02-22 02:36:21 -05:00
yangzhi ba179033e0 Bug fix 2020-02-22 02:11:01 -05:00
yangzhi e1e3b6953e Bug fix 2020-02-21 17:57:31 +08:00
yangzhi 47b5a24345 1.Merge latest master change.
2.Fix Rendered event logic
3.Improvement of VirtualKeyboard
2020-02-21 17:09:08 +08:00
Jesse Plamondon-Willard f19722e021
tweak release notes 2020-02-20 21:54:39 -05:00
Jesse Plamondon-Willard dd27b3bf35
fix parsing four-part versions from the update-check API 2020-02-20 21:32:55 -05:00
Jesse Plamondon-Willard 6a9bf10a81
migrate to new method in SMAPI 3.3 2020-02-20 21:12:00 -05:00
yangzhi 711845fc29 Update for 1.4.5.138, rewrite for it isSnowing field, draw logic sync 2020-02-20 20:10:17 -05:00
yangzhi 3086a3833c Rewrite for AnimalQueryMenu 2020-02-20 20:09:52 -05:00
Jesse Plamondon-Willard eff29d94fb
don't premultiply fully opaque pixels 2020-02-20 19:52:52 -05:00
yangzhi 27423f0468 Merge branch 'develop' of https://github.com/Pathoschild/SMAPI.git into android
# Conflicts:
#	src/SMAPI/Framework/ContentManagers/ModContentManager.cs
2020-02-20 14:32:16 +08:00
yangzhi 526ea483c6 Update for 1.4.5.138, rewrite for it isSnowing field, draw logic sync 2020-02-20 14:09:15 +08:00
Jesse Plamondon-Willard 2cc786907b
call IAssetEditor with actual type if applicable 2020-02-19 23:42:44 -05:00
Jesse Plamondon-Willard ab90e2c890
rename InputStatus to SButtonState for consistency 2020-02-19 23:28:37 -05:00
Jesse Plamondon-Willard 2e9807a034
rework tilesheet loading to improve errors, allow future validation, and drop support for legacy content files 2020-02-19 23:20:55 -05:00
yangzhi 35819c2748 Rewrite for AnimalQueryMenu 2020-02-20 12:17:14 +08:00
Jesse Plamondon-Willard 82d1e92d97
update TMXL name in metadata 2020-02-19 20:06:27 -05:00
Jesse Plamondon-Willard 7f63e06591
fix anchor position for new sticky header 2020-02-18 00:31:36 -05:00
Jesse Plamondon-Willard 4ce2747567
update compatibility list 2020-02-18 00:12:24 -05:00
Jesse Plamondon-Willard 2319c8e19e
make compatibility list header sticky 2020-02-17 23:55:28 -05:00
Jesse Plamondon-Willard 383ebab1af
add overrides for SMAPI on Android 2020-02-17 23:49:35 -05:00
Jesse Plamondon-Willard da49c7c13b
move hardcoded SMAPI update check logic into config 2020-02-17 23:48:57 -05:00
Chris 739bb4ee37 Bump to version 3.2.0.3 2020-02-17 16:24:20 -05:00
yangzhi b4a7fb8f6a Remove Linq patch,which may cause some error 2020-02-16 23:46:17 -05:00
yangzhi a24d5157e4 Rewrites 2020-02-16 23:45:58 -05:00
yangzhi fbb647bcb9 Compatibility improvement. 2020-02-16 23:45:41 -05:00
yangzhi f7be556bbf 1.Fix isRaining and isDebrisWeather.
2.Fix a critical error of SpriteTextMethods.getWidthOfString (infinite self recursion)
2020-02-16 23:45:16 -05:00
yangzhi cc92375a9d 1.More rewrites.
2,Give detailed message when mod's assemblies can't load.
2020-02-16 23:44:37 -05:00
yangzhi 4a5a8ef7b3 Update to latest 1.4.5.136 game version 2020-02-16 23:44:00 -05:00
yangzhi 15bf4b9eda Remove Linq patch,which may cause some error 2020-02-16 13:28:07 +08:00
yangzhi ad1dcf464f Rewrites 2020-02-15 20:17:53 +08:00
yangzhi a2c3beee29 Compatibility improvement. 2020-02-15 20:17:21 +08:00
yangzhi fc526bbe68 1.Fix isRaining and isDebrisWeather.
2.Fix a critical error of SpriteTextMethods.getWidthOfString (infinite self recursion)
2020-02-14 20:09:18 +08:00
yangzhi 7005836fa7 1.More rewrites.
2,Give detailed message when mod's assemblies can't load.
2020-02-14 17:49:37 +08:00
yangzhi 6ff2db235a Merge branch 'android' of https://github.com/MartyrPher/SMAPI.git into android
# Conflicts:
#	src/SMAPI/Framework/RewriteFacades/SpriteTextMethods.cs
2020-02-14 13:04:25 +08:00
yangzhi e34db6b16a Update to latest 1.4.5.136 game version 2020-02-14 13:00:57 +08:00
Jesse Plamondon-Willard 6294b27317
fix update-check error for SMAPI on Android with four-part versions 2020-02-13 21:03:04 -05:00
Chris 35b33cb00b Bump tp RC version and Update game reference for Save Backup 2020-02-13 20:22:29 -05:00
Chris 1a5e980b4d Update References to new GameVersion, Revert InputStatus.cs Location 2020-02-13 17:29:07 -05:00
Chris a8eecd0a87 Bump SMAPI version, Bump GameVersion, Revert change to TargetPlatform. 2020-02-13 17:28:34 -05:00
yangzhi 2cd19042c9 Fix bug of MenuChanged Event 2020-02-13 17:21:26 -05:00
yangzhi 528c7459d0 Fix for the bug? of MonoMod( Patch a specified generic method but all type of these method was patched) 2020-02-13 17:21:06 -05:00
yangzhi 79af62b741 Fix bug of MenuChanged Event 2020-02-13 15:29:50 +08:00
yangzhi 7de4ed09af Ignore VSHistory backups 2020-02-13 11:28:34 +08:00
yangzhi 6f894bd875 Fix for the bug? of MonoMod( Patch a specified generic method but all type of these method was patched) 2020-02-13 11:25:49 +08:00
yangzhi 751602a5e7 1.Fix for Ldtoken IL
2.Fix shop menu list logic for Json Assets
3.Some method rewrite for compatibility
2020-02-12 16:02:55 -05:00
yangzhi c44bda0991 SpriteText.drawStringWithScrollBackground rewrite 2020-02-12 16:02:05 -05:00
yangzhi b254fa95fa Rewrite for missing Utility.getRandomItemFromSeason method 2020-02-12 16:01:37 -05:00
yangzhi 4e2291a59e 1.CraftingPage to CraftingPageMobile rewriter, which made Custom Farming Redux Mod works
2.Fix TypeReferenceRewriter's BUG,which didn't support isinst IL.
3.SpriteFont.MeasureString bug fix,some stupid game code pass null to this method and crash down.
2020-02-12 16:00:55 -05:00
yangzhi 15a419b5d8 Fix for BetterJunimos and Chest.items null exception 2020-02-12 16:00:02 -05:00
yangzhi e6474d341a 1.Fix for Ldtoken IL
2.Fix shop menu list logic for Json Assets
3.Some method rewrite for compatibility
2020-02-12 23:56:04 +08:00
yangzhi 38eda0bab2 SpriteText.drawStringWithScrollBackground rewrite 2020-02-12 12:02:35 +08:00
yangzhi 4ee31cefca Rewrite for missing Utility.getRandomItemFromSeason method 2020-02-12 12:01:59 +08:00
yangzhi 1648ec1cba Merge branch 'develop' of https://github.com/Pathoschild/SMAPI.git into android 2020-02-12 01:10:22 +08:00
yangzhi 045abeba3c 1.CraftingPage to CraftingPageMobile rewriter, which made Custom Farming Redux Mod works
2.Fix TypeReferenceRewriter's BUG,which didn't support isinst IL.
3.SpriteFont.MeasureString bug fix,some stupid game code pass null to this method and crash down.
2020-02-12 01:02:34 +08:00
yangzhi e0a30f6cce Git ignore 2020-02-11 17:21:56 +08:00
yangzhi d67612e3ed Fix for BetterJunimos and Chest.items null exception 2020-02-11 17:12:40 +08:00
Jesse Plamondon-Willard c649572db8
fix dialogue propagation clearing marriage dialogue 2020-02-10 19:37:59 -05:00
Jesse Plamondon-Willard 801eaa7087
improve save backup logic 2020-02-10 19:14:06 -05:00
yangzhi e81581ecba Merge branch 'android' of https://github.com/MartyrPher/SMAPI.git into android
# Conflicts:
#	src/SMAPI/Constants.cs
#	src/SMAPI/SMAPI.csproj
2020-02-10 15:23:45 +08:00
yangzhi 2b65c4b6d9 Loader quick deploy 2020-02-10 15:19:08 +08:00
Chris 00efcd5eb0 Revert change to TargetPlatorm, SaveBackup lists as Broken 2020-02-09 23:28:02 -05:00
Chris 0502d5ccba Update references to stardew valley version 1.4.4.130 2020-02-09 23:27:35 -05:00
yangzhi 176eac1c75 Modify TypeFieldToAnotherTypeMethodRewriter to TypeFieldToAnotherTypePropertyRewriter, make it supports stsfld and stsfld IL. 2020-02-09 23:01:28 -05:00
yangzhi 0f7cb1e1f6 TypeFieldToAnotherTypeMethodRewriter, a much more flexible choice to deal with fields changes 2020-02-09 23:00:59 -05:00
yangzhi d3315ae6b5 Adapt to 1.4.4.128 game version, onScreenMenus rewrite bug fix, PropertyToFieldRewriter 2020-02-09 22:59:45 -05:00
yangzhi a0c838b02a BUG fix 2020-02-09 22:57:31 -05:00
yangzhi e73b230423 Bug fix for 'Path is empty error' 2020-02-09 22:56:43 -05:00
yangzhi 91f21e633d Modify TypeFieldToAnotherTypeMethodRewriter to TypeFieldToAnotherTypePropertyRewriter, make it supports stsfld and stsfld IL. 2020-02-09 16:59:29 +08:00
Jesse Plamondon-Willard 136773678e
add helper.Input.GetStatus method 2020-02-09 01:04:55 -05:00
Jesse Plamondon-Willard f3acc0b07c
add Italian translations 2020-02-08 23:34:43 -05:00
yangzhi d0da995932 TypeFieldToAnotherTypeMethodRewriter, a much more flexible choice to deal with fields changes 2020-02-09 01:01:28 +08:00
yangzhi fdf249c853 Adapt to 1.4.4.128 game version, onScreenMenus rewrite bug fix, PropertyToFieldRewriter 2020-02-08 15:40:17 +08:00
yangzhi 56c17a2106 Content 2020-02-07 15:24:18 +08:00
yangzhi 9c9820688d Merge branch 'android' of https://github.com/ZaneYork/SMAPI.git into android 2020-02-07 15:12:14 +08:00
yangzhi 8544971d6a Loader Project, make it easier to debug SMAPI application 2020-02-07 15:12:06 +08:00
Zane.Y dc6724a958
Update SMAPI.csproj 2020-02-07 15:07:30 +08:00
yangzhi 6931e817a4 Adapt project for vs2017(using vs2019 leads to an error 'Could not load type of field') 2020-02-07 15:06:22 +08:00
yangzhi 5709f21c64 Adapt project for vs2017(using vs2019 leads to an error 'Could not load type of field') 2020-02-07 15:03:29 +08:00
yangzhi 7366796a53 Adapt project for vs2017(using vs2019 leads to an error 'Could not load type of field') 2020-02-07 15:01:46 +08:00
yangzhi df166d0df7 BUG fix 2020-02-07 11:26:53 +08:00
yangzhi b80a66d4f3 Bug fix for 'Path is empty error' 2020-02-06 12:07:39 +08:00
yangzhi 3805301a44 Add command input button for Virtual Keyboard Mod 2020-02-05 14:15:22 +08:00
yangzhi dff5cbcae0 Merge branch 'android' of https://github.com/MartyrPher/SMAPI.git into android
# Conflicts:
#	src/SMAPI/Metadata/CoreAssetPropagator.cs
2020-02-05 10:37:00 +08:00
Chris 5b146632cf PR#2 Update SGameConsole 2020-02-04 11:37:18 -05:00
Chris cc56b39209 Add files to .csproj 2020-02-04 11:08:28 -05:00
Chris 58ad294515 Readded things to SCore affected by mscorlib issue, removed terminal disabled message. 2020-02-04 11:08:04 -05:00
Chris 430a2e5713 Comment out part of LooseSprites/Cursors since it's a List<T> instead of IList<T> 2020-02-04 11:07:07 -05:00
Chris be167734ea Add Utility Rewrites 2020-02-04 11:05:28 -05:00
Chris 1aeaece371 Add IClickableMenu Rewrites 2020-02-04 11:05:04 -05:00
Chris 59ffb3c57b Remove AndroidApiVersion Constant and bump version to 3.2.0.1 2020-02-04 11:04:41 -05:00
Chris c465e437a4 VK, fix for https://github.com/MartyrPher/SMAPI-Android-Installer/issues/50 2020-02-04 10:57:50 -05:00
yangzhi 4331f26549 Add scroll support for GameConsole, fix some compile error 2020-02-04 12:48:12 +08:00
yangzhi 99d1ae3dfb Fix 2020-02-04 10:57:06 +08:00
Jesse Plamondon-Willard 65180f86d8
update CP schema for .tmx support 2020-02-03 19:12:39 -05:00
yangzhi 8e0db4cc6a Fix 2020-02-03 13:48:22 +08:00
Jesse Plamondon-Willard 4991b4d6af
prefix OS name in log on Android 2020-02-02 15:01:03 -05:00
Jesse Plamondon-Willard 0a2b15d3c3
add support for self-broadcasts, optimize network messages 2020-02-02 14:20:41 -05:00
Chris 673290ca14 Update to SMAPI 3.2 2020-02-01 21:53:49 -05:00
Chris 0ea0fccf5c Update to SMAPI 3.1 2020-02-01 21:44:14 -05:00
Jesse Plamondon-Willard bd959442ea
+ credit in release notes 2020-02-01 18:10:56 -05:00
Jesse Plamondon-Willard c8d627cdf2
Merge branch 'develop' into stable 2020-02-01 16:21:35 -05:00
Jesse Plamondon-Willard 17a9193fd2
update packages 2020-02-01 16:06:12 -05:00
Jesse Plamondon-Willard 56b1b8d4d2
fix save folder filter in Save Backup 2020-02-01 15:33:40 -05:00
Jesse Plamondon-Willard aeb72586fd
prepare for release 2020-02-01 11:11:44 -05:00
Jesse Plamondon-Willard d0885831c3
ignore Harmony DLL in mod build package 2020-02-01 11:09:21 -05:00
Jesse Plamondon-Willard 0fddc7f510
polish release notes 2020-02-01 01:11:46 -05:00
Jesse Plamondon-Willard 70a1334f2c
add JSON converter for Vector2 2020-02-01 01:08:29 -05:00
Jesse Plamondon-Willard c8191449a0
add support for *.tmx map files 2020-02-01 00:27:53 -05:00
Jesse Plamondon-Willard 125b38c6e6
improve Save Backup compatibility on Android 2020-02-01 00:18:56 -05:00
Jesse Plamondon-Willard 3f1d7b1d22
rework build settings a bit 2020-01-31 22:27:12 -05:00
Jesse Plamondon-Willard 1a2af714aa
fix error message 2020-01-31 22:15:37 -05:00
Chris 326c7d7db1 Update Android branch to SMAPI 3.1.0 2020-01-31 03:34:48 -05:00
Jesse Plamondon-Willard e5d8acf240
rework asset editor/loader tracking so they're affected by load order 2020-01-30 22:10:16 -05:00
Jesse Plamondon-Willard 9f36b2b3d6
update release notes 2020-01-26 20:48:29 -05:00
Jesse Plamondon-Willard 7cbf298bd4
Merge pull request #690 from Drachenkaetzchen/performance-counter
Performance counters
2020-01-26 20:45:27 -05:00
Jesse Plamondon-Willard 860b30443e
simplify performance details output 2020-01-26 20:42:28 -05:00
Jesse Plamondon-Willard 805d857e6e
show warning when using commands while disabled, simplify some commands a bit 2020-01-26 20:28:58 -05:00
Jesse Plamondon-Willard 910b4a2c43
tweak namespace 2020-01-26 19:52:31 -05:00
Jesse Plamondon-Willard 22a0a32b6d
refactor performance counter code
This commit performs some general refactoring, including...
- avoid manually duplicating the event list;
- rework the 'is important' event flag;
- remove the new packages (Cyotek.Collections can be replaced with built-in types, and System.ValueTuple won't work in the Mono version used on Linux/Mac);
- improve performance;
- minor cleanup.
2020-01-26 19:49:17 -05:00
Jesse Plamondon-Willard a96bfea205
back up config.user.json when installing (#693) 2020-01-25 18:37:17 -05:00
Jesse Plamondon-Willard fc0b98be45
add user settings that override defaults (#693) 2020-01-25 18:22:50 -05:00
Jesse Plamondon-Willard 7a6dab7548
fix dialogue asset propagation 2020-01-25 15:21:40 -05:00
Jesse Plamondon-Willard 04d3f9b589
add internal method for Content Patcher 2020-01-25 15:19:47 -05:00
Jesse Plamondon-Willard 4db7ca28f6
fix error building/demolishing buildings for some players 2020-01-25 11:05:36 -05:00
Jesse Plamondon-Willard e33386abcc
prevent load crashes due to invalid building types 2020-01-25 11:00:37 -05:00
Jesse Plamondon-Willard d1935e686c
add full internal support for non-standard four-part versions 2020-01-23 00:31:26 -05:00
Jesse Plamondon-Willard 381de5eba9
add test_input console command 2020-01-22 20:36:24 -05:00
Jesse Plamondon-Willard 1670a2f3a6
fix global data stored in saves folder 2020-01-22 19:06:33 -05:00
Drachenkaetzchen 1b905205a3 Added commands to enable and disable performance counters. Peak is now using the default interval 2020-01-21 12:20:06 +01:00
Jesse Plamondon-Willard 25a22f5d7c
update community links 2020-01-18 16:21:16 -05:00
Drachenkaetzchen 84973ce572 Added peak execution time over the last 60 seconds 2020-01-15 19:08:50 +01:00
Drachenkaetzchen 238b5db4f7 Added "trigger dump" command to dump the configured triggers as commands for copy'n'paste 2020-01-15 17:50:12 +01:00
Drachenkaetzchen fce5814bcb Added documentation for all commands. Renamed the "monitor" command to "trigger". Method name refactoring to be more consistent. 2020-01-15 17:43:41 +01:00
Drachenkaetzchen 1d58a525fa Added optional right-align for the table output 2020-01-15 17:42:46 +01:00
Drachenkaetzchen 694cca4b21 Added documentation for all performance counter methods and members. Refactored the naming of several members and methods to reflect their actual intention. 2020-01-15 16:01:35 +01:00
Jesse Plamondon-Willard 700ea3cf1b
update release note (#691) 2020-01-12 20:46:29 -05:00
Jesse Plamondon-Willard abe1fa1442
Merge pull request #691 from danvolchek/develop
[SMAPI] Fix update marker file not being created
2020-01-12 20:41:57 -05:00
Jesse Plamondon-Willard d68e4f9766
drop pre-3.0 update-check support 2020-01-12 19:41:14 -05:00
danvolchek 734c727bc3 set updateFound based on the suggested update response 2020-01-12 15:24:57 -08:00
Jesse Plamondon-Willard 8b1fd90c6e
remove invalid-schedule error which can have false positives (e.g. when NPC is married to a player) 2020-01-12 15:53:59 -05:00
Jesse Plamondon-Willard 5518e4cf24
fix asset propagation for player sprites not affecting other players or recolor maps 2020-01-12 15:45:54 -05:00
Jesse Plamondon-Willard 351f5ad5e0
fix recursive lock error 2020-01-12 14:33:07 -05:00
Jesse Plamondon-Willard 2b68be4ebb
add version mappings from the wiki to API data 2020-01-11 20:33:01 -05:00
Jesse Plamondon-Willard bffc7f28e9
fix update-check error for Chucklefish pages with no version 2020-01-11 19:16:46 -05:00
Jesse Plamondon-Willard 609ceedaba
update for compatibility list change 2020-01-11 16:53:58 -05:00
Jesse Plamondon-Willard 219696275d
fix errors due to async threads creating content managers 2020-01-11 13:20:37 -05:00
Drachenkaetzchen 280dc91183 Reworked the console implementation, added monitoring. Some internal refactoring. 2020-01-11 15:45:45 +01:00
Drachenkaetzchen 8a77373b18 Added reset functionality 2020-01-10 14:16:00 +01:00
Drachenkaetzchen 47f626cc99 Moved most PerformanceCounter logic out of SCore into the new PerformanceCounterManager, some namespace refactoring 2020-01-10 14:08:25 +01:00
Drachenkaetzchen a751252c4e Initial commit of the performance counters 2020-01-10 01:27:56 +01:00
Jesse Plamondon-Willard ceff27c9a8
update min game version
1.4.1 is needed due to the new gamepad option, which SMAPI 3.1 added support for.
2020-01-07 21:29:49 -05:00
Jesse Plamondon-Willard 18c69c5587
intercept schedule errors 2020-01-07 21:26:58 -05:00
kchapelier b8a566a060
Add french translation 2020-01-06 19:59:32 -05:00
Jesse Plamondon-Willard 372eb72233
streamline front page design 2020-01-05 23:08:17 -05:00
Jesse Plamondon-Willard f976b5c0f0
Merge branch 'develop' into stable 2020-01-05 20:18:16 -05:00
Jesse Plamondon-Willard 48959375b9
prepare for release 2020-01-04 22:57:38 -05:00
Jesse Plamondon-Willard d804526d52
remove DumpMetadata option 2020-01-04 22:32:23 -05:00
Jesse Plamondon-Willard 93459a5e37
fix new asset invalidation code not correctly handling interceptors which both load and edit 2020-01-04 22:08:01 -05:00
Jesse Plamondon-Willard aef2550d23
add Japanese translations, update translation docs 2020-01-02 23:11:01 -05:00
Jesse Plamondon-Willard 00932a335c
Merge pull request #686 from wartech0/chest-tracking
Add chest items changed event
2020-01-01 18:57:05 -05:00
Jesse Plamondon-Willard b6aef499d3
update release notes 2020-01-01 18:55:07 -05:00
Jesse Plamondon-Willard e64a1220e3
unify item diff logic for players & chests 2020-01-01 18:52:24 -05:00
Jesse Plamondon-Willard 6766fcd0fd
fix NetList watcher not handling array replacement and conflicting changes correctly 2020-01-01 00:48:44 -05:00
Jesse Plamondon-Willard c5cfcc6c9f
fix location snapshot not updated for removed chests 2020-01-01 00:22:29 -05:00
Jesse Plamondon-Willard 844efa32d4
optimize chest watchers using net events 2020-01-01 00:13:59 -05:00
Jesse Plamondon-Willard 6bf99f0f81
minor refactoring 2019-12-31 17:32:46 -05:00
wartech0 0411dcf3db
Finished chest events 2019-12-31 16:26:14 -05:00
wartech0 2894b43223
reworking chest event handler 2019-12-31 16:25:51 -05:00
Jesse Plamondon-Willard 1286a90ec2
minor refactoring
This commit...
- removes key fields added to non-keyed types like NetListWatcher and SnapshotListDiff;
- fixes existing chests not being watched;
- fixes diffs not correctly updated for added/removed chests;
- performs minor cleanup, adds missing docs, etc.
2019-12-31 16:19:50 -05:00
wartech0 aef1b8ac28
Added the new ChestItemChanged event. 2019-12-31 16:19:43 -05:00
Jesse Plamondon-Willard dca60f42b2
fix XNA keeping loaded assets alive forever (#685) 2019-12-31 16:18:11 -05:00
Jesse Plamondon-Willard d9a9cef172
fix ObservableCollection watcher not handling list reset (#685) 2019-12-30 11:27:25 -05:00
Jesse Plamondon-Willard 3818d53752
fix main sidebar link pointing to wiki instead of home page 2019-12-30 10:33:07 -05:00
Jesse Plamondon-Willard c5d452478d
fix outdated section in technical docs 2019-12-27 01:01:27 -05:00
Jesse Plamondon-Willard c3e86c048f
update release notes (#684) 2019-12-26 23:49:33 -05:00
Jesse Plamondon-Willard 722ffba6eb
Merge pull request #684 from danvolchek/fixlogparser
[Log Parser] Fix parsing errors on content packs without authors
2019-12-26 23:47:17 -05:00
Dan Volchek 360a982336 fix log parser content pack list entry pattern, remove unneeded ternary in content pack logging 2019-12-26 20:34:39 -08:00
Jesse Plamondon-Willard 9ea2599356
Merge pull request #683 from danvolchek/fixtypo
[JSON Validator] Change 'log' to 'JSON file' on the JSON validator page
2019-12-26 00:13:19 -05:00
Dan Volchek 63f2eacb47 display JSON file instead of log on the JSON validator page 2019-12-25 20:51:46 -08:00
Jesse Plamondon-Willard eee65ad0b6
update translation docs (#682) 2019-12-25 12:21:31 -05:00
Jesse Plamondon-Willard 76fa96591e
Merge pull request #682 from L30Bola/adding-portuguese-translation
Add portuguese translation
2019-12-25 12:19:11 -05:00
Leonardo Godoy 5ca5dc6f88 Add portuguese translation 2019-12-25 05:34:59 -03:00
Jesse Plamondon-Willard 2833ad9a62
fix log parser & JSON validator showing relative share URL 2019-12-24 13:59:11 -05:00
Jesse Plamondon-Willard d932a11f51
list broken dependencies first in 'skipped mods' list 2019-12-24 13:51:21 -05:00
Jesse Plamondon-Willard 4c471ea215
fix CP schema not requiring Default field if AllowBlank is omitted 2019-12-22 18:46:03 -05:00
Jesse Plamondon-Willard d6901ed496
add asset propagation for winter flooring (#679) 2019-12-22 12:52:34 -05:00
Jesse Plamondon-Willard d6ef6f627a
configure MongoDB connection string directly 2019-12-22 12:08:01 -05:00
Jesse Plamondon-Willard 139e267aaa
update item spawning code, detect ring type automatically to support custom rings, minor refactor 2019-12-22 12:04:40 -05:00
Jesse Plamondon-Willard 05d237400c
Merge pull request #681 from Mizzion/develop
Fixed the ring issue and flooring
2019-12-22 10:58:05 -05:00
Jesse Plamondon-Willard 082f285bc7
streamline local environments, update technical docs & privacy page 2019-12-22 00:44:13 -05:00
Jesse Plamondon-Willard c1b15fb372
allow local dev environments without an Azure account 2019-12-21 23:52:47 -05:00
Mizzion 89de36534d Fixed the ring issue and flooring
Fixed the same issues that CJB Item Spawner had related to the rings and floors.

(Sorry for the delay Christmas preparation is taking up most of my time).
2019-12-21 21:36:42 -07:00
Jesse Plamondon-Willard ba46491ebc
drop Amazon S3 support 2019-12-21 23:14:15 -05:00
Jesse Plamondon-Willard 242dc718cd
switch to Azure Blob storage for saving files 2019-12-21 15:41:55 -05:00
Jesse Plamondon-Willard 02f645900e
add option to disable uploading new files to Pastebin 2019-12-21 11:56:19 -05:00
Jesse Plamondon-Willard 9dc6054479
fix typo in asset propagation 2019-12-20 20:29:02 -05:00
Jesse Plamondon-Willard 0a00c70397
add console warning in paranoid mode 2019-12-20 20:27:21 -05:00
Jesse Plamondon-Willard 4da65cf4c0
update schemas for Content Patcher 1.11 2019-12-16 21:51:55 -05:00
Jesse Plamondon-Willard c4e2e94eed
add option to edit & reupload in the JSON validator 2019-12-16 21:39:37 -05:00
Jesse Plamondon-Willard f692af269c
ignore deployment slot profiles 2019-12-16 20:37:41 -05:00
Jesse Plamondon-Willard c7426a191a
add Spanish translations
Thanks to PlussRolf!
2019-12-15 21:47:42 -05:00
Jesse Plamondon-Willard 9018750eb3
fix Linux systems with libhybris-utils installed incorrectly detected as Android (#668) 2019-12-15 11:27:46 -05:00
Jesse Plamondon-Willard 4711d19b3e
fix .gitignore and line endings for Linux 2019-12-15 10:50:05 -05:00
Jesse Plamondon-Willard 6275821288
add friendly log message for save file-not-found errors 2019-12-15 01:08:35 -05:00
Jesse Plamondon-Willard d662ea858c
improve error message for TargetParameterCountException in the reflection API 2019-12-15 00:33:08 -05:00
Jesse Plamondon-Willard 18a5b07c5b
fix overeager asset propagation for bundles 2019-12-15 00:04:00 -05:00
Jesse Plamondon-Willard 4aa2c0c3ec
update release notes (#676, #678) 2019-12-14 22:22:10 -05:00
Jesse Plamondon-Willard b09381d2a6
Merge pull request #678 from techge/mate-terminal
Add mate-terminal to the known-to-work terminals (fixes #676)
2019-12-14 22:16:55 -05:00
Jesse Plamondon-Willard 5ea5932661
add asset propagation for bundles 2019-12-14 22:11:25 -05:00
Jesse Plamondon-Willard 16f986c51b
refactor cache invalidation & propagation to allow for future optimizations 2019-12-14 21:31:34 -05:00
Jesse Plamondon-Willard 6dc442803f
fix private assets from content packs not having tracking info 2019-12-14 10:38:17 -05:00
Jesse Plamondon-Willard 3ba718749c
don't keep a reference to uncached assets 2019-12-14 10:35:08 -05:00
Jesse Plamondon-Willard ff94a8149e
fix assets not being disposed when a content manager is disposed 2019-12-12 23:46:32 -05:00
Jesse Plamondon-Willard e4a7ca5826
batch asset editor/loader changes 2019-12-12 23:22:19 -05:00
Alexander Paetzelt 0454d7dad9 Add mate-terminal to the known-to-work terminals 2019-12-12 20:52:20 +01:00
Jesse Plamondon-Willard 238fbfe569
let mods use Read/WriteSaveData while a save is being loaded 2019-12-08 12:20:59 -05:00
Jesse Plamondon-Willard 194b96a79c
use GetLocations logic more consistently in asset propagation 2019-12-08 11:31:20 -05:00
Jesse Plamondon-Willard 04b9a810dd
add asset propagation for grass textures 2019-12-08 11:27:23 -05:00
Jesse Plamondon-Willard 47beb2f534
fix launcher compatibility on Arch Linux
Arch Linux sets the $TERMINAL variable, which makes SMAPI think the terminal is being overridden for testing and bypass the terminal selection logic. Since it's only used for testing, we can re-add it locally when needed.
2019-12-07 19:24:27 -05:00
Jesse Plamondon-Willard 49080501d3
fix link in package readme (#677) 2019-12-07 10:24:01 -05:00
Jesse Plamondon-Willard 9c9a0a41b0
update for 'force off' gamepad option added in Stardew Valley 1.4.0.1 2019-12-05 22:10:57 -05:00
Jesse Plamondon-Willard 9465628eff
fix JSON validator format selector no longer working since URL changes 2019-12-04 20:52:40 -05:00
Jesse Plamondon-Willard 8ddb60cee6
move supporter list into environment config 2019-12-03 23:06:42 -05:00
Jesse Plamondon-Willard 2b1f607d41
encapsulate file storage, also handle Pastebin rate limits in JSON validator 2019-12-03 21:21:28 -05:00
Jesse Plamondon-Willard 0aad3f545a
update Content Patcher schema 2019-12-03 19:36:56 -05:00
Jesse Plamondon-Willard d34f369d35
Merge branch 'develop' into stable 2019-12-02 22:48:00 -05:00
Jesse Plamondon-Willard 1128451acf
prepare for release 2019-12-02 22:47:42 -05:00
Jesse Plamondon-Willard abf5f27454
add support for semver 2.0 build metadata, update for SDV 1.4.0.1 2019-12-02 22:37:03 -05:00
Jesse Plamondon-Willard d07495c2dc
fix JSON Validator issues 2019-12-02 21:23:41 -05:00
Jesse Plamondon-Willard 71048825bd
update supporter list 2019-12-02 21:08:05 -05:00
Jesse Plamondon-Willard 8a11d5c0d9
fix incorrect link URLs in some cases 2019-12-02 20:14:12 -05:00
Jesse Plamondon-Willard 5f532c259d
migrate from AWS to Azure
This commit migrates from subdomains to paths (due to the cost of a wildcard HTTPS certificate on Azure), adds a web project to redirect the old subdomains from AWS to Azure, and removes AWS-specific hacks.
2019-12-02 20:14:07 -05:00
Jesse Plamondon-Willard 8766a79408
update readme and release notes 2019-12-02 20:13:58 -05:00
Jesse Plamondon-Willard db6ec7fed6
Merge pull request #670 from DanielHeath/patch-1
Prevent linux install failing with cryptic error
2019-12-02 20:09:58 -05:00
Jesse Plamondon-Willard fcf313bd3d
Merge pull request #669 from archification/develop
Add alacritty support to unix-launcher.sh
2019-12-02 19:56:50 -05:00
Jesse Plamondon-Willard 2888c0d74c
Merge pull request #667 from berkayylmao/develop
Add Turkish translation
2019-12-02 19:44:27 -05:00
Jesse Plamondon-Willard bd218720f0
Merge pull request #672 from Osiris901/develop
Add Russian translation
2019-12-02 19:44:14 -05:00
Georgii Smirnov 854ee8c154 Create ru.json
Add Russian Translation
2019-12-01 17:43:50 +03:00
Jesse Plamondon-Willard d7948fbe1c
update translation docs (#664, #671) 2019-11-30 16:44:34 -05:00
Jesse Plamondon-Willard e1d414839a
Merge pull request #671 from feathershine/develop
add Chinese translation
2019-11-30 16:41:32 -05:00
FeatherShine 9fadc3a6ad
add Chinese translation 2019-12-01 00:42:27 +08:00
Daniel Heath 10a1829077
Prevent linux install failing with cryptic error
This avoids the error described at https://stackoverflow.com/questions/49242075/mono-bug-magic-number-is-wrong-542

System.TypeInitializationException: The type initializer for 'System.Console' threw an exception. ---> System.TypeInitializationException: The type initializer for 'System.ConsoleDriver' threw an exception. ---> System.Exception: Magic number is wrong: 542
2019-11-30 20:25:16 +11:00
archification 286f0f8c1e add alacritty support to unix-launcher 2019-11-29 23:49:59 -06:00
Jesse Plamondon-Willard b1400bcb68
fallback to Amazon S3 if saving a log to Pastebin fails 2019-11-27 21:49:36 -05:00
Jesse Plamondon-Willard 0223382ca8
remove unused package 2019-11-27 19:50:42 -05:00
Chris 11dc98587f Re-desgined SGameConsole, new "X", tap anywhere to enter a command 2019-11-26 20:35:02 -05:00
Chris 0af0418967 Added a warning message for mods that have new updates 2019-11-26 20:34:09 -05:00
Chris 9898f620c1 Added template for quickly disabling Harmony 2019-11-26 20:33:43 -05:00
Chris 6e4b917f6a Bump version to 0.9.2 and chnage save path 2019-11-26 20:33:15 -05:00
Chris e41000a21c Remove old empty projects from the solution 2019-11-26 20:32:49 -05:00
Chris b309f067c2 Update VK to 0.9.7 and prevent players to move to button positions 2019-11-26 20:32:12 -05:00
Chris f3eaa564e8 Some csproj changes 2019-11-26 20:31:31 -05:00
Chris 7cd710a2f0 Revert .csproj since it needs to be an Android Class Library. 2019-11-26 20:30:54 -05:00
Berkay cc1ee0dbce
Add Turkish translation 2019-11-25 13:30:48 +03:00
Jesse Plamondon-Willard a3f2168504
Merge branch 'develop' into stable 2019-11-24 13:49:30 -05:00
Jesse Plamondon-Willard 277bf08267
Merge branch 'secret-dev' into develop 2019-11-24 13:47:54 -05:00
Jesse Plamondon-Willard eaf31f992f
update movie data propagation (#638) 2019-11-24 13:47:37 -05:00
Jesse Plamondon-Willard bb8668db24
update compatibility list (#638) 2019-11-24 13:47:36 -05:00
Jesse Plamondon-Willard 2c2644f5a0
add roe spawning (#638) 2019-11-24 13:47:36 -05:00
Jesse Plamondon-Willard 7048f37563
add asset propagation for new assets in SDV 1.4 (#638) 2019-11-24 13:47:36 -05:00
Jesse Plamondon-Willard 6b04758642
polish release notes 2019-11-24 13:43:38 -05:00
Jesse Plamondon-Willard a5c9cb929e
migrate package icon to the new NuGet format 2019-11-24 12:36:01 -05:00
Jesse Plamondon-Willard f0f348bd5f
update packages 2019-11-24 12:13:34 -05:00
Jesse Plamondon-Willard 730d978395
drop mod build package change which sets the x86 platform
Visual Studio changes platform inconsistently when set through a NuGet package, which can cause confusing behavior. It's better to set it directly in the project file instead.
2019-11-23 22:39:57 -05:00
Jesse Plamondon-Willard cc74388025
update compatibility list (#638) 2019-11-23 22:37:47 -05:00
Jesse Plamondon-Willard 5c1516aaab
optimise map tilesheet fixing slightly 2019-11-18 21:08:48 -05:00
Jesse Plamondon-Willard f154c5774d
minor updates (#638) 2019-11-18 21:07:52 -05:00
Jesse Plamondon-Willard 3d4276707b
update CP schema to allow boolean values for Enabled field 2019-11-16 18:32:50 -05:00
Jesse Plamondon-Willard 31db556d02
update for more draw changes (#638) 2019-11-16 17:31:26 -05:00
Jesse Plamondon-Willard 41a809a2e0
fix render events not raised during minigames 2019-11-16 17:31:20 -05:00
Jesse Plamondon-Willard 2717ea8cb1
update for more draw changes (#638) 2019-11-16 17:30:58 -05:00
Jesse Plamondon-Willard 02300fcaa8
update for more draw changes (#638) 2019-11-16 17:30:45 -05:00
Jesse Plamondon-Willard 6e46990ed1
update for more draw changes (#638) 2019-11-16 17:30:35 -05:00
Jesse Plamondon-Willard 7a2fc8471f
update for draw changes in SDV 1.4 (#638) 2019-11-16 17:30:13 -05:00
Jesse Plamondon-Willard fd6a719b02
overhaul update checks
This commit moves the core update-check logic serverside, and adds support for community-defined version mappings. For example, that means false update alerts can now be solved by the community for all players.
2019-11-09 21:18:06 -05:00
Jesse Plamondon-Willard 01db5e364d
filter another new error (#638) 2019-11-09 00:09:12 -05:00
Jesse Plamondon-Willard 012ff7ec43
update for NPC schedule changes (#638) 2019-11-08 22:53:51 -05:00
Jesse Plamondon-Willard 39214fd23f
update game log filters (#638) 2019-11-08 22:48:49 -05:00
Jesse Plamondon-Willard a03137372d
update release notes (#605) 2019-11-08 14:44:12 -05:00
Jesse Plamondon-Willard 0aac0717bf
add CurseForge to mod metadata (#605) 2019-11-08 13:44:49 -05:00
Jesse Plamondon-Willard 8b09a2776d
add support for CurseForge update keys (#605) 2019-11-07 13:51:45 -05:00
Jesse Plamondon-Willard fed71886a9
Merge pull request #666 from eren-kemer/patch-2
Correct README for translated language
2019-11-07 13:50:21 -05:00
Eren Kemer f2ab7b506d
Correct README for translated language
#664
2019-11-07 19:39:23 +01:00
Jesse Plamondon-Willard 88dce820d5
no longer omit zero patch numbers when formatting versions 2019-11-04 16:50:00 -05:00
Jesse Plamondon-Willard 01c612bc4a
add friendly error for BadImageFormatException on launch 2019-11-04 13:59:34 -05:00
Jesse Plamondon-Willard e454de1e11
remove obsolete validation
Players can no longer launch SMAPI from the installer folder, since the files are hidden in a data file.
2019-11-04 12:02:29 -05:00
Jesse Plamondon-Willard df7e814286
add support for using environment variables instead of command-line arguments (#665) 2019-11-03 18:24:34 -05:00
Jesse Plamondon-Willard f386df7e4d
Merge pull request #664 from eren-kemer/patch-1
Create de.json
2019-11-02 11:13:43 -04:00
Eren Kemer 8968d2737d
Create de.json
Translation into german,
2019-11-02 13:02:13 +01:00
Jesse Plamondon-Willard 9035d945f9
update for further networking changes in SDV 1.4 (#638) 2019-10-29 16:41:24 -04:00
Jesse Plamondon-Willard f4bc61976c
update for networking changes in SDV 1.4 (#638) 2019-10-29 11:29:20 -04:00
Jesse Plamondon-Willard 773ebf5406
update for honey changes in SDV 1.4 (#638) 2019-10-29 11:28:07 -04:00
Jesse Plamondon-Willard be79a04206
make item spawn commands more robust 2019-10-29 10:45:34 -04:00
Jesse Plamondon-Willard 08dc846195
add asset propagation for cursors2 (#638) 2019-10-22 07:59:20 -04:00
Jesse Plamondon-Willard b4a8c1c2ac
rework Save Backup to support Android 2019-10-07 15:05:01 -04:00
Jesse Plamondon-Willard 175ebf9071
fix non-generic GetAPI not checking that all mods are loaded (#662) 2019-10-03 12:08:22 -04:00
Jesse Plamondon-Willard 15cd316ce4
fix Save Backup mod on Android 2019-10-02 01:19:33 -04:00
Jesse Plamondon-Willard b2bcda83d9
tweak docs 2019-10-02 01:08:42 -04:00
Jesse Plamondon-Willard 65997c1243
auto-fix save data when a custom location mod is removed 2019-10-01 21:41:15 -04:00
Jesse Plamondon-Willard 845deb43d6
add support for core translation files 2019-10-01 21:27:49 -04:00
Jesse Plamondon-Willard 673510b394
remove unused translation field & method 2019-10-01 20:04:58 -04:00
Jesse Plamondon-Willard c4157b55eb
update supporter list 2019-10-01 14:02:35 -04:00
Jesse Plamondon-Willard 7a1f178188
document short URLs 2019-10-01 13:48:52 -04:00
Jesse Plamondon-Willard 52914515a2
add community short url 2019-10-01 13:48:23 -04:00
Jesse Plamondon-Willard 9461494a35
auto-fix save data when a custom NPC mod is removed 2019-09-26 19:48:01 -04:00
Chris Gephardt f9c66fc9c0
Merge pull request #1 from Pathoschild/sync-repos
Reduce differences from main repo
2019-09-23 23:23:49 -04:00
Jesse Plamondon-Willard 1b5055dfaa
make console colors configurable 2019-09-23 17:09:35 -04:00
Jesse Plamondon-Willard 60f9eb4ad3
sync to match main repo in some cases 2019-09-21 00:01:58 -04:00
Chris a2976ca5f6 Add GamePlatform Android 2019-09-19 17:44:48 -04:00
Chris fda5764810 Bump Android version to 0.9.1 2019-09-19 17:44:29 -04:00
Chris 7bcaa72849 Save Backup and Console Commands build 2019-09-19 17:44:10 -04:00
danvolchek e6edf8adc7
fix saving event doc typo 2019-09-18 01:23:54 -04:00
Chris ebd54ca220 Updates for Android 2.11.3 2019-09-17 18:02:25 -04:00
Chris c6c49a1d75 Update for Android 2.11.3 2019-09-17 18:02:03 -04:00
Chris dc7ca4e10c Console Commands SetMoneyCommand Fix 2019-09-17 15:40:41 -04:00
Chris f3b6b06d60 Removed unused SMainActivity namespaces 2019-09-17 15:40:23 -04:00
Jesse Plamondon-Willard 4e7a67bc6d
log custom SMAPI settings to simplify troubleshooting 2019-09-16 16:28:12 -04:00
Jesse Plamondon-Willard 3cf3df8ffb
fix ICursorPosition.AbsolutePixels not adjusted for zoom 2019-09-14 23:18:03 -04:00
Jesse Plamondon-Willard 4fec41f3a1
minor fixes 2019-09-14 19:26:57 -04:00
Jesse Plamondon-Willard 8271c15d6a
update release notes for asset changes 2019-09-14 19:22:31 -04:00
Jesse Plamondon-Willard 083e68ad5b
fix key errors during asset propagation in some cases 2019-09-14 19:22:25 -04:00
Jesse Plamondon-Willard 4b3a593941
track texture asset keys, fix NPC portrait propagation 2019-09-14 19:22:08 -04:00
Jesse Plamondon-Willard 449d793979
reorganise 3.0 release notes, add release highlights 2019-09-14 19:21:23 -04:00
Jesse Plamondon-Willard f5b46e8f3d
add asset propagation for Data\FarmAnimals (#618) 2019-09-14 19:20:12 -04:00
Jesse Plamondon-Willard dbd0b97c17
simplify Data/NPCDispositions propagation with changes in SDV 1.4 (#638) 2019-09-14 19:19:45 -04:00
Jesse Plamondon-Willard 3f1ffd3e4f
allow bool condition values in CP schema 2019-09-14 19:19:40 -04:00
Jesse Plamondon-Willard 2f9884c47b
update packages 2019-09-14 19:19:34 -04:00
Jesse Plamondon-Willard 2d6175fcd2
add immutable collection watcher 2019-09-14 19:19:30 -04:00
Jesse Plamondon-Willard 1db1a8fa23
update SMAPI/game version map 2019-09-14 19:19:23 -04:00
Jesse Plamondon-Willard 8cb190de08
add Android detection 2019-09-14 19:19:08 -04:00
Jesse Plamondon-Willard e02372bba9
fix log parser changes 2019-09-14 19:17:27 -04:00
Jesse Plamondon-Willard a36426296a
Merge pull request #658 from danvolchek/log-parser-user-agent-detection
[SMAPI.Web] Detect the client's platform and check the right log parser input accordingly
2019-09-14 19:16:44 -04:00
Jesse Plamondon-Willard 98a56169e7
update release notes 2019-09-14 19:15:29 -04:00
Jesse Plamondon-Willard e7b214390a
move platform to log parser model instead of middleware 2019-09-14 19:14:56 -04:00
Jesse Plamondon-Willard d49ead6113
remove custom enum, add Android to SMAPI's platform enum
This will also be used in an upcoming commit for SMAPI's target platform constant.
2019-09-14 19:14:51 -04:00
Jesse Plamondon-Willard 7ca168269f
log skipped loose files 2019-09-14 19:14:42 -04:00
Dan Volchek f04f781153
rename namespace to be more accurate 2019-09-14 19:14:24 -04:00
Dan Volchek 00b067fead
detect the client's platform and check the appropriate input in the log parser 2019-09-14 19:14:19 -04:00
Jesse Plamondon-Willard 15fd868f59
fix 'unknown file extension' error not listing .json as a valid extension 2019-09-14 19:13:42 -04:00
Jesse Plamondon-Willard 1003116f7f
fix asset changes not affecting cached asset loads in a specific case 2019-09-14 19:13:35 -04:00
Jesse Plamondon-Willard 9828f32bf7
fix validator not handling string entries (#654) 2019-09-14 19:13:31 -04:00
Jesse Plamondon-Willard 2b68b06729
don't strip comments when validating JSON (#654) 2019-09-14 19:13:25 -04:00
Jesse Plamondon-Willard 192c54b71c
update for game draw changes (#638) 2019-09-14 19:13:21 -04:00
Jesse Plamondon-Willard d2a134ae08
reduce automatic retry window for background wiki fetches (#651) 2019-09-14 19:13:16 -04:00
Jesse Plamondon-Willard 86b2fef8ce
better handle stale age label on mod compatibility list 2019-09-14 19:13:11 -04:00
Jesse Plamondon-Willard cff42300bc
only set game as start action for main SMAPI project 2019-09-14 19:13:06 -04:00
Jesse Plamondon-Willard 25e4aa14d8
remove legacy AssemblyInfo and GlobalAssemblyInfo files, use consistent assembly names 2019-09-14 19:12:40 -04:00
Jesse Plamondon-Willard 49b3dbb38f
update for game draw changes (#638) 2019-09-14 19:08:27 -04:00
Jesse Plamondon-Willard fd77ae93d5
fix typos and inconsistent spelling 2019-09-14 19:08:06 -04:00
Jesse Plamondon-Willard 3f6865e830
add footer tip about using schema directly, add details to page title (#654) 2019-09-14 19:06:34 -04:00
Jesse Plamondon-Willard 6036fbf050
make 'then' blocks transparent by default (#654) 2019-09-14 19:06:29 -04:00
Jesse Plamondon-Willard 5679df8d66
expand Content Patcher schema, detect more common issues (#654) 2019-09-14 19:06:24 -04:00
Jesse Plamondon-Willard 807868f440
add support for transparent schema errors with multiple child errors (#654) 2019-09-14 19:06:19 -04:00
Jesse Plamondon-Willard 674ceea74e
add support for transparent schema errors (#654) 2019-09-14 19:06:14 -04:00
Jesse Plamondon-Willard 74e86de01e
when uploading a new file to the JSON validator, prefill previous schema type by default (#654) 2019-09-14 19:06:09 -04:00
Jesse Plamondon-Willard 2cc183b48b
tweak manifest schema to allow $schema field, fix parse errors in some text editors (#654) 2019-09-14 19:06:04 -04:00
Jesse Plamondon-Willard d88d3505ec
add error type code to HTML for convenience when adding custom error messages (#654) 2019-09-14 19:05:59 -04:00
Jesse Plamondon-Willard e51638948f
add support for @value token in custom schema errors (#654) 2019-09-14 19:05:54 -04:00
Jesse Plamondon-Willard 22480d25b9
restructure Content Patcher schema a bit (#654) 2019-09-14 19:05:50 -04:00
Jesse Plamondon-Willard 3331beb17a
integrate Content Patcher schema into validator, update docs (#654) 2019-09-14 19:05:45 -04:00
Jesse Plamondon-Willard 39d58a68ab
Merge pull request #655 from TehPers/cp-schema
Added Content Patcher schema
2019-09-14 19:05:23 -04:00
TehPers 5d06d0b836
Updated title with feedback from Cat 2019-09-14 19:04:27 -04:00
TehPers 3199091619
Updated $id 2019-09-14 19:04:21 -04:00
TehPers 093c68cac4
Fixed 2019-09-14 19:04:17 -04:00
Jesse Plamondon-Willard c785572fdd
raise JSON validation error for duplicate fields (#654) 2019-09-14 19:03:51 -04:00
Jesse Plamondon-Willard 84ad8b2a92
fix manifest error if neither EntryDll nor ContentPackFor are specified (#654) 2019-09-14 19:03:44 -04:00
Jesse Plamondon-Willard 5e8991bfcf
tweak button names, update release notes (#654) 2019-09-14 19:03:26 -04:00
Jesse Plamondon-Willard 0c5fa11809
Merge branch 'json-validator' into develop 2019-09-14 19:01:53 -04:00
Jesse Plamondon-Willard ee0ff5687d
add user-friendly doc link & error messages, document validator, improve manifest schema (#654) 2019-09-14 19:00:54 -04:00
Jesse Plamondon-Willard f24e7428df
add line highlighting and linking (#654) 2019-09-14 19:00:50 -04:00
Jesse Plamondon-Willard 1b9ce5e64f
format displayed JSON (#654) 2019-09-14 19:00:46 -04:00
Jesse Plamondon-Willard 3ba567eadd
add JSON validator with initial support for manifest format (#654) 2019-09-14 19:00:41 -04:00
Jesse Plamondon-Willard c86db64880
encapsulate gzip logic for reuse (#654) 2019-09-14 19:00:36 -04:00
Jesse Plamondon-Willard 8e0ddd1d00
update for disconnection change in SDV 1.4 (#638) 2019-09-14 18:59:55 -04:00
Jesse Plamondon-Willard 85715988f9
fix error when Chucklefish page doesn't exist for update checks 2019-09-14 18:59:50 -04:00
Jesse Plamondon-Willard b0ec0de2ce
fix does-not-exist errors suppressed due to recent changes (#651) 2019-09-14 18:59:44 -04:00
Jesse Plamondon-Willard b802471dd4
remove soft GitHub lookups during update checks (#651)
This caused incorrect update alerts for repositories that contain multiple mods but still use releases.
2019-09-14 18:59:39 -04:00
Jesse Plamondon-Willard 4bb644e46e
prefer SPDX license ID in tracked license info (#651) 2019-09-14 18:59:34 -04:00
Jesse Plamondon-Willard 1d085df5b7
track license info for mod GitHub repos (#651) 2019-09-14 18:59:29 -04:00
Jesse Plamondon-Willard 2b4bc2c282
back up saves in a background thread 2019-09-14 18:59:23 -04:00
Jesse Plamondon-Willard 95f261b1f3
fetch mod info from Nexus API if the web page is hidden due to adult content (#651) 2019-09-14 18:59:15 -04:00
Jesse Plamondon-Willard 890c6b3ea7
rename Nexus API client for upcoming API usage (#651) 2019-09-14 18:59:10 -04:00
Jesse Plamondon-Willard 08d83aa039
treat hidden/unpublished Nexus mods as not found (#651) 2019-09-14 18:59:05 -04:00
Jesse Plamondon-Willard edc00ddaab
remove cached mod data not requested within 48 hours (#651) 2019-09-14 18:58:59 -04:00
Jesse Plamondon-Willard 17c6ae7ed9
migrate update check caching to MongoDB (#651) 2019-09-14 18:58:54 -04:00
Jesse Plamondon-Willard 03a082297a
add generic cache repository interface (#651) 2019-09-14 18:58:49 -04:00
Jesse Plamondon-Willard f6b336def7
store DateTimeOffset values in date fields instead of the default array (#651) 2019-09-14 18:58:45 -04:00
Jesse Plamondon-Willard e856d5efeb
add remote mod status to update check info (#651) 2019-09-14 18:54:11 -04:00
Jesse Plamondon-Willard 4fb16abfe9
normalise map tilesheets before custom-tilesheet changes to avoid errors 2019-09-14 18:54:06 -04:00
Jesse Plamondon-Willard 4b9ba35a19
apply tilesheet fixes to XNB map files too 2019-09-14 18:54:01 -04:00
Jesse Plamondon-Willard dc1c9bf036
normalise custom map's tilesheet paths for the OS 2019-09-14 18:53:42 -04:00
Jesse Plamondon-Willard 673ef91cc7
show versions in duplicate-mod errors, make folder paths in trace logs clearer 2019-09-14 18:53:37 -04:00
Jesse Plamondon-Willard ec747b518b
enable readonly access to job dashboard when deployed (#651) 2019-09-14 18:53:31 -04:00
Jesse Plamondon-Willard 450cfc11c2
avoid Hangfire connection errors on startup (#651) 2019-09-14 18:53:25 -04:00
Jesse Plamondon-Willard 1b807edd00
update HTTP client to fix form-url-encoded error with large log files 2019-09-14 18:53:20 -04:00
Jesse Plamondon-Willard 7a2891573b
minor cleanup (#651) 2019-09-14 18:53:15 -04:00
Jesse Plamondon-Willard ce6cedaf4b
add background fetch for mod compatibility list (#651) 2019-09-14 18:52:58 -04:00
Jesse Plamondon-Willard 88110dffbf
reduce log level in development 2019-09-14 18:52:52 -04:00
Jesse Plamondon-Willard be1f09f5f9
update obsolete code 2019-09-14 18:52:47 -04:00
Jesse Plamondon-Willard 8700084300
bump .NET Standard version used by the mod build package to match toolkit 2019-09-14 18:52:39 -04:00
Jesse Plamondon-Willard db141f3976
update code analysis package
This commit updates the code analysis package to the one available in Visual Studio 2017 v15.9; the next version matches Visual Studio 2019.
2019-09-14 18:52:33 -04:00
Jesse Plamondon-Willard 79622d79b8
Update Mono.Cecil package 2019-09-14 18:52:27 -04:00
Jesse Plamondon-Willard b2134035b7
update NuGet packages 2019-09-14 18:52:22 -04:00
Jesse Plamondon-Willard 1bf399ec23
add dev note field to compatibility list 2019-09-14 18:52:14 -04:00
Jesse Plamondon-Willard 48f211f544
add metadata links to mod compatibility list 2019-09-14 18:51:57 -04:00
Jesse Plamondon-Willard 1053232c20
add asset propagation for DayTimeMoneyBox buttons 2019-09-14 18:49:28 -04:00
Jesse Plamondon-Willard 4f7d861ce4
make SemanticVersion.TryParse public 2019-09-14 18:48:54 -04:00
Jesse Plamondon-Willard e2f545484e
add asset propagation for critter textures (#652) 2019-09-14 18:48:40 -04:00
Jesse Plamondon-Willard c6d4381142
update for SDV 1.4 build change on Linux/Mac (#638) 2019-09-14 18:47:40 -04:00
Jesse Plamondon-Willard c9778b567e
update draw logic (#638) 2019-09-14 18:47:35 -04:00
Jesse Plamondon-Willard 20c81f04e0
update compatibility list (#638) 2019-09-14 18:47:30 -04:00
Jesse Plamondon-Willard a731f5ea9a
use better index type (#651) 2019-09-14 18:47:25 -04:00
Jesse Plamondon-Willard 2b3f0e740b
make MongoDB database name configurable (#651) 2019-09-14 18:47:21 -04:00
Jesse Plamondon-Willard e00fb85ee7
migrate compatibility list's wiki data to MongoDB cache (#651) 2019-09-14 18:47:16 -04:00
Jesse Plamondon-Willard f18ad1210c
update project name 2019-09-14 18:46:41 -04:00
Jesse Plamondon-Willard 9162f41462
add redirect for old links until NuGet package is updated (#651) 2019-09-14 18:45:19 -04:00
Jesse Plamondon-Willard 1dde811c36
group technical docs, add general shortcut for mod build package docs (#651) 2019-09-14 18:43:59 -04:00
Jesse Plamondon-Willard a352b1101c
reorganise docs to support more detailed technical docs (#651) 2019-09-14 18:19:14 -04:00
Jesse Plamondon-Willard 0eb986a8c0
update compatibility list (#638) 2019-09-14 18:16:45 -04:00
Jesse Plamondon-Willard 0cde44fbd1
remove unsupported Markdown in nuspec release notes 2019-09-14 18:16:23 -04:00
Jesse Plamondon-Willard 62d0b3b322
reduce duplication in mod build package 2019-09-14 18:16:19 -04:00
Jesse Plamondon-Willard a54db1b330
add optional Harmony reference to mod build package 2019-09-14 18:16:13 -04:00
Jesse Plamondon-Willard a07e2de9a0
keep true/false capitalisation consistent in mod build package 2019-09-14 18:16:06 -04:00
Jesse Plamondon-Willard 3f28abe2c2
update game-not-found error messages 2019-09-14 18:16:00 -04:00
Jesse Plamondon-Willard 904c39eb72
move assembly references out of common.targets 2019-09-14 18:13:41 -04:00
Jesse Plamondon-Willard 6a951d29ae
add $(GameExecutableName) to mod build package 2019-09-14 18:11:25 -04:00
Jesse Plamondon-Willard b3e4162f7c
move <GamePath> logic into separate .targets file file for reuse 2019-09-14 18:11:21 -04:00
Jesse Plamondon-Willard 601f22b296
overhaul mod build package readme 2019-09-14 18:11:15 -04:00
Jesse Plamondon-Willard 4eab734c81
reorganise and partly rewrite mod build config readme 2019-09-14 18:11:10 -04:00
Jesse Plamondon-Willard ffe5bc1d4d
remove temporary backwards-compat in mod build package 2019-09-14 18:11:05 -04:00
Jesse Plamondon-Willard 2cf2b6706f
move game detection into toolkit for reuse 2019-09-14 18:10:59 -04:00
Jesse Plamondon-Willard 1a8c7345c3
add stardewvalley.targets support to toolkit 2019-09-14 18:10:41 -04:00
Jesse Plamondon-Willard a7544e5afb
move game detection into toolkit for reuse 2019-09-14 18:05:18 -04:00
Jesse Plamondon-Willard 46a0dd6236
move environment utility into toolkit for reuse 2019-09-14 18:05:10 -04:00
Jesse Plamondon-Willard 660e8087a1
update for location change in SDV 1.4 (#638) 2019-09-14 18:05:04 -04:00
Jesse Plamondon-Willard 480b307e62
include PDB files in mod builds by default 2019-09-14 18:04:58 -04:00
Jesse Plamondon-Willard 059a59a7bc
fix error when loading a mod asset through a translated content manager (#647) 2019-09-14 18:04:50 -04:00
Jesse Plamondon-Willard 7ecbbb1b70
fix missing PDB file 2019-09-14 18:04:43 -04:00
Jesse Plamondon-Willard d3209b17de
decouple updating watchers & raising event to fix some mod changes not being tracked correctly (#648) 2019-09-14 18:04:11 -04:00
Jesse Plamondon-Willard fdf221adde
reorganise update loop a bit (#648) 2019-09-14 18:04:00 -04:00
Jesse Plamondon-Willard 31c882c8ce
fix map reloads not updating door warps (#643) 2019-09-14 18:03:54 -04:00
Jesse Plamondon-Willard 93551c0941
add temporary backwards compatibility for SDV 1.3.36 in mod build package 2019-09-14 18:03:48 -04:00
Jesse Plamondon-Willard d5a7465b02
add mod build features for new csproj format 2019-09-14 18:03:23 -04:00
Jesse Plamondon-Willard 4f87da3426
drop legacy options in mod build package 2019-09-14 18:03:17 -04:00
Jesse Plamondon-Willard b47329d5b8
fix year edge case in date calculations 2019-09-14 18:03:11 -04:00
Jesse Plamondon-Willard c28c3ff081
update code for SDV 1.4 changes (#638) 2019-09-14 18:03:04 -04:00
Jesse Plamondon-Willard f14260b3b4
fix typos 2019-09-14 18:02:45 -04:00
Jesse Plamondon-Willard a5146daaab
use known working terminal before trying x-terminal-emulator (#640) 2019-09-14 18:01:51 -04:00
Jesse Plamondon-Willard 1b3a6a514f
fix readlink commands in launcher not working in ZorinOS (#640) 2019-09-14 18:01:44 -04:00
Jesse Plamondon-Willard b9dec73469
disable mod-level asset caching (#644)
This fixes an issue where some asset references could be shared between content managers, causing changes to propagate unintentionally.
2019-09-14 18:01:38 -04:00
Jesse Plamondon-Willard 202ba23dcc
ignore root content managers when handling managed asset keys (#644) 2019-09-14 18:01:32 -04:00
Jesse Plamondon-Willard c37fe62ca2
no longer forward managed asset keys loaded through a mod content manager (#644)
That isn't needed for any documented functionality, and allowed mods to load (and in some cases edit) a different mod's local assets.
2019-09-14 18:01:26 -04:00
Jesse Plamondon-Willard fff5e8c939
move most mod asset loading logic into content managers (#644)
This fixes mods needing to load Map assets manually before the game could load them via internal key.
2019-09-14 18:01:19 -04:00
Jesse Plamondon-Willard bf3738eacb
add separate LogNetworkTraffic option 2019-09-14 18:00:49 -04:00
Jesse Plamondon-Willard d4e09c5a85
fix tilesheets seasonalised when loading an indoor map 2019-09-14 17:59:13 -04:00
Jesse Plamondon-Willard 24160cacdc
fix tilesheets not seasonalised when a map is reloaded (#642) 2019-09-14 17:59:03 -04:00
Jesse Plamondon-Willard 732d66f1fe
remove reflection no longer needed in newest SDV 1.4 build (#638) 2019-09-14 17:58:45 -04:00
Jesse Plamondon-Willard 2b12bb32f6
batch reload assets in some cases 2019-09-14 17:58:39 -04:00
Jesse Plamondon-Willard 5cd5e2416d
fix cache misses for non-English players 2019-09-14 17:58:33 -04:00
Jesse Plamondon-Willard f2dd11fe3f
fix inconsistent LoadStage behavior when creating a new save 2019-09-14 17:57:42 -04:00
Jesse Plamondon-Willard 2be3b7fb01
fix default toolkit namespace 2019-09-14 17:52:33 -04:00
Jesse Plamondon-Willard 83ae036e09
improve XNB mod and ignore file matching 2019-09-14 17:52:02 -04:00
Jesse Plamondon-Willard 30cc7ac916
consolidate XNB mods when scanning mods 2019-09-14 17:50:45 -04:00
Jesse Plamondon-Willard d74b710833
add mod type to mod scanner result 2019-09-14 17:50:39 -04:00
Jesse Plamondon-Willard a450b0ebef
drop monitor.ExitGameImmediately method
This is bad practice in most cases, and was only used by two mods which didn't legitimately need to exit immediately.
2019-09-14 17:50:26 -04:00
Jesse Plamondon-Willard e18ffc009d
update mods + mod build package for smapi-internal changes 2019-09-14 17:49:49 -04:00
Jesse Plamondon-Willard c15785a68d
simplify config.json and metadata.json names 2019-09-14 17:46:57 -04:00
Jesse Plamondon-Willard abffdc2dab
simplify project names 2019-09-14 17:46:34 -04:00
Jesse Plamondon-Willard f8e32f4433
update release notes, tweak launch script comments (#640) 2019-09-14 17:20:34 -04:00
Jesse Plamondon-Willard 99a4b2a3b9
update compatibility list, rm SMAPI 3.0 entries for mods which are incompatible with SDV 1.4 (#638) 2019-09-14 17:18:45 -04:00
Jesse Plamondon-Willard 3080c4fff4
clarify path formatting in <IgnoreModFilePatterns> 2019-09-14 17:16:45 -04:00
Jesse Plamondon-Willard 6f63bd0024
update nuspec for alpha release 2019-09-14 17:16:39 -04:00
Jesse Plamondon-Willard b887ecb30b
fix <IgnoreModFilePatterns> not applied to files matched by convention, update readme 2019-09-14 17:14:56 -04:00
Jesse Plamondon-Willard aa7e4b9c36
add new DLL to SMAPI references, support older game versions in package, fix name on Linux/Mac (#638) 2019-09-14 17:14:49 -04:00
Jesse Plamondon-Willard 78f28357e4
update code for SDV 1.4 (#638) 2019-09-14 17:14:43 -04:00
Jesse Plamondon-Willard ee13282843
update for new DLL in SDV 1.4 (#638) 2019-09-14 17:14:37 -04:00
Jesse Plamondon-Willard 161618d0d9
fix cache miss when not playing in English (#634) 2019-09-14 17:14:32 -04:00
Jesse Plamondon-Willard 6c220453e1
fix translatable assets not updated when switching language (#586) 2019-09-14 17:13:53 -04:00
Jesse Plamondon-Willard 09d1c5a601
list all detected issues in trace logs for incompatible mods 2019-09-14 17:12:17 -04:00
Jesse Plamondon-Willard 307055b028
bump version to 3.0 2019-09-14 17:10:44 -04:00
Jesse Plamondon-Willard d10ded0fcc
update compatibility list 2019-09-14 17:08:49 -04:00
Jesse Plamondon-Willard 80741d3d2d
update NuGet package version & release notes 2019-09-14 17:05:38 -04:00
Jesse Plamondon-Willard 4689eeb6a3
load mods much earlier so they can intercept all content assets 2019-09-14 17:03:15 -04:00
Jesse Plamondon-Willard 34633cfed9
bundle assets folder into mods by default 2019-09-14 17:02:11 -04:00
Jesse Plamondon-Willard f78502a3a4
fix incorrect input check, update release notes 2019-09-14 17:01:33 -04:00
Jesse Plamondon-Willard 332bcfa5a1
add content pack translations 2019-09-14 17:00:55 -04:00
Jesse Plamondon-Willard dc0556ff5f
fix log level for multiplayer 'received message' logs 2019-09-14 17:00:05 -04:00
Jesse Plamondon-Willard bad2ac2a29
remove deprecated APIs (#606) 2019-09-14 16:59:29 -04:00
Jesse Plamondon-Willard 4a297e29eb
better handle player reconnecting before disconnection is registered 2019-09-14 16:58:52 -04:00
Jesse Plamondon-Willard 0ba8325708
fix Newtonsoft.Json.pdb not ignored for release zips 2019-09-14 16:58:45 -04:00
Jesse Plamondon-Willard 6b347b83a7
fix Save Backup not pruning old backups if they're uncompressed 2019-09-14 16:58:25 -04:00
Jesse Plamondon-Willard 6fdb29d806
drop support for old versions of SMAPI and Visual Studio in mod build package 2019-09-14 16:57:38 -04:00
Jesse Plamondon-Willard 31a49b83c2
update NuGet packages 2019-09-14 16:57:15 -04:00
Jesse Plamondon-Willard e55295385b
add HasFile content pack method 2019-09-14 16:56:53 -04:00
kurumushi 7e9cb99acb
Update unix-launcher.sh
minor formatting fixes
2019-09-14 16:54:51 -04:00
kurumushi d14e470ea9
Update unix-launcher.sh
Changed the line to launch xterm, forcing TERM=xterm, as suggested by @toastal
2019-09-14 16:54:46 -04:00
Kris Scott 304d89cd19
Reworked the unix launcher
- More posix compliance and less prone to failing on bad variables
- Replaced depreciated backquotes (`) with the 'which' command
- Reworked the entire terminal detection code for easier editing and testing
2019-09-14 16:54:24 -04:00
Jesse Plamondon-Willard 6521df7b13
Merge branch 'develop' into stable 2019-09-13 18:24:54 -04:00
Jesse Plamondon-Willard b7b8b001c5
update for release 2019-09-13 18:20:27 -04:00
Jesse Plamondon-Willard fb04b67a2b
use same .csproj charset as Visual Studio tools 2019-09-13 17:44:41 -04:00
Jesse Plamondon-Willard 125bcbee56
migrate to new project file format 2019-09-13 17:22:45 -04:00
Jesse Plamondon-Willard 56726073ba
fix inconsistent default value 2019-09-13 16:22:09 -04:00
Jesse Plamondon-Willard e4d5b1d0db
fix 'unknown file extension' error not listing .json as a valid extension 2019-09-13 16:21:27 -04:00
Jesse Plamondon-Willard 23fe0c24a0
ignore AWS Beanstalk data file 2019-09-13 16:15:45 -04:00
Jesse Plamondon-Willard 6285c79548
prevent mods from crashing the game with invalid dialogue in more cases 2019-09-13 16:13:38 -04:00
Jesse Plamondon-Willard b02c5459e1
add Android instructions to log parser 2019-09-13 16:09:23 -04:00
Jesse Plamondon-Willard 6f83af0c21
fix mod compatibility list not caching data 2019-09-13 16:09:07 -04:00
Jesse Plamondon-Willard f7d4a9181b
move 1.4 compatibility into advanced until it's publicly available, change "SDV beta only" to use version (#638) 2019-09-13 16:00:35 -04:00
Jesse Plamondon-Willard 6eb36333b7
add 'broke in' API fields (#638) 2019-09-13 16:00:23 -04:00
Jesse Plamondon-Willard aa15431966
remove 'SMAPI 3.0 ready' API fields (#638) 2019-09-13 16:00:01 -04:00
Jesse Plamondon-Willard 01221ea66f
drop SMAPI 3.0 compatibility field (#638) 2019-09-13 15:58:54 -04:00
Jesse Plamondon-Willard 460b765f0b
make SDV beta blurb more generic (#638) 2019-09-13 15:58:34 -04:00
Jesse Plamondon-Willard 2b17de5460
link status color to non-beta status (#638) 2019-09-13 15:58:28 -04:00
Jesse Plamondon-Willard ceaa7124a1
support prerelease versions with a different tag (#638) 2019-09-13 15:58:22 -04:00
Jesse Plamondon-Willard bb69891122
add GitHub donation links 2019-09-13 15:58:09 -04:00
Jesse Plamondon-Willard af3fdf7e5a
revamp 'support SMAPI' section on main page 2019-09-13 15:58:01 -04:00
Jesse Plamondon-Willard 94702ca4b7
use default indentation for JSON files 2019-09-13 15:57:18 -04:00
Jesse Plamondon-Willard 7d755da3e2
fix log parser failing for logs with dot-delimited time formats 2019-09-13 15:52:30 -04:00
Jesse Plamondon-Willard 77f85a701a
update mod list filters to always display clicked mod link 2019-09-13 15:49:34 -04:00
Jesse Plamondon-Willard 8595a2a6fa
make Harmony patch names more consistent 2019-09-13 15:46:46 -04:00
Jesse Plamondon-Willard e3a2c56a6d
fix 'location list changed' verbose log not correctly listing changes 2019-09-13 15:44:57 -04:00
Jesse Plamondon-Willard 602c8d75db
use CRLF line endings in README.txt file for compatibility with more Windows text editors 2019-09-13 15:29:54 -04:00
Jesse Plamondon-Willard e43f01ffce
tweak patch code style 2019-09-13 15:29:08 -04:00
Jesse Plamondon-Willard 36efdcfce2
update release notes (#636) 2019-09-13 15:28:47 -04:00
Jesse Plamondon-Willard f250afbadd
fix unspecified log levels 2019-09-13 15:28:14 -04:00
Jesse Plamondon-Willard 4b9afa4ca3
tweak smapi.io logic to allow hidden non-old downloads 2019-09-13 15:27:48 -04:00
Jesse Plamondon-Willard 20912724a0
fix errors during early startup not shown before exit 2019-09-13 15:27:06 -04:00
Jesse Plamondon-Willard 29d11a72c2
fix release note 2019-09-13 15:26:15 -04:00
Jesse Plamondon-Willard 64331ffe8c
default Monitor.Log to trace 2019-09-13 15:25:07 -04:00
Jesse Plamondon-Willard 26cac2c12a
prevent invalid items from breaking menus on hover 2019-09-13 15:21:59 -04:00
Jesse Plamondon-Willard 575eb8c525
update release notes 2019-09-13 15:17:51 -04:00
Jesse Plamondon-Willard 9732ddb275
avoid possible invalid state if checkEventPrecondition is called asynchronously (#636) 2019-09-13 15:17:43 -04:00
Jesse Plamondon-Willard bac92d6f26
log underlying error (#636) 2019-09-13 15:17:35 -04:00
Jesse Plamondon-Willard 05bfd33ac4
fix formatting and code style (#636) 2019-09-13 15:17:09 -04:00
berkay2578 a13af946e2
Implement the return value of the original method 2019-09-13 15:16:58 -04:00
berkay2578 accaa6c0e0
checkEventPrecondition crash fix 2019-09-13 15:12:45 -04:00
Chris 1eab4474cc Bump Version to 0.9.0 2019-08-11 10:04:18 -04:00
Chris 7e669ad9de Updated assembly paths 2019-08-10 00:29:03 -04:00
Chris dea50b6851 SMainActivity changes to reflect changes made in 1.322 2019-08-10 00:28:50 -04:00
Chris 8c571146fb Bump version to 0.9.0-beta 2019-08-10 00:28:28 -04:00
Chris 5ac77c3cb2 Bump version to 0.8.9 2019-08-05 00:34:27 -04:00
Chris 241a118bec Possible language fix 2019-08-05 00:34:13 -04:00
Chris 16f7490871 Backport SMAPI 3.0 onLoadingFirstAsset to get mods loaded before the game starts 2019-08-03 05:06:17 -04:00
Chris af49b4457b bump version to beta and hardcode platform for Android 2019-08-03 05:05:08 -04:00
Chris 17c345fdde Fix permissions bug and added overrided methods that in MainActivity 2019-08-03 05:03:42 -04:00
Chris 7206a8707a Changes to the Should Trigger logic to support all devices 2019-08-03 05:03:01 -04:00
Chris 70564594dc Game version 1.31 renderScreenBuffer fix and added 1.31 reference. 2019-07-20 22:55:47 -04:00
Chris aa4ff743bb help console command fix 2019-07-18 04:53:32 -04:00
Chris 2ed77cbe33 SGameConsole overlap fix, SGameConsole boot on app start, VK config added and bug fixes, HarmonyBridge.Init is open to all devices now. Commented out SMainActivity methods that I think get called twice. 2019-07-17 15:44:40 -04:00
Chris 8fc324a86a Rewrites, added harmony patch, VK fix 2019-07-02 18:57:53 -04:00
Chris dbf53dc3eb Game Console, v0.86 2019-06-23 00:45:30 -04:00
Chris e75e569bce SMainActivity cleanup and Virtual Keyboard Reflection Fix 2019-06-10 14:20:10 -04:00
Chris f1a17641be Virtual toggle 2019-06-04 11:26:01 -04:00
Chris 470251e947 Re-enable SMAPI Reflection checks and Updated SGame for Game loader Synching 2019-06-01 02:48:21 -04:00
Chris 1b6361b32d Virtual Keyboard Mod + Updated SMainActivity, Some external Assembly references 2019-05-30 10:52:47 -04:00
Chris 6c33ddacd9 Remove SMAPI folder 2019-05-24 03:26:45 -04:00
Chris a73e416e32 Upgrade 2019-05-24 03:23:57 -04:00
Chris 0de5f433d1 android branch 2.11.2 Upgrade 2019-05-24 03:21:08 -04:00
Jesse Plamondon-Willard e22a542121
Merge branch 'develop' into stable 2019-04-22 22:06:02 -04:00
Jesse Plamondon-Willard 98f58c353e
prepare for 2.11.2 release 2019-04-22 22:05:36 -04:00
Jesse Plamondon-Willard 5d0cba90a1
fix error on Mac when a custom map references a vanilla tilesheet that only exists under Content/Maps 2019-04-22 22:02:14 -04:00
Jesse Plamondon-Willard 2800f7a931
add release note (#633) 2019-04-22 22:01:02 -04:00
archification e3ae54637f
adding termite support 2019-04-22 21:56:09 -04:00
842 changed files with 47455 additions and 19845 deletions

View File

@ -12,12 +12,19 @@ insert_final_newline = true
trim_trailing_whitespace = true
charset = utf-8
[*.{csproj,json,nuspec,targets}]
[*.{csproj,nuspec,targets}]
indent_size = 2
[*.csproj]
charset = utf-8-bom
insert_final_newline = false
[README.txt]
end_of_line=crlf
[*.{command,sh}]
end_of_line=lf
##########
## C# formatting
## documentation: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
@ -64,4 +71,11 @@ csharp_style_expression_bodied_accessors = true:suggestion
csharp_style_inlined_variable_declaration = true:warning
# avoid superfluous braces
csharp_prefer_braces = false:suggestion
csharp_prefer_braces = false:hint
##########
## Column guidelines
## documentation: https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelines
##########
[*.md]
guidelines = 100

6
.gitattributes vendored
View File

@ -1,2 +1,6 @@
# normalise line endings
# normalize line endings
* text=auto
README.txt text eol=crlf
*.command text eol=lf
*.sh text eol=lf

View File

@ -1,19 +1,12 @@
Do you want to...
* **Ask for help using SMAPI?**
Please post a message in the [SMAPI support thread](http://community.playstarbound.com/threads/108375)
or [ask on Discord](https://stardewvalleywiki.com/Modding:Community#Discord), don't create a
GitHub issue.
* **Report a bug?**
Please post a message in the [SMAPI support thread](http://community.playstarbound.com/threads/108375)
or [ask on Discord](https://stardewvalleywiki.com/Modding:Community#Discord) instead, unless
you're sure it's a bug in SMAPI itself.
* **Ask for help or report a bug?**
Please see 'get help' on [the SMAPI website](https://smapi.io) instead, don't create a GitHub
issue.
* **Submit a pull request?**
Pull requests are welcome! If you're submitting a new feature, it's best to discuss first to make
sure it'll be accepted. Feel free to come chat in [#modding on Discord](https://stardewvalleywiki.com/Modding:Community#Discord)
or post in the [SMAPI support thread](http://community.playstarbound.com/threads/108375).
sure it'll be accepted. Feel free to come chat [on Discord](https://smapi.io/community).
Documenting your code and using the same formatting conventions is appreciated, but don't worry too
much about it. We'll fix up the code after we accept the pull request if needed.

3
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,3 @@
patreon: pathoschild
ko_fi: pathoschild
custom: https://www.paypal.me/pathoschild

View File

@ -1,32 +0,0 @@
---
name: Bug report
about: Report a problem with SMAPI.
---
<!--
Only report a bug here if you're sure it's a SMAPI bug! To request support instead, see:
- #modding on Discord: https://stardewvalleywiki.com/Modding:Community#Discord
- support forum thread: https://community.playstarbound.com/threads/108375
- Nexus mod page: https://www.nexusmods.com/stardewvalley/mods/2400
Replace the instructions below with the bug details.
-->
**Describe the bug**
A clear and concise description of what the bug is. Provide any other details you think might be relevant here.
**To Reproduce**
Exact steps which reproduce the bug, if possible. For example:
1. Load save '...'.
2. Walk to '....'.
3. Click '....'.
4. Error occurs.
**Log file**
Upload your SMAPI log to https://log.smapi.io and post a link here.
**Screenshots**
If applicable, add screenshots to help explain your problem.

8
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Troubleshooting guide for players
url: https://smapi.io/troubleshoot
about: See if your question is already answered first!
- name: Get help or discuss
url: https://smapi.io/help
about: Ask for help from the community, or join the Stardew Valley Discord to ask questions, report issues, or discuss with the SMAPI developer, players, and mod authors. The SMAPI developer is @Pathoschild#0001 on Discord.

37
.github/ISSUE_TEMPLATE/custom.md vendored Normal file
View File

@ -0,0 +1,37 @@
---
name: Create a development task
about: DON'T DO THIS BEFORE READING. This is for specific changes to the code or technical bug reports. See below if something isn't working, you have questions or ideas, or you want to discuss something.
---
<!--
STOP!
Is this a specific development task? Don't create an issue if not!
See https://smapi.io/community if something isn't working, you have questions or ideas, or you want
to discuss something.
If you're absolutely sure it's a specific development task (e.g. a specific bug, not just
'something went wrong on my computer'), edit the template below.
-->
**Describe the bug**
A clear and concise description of what the bug is. Provide any other details you think might be relevant here.
**To Reproduce**
Exact steps which reproduce the bug, if possible. For example:
1. Load save '...'.
2. Walk to '....'.
3. Click '....'.
4. Error occurs.
**Log file**
Upload your SMAPI log to https://smapi.io/log and post a link here.
**Screenshots**
If applicable, add screenshots to help explain your problem.

View File

@ -1,15 +0,0 @@
---
name: Feature request
about: Suggest an idea for SMAPI.
---
<!--
GitHub issues are only used for development tasks. Please don't submit feature requests here! Instead, see...
- #modding on Discord: https://stardewvalleywiki.com/Modding:Community#Discord
- support forum thread: https://community.playstarbound.com/threads/108375
- Nexus page: https://www.nexusmods.com/stardewvalley/mods/2400
-->

View File

@ -1,15 +0,0 @@
---
name: General
about: Create a ticket about something else.
---
<!--
GitHub issues are only used for development tasks. For support and questions, see...
- #modding on Discord: https://stardewvalleywiki.com/Modding:Community#Discord
- support forum thread: https://community.playstarbound.com/threads/108375
- Nexus page: https://www.nexusmods.com/stardewvalley/mods/2400
-->

4
.github/SUPPORT.md vendored
View File

@ -1,5 +1,3 @@
GitHub issues are only used for SMAPI development tasks.
To get help with SMAPI problems, you can...
* [ask on Discord](https://stardewvalleywiki.com/Modding:Community#Discord);
* or post in the [SMAPI support thread](https://community.playstarbound.com/threads/108375).
To get help with SMAPI problems, see 'get help' on [the SMAPI website](https://smapi.io/) instead.

19
.gitignore vendored
View File

@ -11,6 +11,7 @@
[Oo]bj/
# Visual Studio cache/options
.config/
.vs/
# ReSharper
@ -18,6 +19,9 @@ _ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# Rider
.idea/
# NuGet packages
*.nupkg
**/packages/*
@ -26,3 +30,18 @@ _ReSharper*/
# sensitive files
appsettings.Development.json
# Azure generated files
src/SMAPI.Web/Properties/PublishProfiles/*.pubxml
src/SMAPI.Web/Properties/ServiceDependencies/* - Web Deploy/
# macOS
.DS_Store
# Loader Game Asserts
src/Loader/Assets/Content/
src/Loader/libs/
# VSHistory
**/.vshistory/
/build/StardewValleyAndroidStuff/

BIN
build/0Harmony.dll Normal file

Binary file not shown.

View File

@ -1,5 +0,0 @@
using System.Reflection;
[assembly: AssemblyProduct("SMAPI")]
[assembly: AssemblyVersion("2.11.1")]
[assembly: AssemblyFileVersion("2.11.1")]

BIN
build/Mono.Cecil.dll Normal file

Binary file not shown.

BIN
build/Newtonsoft.Json.dll Normal file

Binary file not shown.

BIN
build/Pintail.dll Normal file

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
build/TMXTile.dll Normal file

Binary file not shown.

View File

@ -1,139 +1,78 @@
<!--
This MSBuild file sets the common configuration and build scripts used by all the projects in this
repo. It imports the other MSBuild files as needed.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- load dev settings -->
<Import Condition="$(OS) != 'Windows_NT' AND Exists('$(HOME)\stardewvalley.targets')" Project="$(HOME)\stardewvalley.targets" />
<Import Condition="$(OS) == 'Windows_NT' AND Exists('$(USERPROFILE)\stardewvalley.targets')" Project="$(USERPROFILE)\stardewvalley.targets" />
<!-- find game path -->
<PropertyGroup>
<!-- Linux paths -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.steam/steam/steamapps/common/Stardew Valley</GamePath>
<!--set general build properties -->
<Version>3.18.4</Version>
<Product>SMAPI</Product>
<LangVersion>latest</LangVersion>
<AssemblySearchPaths>$(AssemblySearchPaths);{GAC}</AssemblySearchPaths>
<DefineConstants Condition="$(OS) == 'Windows_NT' AND '$(BUILD_FOR_MOBILE)' == ''">$(DefineConstants);SMAPI_DEPRECATED;SMAPI_FOR_WINDOWS</DefineConstants>
<DebugSymbols>true</DebugSymbols>
<!-- Mac paths -->
<GamePath Condition="!Exists('$(GamePath)')">/Applications/Stardew Valley.app/Contents/MacOS</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS</GamePath>
<!--embed symbols for error stack trace line numbers on Linux/macOS: https://github.com/dotnet/runtime/issues/39987-->
<DebugType>embedded</DebugType>
<!-- Windows paths -->
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\GOG Galaxy\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\Steam\steamapps\common\Stardew Valley</GamePath>
<!--enable nullable annotations, except in .NET Standard 2.0 where they aren't supported-->
<Nullable Condition="'$(TargetFramework)' != 'netstandard2.0'">enable</Nullable>
<NoWarn Condition="'$(TargetFramework)' == 'netstandard2.0'">$(NoWarn);CS8632</NoWarn>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)') AND '$(OS)' == 'Windows_NT'">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32))</GamePath>
<GamePath Condition="!Exists('$(GamePath)') AND '$(OS)' == 'Windows_NT'">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32))</GamePath>
<!--compile constants -->
<!--set platform-->
<DefineConstants Condition="$(OS) == 'Windows_NT'">$(DefineConstants);SMAPI_FOR_WINDOWS</DefineConstants>
<CopyToGameFolder>false</CopyToGameFolder>
<!-- allow mods to be compiled as AnyCPU for compatibility with older platforms -->
<ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>None</ResolveAssemblyWarnOrErrorOnTargetArchitectureMismatch>
<!--
suppress warnings that don't apply, so it's easier to spot actual issues.
warning | builds | summary | rationale
┄┄┄┄┄┄┄ | ┄┄┄┄┄┄┄┄┄┄ | ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ | ┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
CS0436 | all | local type conflicts with imported type | SMAPI needs to use certain low-level code during very early compatibility checks, before it's safe to load any other DLLs.
CS0612 | deprecated | member is obsolete | internal references to deprecated code when deprecated code is enabled.
CS0618 | deprecated | member is obsolete (with message) | internal references to deprecated code when deprecated code is enabled.
CA1416 | all | platform code available on all platforms | Compiler doesn't recognize the #if constants used by SMAPI.
CS0809 | all | obsolete overload for non-obsolete member | This is deliberate to signal to mods that certain APIs are only implemented for the game and shouldn't be called by mods.
NU1701 | all | NuGet package targets older .NET version | All such packages are carefully tested to make sure they do work.
-->
<NoWarn Condition="$(DefineConstants.Contains(SMAPI_DEPRECATED))">$(NoWarn);CS0612;CS0618</NoWarn>
<NoWarn>$(NoWarn);CS0436;CA1416;CS0809;NU1701</NoWarn>
</PropertyGroup>
<!-- add common references -->
<ItemGroup>
<Reference Condition="'$(OS)' == 'Windows_NT' AND '$(MSBuildProjectName)' != 'StardewModdingAPI.Toolkit' AND '$(MSBuildProjectName)' != 'StardewModdingAPI.Toolkit.CoreInterfaces'" Include="System.Management" />
<ItemGroup Condition="$(COMPILE_WITH_PLUGIN) == 'True'">
<PackageReference Include="Microsoft.Net.Compilers" Version="3.3.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
<!-- add game references-->
<Choose>
<When Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.ConsoleCommands' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.SaveBackup' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Tests'">
<!-- Windows -->
<ItemGroup Condition="$(OS) == 'Windows_NT'">
<Reference Include="Stardew Valley">
<HintPath>$(GamePath)\Stardew Valley.exe</HintPath>
<Private Condition="'$(MSBuildProjectName)' != 'StardewModdingAPI.Tests'">False</Private>
</Reference>
<Reference Include="Netcode">
<HintPath>$(GamePath)\Netcode.dll</HintPath>
<Private Condition="'$(MSBuildProjectName)' != 'StardewModdingAPI.Tests'">False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Game, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Graphics, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
<Reference Include="Microsoft.Xna.Framework.Xact, Version=4.0.0.0, Culture=neutral, PublicKeyToken=842cf8be1de50553, processorArchitecture=x86">
<Private>False</Private>
</Reference>
</ItemGroup>
<!--find game folder-->
<Import Project="find-game-folder.targets" />
<!-- <Target Name="ValidateInstallPath" AfterTargets="BeforeBuild">-->
<!-- &lt;!&ndash; if game path is invalid, show one user-friendly error instead of a slew of reference errors &ndash;&gt;-->
<!-- <Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically. You can specify where to find it; see https://smapi.io/package/custom-game-path." />-->
<!-- </Target>-->
<!-- Linux/Mac -->
<ItemGroup Condition="$(OS) != 'Windows_NT'">
<Reference Include="StardewValley">
<HintPath>$(GamePath)\StardewValley.exe</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="MonoGame.Framework">
<HintPath>$(GamePath)\MonoGame.Framework.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- common -->
<ItemGroup>
<Reference Include="GalaxyCSharp">
<HintPath>$(GamePath)\GalaxyCSharp.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="Lidgren.Network">
<HintPath>$(GamePath)\Lidgren.Network.dll</HintPath>
<Private>False</Private>
</Reference>
<Reference Include="xTile">
<HintPath>$(GamePath)\xTile.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
</When>
</Choose>
<!-- if game path is invalid, show one user-friendly error instead of a slew of reference errors -->
<Target Name="BeforeBuild">
<Error Condition="!Exists('$(GamePath)')" Text="Failed to find the game install path automatically; edit the *.csproj file and manually add a &lt;GamePath&gt; setting with the full directory path containing the Stardew Valley executable." />
</Target>
<!-- copy files into game directory and enable debugging -->
<Target Name="AfterBuild">
<CallTarget Targets="CopySMAPI;CopyDefaultMods" />
</Target>
<Target Name="CopySMAPI" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI'">
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).config.json" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).metadata.json" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\0Harmony.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)\smapi-internal" />
</Target>
<Target Name="CopyDefaultMods" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.ConsoleCommands' OR '$(MSBuildProjectName)' == 'StardewModdingAPI.Mods.SaveBackup'">
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\Mods\$(AssemblyName)" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\Mods\$(AssemblyName)" Condition="Exists('$(TargetDir)\$(TargetName).pdb')" />
<Copy SourceFiles="$(TargetDir)\manifest.json" DestinationFolder="$(GamePath)\Mods\$(AssemblyName)" />
</Target>
<Target Name="CopyToolkit" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI.Toolkit' AND $(TargetFramework) == 'net4.5'" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)\smapi-internal" />
</Target>
<Target Name="CopyToolkitCoreInterfaces" Condition="'$(MSBuildProjectName)' == 'StardewModdingAPI.Toolkit.CoreInterfaces' AND $(TargetFramework) == 'net4.5'" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).pdb" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)\smapi-internal" />
</Target>
<!-- common build settings -->
<PropertyGroup>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<!--deploy local files-->
<Import Project="deploy-local-smapi.targets" Condition="'$(CopyToGameFolder)' == 'true'" />
<!-- launch SMAPI through Visual Studio -->
<PropertyGroup>
<PropertyGroup Condition="'$(MSBuildProjectName)' == 'SMAPI'">
<StartAction>Program</StartAction>
<StartProgram>$(GamePath)\StardewModdingAPI.exe</StartProgram>
<StartWorkingDirectory>$(GamePath)</StartWorkingDirectory>
</PropertyGroup>
<!-- Somehow this makes Visual Studio for Mac recognise the previous section. Nobody knows why. -->
<!-- Somehow this makes Visual Studio for macOS recognise the previous section. Nobody knows why. -->
<PropertyGroup Condition="'$(RunConfiguration)' == 'Default'" />
</Project>

View File

@ -0,0 +1,13 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--set properties -->
<PropertyGroup>
<!-- <BUILD_FOR_MOBILE></BUILD_FOR_MOBILE>-->
<BUILD_FOR_MOBILE>GOOGLE</BUILD_FOR_MOBILE>
<!-- <BUILD_FOR_MOBILE>GOOGLE_145</BUILD_FOR_MOBILE>-->
<!-- <BUILD_FOR_MOBILE>AMAZON</BUILD_FOR_MOBILE>-->
<!-- <BUILD_FOR_MOBILE>SAMSUNG</BUILD_FOR_MOBILE>-->
<!-- <BUILD_FOR_MOBILE>GOOGLE_LEGACY</BUILD_FOR_MOBILE>-->
<COMPILE_WITH_PLUGIN>False</COMPILE_WITH_PLUGIN>
<DefineConstants Condition="'$(BUILD_FOR_MOBILE)' == 'GOOGLE'">SMAPI_DEPRECATED;SMAPI_FOR_MOBILE;ANDROID_TARGET_GOOGLE</DefineConstants>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,77 @@
<!--
This MSBuild file copies SMAPI and the bundled mods into the local Stardew Valley folder on build
to simplify testing. This just avoids needing to run the SMAPI installer each time.
This assumes `find-game-folder.targets` has already been imported and validated.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Target Name="CopySmapiFiles" AfterTargets="AfterBuild">
<CallTarget Targets="CopySMAPI;CopyDefaultMods" />
</Target>
<Target Name="CopySMAPI" Condition="'$(MSBuildProjectName)' == 'SMAPI'">
<!-- SMAPI -->
<ItemGroup>
<TranslationFiles Include="$(TargetDir)\i18n\*.json" />
</ItemGroup>
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFolder="$(GamePath)" Condition="$(OS) == 'Windows_NT'" />
<Copy SourceFiles="$(TargetDir)\$(TargetName)" DestinationFolder="$(GamePath)" Condition="$(OS) != 'Windows_NT'" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)" />
<Copy SourceFiles="$(TargetDir)\SMAPI.config.json" DestinationFiles="$(GamePath)\smapi-internal\config.json" />
<Copy SourceFiles="$(TargetDir)\SMAPI.metadata.json" DestinationFiles="$(GamePath)\smapi-internal\metadata.json" />
<Copy SourceFiles="$(TargetDir)\Newtonsoft.Json.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\TMXTile.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\Pintail.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="@(TranslationFiles)" DestinationFolder="$(GamePath)\smapi-internal\i18n" />
<!-- Harmony + dependencies -->
<Copy SourceFiles="$(TargetDir)\0Harmony.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\0Harmony.xml" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.Mdb.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\Mono.Cecil.Pdb.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\MonoMod.Common.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<!-- FluentHttpClient + dependencies -->
<Copy SourceFiles="$(TargetDir)\Pathoschild.Http.Client.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\System.Net.Http.Formatting.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<!-- .NET dependencies -->
<Copy SourceFiles="$(TargetDir)\System.Management.dll" DestinationFolder="$(GamePath)\smapi-internal" Condition="$(OS) == 'Windows_NT'" />
<!-- Legacy .NET dependencies (remove in SMAPI 4.0.0) -->
<Copy SourceFiles="$(TargetDir)\System.Configuration.ConfigurationManager.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\System.Runtime.Caching.dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\System.Security.Permissions.dll" DestinationFolder="$(GamePath)\smapi-internal" />
</Target>
<!-- .NET metadata files -->
<Target Name="CopyNetMetadata" Condition="'$(MSBuildProjectName)' == 'SMAPI.Installer'" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(TargetDir)\assets\runtimeconfig.json" DestinationFiles="$(GamePath)\StardewModdingAPI.runtimeconfig.json" />
<Copy SourceFiles="$(TargetDir)\assets\windows-exe-config.xml" DestinationFiles="$(GamePath)\StardewModdingAPI.exe.config" Condition="$(OS) == 'Windows_NT'" />
<Copy SourceFiles="$(GamePath)\Stardew Valley.deps.json" DestinationFiles="$(GamePath)\StardewModdingAPI.deps.json" Condition="!Exists('$(GamePath)\StardewModdingAPI.deps.json')" />
</Target>
<!-- bundled mods -->
<Target Name="CopyDefaultMods" Condition="'$(MSBuildProjectName)' == 'SMAPI.Mods.ConsoleCommands' OR '$(MSBuildProjectName)' == 'SMAPI.Mods.ErrorHandler' OR '$(MSBuildProjectName)' == 'SMAPI.Mods.SaveBackup'">
<ItemGroup>
<TranslationFiles Include="$(TargetDir)\i18n\*.json" />
</ItemGroup>
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\Mods\$(AssemblyName)" />
<Copy SourceFiles="$(TargetDir)\manifest.json" DestinationFolder="$(GamePath)\Mods\$(AssemblyName)" />
<Copy SourceFiles="@(TranslationFiles)" DestinationFolder="$(GamePath)\Mods\$(AssemblyName)\i18n" />
</Target>
<!-- toolkit -->
<Target Name="CopyToolkit" Condition="'$(MSBuildProjectName)' == 'SMAPI.Toolkit'" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)\smapi-internal" />
</Target>
<Target Name="CopyToolkitCoreInterfaces" Condition="'$(MSBuildProjectName)' == 'SMAPI.Toolkit.CoreInterfaces'" AfterTargets="PostBuildEvent">
<Copy SourceFiles="$(TargetDir)\$(TargetName).dll" DestinationFolder="$(GamePath)\smapi-internal" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).xml" DestinationFolder="$(GamePath)\smapi-internal" />
</Target>
</Project>

View File

@ -0,0 +1,66 @@
<!--
This MSBuild file detects the Stardew Valley install path if possible, and sets the 'GamePath'
property.
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- import developer's custom path (if any) -->
<Import Condition="$(OS) != 'Windows_NT' AND Exists('$(HOME)\stardewvalley.targets')" Project="$(HOME)\stardewvalley.targets" />
<Import Condition="$(OS) == 'Windows_NT' AND Exists('$(USERPROFILE)\stardewvalley.targets')" Project="$(USERPROFILE)\stardewvalley.targets" />
<!-- find game path -->
<Choose>
<When Condition="$(OS) == 'Unix' OR $(OS) == 'OSX'">
<PropertyGroup>
<!-- Linux -->
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/GOG Games/Stardew Valley/game</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.steam/steam/steamapps/common/Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.local/share/Steam/steamapps/common/Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/.var/app/com.valvesoftware.Steam/data/Steam/steamapps/common/Stardew Valley</GamePath>
<!-- macOS (may be 'Unix' or 'OSX') -->
<GamePath Condition="!Exists('$(GamePath)')">/Applications/Stardew Valley.app/Contents/MacOS</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$(HOME)/Library/Application Support/Steam/steamapps/common/Stardew Valley/Contents/MacOS</GamePath>
</PropertyGroup>
</When>
<When Condition="$(OS) == 'Windows_NT'">
<PropertyGroup>
<!-- registry paths -->
<GamePath Condition="!Exists('$(GamePath)')">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\GOG.com\Games\1453375253', 'PATH', null, RegistryView.Registry32))</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">$([MSBuild]::GetRegistryValueFromView('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Steam App 413150', 'InstallLocation', null, RegistryView.Registry64, RegistryView.Registry32))</GamePath>
<!-- derive from Steam library path -->
<_SteamLibraryPath>$([MSBuild]::GetRegistryValueFromView('HKEY_CURRENT_USER\SOFTWARE\Valve\Steam', 'SteamPath', null, RegistryView.Registry32))</_SteamLibraryPath>
<GamePath Condition="!Exists('$(GamePath)') AND '$(_SteamLibraryPath)' != ''">$(_SteamLibraryPath)\steamapps\common\Stardew Valley</GamePath>
<!-- GOG paths -->
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\GOG Galaxy\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\GOG Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GalaxyClient\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GOG Galaxy\Games\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\GOG Games\Stardew Valley</GamePath>
<!-- Xbox app paths -->
<!--
The Xbox app saves the install path to the registry, but we can't use it here since it
saves the internal readonly path (like C:\Program Files\WindowsApps\Mutable\<package ID>)
instead of the mods-enabled path (like C:\Program Files\ModifiableWindowsApps\Stardew Valley).
Fortunately we can cheat a bit: players can customize the install drive, but they can't
change the install path on the drive.
-->
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\ModifiableWindowsApps\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">D:\Program Files\ModifiableWindowsApps\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">E:\Program Files\ModifiableWindowsApps\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">F:\Program Files\ModifiableWindowsApps\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">G:\Program Files\ModifiableWindowsApps\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">H:\Program Files\ModifiableWindowsApps\Stardew Valley</GamePath>
<!-- Steam paths -->
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files\Steam\steamapps\common\Stardew Valley</GamePath>
<GamePath Condition="!Exists('$(GamePath)')">C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley</GamePath>
</PropertyGroup>
</When>
</Choose>
</Project>

Binary file not shown.

Binary file not shown.

View File

@ -1,127 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
This build task is run from the installer project after all projects have been compiled, and
creates the build package in the bin\Packages folder.
-->
<Target Name="AfterBuild">
<PropertyGroup>
<RootPath>$(SolutionDir)\..</RootPath>
<CompiledRootPath>$(RootPath)\bin\$(Configuration)</CompiledRootPath>
<CompiledSmapiPath>$(CompiledRootPath)\SMAPI</CompiledSmapiPath>
<CompiledToolkitPath>$(CompiledRootPath)\SMAPI.Toolkit\net4.5</CompiledToolkitPath>
<PackagePath>$(SolutionDir)\..\bin\SMAPI installer</PackagePath>
<PackageDevPath>$(SolutionDir)\..\bin\SMAPI installer for developers</PackageDevPath>
<PlatformName>windows</PlatformName>
<PlatformName Condition="$(OS) != 'Windows_NT'">unix</PlatformName>
</PropertyGroup>
<ItemGroup>
<CompiledMods Include="$(SolutionDir)\..\bin\$(Configuration)\Mods\**\*.*" />
</ItemGroup>
<!-- reset package directory -->
<RemoveDir Directories="$(PackagePath)" />
<RemoveDir Directories="$(PackageDevPath)" />
<!-- copy installer files -->
<Copy SourceFiles="$(TargetDir)\unix-install.sh" DestinationFiles="$(PackagePath)\install on Linux.sh" />
<Copy SourceFiles="$(TargetDir)\unix-install.sh" DestinationFiles="$(PackagePath)\install on Mac.command" />
<Copy SourceFiles="$(TargetDir)\windows-install.bat" DestinationFiles="$(PackagePath)\install on Windows.bat" />
<Copy SourceFiles="$(TargetDir)\README.txt" DestinationFiles="$(PackagePath)\README.txt" />
<Copy SourceFiles="$(TargetDir)\$(TargetName).exe" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(TargetDir)\windows-exe-config.xml" DestinationFiles="$(PackagePath)\internal\$(PlatformName)-install.exe.config" />
<!--copy bundle files-->
<Copy SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.exe" DestinationFolder="$(PackagePath)\bundle" />
<Copy SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.pdb" DestinationFolder="$(PackagePath)\bundle" />
<Copy SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.xml" DestinationFolder="$(PackagePath)\bundle" />
<Copy SourceFiles="$(CompiledSmapiPath)\steam_appid.txt" DestinationFolder="$(PackagePath)\bundle" />
<Copy SourceFiles="$(CompiledSmapiPath)\0Harmony.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledSmapiPath)\Mono.Cecil.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledSmapiPath)\Newtonsoft.Json.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.config.json" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledSmapiPath)\StardewModdingAPI.metadata.json" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.pdb" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.xml" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.pdb" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="$(CompiledToolkitPath)\StardewModdingAPI.Toolkit.CoreInterfaces.xml" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy SourceFiles="@(CompiledMods)" DestinationFolder="$(PackagePath)\bundle\Mods\%(RecursiveDir)" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(TargetDir)\unix-launcher.sh" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(CompiledSmapiPath)\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy Condition="$(OS) == 'Windows_NT'" SourceFiles="$(TargetDir)\windows-exe-config.xml" DestinationFiles="$(PackagePath)\bundle\StardewModdingAPI.exe.config" />
<!-- fix errors on Linux/Mac (sample: https://log.smapi.io/mMdFUpgB) -->
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(RootPath)\build\lib\System.Numerics.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<Copy Condition="$(OS) != 'Windows_NT'" SourceFiles="$(RootPath)\build\lib\System.Runtime.Caching.dll" DestinationFolder="$(PackagePath)\bundle\smapi-internal" />
<!-- fix Linux/Mac permissions -->
<Exec Condition="$(OS) != 'Windows_NT'" Command="chmod 755 &quot;$(PackagePath)\install on Linux.sh&quot;" />
<Exec Condition="$(OS) != 'Windows_NT'" Command="chmod 755 &quot;$(PackagePath)\install on Mac.command&quot;" />
<!-- finalise 'for developers' installer -->
<ItemGroup>
<PackageFiles Include="$(PackagePath)\**\*.*" />
</ItemGroup>
<Copy SourceFiles="@(PackageFiles)" DestinationFolder="$(PackageDevPath)\%(RecursiveDir)" />
<ZipDirectory FromDirPath="$(PackageDevPath)\bundle" ToFilePath="$(PackageDevPath)\internal\$(PlatformName)-install.dat" />
<RemoveDir Directories="$(PackageDevPath)\bundle" />
<!-- finalise normal installer -->
<ReplaceFileText FilePath="$(PackagePath)\bundle\smapi-internal\StardewModdingAPI.config.json" Search="&quot;DeveloperMode&quot;: true" Replace="&quot;DeveloperMode&quot;: false" />
<ZipDirectory FromDirPath="$(PackagePath)\bundle" ToFilePath="$(PackagePath)\internal\$(PlatformName)-install.dat" />
<RemoveDir Directories="$(PackagePath)\bundle" />
</Target>
<!-- Create a zip file with the contents of a given folder path. Derived from https://stackoverflow.com/a/38127938/262123. -->
<UsingTask TaskName="ZipDirectory" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v12.0.dll">
<ParameterGroup>
<FromDirPath ParameterType="System.String" Required="true" />
<ToFilePath ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.IO.Compression.FileSystem" />
<Using Namespace="System.IO.Compression" />
<Code Type="Fragment" Language="cs">
<![CDATA[
try
{
ZipFile.CreateFromDirectory(FromDirPath, ToFilePath);
return true;
}
catch(Exception ex)
{
Log.LogErrorFromException(ex);
return false;
}
]]>
</Code>
</Task>
</UsingTask>
<!-- Replace text in a file based on a regex pattern. Derived from https://stackoverflow.com/a/22571621/262123. -->
<UsingTask TaskName="ReplaceFileText" TaskFactory="CodeTaskFactory" AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.v4.0.dll">
<ParameterGroup>
<FilePath ParameterType="System.String" Required="true" />
<Search ParameterType="System.String" Required="true" />
<Replace ParameterType="System.String" Required="true" />
</ParameterGroup>
<Task>
<Reference Include="System.Core" />
<Using Namespace="System" />
<Using Namespace="System.IO" />
<Using Namespace="System.Text.RegularExpressions" />
<Code Type="Fragment" Language="cs">
<![CDATA[
File.WriteAllText(
FilePath,
Regex.Replace(File.ReadAllText(FilePath), Search, Replace)
);
]]>
</Code>
</Task>
</UsingTask>
</Project>

View File

@ -1,23 +0,0 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
This build task is run from the ModBuildConfig project after it's been compiled, and copies the
package files to the bin\Pathoschild.Stardew.ModBuildConfig folder.
-->
<Target Name="AfterBuild">
<PropertyGroup>
<PackagePath>$(SolutionDir)\..\bin\Pathoschild.Stardew.ModBuildConfig</PackagePath>
</PropertyGroup>
<RemoveDir Directories="$(PackagePath)" />
<Copy SourceFiles="$(ProjectDir)/package.nuspec" DestinationFolder="$(PackagePath)" />
<Copy SourceFiles="$(ProjectDir)/build/smapi.targets" DestinationFiles="$(PackagePath)/build/Pathoschild.Stardew.ModBuildConfig.targets" />
<Copy SourceFiles="$(TargetDir)/Newtonsoft.Json.dll" DestinationFolder="$(PackagePath)/build" />
<Copy SourceFiles="$(TargetDir)/StardewModdingAPI.ModBuildConfig.dll" DestinationFolder="$(PackagePath)/build" />
<Copy SourceFiles="$(TargetDir)/StardewModdingAPI.Toolkit.dll" DestinationFolder="$(PackagePath)/build" />
<Copy SourceFiles="$(TargetDir)/StardewModdingAPI.Toolkit.CoreInterfaces.dll" DestinationFolder="$(PackagePath)/build" />
<Copy SourceFiles="$(SolutionDir)/SMAPI.ModBuildConfig.Analyzer/bin/netstandard1.3/StardewModdingAPI.ModBuildConfig.Analyzer.dll" DestinationFolder="$(PackagePath)/analyzers/dotnet/cs" />
<Copy SourceFiles="$(SolutionDir)/SMAPI.ModBuildConfig.Analyzer/tools/install.ps1" DestinationFolder="$(PackagePath)/tools" />
<Copy SourceFiles="$(SolutionDir)/SMAPI.ModBuildConfig.Analyzer/tools/uninstall.ps1" DestinationFolder="$(PackagePath)/tools" />
</Target>
</Project>

View File

@ -0,0 +1,212 @@
#!/usr/bin/env bash
#
#
# This is the Bash equivalent of ../windows/prepare-install-package.ps1.
# When making changes, both scripts should be updated.
#
#
##########
## Fetch values
##########
# paths
gamePath="/home/pathoschild/Stardew Valley"
bundleModNames=("ConsoleCommands" "ErrorHandler" "SaveBackup")
# build configuration
buildConfig="Release"
folders=("linux" "macOS" "windows")
declare -A runtimes=(["linux"]="linux-x64" ["macOS"]="osx-x64" ["windows"]="win-x64")
declare -A msBuildPlatformNames=(["linux"]="Unix" ["macOS"]="OSX" ["windows"]="Windows_NT")
# version number
version="$1"
if [ $# -eq 0 ]; then
echo "SMAPI release version (like '4.0.0'):"
read version
fi
##########
## Move to SMAPI root
##########
cd "`dirname "$0"`/../.."
##########
## Clear old build files
##########
echo "Clearing old builds..."
echo "-------------------------------------------------"
for path in bin */**/bin */**/obj; do
echo "$path"
rm -rf $path
done
echo ""
##########
## Compile files
##########
. ${0%/*}/set-smapi-version.sh "$version"
for folder in ${folders[@]}; do
runtime=${runtimes[$folder]}
msbuildPlatformName=${msBuildPlatformNames[$folder]}
echo "Compiling SMAPI for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" --self-contained true
echo ""
echo ""
echo "Compiling installer for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI.Installer --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" -p:PublishTrimmed=True -p:TrimMode=Link --self-contained true
echo ""
echo ""
for modName in ${bundleModNames[@]}; do
echo "Compiling $modName for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI.Mods.$modName --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false"
echo ""
echo ""
done
done
##########
## Prepare install package
##########
echo "Preparing install package..."
echo "-------------------------------------------------"
# init paths
installAssets="src/SMAPI.Installer/assets"
packagePath="bin/SMAPI installer"
packageDevPath="bin/SMAPI installer for developers"
# init structure
for folder in ${folders[@]}; do
mkdir "$packagePath/internal/$folder/bundle/smapi-internal" --parents
done
# copy base installer files
for name in "install on Linux.sh" "install on macOS.command" "install on Windows.bat" "README.txt"; do
cp "$installAssets/$name" "$packagePath"
done
# copy per-platform files
for folder in ${folders[@]}; do
runtime=${runtimes[$folder]}
# get paths
smapiBin="src/SMAPI/bin/$buildConfig/$runtime/publish"
internalPath="$packagePath/internal/$folder"
bundlePath="$internalPath/bundle"
# installer files
cp -r "src/SMAPI.Installer/bin/$buildConfig/$runtime/publish"/* "$internalPath"
rm -rf "$internalPath/assets"
# runtime config for SMAPI
# This is identical to the one generated by the build, except that the min runtime version is
# set to 5.0.0 (instead of whatever version it was built with) and rollForward is set to latestMinor instead of
# minor.
cp "$installAssets/runtimeconfig.json" "$bundlePath/StardewModdingAPI.runtimeconfig.json"
# installer DLL config
if [ $folder == "windows" ]; then
cp "$installAssets/windows-exe-config.xml" "$packagePath/internal/windows/install.exe.config"
fi
# bundle root files
for name in "StardewModdingAPI" "StardewModdingAPI.dll" "StardewModdingAPI.xml" "steam_appid.txt"; do
if [ $name == "StardewModdingAPI" ] && [ $folder == "windows" ]; then
name="$name.exe"
fi
cp "$smapiBin/$name" "$bundlePath"
done
# bundle i18n
cp -r "$smapiBin/i18n" "$bundlePath/smapi-internal"
# bundle smapi-internal
for name in "0Harmony.dll" "0Harmony.xml" "Mono.Cecil.dll" "Mono.Cecil.Mdb.dll" "Mono.Cecil.Pdb.dll" "MonoMod.Common.dll" "Newtonsoft.Json.dll" "Pathoschild.Http.Client.dll" "Pintail.dll" "TMXTile.dll" "SMAPI.Toolkit.dll" "SMAPI.Toolkit.xml" "SMAPI.Toolkit.CoreInterfaces.dll" "SMAPI.Toolkit.CoreInterfaces.xml" "System.Net.Http.Formatting.dll"; do
cp "$smapiBin/$name" "$bundlePath/smapi-internal"
done
cp "$smapiBin/SMAPI.config.json" "$bundlePath/smapi-internal/config.json"
cp "$smapiBin/SMAPI.metadata.json" "$bundlePath/smapi-internal/metadata.json"
if [ $folder == "linux" ] || [ $folder == "macOS" ]; then
cp "$installAssets/unix-launcher.sh" "$bundlePath"
else
cp "$installAssets/windows-exe-config.xml" "$bundlePath/StardewModdingAPI.exe.config"
fi
# copy .NET dependencies
if [ $folder == "windows" ]; then
cp "$smapiBin/System.Management.dll" "$bundlePath/smapi-internal"
fi
# copy legacy .NET dependencies (remove in SMAPI 4.0.0)
cp "$smapiBin/System.Configuration.ConfigurationManager.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Runtime.Caching.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Security.Permissions.dll" "$bundlePath/smapi-internal"
# copy bundled mods
for modName in ${bundleModNames[@]}; do
fromPath="src/SMAPI.Mods.$modName/bin/$buildConfig/$runtime/publish"
targetPath="$bundlePath/Mods/$modName"
mkdir "$targetPath" --parents
cp "$fromPath/$modName.dll" "$targetPath"
cp "$fromPath/manifest.json" "$targetPath"
if [ -d "$fromPath/i18n" ]; then
cp -r "$fromPath/i18n" "$targetPath"
fi
done
done
# mark scripts executable
for path in "install on Linux.sh" "install on macOS.command" "bundle/unix-launcher.sh"; do
if [ -f "$packagePath/$path" ]; then
chmod 755 "$packagePath/$path"
fi
done
# split into main + for-dev folders
cp -r "$packagePath" "$packageDevPath"
for folder in ${folders[@]}; do
# disable developer mode in main package
sed --in-place --expression="s/\"DeveloperMode\": true/\"DeveloperMode\": false/" "$packagePath/internal/$folder/bundle/smapi-internal/config.json"
# convert bundle folder into final 'install.dat' files
for path in "$packagePath/internal/$folder" "$packageDevPath/internal/$folder"; do
pushd "$path/bundle" > /dev/null
zip "install.dat" * --recurse-paths --quiet
popd > /dev/null
mv "$path/bundle/install.dat" "$path/install.dat"
rm -rf "$path/bundle"
done
done
##########
## Create release zips
##########
# rename folders
mv "$packagePath" "bin/SMAPI $version installer"
mv "$packageDevPath" "bin/SMAPI $version installer for developers"
# package files
pushd bin > /dev/null
zip -9 "SMAPI $version installer.zip" "SMAPI $version installer" --recurse-paths --quiet
zip -9 "SMAPI $version installer for developers.zip" "SMAPI $version installer for developers" --recurse-paths --quiet
popd > /dev/null
echo ""
echo "Done! Package created in $(pwd)/bin"

26
build/unix/set-smapi-version.sh Executable file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
#
#
# This is the Bash equivalent of ../windows/set-smapi-version.ps1.
# When making changes, both scripts should be updated.
#
#
# get version number
version="$1"
if [ $# -eq 0 ]; then
echo "SMAPI release version (like '4.0.0'):"
read version
fi
# move to SMAPI root
cd "`dirname "$0"`/../.."
# apply changes
sed "s/<Version>.+<\/Version>/<Version>$version<\/Version>/" "build/common.targets" --in-place --regexp-extended
sed "s/RawApiVersion = \".+?\";/RawApiVersion = \"$version\";/" "src/SMAPI/Constants.cs" --in-place --regexp-extended
for modName in "ConsoleCommands" "ErrorHandler" "SaveBackup"; do
sed "s/\"(Version|MinimumApiVersion)\": \".+?\"/\"\1\": \"$version\"/g" "src/SMAPI.Mods.$modName/manifest.json" --in-place --regexp-extended
done

View File

@ -0,0 +1,67 @@
#!/usr/bin/env bash
##########
## Read config
##########
# get SMAPI version
version="$1"
if [ $# -eq 0 ]; then
echo "SMAPI release version (like '4.0.0'):"
read version
fi
# get Windows bin path
windowsBinPath="$2"
if [ $# -le 1 ]; then
echo "Windows compiled bin path:"
read windowsBinPath
fi
# installer internal folders
buildFolders=("linux" "macOS" "windows")
##########
## Finalize release package
##########
for folderName in "SMAPI $version installer" "SMAPI $version installer for developers"; do
# move files to Linux filesystem
echo "Preparing $folderName.zip..."
echo "-------------------------------------------------"
echo "copying '$windowsBinPath/$folderName' to Linux filesystem..."
cp -r "$windowsBinPath/$folderName" .
# fix permissions
echo "fixing permissions..."
find "$folderName" -type d -exec chmod 755 {} \;
find "$folderName" -type f -exec chmod 644 {} \;
find "$folderName" -name "*.sh" -exec chmod 755 {} \;
find "$folderName" -name "*.command" -exec chmod 755 {} \;
find "$folderName" -name "SMAPI.Installer" -exec chmod 755 {} \;
find "$folderName" -name "StardewModdingAPI" -exec chmod 755 {} \;
# convert bundle folder into final 'install.dat' files
for build in ${buildFolders[@]}; do
echo "packaging $folderName/internal/$build/install.dat..."
pushd "$folderName/internal/$build/bundle" > /dev/null
zip "install.dat" * --recurse-paths --quiet
mv install.dat ../
popd > /dev/null
rm -rf "$folderName/internal/$build/bundle"
done
# zip installer
echo "packaging installer..."
zip -9 "$folderName.zip" "$folderName" --recurse-paths --quiet
# move zip back to Windows bin path
echo "moving release zip to $windowsBinPath/$folderName.zip..."
mv "$folderName.zip" "$windowsBinPath"
rm -rf "$folderName"
echo ""
echo ""
done
echo "Done!"

View File

@ -0,0 +1,11 @@
function In-Place-Regex {
param (
[Parameter(Mandatory)][string]$Path,
[Parameter(Mandatory)][string]$Search,
[Parameter(Mandatory)][string]$Replace
)
$content = (Get-Content "$Path" -Encoding UTF8)
$content = ($content -replace "$Search", "$Replace")
[System.IO.File]::WriteAllLines((Get-Item "$Path").FullName, $content)
}

View File

@ -0,0 +1,241 @@
#
#
# This is the PowerShell equivalent of ../unix/prepare-install-package.sh, *except* that it doesn't
# set Linux permissions, create the install.dat files, or create the final zip (unless you specify
# --windows-only). Due to limitations in PowerShell, the final changes are handled by the
# windows/finalize-install-package.sh file in WSL.
#
# When making changes, make sure to update ../unix/prepare-install-package.ps1 too.
#
#
. "$PSScriptRoot/lib/in-place-regex.ps1"
##########
## Fetch values
##########
# paths
$gamePath = "C:\Program Files (x86)\Steam\steamapps\common\Stardew Valley"
$bundleModNames = "ConsoleCommands", "ErrorHandler", "SaveBackup"
# build configuration
$buildConfig = "Release"
$folders = "linux", "macOS", "windows"
$runtimes = @{ linux = "linux-x64"; macOS = "osx-x64"; windows = "win-x64" }
$msBuildPlatformNames = @{ linux = "Unix"; macOS = "OSX"; windows = "Windows_NT" }
# version number
$version = $args[0]
if (!$version) {
$version = Read-Host "SMAPI release version (like '4.0.0')"
}
# Windows-only build
$windowsOnly = $false
foreach ($arg in $args) {
if ($arg -eq "--windows-only") {
$windowsOnly = $true
$folders = "windows"
$runtimes = @{ windows = "win-x64" }
$msBuildPlatformNames = @{ windows = "Windows_NT" }
}
}
##########
## Move to SMAPI root
##########
cd "$PSScriptRoot/../.."
##########
## Clear old build files
##########
echo "Clearing old builds..."
echo "-------------------------------------------------"
foreach ($path in (dir -Recurse -Include ('bin', 'obj'))) {
echo "$path"
rm -Recurse -Force "$path"
}
echo ""
##########
## Compile files
##########
. "$PSScriptRoot/set-smapi-version.ps1" "$version"
foreach ($folder in $folders) {
$runtime = $runtimes[$folder]
$msbuildPlatformName = $msBuildPlatformNames[$folder]
echo "Compiling SMAPI for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" --self-contained true
echo ""
echo ""
echo "Compiling installer for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI.Installer --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false" -p:PublishTrimmed=True -p:TrimMode=Link --self-contained true
echo ""
echo ""
foreach ($modName in $bundleModNames) {
echo "Compiling $modName for $folder..."
echo "-------------------------------------------------"
dotnet publish src/SMAPI.Mods.$modName --configuration $buildConfig -v minimal --runtime "$runtime" -p:OS="$msbuildPlatformName" -p:GamePath="$gamePath" -p:CopyToGameFolder="false"
echo ""
echo ""
}
}
##########
## Prepare install package
##########
echo "Preparing install package..."
echo "----------------------------"
# init paths
$installAssets = "src/SMAPI.Installer/assets"
$packagePath = "bin/SMAPI installer"
$packageDevPath = "bin/SMAPI installer for developers"
# init structure
foreach ($folder in $folders) {
mkdir "$packagePath/internal/$folder/bundle/smapi-internal" > $null
}
# copy base installer files
foreach ($name in @("install on Linux.sh", "install on macOS.command", "install on Windows.bat", "README.txt")) {
if ($windowsOnly -and ($name -eq "install on Linux.sh" -or $name -eq "install on macOS.command")) {
continue;
}
cp "$installAssets/$name" "$packagePath"
}
# copy per-platform files
foreach ($folder in $folders) {
$runtime = $runtimes[$folder]
# get paths
$smapiBin = "src/SMAPI/bin/$buildConfig/$runtime/publish"
$internalPath = "$packagePath/internal/$folder"
$bundlePath = "$internalPath/bundle"
# installer files
cp "src/SMAPI.Installer/bin/$buildConfig/$runtime/publish/*" "$internalPath" -Recurse
rm -Recurse -Force "$internalPath/assets"
# runtime config for SMAPI
# This is identical to the one generated by the build, except that the min runtime version is
# set to 5.0.0 (instead of whatever version it was built with) and rollForward is set to latestMinor instead of
# minor.
cp "$installAssets/runtimeconfig.json" "$bundlePath/StardewModdingAPI.runtimeconfig.json"
# installer DLL config
if ($folder -eq "windows") {
cp "$installAssets/windows-exe-config.xml" "$packagePath/internal/windows/install.exe.config"
}
# bundle root files
foreach ($name in @("StardewModdingAPI", "StardewModdingAPI.dll", "StardewModdingAPI.xml", "steam_appid.txt")) {
if ($name -eq "StardewModdingAPI" -and $folder -eq "windows") {
$name = "$name.exe"
}
cp "$smapiBin/$name" "$bundlePath"
}
# bundle i18n
cp -Recurse "$smapiBin/i18n" "$bundlePath/smapi-internal"
# bundle smapi-internal
foreach ($name in @("0Harmony.dll", "0Harmony.xml", "Mono.Cecil.dll", "Mono.Cecil.Mdb.dll", "Mono.Cecil.Pdb.dll", "MonoMod.Common.dll", "Newtonsoft.Json.dll", "Pathoschild.Http.Client.dll", "Pintail.dll", "TMXTile.dll", "SMAPI.Toolkit.dll", "SMAPI.Toolkit.xml", "SMAPI.Toolkit.CoreInterfaces.dll", "SMAPI.Toolkit.CoreInterfaces.xml", "System.Net.Http.Formatting.dll")) {
cp "$smapiBin/$name" "$bundlePath/smapi-internal"
}
if ($folder -eq "windows") {
cp "$smapiBin/VdfConverter.dll" "$bundlePath/smapi-internal"
}
cp "$smapiBin/SMAPI.config.json" "$bundlePath/smapi-internal/config.json"
cp "$smapiBin/SMAPI.metadata.json" "$bundlePath/smapi-internal/metadata.json"
if ($folder -eq "linux" -or $folder -eq "macOS") {
cp "$installAssets/unix-launcher.sh" "$bundlePath"
}
else {
cp "$installAssets/windows-exe-config.xml" "$bundlePath/StardewModdingAPI.exe.config"
}
# copy .NET dependencies
if ($folder -eq "windows") {
cp "$smapiBin/System.Management.dll" "$bundlePath/smapi-internal"
}
# copy legacy .NET dependencies (remove in SMAPI 4.0.0)
cp "$smapiBin/System.Configuration.ConfigurationManager.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Runtime.Caching.dll" "$bundlePath/smapi-internal"
cp "$smapiBin/System.Security.Permissions.dll" "$bundlePath/smapi-internal"
# copy bundled mods
foreach ($modName in $bundleModNames) {
$fromPath = "src/SMAPI.Mods.$modName/bin/$buildConfig/$runtime/publish"
$targetPath = "$bundlePath/Mods/$modName"
mkdir "$targetPath" > $null
cp "$fromPath/$modName.dll" "$targetPath"
cp "$fromPath/manifest.json" "$targetPath"
if (Test-Path "$fromPath/i18n" -PathType Container) {
cp -Recurse "$fromPath/i18n" "$targetPath"
}
}
}
# DISABLED: will be handled by Linux script
# mark scripts executable
#ForEach ($path in @("install on Linux.sh", "install on macOS.command", "bundle/unix-launcher.sh")) {
# if (Test-Path "$packagePath/$path" -PathType Leaf) {
# chmod 755 "$packagePath/$path"
# }
#}
# split into main + for-dev folders
cp -Recurse "$packagePath" "$packageDevPath"
foreach ($folder in $folders) {
# disable developer mode in main package
In-Place-Regex -Path "$packagePath/internal/$folder/bundle/smapi-internal/config.json" -Search "`"DeveloperMode`": true" -Replace "`"DeveloperMode`": false"
# convert bundle folder into final 'install.dat' files
if ($windowsOnly)
{
foreach ($path in @("$packagePath/internal/$folder", "$packageDevPath/internal/$folder"))
{
Compress-Archive -Path "$path/bundle/*" -CompressionLevel Optimal -DestinationPath "$path/install.zip"
mv "$path/install.zip" "$path/install.dat"
rm -Recurse -Force "$path/bundle"
}
}
}
###########
### Create release zips
###########
# rename folders
mv "$packagePath" "bin/SMAPI $version installer"
mv "$packageDevPath" "bin/SMAPI $version installer for developers"
# package files
if ($windowsOnly)
{
Compress-Archive -Path "bin/SMAPI $version installer" -DestinationPath "bin/SMAPI $version installer.zip" -CompressionLevel Optimal
Compress-Archive -Path "bin/SMAPI $version installer for developers" -DestinationPath "bin/SMAPI $version installer for developers.zip" -CompressionLevel Optimal
}
echo ""
echo "Done! See docs/technical/smapi.md to create the release zips."

View File

@ -0,0 +1,25 @@
#
#
# This is the PowerShell equivalent of ../unix/set-smapi-version.sh.
# When making changes, both scripts should be updated.
#
#
. "$PSScriptRoot\lib\in-place-regex.ps1"
# get version number
$version=$args[0]
if (!$version) {
$version = Read-Host "SMAPI release version (like '4.0.0')"
}
# move to SMAPI root
cd "$PSScriptRoot/../.."
# apply changes
In-Place-Regex -Path "build/common.targets" -Search "<Version>.+</Version>" -Replace "<Version>$version</Version>"
In-Place-Regex -Path "src/SMAPI/Constants.cs" -Search "RawApiVersion = `".+?`";" -Replace "RawApiVersion = `"$version`";"
ForEach ($modName in "ConsoleCommands","ErrorHandler","SaveBackup") {
In-Place-Regex -Path "src/SMAPI.Mods.$modName/manifest.json" -Search "`"(Version|MinimumApiVersion)`": `".+?`"" -Replace "`"`$1`": `"$version`""
}

View File

@ -1,6 +1,6 @@
**SMAPI** is an open-source modding framework and API for [Stardew Valley](https://stardewvalley.net/)
that lets you play the game with mods. It's safely installed alongside the game's executable, and
doesn't change any of your game files. It serves eight main purposes:
doesn't change any of your game files. It serves seven main purposes:
1. **Load mods into the game.**
_SMAPI loads mods when the game is starting up so they can interact with it. (Code mods aren't
@ -10,20 +10,19 @@ doesn't change any of your game files. It serves eight main purposes:
_SMAPI provides APIs and events which let mods interact with the game in ways they otherwise
couldn't._
3. **Rewrite mods for crossplatform compatibility.**
_SMAPI rewrites mods' compiled code before loading them so they work on Linux/Mac/Windows
without the mods needing to handle differences between the Linux/Mac and Windows versions of the
game._
3. **Rewrite mods for compatibility.**
_SMAPI rewrites mods' compiled code before loading them so they work on Linux/macOS/Windows
without the mods needing to handle differences between the Linux/macOS and Windows versions of
the game. In some cases it also rewrites code broken by a game update so the mod doesn't break._
4. **Rewrite mods to update them.**
_SMAPI detects when a mod accesses part of the game that changed in a game update which affects
many mods, and rewrites the mod so it's compatible._
5. **Intercept errors and automatically fix saves.**
_SMAPI intercepts errors, shows the error info in the SMAPI console, and in most cases
automatically recovers the game. That prevents mods from crashing the game, and makes it
possible to troubleshoot errors in the game itself that would otherwise show a generic 'program
has stopped working' type of message._
5. **Intercept errors.**
_SMAPI intercepts errors that happen in the game, displays the error details in the console
window, and in most cases automatically recovers the game. This prevents mods from accidentally
crashing the game, and makes it possible to troubleshoot errors in the game itself that would
otherwise show a generic 'program has stopped working' type of message._
_SMAPI also automatically fixes save data in some cases when a load would crash, e.g. due to a
custom location or NPC mod that was removed._
6. **Provide update checks.**
_SMAPI automatically checks for new versions of your installed mods, and notifies you when any
@ -34,20 +33,47 @@ doesn't change any of your game files. It serves eight main purposes:
they cause problems._
8. **Back up your save files.**
_SMAPI automatically creates a daily backup of your saves and keeps ten backups, in case
something goes wrong. (Via the bundled SaveBackup mod.)_
_SMAPI automatically creates a daily backup of your saves and keeps ten backups (via the bundled
Save Backup mod), in case something goes wrong._
## Documentation
Have questions? Come [chat on Discord](https://discord.gg/KCJHWhX) with SMAPI developers and other
modders!
Have questions? Come [ask the community](https://smapi.io/community) to get help from SMAPI
developers and other modders!
### For players
* [Player guide](https://stardewvalleywiki.com/Modding:Player_Guide)
### For modders
* [Modding documentation](https://stardewvalleywiki.com/Modding:Index)
* [Mod build configuration](mod-build-config.md)
* [Modding documentation](https://smapi.io/docs)
* [Mod build configuration](technical/mod-package.md)
* [Release notes](release-notes.md)
### For SMAPI developers
* [Technical docs](technical-docs.md)
* [Technical docs](technical/smapi.md)
## Translating SMAPI
SMAPI rarely shows text in-game, so it only has a few translations. Contributions are welcome! See
[Modding:Translations](https://stardewvalleywiki.com/Modding:Translations) on the wiki for help
contributing translations.
locale | status
----------- | :----------------
default | ✓ [fully translated](../src/SMAPI/i18n/default.json)
Chinese | ✓ [fully translated](../src/SMAPI/i18n/zh.json)
French | ✓ [fully translated](../src/SMAPI/i18n/fr.json)
German | ✓ [fully translated](../src/SMAPI/i18n/de.json)
Hungarian | ✓ [fully translated](../src/SMAPI/i18n/hu.json)
Italian | ✓ [fully translated](../src/SMAPI/i18n/it.json)
Japanese | ✓ [fully translated](../src/SMAPI/i18n/ja.json)
Korean | ✓ [fully translated](../src/SMAPI/i18n/ko.json)
[Polish] | ✓ [fully translated](../src/SMAPI/i18n/pl.json)
Portuguese | ✓ [fully translated](../src/SMAPI/i18n/pt.json)
Russian | ✓ [fully translated](../src/SMAPI/i18n/ru.json)
Spanish | ✓ [fully translated](../src/SMAPI/i18n/es.json)
[Thai] | ✓ [fully translated](../src/SMAPI/i18n/th.json)
Turkish | ✓ [fully translated](../src/SMAPI/i18n/tr.json)
[Ukrainian] | ✓ [fully translated](../src/SMAPI/i18n/uk.json)
[Polish]: https://www.nexusmods.com/stardewvalley/mods/3616
[Thai]: https://www.nexusmods.com/stardewvalley/mods/7052
[Ukrainian]: https://www.nexusmods.com/stardewvalley/mods/8427

View File

@ -1,283 +1 @@
The **mod build package** is an open-source NuGet package which automates the MSBuild configuration
for SMAPI mods.
The package...
* detects your game install path;
* adds the assembly references you need (with automatic support for Linux/Mac/Windows);
* packages the mod into your `Mods` folder when you rebuild the code (configurable);
* configures Visual Studio to enable debugging into the code when the game is running (_Windows only_);
* adds C# analyzers to warn for Stardew Valley-specific issues.
## Contents
* [Install](#install)
* [Configure](#configure)
* [Code analysis warnings](#code-analysis-warnings)
* [Troubleshoot](#troubleshoot)
* [Release notes](#release-notes)
## Install
**When creating a new mod:**
1. Create an empty library project.
2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig).
3. [Write your code](https://stardewvalleywiki.com/Modding:Creating_a_SMAPI_mod).
4. Compile on any platform.
**When migrating an existing mod:**
1. Remove any project references to `Microsoft.Xna.*`, `MonoGame`, Stardew Valley,
`StardewModdingAPI`, and `xTile`.
2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig).
3. Compile on any platform.
## Configure
### Deploy files into the `Mods` folder
By default, your mod will be copied into the game's `Mods` folder (with a subfolder matching your
project name) when you rebuild the code. The package will automatically include your
`manifest.json`, any `i18n` files, and the build output.
To add custom files to the mod folder, just [add them to the build output](https://stackoverflow.com/a/10828462/262123).
(If your project references another mod, make sure the reference is [_not_ marked 'copy local'](https://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx).)
You can change the mod's folder name by adding this above the first `</PropertyGroup>` in your
`.csproj`:
```xml
<ModFolderName>YourModName</ModFolderName>
```
If you don't want to deploy the mod automatically, you can add this:
```xml
<EnableModDeploy>False</EnableModDeploy>
```
### Create release zip
By default, a zip file will be created in the build output when you rebuild the code. This zip file
contains all the files needed to share your mod in the recommended format for uploading to Nexus
Mods or other sites.
You can change the zipped folder name (and zip name) by adding this above the first
`</PropertyGroup>` in your `.csproj`:
```xml
<ModFolderName>YourModName</ModFolderName>
```
You can change the folder path where the zip is created like this:
```xml
<ModZipPath>$(SolutionDir)\_releases</ModZipPath>
```
Finally, you can disable the zip creation with this:
```xml
<EnableModZip>False</EnableModZip>
```
Or only create it in release builds with this:
```xml
<EnableModZip Condition="$(Configuration) != 'Release'">False</EnableModZip>
```
### Game path
The package usually detects where your game is installed automatically. If it can't find your game
or you have multiple installs, you can specify the path yourself. There's two ways to do that:
* **Option 1: global game path (recommended).**
_This will apply to every project that uses the package._
1. Get the full folder path containing the Stardew Valley executable.
2. Create this file:
platform | path
--------- | ----
Linux/Mac | `~/stardewvalley.targets`
Windows | `%USERPROFILE%\stardewvalley.targets`
3. Save the file with this content:
```xml
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<GamePath>PATH_HERE</GamePath>
</PropertyGroup>
</Project>
```
4. Replace `PATH_HERE` with your game path.
* **Option 2: path in the project file.**
_You'll need to do this for each project that uses the package._
1. Get the folder path containing the Stardew Valley `.exe` file.
2. Add this to your `.csproj` file under the `<Project` line:
```xml
<PropertyGroup>
<GamePath>PATH_HERE</GamePath>
</PropertyGroup>
```
3. Replace `PATH_HERE` with your custom game install path.
The configuration will check your custom path first, then fall back to the default paths (so it'll
still compile on a different computer).
### Ignore files
If you don't want to include a file in the mod folder or release zip:
* Make sure it's not copied to the build output. For a DLL, make sure the reference is [not marked 'copy local'](https://msdn.microsoft.com/en-us/library/t1zz5y8c(v=vs.100).aspx).
* Or add this to your `.csproj` file under the `<Project` line:
```xml
<IgnoreModFilePatterns>\.txt$, \.pdf$</IgnoreModFilePatterns>
```
This is a comma-delimited list of regular expression patterns. If any pattern matches a file's
relative path in your mod folder, that file won't be included.
### Non-mod projects
You can use the package in non-mod projects too (e.g. unit tests or framework DLLs). You'll need to
disable deploying the mod and creating a release zip:
```xml
<EnableModDeploy>False</EnableModDeploy>
<EnableModZip>False</EnableModZip>
```
If this is for unit tests, you may need to copy the referenced DLLs into your build output too:
```xml
<CopyModReferencesToBuildOutput>True</CopyModReferencesToBuildOutput>
```
## Code warnings
### Overview
The NuGet package adds code warnings in Visual Studio specific to Stardew Valley. For example:
![](screenshots/code-analyzer-example.png)
You can hide the warnings using the warning ID (shown under 'code' in the Error List). See...
* [for specific code](https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-pragma-warning);
* for a method using this attribute:
```cs
[System.Diagnostics.CodeAnalysis.SuppressMessage("SMAPI.CommonErrors", "AvoidNetField")]
```
* for an entire project:
1. Expand the _References_ node for the project in Visual Studio.
2. Right-click on _Analyzers_ and choose _Open Active Rule Set_.
4. Expand _StardewModdingAPI.ModBuildConfig.Analyzer_ and uncheck the warnings you want to hide.
See below for help with each specific warning.
### Avoid implicit net field cast
Warning text:
> This implicitly converts '{{expression}}' from {{net type}} to {{other type}}, but
> {{net type}} has unintuitive implicit conversion rules. Consider comparing against the actual
> value instead to avoid bugs.
Stardew Valley uses net types (like `NetBool` and `NetInt`) to handle multiplayer sync. These types
can implicitly convert to their equivalent normal values (like `bool x = new NetBool()`), but their
conversion rules are unintuitive and error-prone. For example,
`item?.category == null && item?.category != null` can both be true at once, and
`building.indoors != null` can be true for a null value.
Suggested fix:
* Some net fields have an equivalent non-net property like `monster.Health` (`int`) instead of
`monster.health` (`NetInt`). The package will add a separate [AvoidNetField](#avoid-net-field) warning for
these. Use the suggested property instead.
* For a reference type (i.e. one that can contain `null`), you can use the `.Value` property:
```c#
if (building.indoors.Value == null)
```
Or convert the value before comparison:
```c#
GameLocation indoors = building.indoors;
if(indoors == null)
// ...
```
* For a value type (i.e. one that can't contain `null`), check if the object is null (if applicable)
and compare with `.Value`:
```cs
if (item != null && item.category.Value == 0)
```
### Avoid net field
Warning text:
> '{{expression}}' is a {{net type}} field; consider using the {{property name}} property instead.
Your code accesses a net field, which has some unusual behavior (see [AvoidImplicitNetFieldCast](#avoid-implicit-net-field-cast)).
This field has an equivalent non-net property that avoids those issues.
Suggested fix: access the suggested property name instead.
### Avoid obsolete field
Warning text:
> The '{{old field}}' field is obsolete and should be replaced with '{{new field}}'.
Your code accesses a field which is obsolete or no longer works. Use the suggested field instead.
## Troubleshoot
### "Failed to find the game install path"
That error means the package couldn't find your game. You can specify the game path yourself; see
_[Game path](#game-path)_ above.
## Release notes
### 2.2
* Added support for SMAPI 2.8+ (still compatible with earlier versions).
* Added default game paths for 32-bit Windows.
* Fixed valid manifests marked invalid in some cases.
### 2.1
* Added support for Stardew Valley 1.3.
* Added support for non-mod projects.
* Added C# analyzers to warn about implicit conversions of Netcode fields in Stardew Valley 1.3.
* Added option to ignore files by regex pattern.
* Added reference to new SMAPI DLL.
* Fixed some game paths not detected by NuGet package.
### 2.0.2
* Fixed compatibility issue on Linux.
### 2.0.1
* Fixed mod deploy failing to create subfolders if they don't already exist.
### 2.0
* Added: mods are now copied into the `Mods` folder automatically (configurable).
* Added: release zips are now created automatically in your build output folder (configurable).
* Added: mod deploy and release zips now exclude Json.NET automatically, since it's provided by SMAPI.
* Added mod's version to release zip filename.
* Improved errors to simplify troubleshooting.
* Fixed release zip not having a mod folder.
* Fixed release zip failing if mod name contains characters that aren't valid in a filename.
### 1.7.1
* Fixed issue where i18n folders were flattened.
* The manifest/i18n files in the project now take precedence over those in the build output if both
are present.
### 1.7
* Added option to create release zips on build.
* Added reference to XNA's XACT library for audio-related mods.
### 1.6
* Added support for deploying mod files into `Mods` automatically.
* Added a build error if a game folder is found, but doesn't contain Stardew Valley or SMAPI.
### 1.5
* Added support for setting a custom game path globally.
* Added default GOG path on Mac.
### 1.4
* Fixed detection of non-default game paths on 32-bit Windows.
* Removed support for SilVerPLuM (discontinued).
* Removed support for overriding the target platform (no longer needed since SMAPI crossplatforms
mods automatically).
### 1.3
* Added support for non-default game paths on Windows.
### 1.2
* Exclude game binaries from mod build output.
### 1.1
* Added support for overriding the target platform.
### 1.0
* Initial release.
* Added support for detecting the game path automatically.
* Added support for injecting XNA/MonoGame references automatically based on the OS.
* Added support for mod builders like SilVerPLuM.
[Documentation moved](technical/mod-package.md).

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,232 +0,0 @@
&larr; [README](README.md)
This file provides more technical documentation about SMAPI. If you only want to use or create
mods, this section isn't relevant to you; see the main README to use or create mods.
# Contents
* [SMAPI](#smapi)
* [Development](#development)
* [Compiling from source](#compiling-from-source)
* [Debugging a local build](#debugging-a-local-build)
* [Preparing a release](#preparing-a-release)
* [Customisation](#customisation)
* [Configuration file](#configuration-file)
* [Command-line arguments](#command-line-arguments)
* [Compile flags](#compile-flags)
* [SMAPI web services](#smapi-web-services)
* [Overview](#overview)
* [Log parser](#log-parser)
* [Web API](#web-api)
* [Development](#development-2)
* [Local development](#local-development)
* [Deploying to Amazon Beanstalk](#deploying-to-amazon-beanstalk)
* [Mod build config package](#mod-build-config-package)
# SMAPI
## Development
### Compiling from source
Using an official SMAPI release is recommended for most users.
SMAPI uses some C# 7 code, so you'll need at least
[Visual Studio 2017](https://www.visualstudio.com/vs/community/) on Windows,
[MonoDevelop 7.0](https://www.monodevelop.com/) on Linux,
[Visual Studio 2017 for Mac](https://www.visualstudio.com/vs/visual-studio-mac/), or an equivalent
IDE to compile it. It uses build configuration derived from the
[crossplatform mod config](https://github.com/Pathoschild/Stardew.ModBuildConfig#readme) to detect
your current OS automatically and load the correct references. Compile output will be placed in a
`bin` folder at the root of the git repository.
### Debugging a local build
Rebuilding the solution in debug mode will copy the SMAPI files into your game folder. Starting
the `StardewModdingAPI` project with debugging from Visual Studio (on Mac or Windows) will launch
SMAPI with the debugger attached, so you can intercept errors and step through the code being
executed. This doesn't work in MonoDevelop on Linux, unfortunately.
### Preparing a release
To prepare a crossplatform SMAPI release, you'll need to compile it on two platforms. See
[crossplatforming info](https://stardewvalleywiki.com/Modding:Modder_Guide/Test_and_Troubleshoot#Testing_on_all_platforms)
on the wiki for the first-time setup.
1. Update the version number in `GlobalAssemblyInfo.cs` and `Constants::Version`. Make sure you use a
[semantic version](https://semver.org). Recommended format:
build type | format | example
:--------- | :----------------------- | :------
dev build | `<version>-alpha.<date>` | `3.0-alpha.20171230`
prerelease | `<version>-beta.<count>` | `3.0-beta.2`
release | `<version>` | `3.0`
2. In Windows:
1. Rebuild the solution in Release mode.
2. Copy `windows-install.*` from `bin/SMAPI installer` and `bin/SMAPI installer for developers` to
Linux/Mac.
3. In Linux/Mac:
1. Rebuild the solution in Release mode.
2. Add the `windows-install.*` files to the `bin/SMAPI installer` and
`bin/SMAPI installer for developers` folders.
3. Rename the folders to `SMAPI <version> installer` and `SMAPI <version> installer for developers`.
4. Zip the two folders.
## Customisation
### Configuration file
You can customise the SMAPI behaviour by editing the `smapi-internal/StardewModdingAPI.config.json`
file in your game folder.
Basic fields:
field | purpose
----------------- | -------
`DeveloperMode` | Default `false` (except in _SMAPI for developers_ releases). Whether to enable features intended for mod developers (mainly more detailed console logging).
`CheckForUpdates` | Default `true`. Whether SMAPI should check for a newer version when you load the game. If a new version is available, a small message will appear in the console. This doesn't affect the load time even if your connection is offline or slow, because it happens in the background.
`VerboseLogging` | Default `false`. Whether SMAPI should log more information about the game context.
`ModData` | Internal metadata about SMAPI mods. Changing this isn't recommended and may destabilise your game. See documentation in the file.
### Command-line arguments
The SMAPI installer recognises three command-line arguments:
argument | purpose
-------- | -------
`--install` | Preselects the install action, skipping the prompt asking what the user wants to do.
`--uninstall` | Preselects the uninstall action, skipping the prompt asking what the user wants to do.
`--game-path "path"` | Specifies the full path to the folder containing the Stardew Valley executable, skipping automatic detection and any prompt to choose a path. If the path is not valid, the installer displays an error.
SMAPI itself recognises two arguments, but these are intended for internal use or testing and may
change without warning.
argument | purpose
-------- | -------
`--no-terminal` | SMAPI won't write anything to the console window. (Messages will still be written to the log file.)
`--mods-path` | The path to search for mods, if not the standard `Mods` folder. This can be a path relative to the game folder (like `--mods-path "Mods (test)"`) or an absolute path.
### Compile flags
SMAPI uses a small number of conditional compilation constants, which you can set by editing the
`<DefineConstants>` element in `StardewModdingAPI.csproj`. Supported constants:
flag | purpose
---- | -------
`SMAPI_FOR_WINDOWS` | Whether SMAPI is being compiled on Windows for players on Windows. Set automatically in `crossplatform.targets`.
`SMAPI_3_0_STRICT` | Whether to exclude all deprecated APIs from compilation. This is useful for testing mods for SMAPI 3.0 compatibility.
# SMAPI web services
## Overview
The `StardewModdingAPI.Web` project provides an API and web UI hosted at `*.smapi.io`.
### Log parser
The log parser provides a web UI for uploading, parsing, and sharing SMAPI logs. The logs are
persisted in a compressed form to Pastebin.
The log parser lives at https://log.smapi.io.
### Web API
SMAPI provides a web API at `api.smapi.io` for use by SMAPI and external tools. The URL includes a
`{version}` token, which is the SMAPI version for backwards compatibility. This API is publicly
accessible but not officially released; it may change at any time.
The API has one `/mods` endpoint. This provides mod info, including official versions and URLs
(from Chucklefish, GitHub, or Nexus), unofficial versions from the wiki, and optional mod metadata
from the wiki and SMAPI's internal data. This is used by SMAPI to perform update checks, and by
external tools to fetch mod data.
The API accepts a `POST` request with the mods to match, each of which **must** specify an ID and
may _optionally_ specify [update keys](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest#Update_checks).
The API will automatically try to fetch known update keys from the wiki and internal data based on
the given ID.
```
POST https://api.smapi.io/v2.0/mods
{
"mods": [
{
"id": "Pathoschild.LookupAnything",
"updateKeys": [ "nexus:541", "chucklefish:4250" ]
}
],
"includeExtendedMetadata": true
}
```
The API will automatically aggregate versions and errors. Each mod will include...
* an `id` (matching what you passed in);
* up to three versions: `main` (e.g. 'latest version' field on Nexus), `optional` if newer (e.g.
optional files on Nexus), and `unofficial` if newer (from the wiki);
* `metadata` with mod info crossreferenced from the wiki and internal data (only if you specified
`includeExtendedMetadata: true`);
* and `errors` containing any error messages that occurred while fetching data.
For example:
```
[
{
"id": "Pathoschild.LookupAnything",
"main": {
"version": "1.19",
"url": "https://www.nexusmods.com/stardewvalley/mods/541"
},
"metadata": {
"id": [
"Pathoschild.LookupAnything",
"LookupAnything"
],
"name": "Lookup Anything",
"nexusID": 541,
"gitHubRepo": "Pathoschild/StardewMods",
"compatibilityStatus": "Ok",
"compatibilitySummary": "✓ use latest version."
},
"errors": []
}
]
```
## Development
### Local development
`StardewModdingAPI.Web` is a regular ASP.NET MVC Core app, so you can just launch it from within
Visual Studio to run a local version.
There are two differences when it's run locally: all endpoints use HTTP instead of HTTPS, and the
subdomain portion becomes a route (e.g. `log.smapi.io` &rarr; `localhost:59482/log`).
Before running it locally, you need to enter your credentials in the `appsettings.Development.json`
file. See the next section for a description of each setting. This file is listed in `.gitignore`
to prevent accidentally committing credentials.
### Deploying to Amazon Beanstalk
The app can be deployed to a standard Amazon Beanstalk IIS environment. When creating the
environment, make sure to specify the following environment properties:
property name | description
------------------------------- | -----------------
`LogParser:PastebinDevKey` | The [Pastebin developer key](https://pastebin.com/api#1) used to authenticate with the Pastebin API.
`LogParser:PastebinUserKey` | The [Pastebin user key](https://pastebin.com/api#8) used to authenticate with the Pastebin API. Can be left blank to post anonymously.
`LogParser:SectionUrl` | The root URL of the log page, like `https://log.smapi.io/`.
`ModUpdateCheck:GitHubPassword` | The password with which to authenticate to GitHub when fetching release info.
`ModUpdateCheck:GitHubUsername` | The username with which to authenticate to GitHub when fetching release info.
## Mod build config package
### Overview
The mod build config package is a NuGet package that mods reference to automatically set up
references, configure the build, and add analyzers specific to Stardew Valley mods.
This involves three projects:
project | purpose
------------------------------------------------- | ----------------
`StardewModdingAPI.ModBuildConfig` | Configures the build (references, deploying the mod files, setting up debugging, etc).
`StardewModdingAPI.ModBuildConfig.Analyzer` | Adds C# analyzers which show code warnings in Visual Studio.
`StardewModdingAPI.ModBuildConfig.Analyzer.Tests` | Unit tests for the C# analyzers.
When the projects are built, the relevant files are copied into `bin/Pathoschild.Stardew.ModBuildConfig`.
### Preparing a build
To prepare a build of the NuGet package:
1. Install the [NuGet CLI](https://docs.microsoft.com/en-us/nuget/install-nuget-client-tools#nugetexe-cli).
1. Change the version and release notes in `package.nuspec`.
2. Rebuild the solution in _Release_ mode.
3. Open a terminal in the `bin/Pathoschild.Stardew.ModBuildConfig` package and run this command:
```bash
nuget.exe pack
```
That will create a `Pathoschild.Stardew.ModBuildConfig-<version>.nupkg` file in the same directory
which can be uploaded to NuGet or referenced directly.

View File

@ -0,0 +1,618 @@
&larr; [SMAPI](../README.md)
The **mod build package** is an open-source NuGet package which automates the MSBuild configuration
for SMAPI mods and related tools. The package is fully compatible with Linux, macOS, and Windows.
## Contents
* [Use](#use)
* [Features](#features)
* [Configure](#configure)
* [Code warnings](#code-warnings)
* [FAQs](#faqs)
* [How do I set the game path?](#custom-game-path)
* [How do I change which files are included in the mod deploy/zip?](#how-do-i-change-which-files-are-included-in-the-mod-deployzip)
* [Can I use the package for non-mod projects?](#can-i-use-the-package-for-non-mod-projects)
* [For SMAPI developers](#for-smapi-developers)
* [Release notes](#release-notes)
## Use
1. Create an empty library project.
2. Reference the [`Pathoschild.Stardew.ModBuildConfig` NuGet package](https://www.nuget.org/packages/Pathoschild.Stardew.ModBuildConfig).
3. [Write your code](https://stardewvalleywiki.com/Modding:Creating_a_SMAPI_mod).
4. Compile on any platform.
5. Run the game to play with your mod.
## Features
The package includes several features to simplify mod development (see [_configure_](#configure) to
change how these work):
* **Detect game path:**
The package automatically finds your game folder by scanning the default install paths and
Windows registry. It adds two MSBuild properties for use in your `.csproj` file if needed:
`$(GamePath)` and `$(GameModsPath)`.
* **Add assembly references:**
The package adds assembly references to MonoGame, SMAPI, Stardew Valley, and xTile. It
automatically adjusts depending on which OS you're compiling it on. If you use
[Harmony](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Harmony), it can optionally add
a reference to that too.
* **Copy files into the `Mods` folder:**
The package automatically copies your mod's DLL and PDB files, `manifest.json`, [`i18n`
files](https://stardewvalleywiki.com/Modding:Translations) (if any), and the `assets` folder (if
any) into the `Mods` folder when you rebuild the code, with a subfolder matching the mod's project
name. That lets you try the mod in-game right after building it.
* **Create release zip:**
The package adds a zip file in your project's `bin` folder when you rebuild the code, in the
format recommended for uploading to mod sites like Nexus Mods. This includes the same files as
the previous feature.
* **Launch or debug mod:**
On Windows only, the package configures Visual Studio so you can launch the game and attach a
debugger using _Debug > Start Debugging_ or _Debug > Start Without Debugging_. This lets you [set
breakpoints](https://docs.microsoft.com/en-us/visualstudio/debugger/using-breakpoints?view=vs-2019)
in your code while the game is running, or [make simple changes to the mod code without needing to
restart the game](https://docs.microsoft.com/en-us/visualstudio/debugger/edit-and-continue?view=vs-2019).
This is disabled on Linux/macOS due to limitations with the Mono wrapper.
* **Preconfigure common settings:**
The package automatically enables `.pdb` files (so error logs show line numbers to simplify
debugging), and enables support for the simplified SDK-style `.csproj` format.
* **Add code warnings:**
The package runs code analysis on your mod and raises warnings for some common errors or
pitfalls. See [_code warnings_](#code-warnings) for more info.
## Configure
### How to set options
You can configure the package by setting build properties, which are essentially tags like this:
```xml
<PropertyGroup>
<ModFolderName>CustomModName</ModFolderName>
<EnableModDeploy>false</EnableModDeploy>
</PropertyGroup>
```
There are two places you can put them:
* **Global properties** apply to every mod project you open on your computer. That's recommended
for properties you want to set for all mods (e.g. a custom game path). Here's where to put them:
1. Open the home folder on your computer (see instructions for
[Linux](https://superuser.com/questions/409218/where-is-my-users-home-folder-in-ubuntu),
[macOS](https://www.cnet.com/how-to/how-to-find-your-macs-home-folder-and-add-it-to-finder/),
or [Windows](https://www.computerhope.com/issues/ch000109.htm)).
2. Create a `stardewvalley.targets` file with this content:
```xml
<Project>
<PropertyGroup>
</PropertyGroup>
</Project>
```
3. Add the properties between the `<PropertyGroup>` and `</PropertyGroup>`.
* **Project properties** apply to a specific project. This is mainly useful for mod-specific
options like the mod name. Here's where to put them:
1. Open the folder containing your mod's source code.
2. Open the `.csproj` file in a text editor (Notepad is fine).
3. Add the properties between the first `<PropertyGroup>` and `</PropertyGroup>` tags you find.
**Note:** you can't use a property before it's defined. That mainly means that when setting
`GameModsPath`, you'll need to either specify `GamePath` manually or put the full path in
`GameModsPath`.
### Available properties
These are the options you can set:
<ul>
<li>Game properties:
<table>
<tr>
<th>property</th>
<th>effect</th>
</tr>
<tr>
<td><code>GamePath</code></td>
<td>
The absolute path to the Stardew Valley folder. This is auto-detected, so you usually don't need to
change it.
</td>
</tr>
<tr>
<td><code>GameModsPath</code></td>
<td>
The absolute path to the folder containing the game's installed mods (defaults to
`$(GamePath)/Mods`), used when deploying the mod files.
</td>
</tr>
<tr>
</table>
</li>
<li>Mod build properties:
<table>
<tr>
<th>property</th>
<th>effect</th>
</tr>
<tr>
<td><code>EnableHarmony</code></td>
<td>
Whether to add a reference to [Harmony](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Harmony)
(default `false`). This is only needed if you use Harmony.
</td>
</tr>
<tr>
<td><code>EnableModDeploy</code></td>
<td>
Whether to copy the mod files into your game's `Mods` folder (default `true`).
</td>
</tr>
<tr>
<td><code>EnableModZip</code></td>
<td>
Whether to create a release-ready `.zip` file in the mod project's `bin` folder (default `true`).
</td>
</tr>
<tr>
<td><code>ModFolderName</code></td>
<td>
The mod name for its folder under `Mods` and its release zip (defaults to the project name).
</td>
</tr>
<tr>
<td><code>ModZipPath</code></td>
<td>
The folder path where the release zip is created (defaults to the project's `bin` folder).
</td>
</tr>
</table>
</li>
<li>Specialized properties:
<table>
<tr>
<th>property</th>
<th>effect</th>
</tr>
<tr>
<td><code>BundleExtraAssemblies</code></td>
<td>
**Most mods should not change this option.**
By default (when this is _not_ enabled), only the mod files [normally considered part of the
mod](#Features) will be added to the release `.zip` and copied into the `Mods` folder (i.e.
"deployed"). That includes the assembly files (`*.dll`, `*.pdb`, and `*.xml`) for your mod project,
but any other DLLs won't be deployed.
Enabling this option will add _all_ dependencies to the build output, then deploy _some_ of them
depending on the comma-separated value(s) you set:
<table>
<tr>
<th>option</th>
<th>result</th>
</tr>
<tr>
<td><code>ThirdParty</code></td>
<td>
Assembly files which don't match any other category.
</td>
</tr>
<tr>
<td><code>System</code></td>
<td>
Assembly files whose names start with `Microsoft.*` or `System.*`.
</td>
</tr>
<tr>
<td><code>Game</code></td>
<td>
Assembly files which are part of MonoGame, SMAPI, or Stardew Valley.
</td>
</tr>
<tr>
<td><code>All</code></td>
<td>
Equivalent to `System, Game, ThirdParty`.
</td>
</tr>
</table>
Most mods should omit the option. Some mods may need `ThirdParty` if they bundle third-party DLLs
with their mod. The other options are mainly useful for unit tests.
When enabling this option, you should **manually review which files get deployed** and use the
`IgnoreModFilePaths` or `IgnoreModFilePatterns` options to exclude files as needed.
</td>
</tr>
<tr>
<td><code>EnableGameDebugging</code></td>
<td>
Whether to configure the project so you can launch or debug the game through the _Debug_ menu in
Visual Studio (default `true`). There's usually no reason to change this, unless it's a unit test
project.
</td>
</tr>
<tr>
<td><code>IgnoreModFilePaths</code></td>
<td>
A comma-delimited list of literal file paths to ignore, relative to the mod's `bin` folder. Paths
are case-sensitive, but path delimiters are normalized automatically. For example, this ignores a
set of tilesheets:
```xml
<IgnoreModFilePaths>assets/paths.png, assets/springobjects.png</IgnoreModFilePaths>
```
</td>
</tr>
<tr>
<td><code>IgnoreModFilePatterns</code></td>
<td>
A comma-delimited list of regex patterns matching files to ignore when deploying or zipping the mod
files (default empty). For crossplatform compatibility, you should replace path delimiters with `[/\\]`.
For example, this excludes all `.txt` and `.pdf` files, as well as the `assets/paths.png` file:
```xml
<IgnoreModFilePatterns>\.txt$, \.pdf$, assets[/\\]paths.png</IgnoreModFilePatterns>
```
</td>
</tr>
</table>
</li>
</ul>
## Code warnings
### Overview
The NuGet package adds code warnings in Visual Studio specific to Stardew Valley. For example:
![](screenshots/code-analyzer-example.png)
You can [hide the warnings](https://visualstudiomagazine.com/articles/2017/09/01/hide-compiler-warnings.aspx)
if needed using the warning ID (shown under 'code' in the Error List).
See below for help with specific warnings.
### Avoid implicit net field cast
Warning text:
> This implicitly converts '{{expression}}' from {{net type}} to {{other type}}, but
> {{net type}} has unintuitive implicit conversion rules. Consider comparing against the actual
> value instead to avoid bugs.
Stardew Valley uses net types (like `NetBool` and `NetInt`) to handle multiplayer sync. These types
can implicitly convert to their equivalent normal values (like `bool x = new NetBool()`), but their
conversion rules are unintuitive and error-prone. For example,
`item?.category == null && item?.category != null` can both be true at once, and
`building.indoors != null` can be true for a null value.
Suggested fix:
* Some net fields have an equivalent non-net property like `monster.Health` (`int`) instead of
`monster.health` (`NetInt`). The package will add a separate [AvoidNetField](#avoid-net-field) warning for
these. Use the suggested property instead.
* For a reference type (i.e. one that can contain `null`), you can use the `.Value` property:
```c#
if (building.indoors.Value == null)
```
Or convert the value before comparison:
```c#
GameLocation indoors = building.indoors;
if(indoors == null)
// ...
```
* For a value type (i.e. one that can't contain `null`), check if the object is null (if applicable)
and compare with `.Value`:
```cs
if (item != null && item.category.Value == 0)
```
### Avoid net field
Warning text:
> '{{expression}}' is a {{net type}} field; consider using the {{property name}} property instead.
Your code accesses a net field, which has some unusual behavior (see [AvoidImplicitNetFieldCast](#avoid-implicit-net-field-cast)).
This field has an equivalent non-net property that avoids those issues.
Suggested fix: access the suggested property name instead.
### Avoid obsolete field
Warning text:
> The '{{old field}}' field is obsolete and should be replaced with '{{new field}}'.
Your code accesses a field which is obsolete or no longer works. Use the suggested field instead.
### Wrong processor architecture
Warning text:
> The target platform should be set to 'Any CPU' for compatibility with both 32-bit and 64-bit
> versions of Stardew Valley (currently set to '{{current platform}}').
Mods can be used in either 32-bit or 64-bit mode. Your project's target platform isn't set to the
default 'Any CPU', so it won't work in both. You can fix it by [setting the target platform to
'Any CPU'](https://docs.microsoft.com/en-ca/visualstudio/ide/how-to-configure-projects-to-target-platforms).
## FAQs
### How do I set the game path?<span id="custom-game-path"></span>
The package detects where your game is installed automatically, so you usually don't need to set it
manually. If it can't find your game or you have multiple installs, you can specify the path
yourself.
To do that:
1. Get the full folder path containing the Stardew Valley executable.
2. See [_configure_](#configure) to add this property:
```xml
<PropertyGroup>
<GamePath>PATH_HERE</GamePath>
</PropertyGroup>
```
3. Replace `PATH_HERE` with your game's folder path (don't add quotes).
The configuration will check your custom path first, then fall back to the default paths (so it'll
still compile on a different computer).
### How do I change which files are included in the mod deploy/zip?
* For normal files, you can [add/remove them in the build output](https://stackoverflow.com/a/10828462/262123).
* For assembly files (`*.dll`, `*.exe`, `*.pdb`, or `*.xml`), see the
[`BundleExtraAssemblies` option](#configure).
* To exclude a file which the package copies by default, see the [`IgnoreModFilePaths` or
`IgnoreModFilePatterns` options](#configure).
### Can I use the package for non-mod projects?
Yep, this works in unit tests and framework projects too. Just disable the mod-related package
features (see [_configure_](#configure)):
```xml
<EnableGameDebugging>false</EnableGameDebugging>
<EnableModDeploy>false</EnableModDeploy>
<EnableModZip>false</EnableModZip>
```
To copy referenced DLLs into your build output for unit tests, add this too:
```xml
<BundleExtraAssemblies>All</BundleExtraAssemblies>
```
## For SMAPI developers
The mod build package consists of three projects:
project | purpose
------------------------------------------------- | ----------------
`StardewModdingAPI.ModBuildConfig` | Configures the build (references, deploying the mod files, setting up debugging, etc).
`StardewModdingAPI.ModBuildConfig.Analyzer` | Adds C# analyzers which show code warnings in Visual Studio.
`StardewModdingAPI.ModBuildConfig.Analyzer.Tests` | Unit tests for the C# analyzers.
The NuGet package is generated automatically in `StardewModdingAPI.ModBuildConfig`'s `bin` folder
when you compile it.
## Release notes
## 4.1.1
Released 24 June 2023 for SMAPI 3.13.0 or later.
* Replaced `.pdb` files with embedded symbols by default. This fixes logged errors not having line numbers on Linux/macOS.
### 4.1.0
Released 08 January 2023 for SMAPI 3.13.0 or later.
* Added `manifest.json` format validation on build (thanks to tylergibbs2!).
* Fixed game DLLs not excluded from the release zip when they're referenced explicitly but `BundleExtraAssemblies` isn't set.
### 4.0.2
Released 09 October 2022 for SMAPI 3.13.0 or later.
* Switched to the newer crossplatform `portable` debug symbols (thanks to lanturnalis!).
* Fixed `BundleExtraAssemblies` option being partly case-sensitive.
* Fixed `BundleExtraAssemblies` not applying `All` value to game assemblies.
### 4.0.1
Released 14 April 2022 for SMAPI 3.13.0 or later.
* Added detection for Xbox app game folders.
* Fixed "_conflicts between different versions of Microsoft.Win32.Registry_" warnings in recent SMAPI versions.
* Internal refactoring.
### 4.0.0
Released 30 November 2021 for SMAPI 3.13.0 or later.
* Updated for Stardew Valley 1.5.5 and SMAPI 3.13.0. (Older versions are no longer supported.)
* Added `IgnoreModFilePaths` option to ignore literal paths.
* Added `BundleExtraAssemblies` option to copy bundled DLLs into the mod zip/folder.
* Removed the `GameExecutableName` and `GameFramework` options (since they now have the same value
on all platforms).
* Removed the `CopyModReferencesToBuildOutput` option (superseded by `BundleExtraAssemblies`).
* Improved analyzer performance by enabling parallel execution.
**Migration guide for mod authors:**
1. See [_migrate to 64-bit_](https://stardewvalleywiki.com/Modding:Migrate_to_64-bit_on_Windows) and
[_migrate to Stardew Valley 1.5.5_](https://stardewvalleywiki.com/Modding:Migrate_to_Stardew_Valley_1.5.5).
2. Possible changes in your `.csproj` or `.targets` files:
* Replace `$(GameExecutableName)` with `Stardew Valley`.
* Replace `$(GameFramework)` with `MonoGame` and remove any XNA Framework-specific logic.
* Replace `<CopyModReferencesToBuildOutput>true</CopyModReferencesToBuildOutput>` with
`<BundleExtraAssemblies>Game</BundleExtraAssemblies>`.
* If you need to bundle extra DLLs besides your mod DLL, see the [`BundleExtraAssemblies`
documentation](#configure).
### 3.3.0
Released 30 March 2021 for SMAPI 3.0.0 or later.
* Added a build warning when the mod isn't compiled for `Any CPU`.
* Added a `GameFramework` build property set to `MonoGame` or `Xna` based on the platform. This can
be overridden to change which framework it references.
* Added support for building mods against the 64-bit Linux version of the game on Windows.
* The package now suppresses the misleading 'processor architecture mismatch' warnings.
### 3.2.2
Released 23 September 2020 for SMAPI 3.0.0 or later.
* Reworked and streamlined how the package is compiled.
* Added [SMAPI-ModTranslationClassBuilder](https://github.com/Pathoschild/SMAPI-ModTranslationClassBuilder)
files to the ignore list.
### 3.2.1
Released 11 September 2020 for SMAPI 3.0.0 or later.
* Added more detailed logging.
* Fixed _path's format is not supported_ error when using default `Mods` path in 3.2.
### 3.2.0
Released 07 September 2020 for SMAPI 3.0.0 or later.
* Added option to change `Mods` folder path.
* Rewrote documentation to make it easier to read.
### 3.1.0
Released 01 February 2020 for SMAPI 3.0.0 or later.
* Added support for semantic versioning 2.0.
* `0Harmony.dll` is now ignored if the mod references Harmony directly (it's bundled with SMAPI).
### 3.0.0
Released 26 November 2019 for SMAPI 3.0.0 or later.
* Updated for SMAPI 3.0 and Stardew Valley 1.4.
* Added automatic support for `assets` folders.
* Added `$(GameExecutableName)` MSBuild variable.
* Added support for projects using the simplified `.csproj` format.
* Added option to disable game debugging config.
* Added `.pdb` files to builds by default (to enable line numbers in error stack traces).
* Added optional Harmony reference.
* Fixed `Newtonsoft.Json.pdb` included in release zips when Json.NET is referenced directly.
* Fixed `<IgnoreModFilePatterns>` not working for `i18n` files.
* Dropped support for older versions of SMAPI and Visual Studio.
* Migrated package icon to NuGet's new format.
### 2.2.0
Released 28 October 2018.
* Added support for SMAPI 2.8+ (still compatible with earlier versions).
* Added default game paths for 32-bit Windows.
* Fixed valid manifests marked invalid in some cases.
### 2.1.0
Released 27 July 2018.
* Added support for Stardew Valley 1.3.
* Added support for non-mod projects.
* Added C# analyzers to warn about implicit conversions of Netcode fields in Stardew Valley 1.3.
* Added option to ignore files by regex pattern.
* Added reference to new SMAPI DLL.
* Fixed some game paths not detected by NuGet package.
### 2.0.2
Released 01 November 2017.
* Fixed compatibility issue on Linux.
### 2.0.1
Released 11 October 2017.
* Fixed mod deploy failing to create subfolders if they don't already exist.
### 2.0.0
Released 11 October 2017.
* Added: mods are now copied into the `Mods` folder automatically (configurable).
* Added: release zips are now created automatically in your build output folder (configurable).
* Added: mod deploy and release zips now exclude Json.NET automatically, since it's provided by SMAPI.
* Added mod's version to release zip filename.
* Improved errors to simplify troubleshooting.
* Fixed release zip not having a mod folder.
* Fixed release zip failing if mod name contains characters that aren't valid in a filename.
### 1.7.1
Released 28 July 2017.
* Fixed issue where i18n folders were flattened.
* The manifest/i18n files in the project now take precedence over those in the build output if both
are present.
### 1.7.0
Released 28 July 2017.
* Added option to create release zips on build.
* Added reference to XNA's XACT library for audio-related mods.
### 1.6.2
Released 10 July 2017.
* Further improved crossplatform game path detection.
* Removed undocumented `GamePlatform` build property.
### 1.6.1
Released 09 July 2017.
* Improved crossplatform game path detection.
### 1.6.0
Released 05 June 2017.
* Added support for deploying mod files into `Mods` automatically.
* Added a build error if a game folder is found, but doesn't contain Stardew Valley or SMAPI.
### 1.5.0
Released 23 January 2017.
* Added support for setting a custom game path globally.
* Added default GOG path on macOS.
### 1.4.0
Released 11 January 2017.
* Fixed detection of non-default game paths on 32-bit Windows.
* Removed support for SilVerPLuM (discontinued).
* Removed support for overriding the target platform (no longer needed since SMAPI crossplatforms
mods automatically).
### 1.3.0
Released 31 December 2016.
* Added support for non-default game paths on Windows.
### 1.2.0
Released 24 October 2016.
* Exclude game binaries from mod build output.
### 1.1.0
Released 21 October 2016.
* Added support for overriding the target platform.
### 1.0.0
Released 21 October 2016.
* Initial release.
* Added support for detecting the game path automatically.
* Added support for injecting XNA/MonoGame references automatically based on the OS.
* Added support for mod builders like SilVerPLuM.

View File

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

176
docs/technical/smapi.md Normal file
View File

@ -0,0 +1,176 @@
&larr; [README](../README.md)
This file provides more technical documentation about SMAPI. If you only want to use or create
mods, this section isn't relevant to you; see the main README to use or create mods.
This document is about SMAPI itself; see also [mod build package](mod-package.md) and
[web services](web.md).
# Contents
* [Customisation](#customisation)
* [Configuration file](#configuration-file)
* [Command-line arguments](#command-line-arguments)
* [Compile flags](#compile-flags)
* [Compile from source code](#compile-from-source-code)
* [Main project](#main-project)
* [Custom Harmony build](#custom-harmony-build)
* [Prepare a release](#prepare-a-release)
* [On any platform](#on-any-platform)
* [On Windows](#on-windows)
* [Release notes](#release-notes)
## Customisation
### Configuration file
You can customise some SMAPI behaviour by editing the `smapi-internal/config.json` file in your
game folder. See documentation in the file for more info.
### Command-line arguments
The SMAPI installer recognises three command-line arguments:
argument | purpose
-------- | -------
`--install` | Preselects the install action, skipping the prompt asking what the user wants to do.
`--uninstall` | Preselects the uninstall action, skipping the prompt asking what the user wants to do.
`--game-path "path"` | Specifies the full path to the folder containing the Stardew Valley executable, skipping automatic detection and any prompt to choose a path. If the path is not valid, the installer displays an error.
`--no-prompt` | Don't let the installer wait for user input (e.g. for cases where it's being run by a script). If the installer is unable to continue without user input, it'll fail instead.
SMAPI itself recognises five arguments, but these are meant for internal use or testing, and might
change without warning. **On Linux/macOS**, command-line arguments won't work; see _environment
variables_ below instead.
argument | purpose
-------- | -------
`--developer-mode`<br />`--developer-mode-off` | Enable or disable features intended for mod developers. Currently this only makes `TRACE`-level messages appear in the console.
`--no-terminal` | SMAPI won't log anything to the console. On Linux/macOS only, this will also prevent the launch script from trying to open a terminal window. (Messages will still be written to the log file.)
`--use-current-shell` | On Linux/macOS only, the launch script won't try to open a terminal window. All console output will be sent to the shell running the launch script.
`--mods-path` | The path to search for mods, if not the standard `Mods` folder. This can be a path relative to the game folder (like `--mods-path "Mods (test)"`) or an absolute path.
### Environment variables
The above SMAPI arguments may not work on Linux/macOS due to the way the game launcher works. You
can set temporary environment variables instead. For example:
> SMAPI_MODS_PATH="Mods (multiplayer)" /path/to/StardewValley
environment variable | purpose
-------------------- | -------
`SMAPI_DEVELOPER_MODE` | Equivalent to `--developer-mode` and `--developer-mode-off` above. The value must be `true` or `false`.
`SMAPI_MODS_PATH` | Equivalent to `--mods-path` above.
`SMAPI_NO_TERMINAL` | Equivalent to `--no-terminal` above.
`SMAPI_USE_CURRENT_SHELL` | Equivalent to `--use-current-shell` above.
### Compile flags
SMAPI uses a small number of conditional compilation constants, which you can set by editing the
`<DefineConstants>` element in `SMAPI.csproj`. Supported constants:
flag | purpose
---- | -------
`SMAPI_FOR_WINDOWS` | Whether SMAPI is being compiled for Windows; if not set, the code assumes Linux/macOS. Set automatically in `common.targets`.
`SMAPI_DEPRECATED` | Whether to include deprecated code in the build.
## Compile from source code
### Main project
Using an official SMAPI release is recommended for most users, but you can compile from source
directly if needed. Just open the project in an IDE like [Visual
Studio](https://visualstudio.microsoft.com/vs/community/) or [Rider](https://www.jetbrains.com/rider/),
and build the `SMAPI` project. The project will automatically adjust the build settings for your
current OS and Stardew Valley install path.
Rebuilding the solution in debug mode will copy the SMAPI files into your game folder. Starting
the `SMAPI` project with debugging from Visual Studio or Rider should launch SMAPI with the
debugger attached, so you can intercept errors and step through the code being executed.
### Custom Harmony build
SMAPI uses [a custom build of Harmony 2.2.2](https://github.com/Pathoschild/Harmony#readme), which
is included in the `build` folder. To use a different build, just replace `0Harmony.dll` in that
folder before compiling.
## Prepare a release
### On any platform
**⚠ Ideally we'd have one set of instructions for all platforms. The instructions in this section
will produce a fully functional release for all supported platforms, _except_ that the application
icon for SMAPI on Windows will disappear due to [.NET runtime bug
3828](https://github.com/dotnet/runtime/issues/3828). Until that's fixed, see the _[on
Windows](#on-windows)_ section below to create a build that retains the icon.**
#### First-time setup
1. On Windows only:
1. [Install Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install).
2. Run `sudo apt update` in WSL to update the package list.
3. The rest of the instructions below should be run in WSL.
2. Install the required software:
1. Install the [.NET 5 SDK](https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu).
_For Ubuntu-based systems, you can run `lsb_release -a` to get the Ubuntu version number._
2. [Install Steam](https://linuxconfig.org/how-to-install-steam-on-ubuntu-20-04-focal-fossa-linux).
3. Launch `steam` and install the game like usual.
4. Download and install your preferred IDE. For the [latest standalone Rider
version](https://www.jetbrains.com/help/rider/Installation_guide.html#prerequisites):
```sh
wget "<download url here>" -O rider-install.tar.gz
sudo tar -xzvf rider-install.tar.gz -C /opt
ln -s "/opt/JetBrains Rider-<version>/bin/rider.sh"
./rider.sh
```
3. Clone the SMAPI repo:
```sh
git clone https://github.com/Pathoschild/SMAPI.git
```
### Launch the game
1. Run these commands to start Steam:
```sh
export TERM=xterm
steam
```
2. Launch the game through the Steam UI.
### Prepare the release
1. Run `build/unix/prepare-install-package.sh VERSION_HERE` to create the release package in the
root `bin` folder.
Make sure you use a [semantic version](https://semver.org). Recommended format:
build type | format | example
:--------- | :----------------------- | :------
dev build | `<version>-alpha.<date>` | `4.0.0-alpha.20251230`
prerelease | `<version>-beta.<date>` | `4.0.0-beta.20251230`
release | `<version>` | `4.0.0`
### On Windows
#### First-time setup
1. Set up Windows Subsystem for Linux (WSL):
1. [Install WSL](https://docs.microsoft.com/en-us/windows/wsl/install).
2. Run `sudo apt update` in WSL to update the package list.
3. The rest of the instructions below should be run in WSL.
2. Install the required software:
1. Install the [.NET 5 SDK](https://dotnet.microsoft.com/download/dotnet/5.0).
2. Install [Stardew Valley](https://www.stardewvalley.net/).
3. Clone the SMAPI repo:
```sh
git clone https://github.com/Pathoschild/SMAPI.git
```
### Prepare the release
1. Run `build/windows/prepare-install-package.ps1 VERSION_HERE` in PowerShell to create the release
package folders in the root `bin` folder.
Make sure you use a [semantic version](https://semver.org). Recommended format:
build type | format | example
:--------- | :----------------------- | :------
dev build | `<version>-alpha.<date>` | `4.0.0-alpha.20251230`
prerelease | `<version>-beta.<date>` | `4.0.0-beta.20251230`
release | `<version>` | `4.0.0`
2. Launch WSL and run this script:
```bash
# edit to match the build created in steps 1
# In WSL, `/mnt/c/example` accesses `C:\example` on the Windows filesystem.
version="4.0.0"
binFolder="/mnt/e/source/_Stardew/SMAPI/bin"
build/windows/finalize-install-package.sh "$version" "$binFolder"
```
Note: to prepare a test Windows-only build, you can pass `--windows-only` in the first step and
skip the second one.
## Release notes
See [release notes](../release-notes.md).

388
docs/technical/web.md Normal file
View File

@ -0,0 +1,388 @@
&larr; [README](../README.md)
**SMAPI.Web** contains the code for the `smapi.io` website, including the mod compatibility list
and update check API.
## Contents
* [Log parser](#log-parser)
* [JSON validator](#json-validator)
* [Web API](#web-api)
* [Short URLs](#short-urls)
* [For SMAPI developers](#for-smapi-developers)
* [Local development](#local-development)
* [Production environment](#production-environment)
## Log parser
The log parser at https://smapi.io/log provides a web UI for uploading, parsing, and sharing SMAPI
logs.
The logs are saved in a compressed form to Amazon Blob storage for 30 days.
## JSON validator
### Overview
The JSON validator at https://smapi.io/json provides a web UI for uploading and sharing JSON files,
and validating them as plain JSON or against a predefined format like `manifest.json` or Content
Patcher's `content.json`.
The logs are saved in a compressed form to Amazon Blob storage for 30 days.
### Schema file format
Schema files are defined in `wwwroot/schemas` using the [JSON Schema](https://json-schema.org/)
format. The JSON validator UI recognises a superset of the standard fields to change output:
<dl>
<dt>Documentation URL</dt>
<dd>
The root schema may have a `@documentationURL` field, which is a web URL for the user
documentation:
```js
"@documentationUrl": "https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest"
```
If present, this is shown in the JSON validator UI.
</dd>
<dt>Error messages</dt>
<dd>
Any part of the schema can define an `@errorMessages` field, which overrides matching schema
errors. You can override by error code (recommended), or by error type and a regex pattern matched
against the error message (more fragile):
```js
// by error type
"pattern": "^[a-zA-Z0-9_.-]+\\.dll$",
"@errorMessages": {
"pattern": "Invalid value; must be a filename ending with .dll."
}
```
```js
// by error type + message pattern
"@errorMessages": {
"oneOf:valid against no schemas": "Missing required field: EntryDll or ContentPackFor.",
"oneOf:valid against more than one schema": "Can't specify both EntryDll or ContentPackFor, they're mutually exclusive."
}
```
Error messages may contain special tokens:
* The `@value` token is replaced with the error's value field. This is usually (but not always) the
original field value.
* When an error has child errors, by default they're flattened into one message:
```
line | field | error
---- | ---------- | -------------------------------------------------------------------------
4 | Changes[0] | JSON does not match schema from 'then'.
| | ==> Changes[0].ToArea.Y: Invalid type. Expected Integer but got String.
| | ==> Changes[0].ToArea: Missing required fields: Height.
```
If you set the message for an error to `$transparent`, the parent error is omitted entirely and
the child errors are shown instead:
```
line | field | error
---- | ------------------- | ----------------------------------------------
8 | Changes[0].ToArea.Y | Invalid type. Expected Integer but got String.
8 | Changes[0].ToArea | Missing required fields: Height.
```
The child errors themselves may be marked `$transparent`, etc. If an error has no child errors,
this override is ignored.
Validation errors for `then` blocks are transparent by default, unless overridden.
</dd>
</dl>
### Using a schema file directly
You can reference the validator schemas in your JSON file directly using the `$schema` field, for
text editors that support schema validation. For example:
```js
{
"$schema": "https://smapi.io/schemas/manifest.json",
"Name": "Some mod",
...
}
```
Available schemas:
format | schema URL
------ | ----------
[SMAPI: `manifest.json`](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest) | https://smapi.io/schemas/manifest.json
[SMAPI: translations (`i18n` folder)](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Translation) | https://smapi.io/schemas/i18n.json
[Content Patcher: `content.json`](https://github.com/Pathoschild/StardewMods/tree/develop/ContentPatcher#readme) | https://smapi.io/schemas/content-patcher.json
## Web API
### Overview
SMAPI provides a web API at `smapi.io/api` for use by SMAPI and external tools. The URL includes a
`{version}` token, which is the SMAPI version for backwards compatibility. This API is publicly
accessible but not officially released; it may change at any time.
### `/mods` endpoint
The API has one `/mods` endpoint. This crossreferences the mod against a variety of sources (e.g.
the wiki, Chucklefish, CurseForge, ModDrop, and Nexus) to provide metadata mainly intended for
update checks.
The API accepts a `POST` request with these fields:
<table>
<tr>
<th>field</th>
<th>summary</th>
</tr>
<tr>
<td><code>mods</code></td>
<td>
The mods for which to fetch metadata. Included fields:
field | summary
----- | -------
`id` | The unique ID in the mod's `manifest.json`. This is used to crossreference with the wiki, and to index mods in the response. If it's unknown (e.g. you just have an update key), you can use a unique fake ID like `FAKE.Nexus.2400`.
`updateKeys` | _(optional)_ [Update keys](https://stardewvalleywiki.com/Modding:Modder_Guide/APIs/Manifest#Update_checks) which specify the mod pages to check, in addition to any mod pages linked to the `ID`.
`installedVersion` | _(optional)_ The installed version of the mod. If not specified, the API won't recommend an update.
`isBroken` | _(optional)_ Whether SMAPI failed to load the installed version of the mod, e.g. due to incompatibility. If true, the web API will be more permissive when recommending updates (e.g. allowing a stable → prerelease update).
</td>
</tr>
<tr>
<td><code>apiVersion</code></td>
<td>
_(optional)_ The installed version of SMAPI. If not specified, the API won't recommend an update.
</td>
</tr>
<tr>
<td><code>gameVersion</code></td>
<td>
_(optional)_ The installed version of Stardew Valley. This may be used to select updates.
</td>
</tr>
<tr>
<td><code>platform</code></td>
<td>
_(optional)_ The player's OS (`Android`, `Linux`, `Mac`, or `Windows`). This may be used to select updates.
</td>
</tr>
<tr>
<td><code>includeExtendedMetadata</code></td>
<td>
_(optional)_ Whether to include extra metadata that's not needed for SMAPI update checks, but which
may be useful to external tools.
</td>
</table>
Example request:
```js
POST https://smapi.io/api/v3.0/mods
{
"mods": [
{
"id": "Pathoschild.ContentPatcher",
"updateKeys": [ "nexus:1915" ],
"installedVersion": "1.9.2",
"isBroken": false
}
],
"apiVersion": "3.0.0",
"gameVersion": "1.4.0",
"platform": "Windows",
"includeExtendedMetadata": true
}
```
Response fields:
<table>
<tr>
<th>field</th>
<th>summary</th>
</tr>
<tr>
<td><code>id</code></td>
<td>
The mod ID you specified in the request.
</td>
</tr>
<tr>
<td><code>suggestedUpdate</code></td>
<td>
The update version recommended by the web API, if any. This is based on some internal rules (e.g.
it won't recommend a prerelease update if the player has a working stable version) and context
(e.g. whether the player is in the game beta channel). Choosing an update version yourself isn't
recommended, but you can set `includeExtendedMetadata: true` and check the `metadata` field if you
really want to do that.
</td>
</tr>
<tr>
<td><code>errors</code></td>
<td>
Human-readable errors that occurred fetching the version info (e.g. if a mod page has an invalid
version).
</td>
</tr>
<tr>
<td><code>metadata</code></td>
<td>
Extra metadata that's not needed for SMAPI update checks but which may be useful to external tools,
if you set `includeExtendedMetadata: true` in the request. Included fields:
field | summary
----- | -------
`id` | The known `manifest.json` unique IDs for this mod defined on the wiki, if any. That includes historical versions of the mod.
`name` | The normalised name for this mod based on the crossreferenced sites.
`nexusID` | The mod ID on [Nexus Mods](https://www.nexusmods.com/stardewvalley/), if any.
`chucklefishID` | The mod ID in the [Chucklefish mod repo](https://community.playstarbound.com/resources/categories/stardew-valley.22/), if any.
`curseForgeID` | The mod project ID on [CurseForge](https://www.curseforge.com/stardewvalley), if any.
`curseForgeKey` | The mod key on [CurseForge](https://www.curseforge.com/stardewvalley), if any. This is used in the mod page URL.
`modDropID` | The mod ID on [ModDrop](https://www.moddrop.com/stardew-valley), if any.
`gitHubRepo` | The GitHub repository containing the mod code, if any. Specified in the `Owner/Repo` form.
`customSourceUrl` | The custom URL to the mod code, if any. This is used for mods which aren't stored in a GitHub repo.
`customUrl` | The custom URL to the mod page, if any. This is used for mods which aren't stored on one of the standard mod sites covered by the ID fields.
`main` | The primary mod version, if any. This depends on the mod site, but it's typically either the version of the mod itself or of its latest non-optional download.
`optional` | The latest optional download version, if any.
`unofficial` | The version of the unofficial update defined on the wiki for this mod, if any.
`unofficialForBeta` | Equivalent to `unofficial`, but for beta versions of SMAPI or Stardew Valley.
`hasBetaInfo` | Whether there's an ongoing Stardew Valley or SMAPI beta which may affect update checks.
`compatibilityStatus` | The compatibility status for the mod for the stable version of the game, as defined on the wiki, if any. See [possible values](https://github.com/Pathoschild/SMAPI/blob/develop/src/SMAPI.Toolkit/Framework/Clients/Wiki/WikiCompatibilityStatus.cs).
`compatibilitySummary` | The human-readable summary of the mod's compatibility in HTML format, if any.
`brokeIn` | The SMAPI or Stardew Valley version that broke this mod, if any.
`betaCompatibilityStatus`<br />`betaCompatibilitySummary`<br />`betaBrokeIn` | Equivalent to the preceding fields, but for beta versions of SMAPI or Stardew Valley.
</td>
</tr>
</table>
Example response with `includeExtendedMetadata: false`:
```js
[
{
"id": "Pathoschild.ContentPatcher",
"suggestedUpdate": {
"version": "1.10.0",
"url": "https://www.nexusmods.com/stardewvalley/mods/1915"
},
"errors": []
}
]
```
Example response with `includeExtendedMetadata: true`:
```js
[
{
"id": "Pathoschild.ContentPatcher",
"suggestedUpdate": {
"version": "1.10.0",
"url": "https://www.nexusmods.com/stardewvalley/mods/1915"
},
"metadata": {
"id": [ "Pathoschild.ContentPatcher" ],
"name": "Content Patcher",
"nexusID": 1915,
"curseForgeID": 309243,
"curseForgeKey": "content-patcher",
"modDropID": 470174,
"gitHubRepo": "Pathoschild/StardewMods",
"main": {
"version": "1.10",
"url": "https://www.nexusmods.com/stardewvalley/mods/1915"
},
"hasBetaInfo": true,
"compatibilityStatus": "Ok",
"compatibilitySummary": "✓ use latest version."
},
"errors": []
}
]
```
## Short URLs
The SMAPI web services provides a few short URLs for convenience:
short url | → | target page
:-------- | - | :----------
[smapi.io/3.0](https://smapi.io/3.0) | → | [stardewvalleywiki.com/Modding:Migrate_to_SMAPI_3.0](https://stardewvalleywiki.com/Modding:Migrate_to_SMAPI_3.0)
[smapi.io/community](https://smapi.io/community) | → | [stardewvalleywiki.com/Modding:Community](https://stardewvalleywiki.com/Modding:Community)
[smapi.io/docs](https://smapi.io/docs) | → | [stardewvalleywiki.com/Modding:Index](https://stardewvalleywiki.com/Modding:Index)
[smapi.io/package](https://smapi.io/package) | → | [github.com/Pathoschild/SMAPI/blob/develop/docs/technical/mod-package.md](https://github.com/Pathoschild/SMAPI/blob/develop/docs/technical/mod-package.md)
[smapi.io/troubleshoot](https://smapi.io/troubleshoot) | → | [stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting](https://stardewvalleywiki.com/Modding:Player_Guide/Troubleshooting)
[smapi.io/xnb](https://smapi.io/xnb) | → | [stardewvalleywiki.com/Modding:Using_XNB_mods](https://stardewvalleywiki.com/Modding:Using_XNB_mods)
## For SMAPI developers
### Local environment
A local environment lets you run a complete copy of the web project (including cache database) on
your machine, with no external dependencies aside from the actual mod sites.
1. Edit `appsettings.Development.json` and set these options:
property name | description
------------- | -----------
`NexusApiKey` | [Your Nexus API key](https://www.nexusmods.com/users/myaccount?tab=api#personal_key).
Optional settings:
property name | description
--------------------------- | -----------
`AzureBlobConnectionString` | The connection string for the Azure Blob storage account. Defaults to using the system's temporary file folder if not specified.
`GitHubUsername`<br />`GitHubPassword` | The GitHub credentials with which to query GitHub release info. Defaults to anonymous requests if not specified.
2. Launch `SMAPI.Web` from Visual Studio to run a local version of the site.
### Production environment
A production environment includes the web servers and cache database hosted online for public
access.
This section assumes you're creating a new environment on Azure, but the app isn't tied to any
Azure services. If you want to host it on a different site, you'll need to adjust the instructions
accordingly.
Initial setup:
1. Create an Azure Blob storage account for uploaded files.
2. Create an Azure App Services environment running the latest .NET on Linux or Windows.
3. Add these application settings in the new App Services environment:
property name | description
------------------------------- | -----------------
`ApiClients.AzureBlobConnectionString` | The connection string for the Azure Blob storage account created in step 2.
`ApiClients.GitHubUsername`<br />`ApiClients.GitHubPassword` | The login credentials for the GitHub account with which to fetch release info. If these are omitted, GitHub will impose much stricter rate limits.
`ApiClients:NexusApiKey` | The [Nexus API authentication key](https://github.com/Pathoschild/FluentNexus#init-a-client).
Optional settings:
property name | description
------------------------------- | -----------------
`BackgroundServices:Enabled` | Set to `true` to enable background processes like fetching data from the wiki, or false to disable them.
`Site:BetaEnabled` | Set to `true` to show a separate download button if there's a beta version of SMAPI in its GitHub releases.
`Site:BetaBlurb` | If `Site:BetaEnabled` is true and there's a beta version of SMAPI in its GitHub releases, this is shown on the beta download button as explanatory subtext.
`Site:SupporterList` | A list of Patreon supports to credit on the download page.
To deploy updates, just [redeploy the web project from Visual Studio](https://docs.microsoft.com/en-us/visualstudio/deployment/quickstart-deploy-to-azure).

View File

@ -0,0 +1,19 @@
Any raw assets you want to be deployed with your application can be placed in
this directory (and child directories) and given a Build Action of "AndroidAsset".
These files will be deployed with your package and will be accessible using Android's
AssetManager, like this:
public class ReadAsset : Activity
{
protected override void OnCreate (Bundle bundle)
{
base.OnCreate (bundle);
InputStream input = Assets.Open ("my_asset.txt");
}
}
Additionally, some Android functions will automatically load asset files:
Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");

110
src/Loader/Loader.csproj Normal file
View File

@ -0,0 +1,110 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{45D7D2FB-6B70-45D1-A595-6E289D6A3468}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<TemplateGuid>{122416d6-6b49-4ee2-a1e8-b825f31c79fe}</TemplateGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Loader</RootNamespace>
<AssemblyName>Loader</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidApplication>True</AndroidApplication>
<AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile>
<AndroidResgenClass>Resource</AndroidResgenClass>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
<TargetFramework>net5.0-android</TargetFramework>
<AndroidManifest>Properties\AndroidManifest.xml</AndroidManifest>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AndroidEnableSGenConcurrent>true</AndroidEnableSGenConcurrent>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>True</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>true</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<AndroidManagedSymbols>false</AndroidManagedSymbols>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
<AndroidDexTool>d8</AndroidDexTool>
<!-- <AndroidLinkSkip>Mono.Android;MonoGame.Framework;mscorlib;System.Core;System;System.Drawing.Common;System.Numerics;System.Runtime.Serialization;System.Xml;System.Xml.Linq</AndroidLinkSkip>-->
<AndroidEnableMultiDex>true</AndroidEnableMultiDex>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugSymbols>False</DebugSymbols>
<DebugType>portable</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidManagedSymbols>false</AndroidManagedSymbols>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<AndroidLinkMode>None</AndroidLinkMode>
<EmbedAssembliesIntoApk>True</EmbedAssembliesIntoApk>
<AndroidUseAapt2>true</AndroidUseAapt2>
<AndroidSupportedAbis>armeabi-v7a;x86;arm64-v8a;x86_64</AndroidSupportedAbis>
<AndroidDexTool>d8</AndroidDexTool>
</PropertyGroup>
<ItemGroup>
<Compile Include="Resources\Resource.designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<None Include="Resources\AboutResources.txt" />
<None Include="Properties\AndroidManifest.xml" />
<None Include="Assets\AboutAssets.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\drawable\icon.png" />
<AndroidResource Include="Resources\drawable\splash.png" />
<AndroidResource Include="Resources\drawable\splash_logos_crop.png" />
<AndroidResource Include="Resources\drawable\splash_screen.xml" />
<AndroidResource Include="Resources\values\colors.xml" />
<AndroidResource Include="Resources\values\ic_launcher_background.xml" />
<AndroidResource Include="Resources\values\strings.xml" />
<AndroidResource Include="Resources\values\styles.xml" />
</ItemGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="Mono.Security" />
<ProjectReference Include="..\SMAPI\SMAPI.csproj" />
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\mipmap\ic_launcher.png" />
<AndroidResource Include="Resources\mipmap\ic_launcher_background.png" />
<AndroidResource Include="Resources\mipmap\ic_launcher_foreground.png" />
<AndroidResource Include="Resources\mipmap\ic_launcher_round.png" />
<AndroidResource Include="Resources\xml\provider_paths.xml">
<SubType>Designer</SubType>
</AndroidResource>
</ItemGroup>
<ItemGroup>
<AndroidAsset Include="Assets\Content\**" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:versionCode="156" android:versionName="1.5.6.31" android:installLocation="auto" package="com.zane.stardewvalley2" platformBuildVersionCode="31" platformBuildVersionName="9">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="31" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.VIBRATE" />
<application
android:label="SMAPI Stardew Valley"
android:icon="@mipmap/ic_launcher"
android:name="android.app.Application"
android:allowBackup="true"
android:resizeableActivity="false"
android:debuggable="true"
android:requestLegacyExternalStorage="true">
</application>
<uses-permission android:name="com.android.vending.CHECK_LICENSE" />
</manifest>

View File

@ -0,0 +1,28 @@
using System.Reflection;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("Loader")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Loader")]
[assembly: AssemblyCopyright("Copyright © 2018")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,44 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.xml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable/
icon.png
layout/
main.xml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:
public class R {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.xml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

175
src/Loader/Resources/Resource.designer.cs generated Normal file
View File

@ -0,0 +1,175 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("Loader.Resource", IsApplication=true)]
namespace Loader
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public static void UpdateIdValues()
{
global::StardewModdingAPI.Resource.String.app_name = global::Loader.Resource.String.app_name;
global::StardewModdingAPI.Resource.String.hello = global::Loader.Resource.String.hello;
}
public partial class Attribute
{
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class Color
{
// aapt resource value: 0x7F010000
public const int colorAccent = 2130771968;
// aapt resource value: 0x7F010001
public const int colorPrimary = 2130771969;
// aapt resource value: 0x7F010002
public const int colorPrimaryDark = 2130771970;
// aapt resource value: 0x7F010003
public const int ic_launcher_background = 2130771971;
static Color()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Color()
{
}
}
public partial class Drawable
{
// aapt resource value: 0x7F020000
public const int icon = 2130837504;
// aapt resource value: 0x7F020001
public const int splash = 2130837505;
// aapt resource value: 0x7F020002
public const int splash_logos_crop = 2130837506;
// aapt resource value: 0x7F020003
public const int splash_screen = 2130837507;
static Drawable()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Drawable()
{
}
}
public partial class Mipmap
{
// aapt resource value: 0x7F030000
public const int ic_launcher = 2130903040;
// aapt resource value: 0x7F030001
public const int ic_launcher_background = 2130903041;
// aapt resource value: 0x7F030002
public const int ic_launcher_foreground = 2130903042;
// aapt resource value: 0x7F030003
public const int ic_launcher_round = 2130903043;
static Mipmap()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Mipmap()
{
}
}
public partial class String
{
// aapt resource value: 0x7F040000
public const int action_settings = 2130968576;
// aapt resource value: 0x7F040001
public const int app_name = 2130968577;
// aapt resource value: 0x7F040002
public const int hello = 2130968578;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
public partial class Style
{
// aapt resource value: 0x7F050000
public const int Theme_Splash = 2131034112;
static Style()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Style()
{
}
}
public partial class Xml
{
// aapt resource value: 0x7F060000
public const int provider_paths = 2131099648;
static Xml()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Xml()
{
}
}
}
}
#pragma warning restore 1591

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<color android:color="#ffffff" />
</item>
<item>
<bitmap android:tileMode="disabled" android:gravity="center" android:src="@drawable/splash_logos_crop"/>
</item>
</layer-list>

Binary file not shown.

After

Width:  |  Height:  |  Size: 314 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 965 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 373 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#2c3e50</color>
<color name="colorPrimaryDark">#1B3147</color>
<color name="colorAccent">#3498db</color>
</resources>

View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="ic_launcher_background">#2C3E50</color>
</resources>

View File

@ -0,0 +1,4 @@
<resources>
<string name="app_name">Loader</string>
<string name="action_settings">Settings</string>
</resources>

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Splash" parent="android:Theme">
<item name="android:windowBackground">@drawable/splash_screen</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowFullscreen">true</item>
</style>
</resources>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<paths xmlns:android="http://schemas.android.com/apk/res/android">
<external-path name="external_files" path="." />
<files-path name="files" path="." />
<internal-path name="internal_files" path="." />
</paths>

View File

@ -0,0 +1,3 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
</packages>

View File

@ -0,0 +1,42 @@
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
#nullable enable
namespace System.Linq
{
public static class EnumerableExtension
{
/// <summary>Produces a sequence of tuples with elements from the two specified sequences.</summary>
/// <param name="first">The first sequence to merge.</param>
/// <param name="second">The second sequence to merge.</param>
/// <typeparam name="TFirst">The type of the elements of the first input sequence.</typeparam>
/// <typeparam name="TSecond">The type of the elements of the second input sequence.</typeparam>
/// <returns>A sequence of tuples with elements taken from the first and second sequences, in that order.</returns>
public static IEnumerable<(TFirst First, TSecond Second)> Zip<TFirst, TSecond>(
this IEnumerable<TFirst> first,
IEnumerable<TSecond> second)
{
if (first == null)
throw new ArgumentNullException("first");
if (second == null)
throw new ArgumentNullException("second");
return ZipIterator<TFirst, TSecond>(first, second);
}
#nullable disable
private static IEnumerable<(TFirst First, TSecond Second)> ZipIterator<TFirst, TSecond>(
IEnumerable<TFirst> first,
IEnumerable<TSecond> second)
{
using (IEnumerator<TFirst> e1 = first.GetEnumerator())
{
using (IEnumerator<TSecond> e2 = second.GetEnumerator())
{
while (e1.MoveNext() && e2.MoveNext())
yield return (e1.Current, e2.Current);
}
}
}
}
}

View File

@ -0,0 +1,23 @@
namespace System;
using Internal.Runtime.CompilerServices;
using System.Collections.Generic;
using System.Globalization;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Text;
public static class MobileMemoryExtension
{
/// <summary>Indicates whether a specified value is found in a read-only span. Values are compared using IEquatable{T}.Equals(T).</summary>
/// <param name="span">The span to search.</param>
/// <param name="value">The value to search for.</param>
/// <typeparam name="T">The type of the span.</typeparam>
/// <returns>
/// <see langword="true" /> if found, <see langword="false" /> otherwise.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool Contains<T>(this ReadOnlySpan<T> span, T value) where T : IEquatable<T>
{
return span.IndexOf(value) >= 0;
}
}

View File

@ -0,0 +1,34 @@
namespace System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Globalization;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Threading;
public static class MobileTypeExtension
{
/// <summary>Determines whether the current type can be assigned to a variable of the specified <paramref name="targetType" />.</summary>
/// <param name="targetType">The type to compare with the current type.</param>
/// <returns>
/// <see langword="true" /> if any of the following conditions is true:
///
/// - The current instance and <paramref name="targetType" /> represent the same type.
///
/// - The current type is derived either directly or indirectly from <paramref name="targetType" />. The current type is derived directly from <paramref name="targetType" /> if it inherits from <paramref name="targetType" />; the current type is derived indirectly from <paramref name="targetType" /> if it inherits from a succession of one or more classes that inherit from <paramref name="targetType" />.
///
/// - <paramref name="targetType" /> is an interface that the current type implements.
///
/// - The current type is a generic type parameter, and <paramref name="targetType" /> represents one of the constraints of the current type.
///
/// - The current type represents a value type, and <paramref name="targetType" /> represents <c>Nullable&lt;c&gt;</c> (<c>Nullable(Of c)</c> in Visual Basic).
///
/// <see langword="false" /> if none of these conditions are true, or if <paramref name="targetType" /> or <see langword="this" /> is <see langword="null" />.</returns>
public static bool IsAssignableTo(this Type type, [NotNullWhen(true)] Type? targetType) => (object) targetType != null && targetType.IsAssignableFrom(type);
}

View File

@ -0,0 +1,29 @@
using System.Runtime.CompilerServices;
#nullable enable
namespace System.Collections.Generic
{
/// <summary>An <see cref="T:System.Collections.Generic.IEqualityComparer`1" /> that uses reference equality (<see cref="M:System.Object.ReferenceEquals(System.Object,System.Object)" />) instead of value equality (<see cref="M:System.Object.Equals(System.Object)" />) when comparing two object instances.</summary>
public sealed class ReferenceEqualityComparer : IEqualityComparer<object?>, IEqualityComparer
{
private ReferenceEqualityComparer()
{
}
/// <summary>Gets the singleton <see cref="T:System.Collections.Generic.ReferenceEqualityComparer" /> instance.</summary>
public static ReferenceEqualityComparer Instance { get; } = new ReferenceEqualityComparer();
/// <summary>Determines whether two object references refer to the same object instance.</summary>
/// <param name="x">The first object to compare.</param>
/// <param name="y">The second object to compare.</param>
/// <returns>
/// <see langword="true" /> if both <paramref name="x" /> and <paramref name="y" /> refer to the same object instance or if both are <see langword="null" />; otherwise, <see langword="false" />.</returns>
public bool Equals(object? x, object? y) => x == y;
/// <summary>Returns a hash code for the specified object. The returned hash code is based on the object identity, not on the contents of the object.</summary>
/// <param name="obj">The object for which to retrieve the hash code.</param>
/// <returns>A hash code for the identity of <paramref name="obj" />.</returns>
public int GetHashCode(object? obj) => RuntimeHelpers.GetHashCode(obj);
}
}

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{E5FE4C97-1A7C-4A97-9904-7351CA020C7F}</ProjectGuid>
<ProjectTypeGuids>{EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MobilePatch</RootNamespace>
<AssemblyName>MobilePatch</AssemblyName>
<FileAlignment>512</FileAlignment>
<AndroidResgenFile>Resources\Resource.Designer.cs</AndroidResgenFile>
<GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
<AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk>
<TargetFrameworkVersion>v12.0</TargetFrameworkVersion>
<TargetFramework>net5.0-android</TargetFramework>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Android" />
<Reference Include="mscorlib" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Mobile\EnumerableExtension.cs" />
<Compile Include="Mobile\MobileMemoryExtension.cs" />
<Compile Include="Mobile\MobileTypeExtension.cs" />
<Compile Include="Mobile\ReferenceEqualityComparer.cs" />
<Compile Include="Resources\Resource.Designer.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<None Include="Resources\AboutResources.txt" />
</ItemGroup>
<ItemGroup>
<AndroidResource Include="Resources\values\strings.xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\drawable\" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

View File

@ -0,0 +1,30 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using Android.App;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("MobilePatch")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MobilePatch")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: ComVisible(false)]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]

View File

@ -0,0 +1,44 @@
Images, layout descriptions, binary blobs and string dictionaries can be included
in your application as resource files. Various Android APIs are designed to
operate on the resource IDs instead of dealing with images, strings or binary blobs
directly.
For example, a sample Android app that contains a user interface layout (main.axml),
an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
would keep its resources in the "Resources" directory of the application:
Resources/
drawable/
icon.png
layout/
main.axml
values/
strings.xml
In order to get the build system to recognize Android resources, set the build action to
"AndroidResource". The native Android APIs do not operate directly with filenames, but
instead operate on resource IDs. When you compile an Android application that uses resources,
the build system will package the resources for distribution and generate a class called "R"
(this is an Android convention) that contains the tokens for each one of the resources
included. For example, for the above Resources layout, this is what the R class would expose:
public class R {
public class drawable {
public const int icon = 0x123;
}
public class layout {
public const int main = 0x456;
}
public class strings {
public const int first_string = 0xabc;
public const int second_string = 0xbcd;
}
}
You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
to reference the layout/main.axml file, or R.strings.first_string to reference the first
string in the dictionary file values/strings.xml.

View File

@ -0,0 +1,59 @@
#pragma warning disable 1591
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
[assembly: global::Android.Runtime.ResourceDesignerAttribute("MobilePatch.Resource", IsApplication=false)]
namespace MobilePatch
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Xamarin.Android.Build.Tasks", "13.2.0.99")]
public partial class Resource
{
static Resource()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
public partial class Attribute
{
static Attribute()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private Attribute()
{
}
}
public partial class String
{
// aapt resource value: 0x7F010000
public static int app_name = 2130771968;
// aapt resource value: 0x7F010001
public static int hello = 2130771969;
static String()
{
global::Android.Runtime.ResourceIdManager.UpdateIdValues();
}
private String()
{
}
}
}
}
#pragma warning restore 1591

View File

@ -0,0 +1,4 @@
<resources>
<string name="hello">Hello World, Click Me!</string>
<string name="app_name">MobilePatch</string>
</resources>

View File

@ -9,4 +9,4 @@
/// <summary>Remove SMAPI from the game directory.</summary>
Uninstall
}
}
}

View File

@ -0,0 +1,65 @@
using System.IO;
using StardewModdingAPI.Toolkit;
using StardewModdingAPI.Toolkit.Framework.GameScanning;
using StardewModdingAPI.Toolkit.Utilities;
namespace StardewModdingAPI.Installer.Framework
{
/// <summary>The installer context.</summary>
internal class InstallerContext
{
/*********
** Fields
*********/
/// <summary>The underlying toolkit game scanner.</summary>
private readonly GameScanner GameScanner = new();
/*********
** Accessors
*********/
/// <summary>The current OS.</summary>
public Platform Platform { get; }
/// <summary>The human-readable OS name and version.</summary>
public string PlatformName { get; }
/// <summary>Whether the installer is running on Windows.</summary>
public bool IsWindows => this.Platform == Platform.Windows;
/// <summary>Whether the installer is running on a Unix OS (including Linux or macOS).</summary>
public bool IsUnix => !this.IsWindows;
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
public InstallerContext()
{
this.Platform = EnvironmentUtility.DetectPlatform();
this.PlatformName = EnvironmentUtility.GetFriendlyPlatformName(this.Platform);
}
/// <summary>Get the installer's version number.</summary>
public ISemanticVersion GetInstallerVersion()
{
var raw = this.GetType().Assembly.GetName().Version!;
return new SemanticVersion(raw);
}
/// <summary>Get whether a folder seems to contain the game files.</summary>
/// <param name="dir">The folder to check.</param>
public bool LooksLikeGameFolder(DirectoryInfo dir)
{
return this.GameScanner.LooksLikeGameFolder(dir);
}
/// <summary>Get whether a folder seems to contain the game, and which version it contains if so.</summary>
/// <param name="dir">The folder to check.</param>
public GameFolderType GetGameFolderType(DirectoryInfo dir)
{
return this.GameScanner.GetGameFolderType(dir);
}
}
}

View File

@ -1,4 +1,5 @@
using System.IO;
using StardewModdingAPI.Toolkit.Framework;
namespace StardewModdingAPI.Installer.Framework
{
@ -8,6 +9,9 @@ namespace StardewModdingAPI.Installer.Framework
/*********
** Accessors
*********/
/****
** Main folders
****/
/// <summary>The directory path containing the files to copy into the game folder.</summary>
public DirectoryInfo BundleDir { get; }
@ -17,9 +21,18 @@ namespace StardewModdingAPI.Installer.Framework
/// <summary>The directory into which to install mods.</summary>
public DirectoryInfo ModsDir { get; }
/****
** Installer paths
****/
/// <summary>The full path to directory path containing the files to copy into the game folder.</summary>
public string BundlePath => this.BundleDir.FullName;
/// <summary>The full path to the backup API user settings folder, if applicable.</summary>
public string BundleApiUserConfigPath { get; }
/****
** Game paths
****/
/// <summary>The full path to the directory containing the installed game.</summary>
public string GamePath => this.GameDir.FullName;
@ -29,17 +42,23 @@ namespace StardewModdingAPI.Installer.Framework
/// <summary>The full path to SMAPI's internal configuration file.</summary>
public string ApiConfigPath { get; }
/// <summary>The full path to the user's config overrides file.</summary>
public string ApiUserConfigPath { get; }
/// <summary>The full path to the installed game DLL.</summary>
public string GameDllPath { get; }
/// <summary>The full path to the installed SMAPI executable file.</summary>
public string ExecutablePath { get; }
public string UnixSmapiExecutablePath { get; }
/// <summary>The full path to the vanilla game launcher on Linux/Mac.</summary>
public string UnixLauncherPath { get; }
/// <summary>The full path to the vanilla game launch script on Linux/macOS.</summary>
public string VanillaLaunchScriptPath { get; }
/// <summary>The full path to the installed SMAPI launcher on Linux/Mac before it's renamed.</summary>
public string UnixSmapiLauncherPath { get; }
/// <summary>The full path to the installed SMAPI launch script on Linux/macOS before it's renamed.</summary>
public string NewLaunchScriptPath { get; }
/// <summary>The full path to the vanilla game launcher on Linux/Mac after SMAPI is installed.</summary>
public string UnixBackupLauncherPath { get; }
/// <summary>The full path to the backed up game launch script on Linux/macOS after SMAPI is installed.</summary>
public string BackupLaunchScriptPath { get; }
/*********
@ -48,18 +67,24 @@ namespace StardewModdingAPI.Installer.Framework
/// <summary>Construct an instance.</summary>
/// <param name="bundleDir">The directory path containing the files to copy into the game folder.</param>
/// <param name="gameDir">The directory path for the installed game.</param>
/// <param name="gameExecutableName">The name of the game's executable file for the current platform.</param>
public InstallerPaths(DirectoryInfo bundleDir, DirectoryInfo gameDir, string gameExecutableName)
public InstallerPaths(DirectoryInfo bundleDir, DirectoryInfo gameDir)
{
// base paths
this.BundleDir = bundleDir;
this.GameDir = gameDir;
this.ModsDir = new DirectoryInfo(Path.Combine(gameDir.FullName, "Mods"));
this.GameDllPath = Path.Combine(gameDir.FullName, Constants.GameDllName);
this.ExecutablePath = Path.Combine(gameDir.FullName, gameExecutableName);
this.UnixLauncherPath = Path.Combine(gameDir.FullName, "StardewValley");
this.UnixSmapiLauncherPath = Path.Combine(gameDir.FullName, "StardewModdingAPI");
this.UnixBackupLauncherPath = Path.Combine(gameDir.FullName, "StardewValley-original");
this.ApiConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "StardewModdingAPI.config.json");
// launch scripts
this.VanillaLaunchScriptPath = Path.Combine(gameDir.FullName, "StardewValley");
this.NewLaunchScriptPath = Path.Combine(gameDir.FullName, "unix-launcher.sh");
this.BackupLaunchScriptPath = Path.Combine(gameDir.FullName, "StardewValley-original");
this.UnixSmapiExecutablePath = Path.Combine(gameDir.FullName, "StardewModdingAPI");
// internal files
this.BundleApiUserConfigPath = Path.Combine(bundleDir.FullName, "smapi-internal", "config.user.json");
this.ApiConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "config.json");
this.ApiUserConfigPath = Path.Combine(gameDir.FullName, "smapi-internal", "config.user.json");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,7 @@ using System.Diagnostics.CodeAnalysis;
using System.IO;
using System.IO.Compression;
using System.Reflection;
using StardewModdingAPI.Internal;
using StardewModdingAPI.Toolkit.Utilities;
using System.Threading;
namespace StardewModdingApi.Installer
{
@ -16,7 +15,7 @@ namespace StardewModdingApi.Installer
*********/
/// <summary>The absolute path of the installer folder.</summary>
[SuppressMessage("ReSharper", "AssignNullToNotNullAttribute", Justification = "The assembly location is never null in this context.")]
private static readonly string InstallerPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
private static readonly string InstallerPath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location)!;
/// <summary>The absolute path of the folder containing the unzipped installer files.</summary>
private static readonly string ExtractedBundlePath = Path.Combine(Path.GetTempPath(), $"SMAPI-installer-{Guid.NewGuid():N}");
@ -32,17 +31,16 @@ namespace StardewModdingApi.Installer
public static void Main(string[] args)
{
// find install bundle
PlatformID platform = Environment.OSVersion.Platform;
FileInfo zipFile = new FileInfo(Path.Combine(Program.InstallerPath, $"{(platform == PlatformID.Win32NT ? "windows" : "unix")}-install.dat"));
FileInfo zipFile = new(Path.Combine(Program.InstallerPath, "install.dat"));
if (!zipFile.Exists)
{
Console.WriteLine($"Oops! Some of the installer files are missing; try redownloading the installer. (Missing file: {zipFile.FullName})");
Console.WriteLine($"Oops! Some of the installer files are missing; try re-downloading the installer. (Missing file: {zipFile.FullName})");
Console.ReadLine();
return;
}
// unzip bundle into temp folder
DirectoryInfo bundleDir = new DirectoryInfo(Program.ExtractedBundlePath);
DirectoryInfo bundleDir = new(Program.ExtractedBundlePath);
Console.WriteLine("Extracting install files...");
ZipFile.ExtractToDirectory(zipFile.FullName, bundleDir.FullName);
@ -51,7 +49,15 @@ namespace StardewModdingApi.Installer
// launch installer
var installer = new InteractiveInstaller(bundleDir.FullName);
installer.Run(args);
try
{
installer.Run(args);
}
catch (Exception ex)
{
Program.PrintErrorAndExit($"The installer failed with an unexpected exception.\nIf you need help fixing this error, see https://smapi.io/help\n\n{ex}");
}
}
/*********
@ -60,14 +66,14 @@ namespace StardewModdingApi.Installer
/// <summary>Method called when assembly resolution fails, which may return a manually resolved assembly.</summary>
/// <param name="sender">The event sender.</param>
/// <param name="e">The event arguments.</param>
private static Assembly CurrentDomain_AssemblyResolve(object sender, ResolveEventArgs e)
private static Assembly? CurrentDomain_AssemblyResolve(object? sender, ResolveEventArgs e)
{
try
{
AssemblyName name = new AssemblyName(e.Name);
AssemblyName name = new(e.Name);
foreach (FileInfo dll in new DirectoryInfo(Program.InternalFilesPath).EnumerateFiles("*.dll"))
{
if (name.Name.Equals(AssemblyName.GetAssemblyName(dll.FullName).Name, StringComparison.InvariantCultureIgnoreCase))
if (name.Name != null && name.Name.Equals(AssemblyName.GetAssemblyName(dll.FullName).Name, StringComparison.OrdinalIgnoreCase))
return Assembly.LoadFrom(dll.FullName);
}
return null;
@ -78,5 +84,19 @@ namespace StardewModdingApi.Installer
return null;
}
}
/// <summary>Write an error directly to the console and exit.</summary>
/// <param name="message">The error message to display.</param>
private static void PrintErrorAndExit(string message)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine(message);
Console.ResetColor();
Console.WriteLine("Game has ended. Press any key to exit.");
Thread.Sleep(100);
Console.ReadKey();
Environment.Exit(0);
}
}
}

View File

@ -1,4 +0,0 @@
using System.Reflection;
[assembly: AssemblyTitle("SMAPI.Installer")]
[assembly: AssemblyDescription("The SMAPI installer for players.")]

View File

@ -0,0 +1,20 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<RootNamespace>StardewModdingAPI.Installer</RootNamespace>
<Description>The SMAPI installer for players.</Description>
<TargetFramework>net5.0</TargetFramework>
<OutputType>Exe</OutputType>
<AppendTargetFrameworkToOutputPath>false</AppendTargetFrameworkToOutputPath>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\SMAPI.Toolkit\SMAPI.Toolkit.csproj" />
</ItemGroup>
<ItemGroup>
<None Update="assets\*" CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<Import Project="..\..\build\common.targets" />
</Project>

View File

@ -1,80 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<ProjectGuid>{443DDF81-6AAF-420A-A610-3459F37E5575}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>StardewModdingAPI.Installer</RootNamespace>
<AssemblyName>StardewModdingAPI.Installer</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<LangVersion>latest</LangVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Debug\Installer</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<PlatformTarget>x86</PlatformTarget>
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>$(SolutionDir)\..\bin\Release\Installer</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\build\GlobalAssemblyInfo.cs">
<Link>Properties\GlobalAssemblyInfo.cs</Link>
</Compile>
<Compile Include="Enums\ScriptAction.cs" />
<Compile Include="Framework\InstallerPaths.cs" />
<Compile Include="InteractiveInstaller.cs" />
<Compile Include="Program.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<Content Include="README.txt">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="windows-exe-config.xml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="windows-install.bat">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="unix-install.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<None Include="unix-launcher.sh">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\StardewModdingAPI.Toolkit\StardewModdingAPI.Toolkit.csproj">
<Project>{ea5cfd2e-9453-4d29-b80f-8e0ea23f4ac6}</Project>
<Name>StardewModdingAPI.Toolkit</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\SMAPI.Internal\SMAPI.Internal.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="..\..\build\common.targets" />
<Import Project="..\..\build\prepare-install-package.targets" />
</Project>

View File

@ -14,31 +14,34 @@
SMAPI lets you run Stardew Valley with mods. Don't forget to download mods separately.
Player's guide
Automated install
--------------------------------
See https://stardewvalleywiki.com/Modding:Player_Guide for help installing SMAPI, adding mods, etc.
Manual install
--------------------------------
THIS IS NOT RECOMMENDED FOR MOST PLAYERS. See instructions above instead.
THIS IS NOT RECOMMENDED FOR MOST PLAYERS. See the instructions above instead.
If you really want to install SMAPI manually, here's how.
1. Unzip "internal/windows-install.dat" (on Windows) or "internal/unix-install.dat" (on Linux/Mac).
You can change '.dat' to '.zip', it's just a normal zip file renamed to prevent confusion.
1. Unzip "internal/windows/install.dat" (on Windows) or "internal/unix/install.dat" (on Linux or
macOS). You can change '.dat' to '.zip', it's just a normal zip file renamed to prevent
confusion.
2. Copy the files from the folder you just unzipped into your game folder. The
`StardewModdingAPI.exe` file should be right next to the game's executable.
3.
3. Copy `Stardew Valley.deps.json` in the game folder, and rename the copy to
`StardewModdingAPI.deps.json`.
4.
- Windows only: if you use Steam, see the install guide above to enable achievements and
overlay. Otherwise, just run StardewModdingAPI.exe in your game folder to play with mods.
- Linux/Mac only: rename the "StardewValley" file (no extension) to "StardewValley-original", and
- Linux/macOS only: rename the "StardewValley" file (no extension) to "StardewValley-original", and
"StardewModdingAPI" (no extension) to "StardewValley". Now just launch the game as usual to
play with mods.
When installing on Linux or Mac:
- Make sure Mono is installed (normally the installer checks for you). While it's not required,
many mods won't work correctly without it. (Specifically, mods which load PNG images may crash or
freeze the game.)
- To configure the color scheme, edit the `smapi-internal/StardewModdingAPI.config.json` file and
see instructions there for the 'ColorScheme' setting.
When installing on Linux or macOS:
- To configure the color scheme, edit the `smapi-internal/config.json` file and see instructions
there for the 'ColorScheme' setting.

View File

@ -0,0 +1,4 @@
#!/usr/bin/env bash
cd "`dirname "$0"`"
internal/linux/SMAPI.Installer

View File

@ -0,0 +1,43 @@
@echo off
setlocal enabledelayedexpansion
SET installerDir="%~dp0"
REM make sure we're not running within a zip folder
REM The error level is usually 0 (install dir contains temp path), 1 (it doesn't), or 9009 (findstr doesn't exist due to a Windows issue).
REM If the command doesn't exist, just skip this check.
echo %installerDir% | findstr /C:"%TEMP%" 1>nul 2>null
if %ERRORLEVEL% EQU 0 (
echo Oops! It looks like you're running the installer from inside a zip file. Make sure you unzip the download first.
echo.
pause
exit
)
REM make sure an antivirus hasn't deleted the installer DLL
if not exist %installerDir%"internal\windows\SMAPI.Installer.dll" (
echo Oops! SMAPI is missing one of its files. Your antivirus might have deleted it.
echo Missing file: %installerDir%internal\windows\SMAPI.Installer.dll
echo.
pause
exit
)
if not exist %installerDir%"internal\windows\SMAPI.Installer.exe" (
echo Oops! SMAPI is missing one of its files. Your antivirus might have deleted it.
echo Missing file: %installerDir%internal\windows\SMAPI.Installer.exe
echo.
pause
exit
)
REM start installer
internal\windows\SMAPI.Installer.exe
REM keep window open if it failed
if %ERRORLEVEL% NEQ 0 (
echo.
echo Oops! The SMAPI installer seems to have failed. The error details may be shown above.
echo.
pause
exit
)

View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
cd "`dirname "$0"`"
xattr -r -d com.apple.quarantine internal
internal/macOS/SMAPI.Installer

View File

@ -0,0 +1,17 @@
{
"runtimeOptions": {
"tfm": "net5.0",
"includedFrameworks": [
{
"name": "Microsoft.NETCore.App",
"version": "5.0.0",
"rollForward": "latestMinor"
}
],
"configProperties": {
// disable tiered runtime JIT: https://github.com/dotnet/runtime/blob/main/docs/design/features/tiered-compilation.md
// This is disabled by the base game, and causes issues with Harmony patches.
"System.Runtime.TieredCompilation": false
}
}
}

View File

@ -0,0 +1,169 @@
#!/usr/bin/env bash
##########
## Initial setup
##########
# move to script's directory
cd "$(dirname "$0")" || exit $?
# Whether to avoid opening a separate terminal window, and avoid logging anything to the console.
# This isn't recommended since you won't see errors, warnings, and update alerts.
SKIP_TERMINAL=false
# Whether to avoid opening a separate terminal, but still send the usual log output to the console.
USE_CURRENT_SHELL=false
##########
## Read environment variables
##########
if [ "$SMAPI_NO_TERMINAL" == "true" ]; then
SKIP_TERMINAL=true
fi
if [ "$SMAPI_USE_CURRENT_SHELL" == "true" ]; then
USE_CURRENT_SHELL=true
fi
##########
## Read command-line arguments
##########
while [ "$#" -gt 0 ]; do
case "$1" in
--skip-terminal ) SKIP_TERMINAL=true; shift ;;
--use-current-shell ) USE_CURRENT_SHELL=true; shift ;;
-- ) shift; break ;;
* ) shift ;;
esac
done
if [ "$SKIP_TERMINAL" == "true" ]; then
USE_CURRENT_SHELL=true
fi
##########
## Open terminal if needed
##########
# on macOS, make sure we're running in a Terminal
# Besides letting the player see errors/warnings/alerts in the console, this is also needed because
# Steam messes with the PATH.
if [ "$(uname)" == "Darwin" ]; then
if [ ! -t 1 ]; then # not open in Terminal (https://stackoverflow.com/q/911168/262123)
# reopen in Terminal if needed
# https://stackoverflow.com/a/29511052/262123
if [ "$USE_CURRENT_SHELL" == "false" ]; then
echo "Reopening in the Terminal app..."
echo '#!/bin/sh' > /tmp/open-smapi-terminal.command
echo "\"$0\" $@ --use-current-shell" >> /tmp/open-smapi-terminal.command
chmod +x /tmp/open-smapi-terminal.command
cat /tmp/open-smapi-terminal.command
open -W /tmp/open-smapi-terminal.command
rm /tmp/open-smapi-terminal.command
exit 0
fi
fi
fi
##########
## Validate assumptions
##########
# script must be run from the game folder
if [ ! -f "Stardew Valley.dll" ]; then
printf "Oops! SMAPI must be placed in the Stardew Valley game folder.\nSee instructions: https://stardewvalleywiki.com/Modding:Player_Guide";
read -r
exit 1
fi
##########
## Launch SMAPI
##########
# macOS
if [ "$(uname)" == "Darwin" ]; then
./StardewModdingAPI "$@"
# Linux
else
# choose binary file to launch
LAUNCH_FILE="./StardewModdingAPI"
export LAUNCH_FILE
# run in terminal
if [ "$USE_CURRENT_SHELL" == "false" ]; then
# select terminal (prefer xterm for best compatibility, then known supported terminals)
for terminal in xterm gnome-terminal kitty terminator xfce4-terminal konsole terminal termite alacritty mate-terminal x-terminal-emulator wezterm; do
if command -v "$terminal" 2>/dev/null; then
export TERMINAL_NAME=$terminal
break;
fi
done
# find the true shell behind x-terminal-emulator
if [ "$TERMINAL_NAME" = "x-terminal-emulator" ]; then
TERMINAL_NAME="$(basename "$(readlink -f "$(command -v x-terminal-emulator)")")"
export TERMINAL_NAME
fi
# run in selected terminal and account for quirks
TERMINAL_PATH="$(command -v "$TERMINAL_NAME")"
export TERMINAL_PATH
if [ -x "$TERMINAL_PATH" ]; then
case $TERMINAL_NAME in
terminal|termite)
# consumes only one argument after -e
# options containing space characters are unsupported
exec "$TERMINAL_NAME" -e "env TERM=xterm $LAUNCH_FILE $@"
;;
xterm|konsole|alacritty)
# consumes all arguments after -e
exec "$TERMINAL_NAME" -e env TERM=xterm $LAUNCH_FILE "$@"
;;
terminator|xfce4-terminal|mate-terminal)
# consumes all arguments after -x
exec "$TERMINAL_NAME" -x env TERM=xterm $LAUNCH_FILE "$@"
;;
gnome-terminal)
# consumes all arguments after --
exec "$TERMINAL_NAME" -- env TERM=xterm $LAUNCH_FILE "$@"
;;
wezterm)
# consumes all arguments after start --. does not copy working directory automatically, needs --cwd for that.
exec "$TERMINAL_NAME" start --cwd "$(pwd)" -- env TERM=xterm $LAUNCH_FILE "$@"
;;
kitty)
# consumes all trailing arguments
exec "$TERMINAL_NAME" env TERM=xterm $LAUNCH_FILE "$@"
;;
*)
# If we don't know the terminal, just try to run it in the current shell.
# If THAT fails, launch with no output.
env TERM=xterm $LAUNCH_FILE "$@"
if [ $? -eq 127 ]; then
exec $LAUNCH_FILE --no-terminal "$@"
fi
esac
## terminal isn't executable; fallback to current shell or no terminal
else
echo "The '$TERMINAL_NAME' terminal isn't executable. SMAPI might be running in a sandbox or the system might be misconfigured? Falling back to current shell."
env TERM=xterm $LAUNCH_FILE "$@"
if [ $? -eq 127 ]; then
exec $LAUNCH_FILE --no-terminal "$@"
fi
fi
# explicitly run without terminal
elif [ "$SKIP_TERMINAL" == "true" ]; then
exec $LAUNCH_FILE --no-terminal "$@"
else
exec $LAUNCH_FILE "$@"
fi
fi

View File

@ -1,21 +0,0 @@
#!/bin/bash
# Run the SMAPI installer through Mono on Linux or Mac.
# Move to script's directory
cd "`dirname "$0"`"
# get cross-distro version of POSIX command
COMMAND=""
if command -v command >/dev/null 2>&1; then
COMMAND="command -v"
elif type type >/dev/null 2>&1; then
COMMAND="type"
fi
# validate Mono & run installer
if $COMMAND mono >/dev/null 2>&1; then
mono internal/unix-install.exe
else
echo "Oops! Looks like Mono isn't installed. Please install Mono from https://mono-project.com, reboot, and run this installer again."
read
fi

View File

@ -1,95 +0,0 @@
#!/bin/bash
# MonoKickstart Shell Script
# Written by Ethan "flibitijibibo" Lee
# Modified for StardewModdingAPI by Viz and Pathoschild
# Move to script's directory
cd "`dirname "$0"`"
# Get the system architecture
UNAME=`uname`
ARCH=`uname -m`
# MonoKickstart picks the right libfolder, so just execute the right binary.
if [ "$UNAME" == "Darwin" ]; then
# ... Except on OSX.
export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:./osx/
# El Capitan is a total idiot and wipes this variable out, making the
# Steam overlay disappear. This sidesteps "System Integrity Protection"
# and resets the variable with Valve's own variable (they provided this
# fix by the way, thanks Valve!). Note that you will need to update your
# launch configuration to the script location, NOT just the app location
# (i.e. Kick.app/Contents/MacOS/Kick, not just Kick.app).
# -flibit
if [ "$STEAM_DYLD_INSERT_LIBRARIES" != "" ] && [ "$DYLD_INSERT_LIBRARIES" == "" ]; then
export DYLD_INSERT_LIBRARIES="$STEAM_DYLD_INSERT_LIBRARIES"
fi
# this was here before
ln -sf mcs.bin.osx mcs
# fix "DllNotFoundException: libgdiplus.dylib" errors when loading images in SMAPI
if [ -f libgdiplus.dylib ]; then
rm libgdiplus.dylib
fi
if [ -f /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib ]; then
ln -s /Library/Frameworks/Mono.framework/Versions/Current/lib/libgdiplus.dylib libgdiplus.dylib
fi
# launch SMAPI
cp StardewValley.bin.osx StardewModdingAPI.bin.osx
open -a Terminal ./StardewModdingAPI.bin.osx $@
else
# choose launcher
LAUNCHER=""
if [ "$ARCH" == "x86_64" ]; then
ln -sf mcs.bin.x86_64 mcs
cp StardewValley.bin.x86_64 StardewModdingAPI.bin.x86_64
LAUNCHER="./StardewModdingAPI.bin.x86_64 $@"
else
ln -sf mcs.bin.x86 mcs
cp StardewValley.bin.x86 StardewModdingAPI.bin.x86
LAUNCHER="./StardewModdingAPI.bin.x86 $@"
fi
# get cross-distro version of POSIX command
COMMAND=""
if command -v command 2>/dev/null; then
COMMAND="command -v"
elif type type 2>/dev/null; then
COMMAND="type"
fi
# open SMAPI in terminal
if $COMMAND xterm 2>/dev/null; then
xterm -e "$LAUNCHER"
elif $COMMAND x-terminal-emulator 2>/dev/null; then
# Terminator converts -e to -x when used through x-terminal-emulator for some reason (per
# `man terminator`), which causes an "unable to find shell" error. If x-terminal-emulator
# is mapped to Terminator, invoke it directly instead.
if [[ "$(readlink -e $(which x-terminal-emulator))" == *"/terminator" ]]; then
terminator -e "sh -c 'TERM=xterm $LAUNCHER'"
else
x-terminal-emulator -e "sh -c 'TERM=xterm $LAUNCHER'"
fi
elif $COMMAND xfce4-terminal 2>/dev/null; then
xfce4-terminal -e "sh -c 'TERM=xterm $LAUNCHER'"
elif $COMMAND gnome-terminal 2>/dev/null; then
gnome-terminal -e "sh -c 'TERM=xterm $LAUNCHER'"
elif $COMMAND konsole 2>/dev/null; then
konsole -p Environment=TERM=xterm -e "$LAUNCHER"
elif $COMMAND terminal 2>/dev/null; then
terminal -e "sh -c 'TERM=xterm $LAUNCHER'"
else
sh -c 'TERM=xterm $LAUNCHER'
fi
# some Linux users get error 127 (command not found) from the above block, even though
# `command -v` indicates the command is valid. As a fallback, launch SMAPI without a terminal when
# that happens and pass in an argument indicating SMAPI shouldn't try writing to the terminal
# (which can be slow if there is none).
if [ $? -eq 127 ]; then
$LAUNCHER --no-terminal
fi
fi

View File

@ -1,8 +0,0 @@
@echo off
echo %~dp0 | findstr /C:"%TEMP%" 1>nul
if not errorlevel 1 (
echo Oops! It looks like you're running the installer from inside a zip file. Make sure you unzip the download first.
pause
) else (
start /WAIT /B internal/windows-install.exe
)

View File

@ -0,0 +1,54 @@
using System;
using System.Reflection;
using HarmonyLib;
namespace StardewModdingAPI.Internal.Patching
{
/// <summary>Provides base implementation logic for <see cref="IPatcher"/> instances.</summary>
internal abstract class BasePatcher : IPatcher
{
/*********
** Public methods
*********/
/// <inheritdoc />
public abstract void Apply(Harmony harmony, IMonitor monitor);
/*********
** Protected methods
*********/
/// <summary>Get a method and assert that it was found.</summary>
/// <typeparam name="TTarget">The type containing the method.</typeparam>
/// <param name="parameters">The method parameter types, or <c>null</c> if it's not overloaded.</param>
protected ConstructorInfo RequireConstructor<TTarget>(params Type[] parameters)
{
return PatchHelper.RequireConstructor<TTarget>(parameters);
}
/// <summary>Get a method and assert that it was found.</summary>
/// <typeparam name="TTarget">The type containing the method.</typeparam>
/// <param name="name">The method name.</param>
/// <param name="parameters">The method parameter types, or <c>null</c> if it's not overloaded.</param>
/// <param name="generics">The method generic types, or <c>null</c> if it's not generic.</param>
protected MethodInfo RequireMethod<TTarget>(string name, Type[]? parameters = null, Type[]? generics = null)
{
return PatchHelper.RequireMethod<TTarget>(name, parameters, generics);
}
/// <summary>Get a Harmony patch method on the current patcher instance.</summary>
/// <param name="name">The method name.</param>
/// <param name="priority">The patch priority to apply, usually specified using Harmony's <see cref="Priority"/> enum, or <c>null</c> to keep the default value.</param>
protected HarmonyMethod GetHarmonyMethod(string name, int? priority = null)
{
HarmonyMethod method = new(
AccessTools.Method(this.GetType(), name)
?? throw new InvalidOperationException($"Can't find patcher method {PatchHelper.GetMethodString(this.GetType(), name)}.")
);
if (priority.HasValue)
method.priority = priority.Value;
return method;
}
}
}

View File

@ -0,0 +1,36 @@
using System;
using HarmonyLib;
namespace StardewModdingAPI.Internal.Patching
{
/// <summary>Simplifies applying <see cref="IPatcher"/> instances to the game.</summary>
internal static class HarmonyPatcher
{
/*********
** Public methods
*********/
/// <summary>Apply the given Harmony patchers.</summary>
/// <param name="id">The mod ID applying the patchers.</param>
/// <param name="monitor">The monitor with which to log any errors.</param>
/// <param name="patchers">The patchers to apply.</param>
public static Harmony Apply(string id, IMonitor monitor, params IPatcher[] patchers)
{
Harmony harmony = new(id);
foreach (IPatcher patcher in patchers)
{
try
{
patcher.Apply(harmony, monitor);
}
catch (Exception ex)
{
monitor.Log($"Couldn't apply runtime patch '{patcher.GetType().Name}' to the game. Some SMAPI features may not work correctly. See log file for details.", LogLevel.Error);
monitor.Log($"Technical details:\n{ex.GetLogSummary()}");
}
}
return harmony;
}
}
}

View File

@ -0,0 +1,16 @@
using HarmonyLib;
namespace StardewModdingAPI.Internal.Patching
{
/// <summary>A set of Harmony patches to apply.</summary>
internal interface IPatcher
{
/*********
** Public methods
*********/
/// <summary>Apply the Harmony patches for this instance.</summary>
/// <param name="harmony">The Harmony instance.</param>
/// <param name="monitor">The monitor with which to log any errors.</param>
public void Apply(Harmony harmony, IMonitor monitor);
}
}

View File

@ -0,0 +1,77 @@
using System;
using System.Linq;
using System.Reflection;
using System.Text;
using HarmonyLib;
namespace StardewModdingAPI.Internal.Patching
{
/// <summary>Provides utility methods for patching game code with Harmony.</summary>
internal static class PatchHelper
{
/*********
** Public methods
*********/
/// <summary>Get a constructor and assert that it was found.</summary>
/// <typeparam name="TTarget">The type containing the method.</typeparam>
/// <param name="parameters">The method parameter types, or <c>null</c> if it's not overloaded.</param>
/// <exception cref="InvalidOperationException">The type has no matching constructor.</exception>
public static ConstructorInfo RequireConstructor<TTarget>(Type[]? parameters = null)
{
return
AccessTools.Constructor(typeof(TTarget), parameters)
?? throw new InvalidOperationException($"Can't find constructor {PatchHelper.GetMethodString(typeof(TTarget), null, parameters)} to patch.");
}
/// <summary>Get a method and assert that it was found.</summary>
/// <typeparam name="TTarget">The type containing the method.</typeparam>
/// <param name="name">The method name.</param>
/// <param name="parameters">The method parameter types, or <c>null</c> if it's not overloaded.</param>
/// <param name="generics">The method generic types, or <c>null</c> if it's not generic.</param>
/// <exception cref="InvalidOperationException">The type has no matching method.</exception>
public static MethodInfo RequireMethod<TTarget>(string name, Type[]? parameters = null, Type[]? generics = null)
{
return
AccessTools.Method(typeof(TTarget), name, parameters, generics)
?? throw new InvalidOperationException($"Can't find method {PatchHelper.GetMethodString(typeof(TTarget), name, parameters, generics)} to patch.");
}
/// <summary>Get a human-readable representation of a method target.</summary>
/// <param name="type">The type containing the method.</param>
/// <param name="name">The method name, or <c>null</c> for a constructor.</param>
/// <param name="parameters">The method parameter types, or <c>null</c> if it's not overloaded.</param>
/// <param name="generics">The method generic types, or <c>null</c> if it's not generic.</param>
public static string GetMethodString(Type type, string? name, Type[]? parameters = null, Type[]? generics = null)
{
StringBuilder str = new();
// type
str.Append(type.FullName);
// method name (if not constructor)
if (name != null)
{
str.Append('.');
str.Append(name);
}
// generics
if (generics?.Any() == true)
{
str.Append('<');
str.Append(string.Join(", ", generics.Select(p => p.FullName)));
str.Append('>');
}
// parameters
if (parameters?.Any() == true)
{
str.Append('(');
str.Append(string.Join(", ", parameters.Select(p => p.FullName)));
str.Append(')');
}
return str.ToString();
}
}
}

View File

@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' &lt; '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
<HasSharedItems>true</HasSharedItems>
<SharedGUID>6c16e948-3e5c-47a7-bf4b-07a7469a87a5</SharedGUID>
</PropertyGroup>
<PropertyGroup Label="Configuration">
<Import_RootNamespace>SMAPI.Internal.Patching</Import_RootNamespace>
</PropertyGroup>
<ItemGroup>
<Compile Include="$(MSBuildThisFileDirectory)BasePatcher.cs" />
<Compile Include="$(MSBuildThisFileDirectory)HarmonyPatcher.cs" />
<Compile Include="$(MSBuildThisFileDirectory)IPatcher.cs" />
<Compile Include="$(MSBuildThisFileDirectory)PatchHelper.cs" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="Globals">
<ProjectGuid>6c16e948-3e5c-47a7-bf4b-07a7469a87a5</ProjectGuid>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
<PropertyGroup />
<Import Project="SMAPI.Internal.Patching.projitems" Label="Shared" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
</Project>

View File

@ -0,0 +1,31 @@
using System;
using System.Collections.Generic;
namespace StardewModdingAPI.Internal.ConsoleWriting
{
/// <summary>The console color scheme options.</summary>
internal class ColorSchemeConfig
{
/*********
** Accessors
*********/
/// <summary>The default color scheme ID to use, or <see cref="MonitorColorScheme.AutoDetect"/> to select one automatically.</summary>
public MonitorColorScheme UseScheme { get; }
/// <summary>The available console color schemes.</summary>
public IDictionary<MonitorColorScheme, IDictionary<ConsoleLogLevel, ConsoleColor>> Schemes { get; }
/*********
** Public methods
*********/
/// <summary>Construct an instance.</summary>
/// <param name="useScheme">The default color scheme ID to use, or <see cref="MonitorColorScheme.AutoDetect"/> to select one automatically.</param>
/// <param name="schemes">The available console color schemes.</param>
public ColorSchemeConfig(MonitorColorScheme useScheme, IDictionary<MonitorColorScheme, IDictionary<ConsoleLogLevel, ConsoleColor>> schemes)
{
this.UseScheme = useScheme;
this.Schemes = schemes;
}
}
}

View File

@ -1,19 +1,24 @@
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using StardewModdingAPI.Toolkit.Utilities;
namespace StardewModdingAPI.Internal.ConsoleWriting
{
/// <summary>Provides a wrapper for writing color-coded text to the console.</summary>
internal class ColorfulConsoleWriter
/// <summary>Writes color-coded text to the console.</summary>
internal class ColorfulConsoleWriter : IConsoleWriter
{
/*********
** Fields
*********/
/// <summary>The console text color for each log level.</summary>
private readonly IDictionary<ConsoleLogLevel, ConsoleColor> Colors;
private readonly IDictionary<ConsoleLogLevel, ConsoleColor>? Colors;
/// <summary>Whether the current console supports color formatting.</summary>
private readonly bool SupportsColor;
#if !SMAPI_FOR_MOBILE
[MemberNotNullWhen(true, nameof(ColorfulConsoleWriter.Colors))]
#endif
private bool SupportsColor { get; }
/*********
@ -21,11 +26,24 @@ namespace StardewModdingAPI.Internal.ConsoleWriting
*********/
/// <summary>Construct an instance.</summary>
/// <param name="platform">The target platform.</param>
/// <param name="colorScheme">The console color scheme to use.</param>
public ColorfulConsoleWriter(Platform platform, MonitorColorScheme colorScheme)
public ColorfulConsoleWriter(Platform platform)
: this(platform, ColorfulConsoleWriter.GetDefaultColorSchemeConfig(MonitorColorScheme.AutoDetect)) { }
/// <summary>Construct an instance.</summary>
/// <param name="platform">The target platform.</param>
/// <param name="colorConfig">The colors to use for text written to the SMAPI console.</param>
public ColorfulConsoleWriter(Platform platform, ColorSchemeConfig colorConfig)
{
this.SupportsColor = this.TestColorSupport();
this.Colors = this.GetConsoleColorScheme(platform, colorScheme);
if (colorConfig.UseScheme == MonitorColorScheme.None)
{
this.SupportsColor = false;
this.Colors = null;
}
else
{
this.SupportsColor = this.TestColorSupport();
this.Colors = this.GetConsoleColorScheme(platform, colorConfig);
}
}
/// <summary>Write a message line to the log.</summary>
@ -53,6 +71,39 @@ namespace StardewModdingAPI.Internal.ConsoleWriting
Console.WriteLine(message);
}
/// <summary>Get the default color scheme config for cases where it's not configurable (e.g. the installer).</summary>
/// <param name="useScheme">The default color scheme ID to use, or <see cref="MonitorColorScheme.AutoDetect"/> to select one automatically.</param>
/// <remarks>The colors here should be kept in sync with the SMAPI config file.</remarks>
public static ColorSchemeConfig GetDefaultColorSchemeConfig(MonitorColorScheme useScheme)
{
return new ColorSchemeConfig(
useScheme: useScheme,
schemes: new Dictionary<MonitorColorScheme, IDictionary<ConsoleLogLevel, ConsoleColor>>
{
[MonitorColorScheme.DarkBackground] = new Dictionary<ConsoleLogLevel, ConsoleColor>
{
[ConsoleLogLevel.Trace] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Debug] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Info] = ConsoleColor.White,
[ConsoleLogLevel.Warn] = ConsoleColor.Yellow,
[ConsoleLogLevel.Error] = ConsoleColor.Red,
[ConsoleLogLevel.Alert] = ConsoleColor.Magenta,
[ConsoleLogLevel.Success] = ConsoleColor.DarkGreen
},
[MonitorColorScheme.LightBackground] = new Dictionary<ConsoleLogLevel, ConsoleColor>
{
[ConsoleLogLevel.Trace] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Debug] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Info] = ConsoleColor.Black,
[ConsoleLogLevel.Warn] = ConsoleColor.DarkYellow,
[ConsoleLogLevel.Error] = ConsoleColor.Red,
[ConsoleLogLevel.Alert] = ConsoleColor.DarkMagenta,
[ConsoleLogLevel.Success] = ConsoleColor.DarkGreen
}
}
);
}
/*********
** Private methods
@ -73,47 +124,22 @@ namespace StardewModdingAPI.Internal.ConsoleWriting
/// <summary>Get the color scheme to use for the current console.</summary>
/// <param name="platform">The target platform.</param>
/// <param name="colorScheme">The console color scheme to use.</param>
private IDictionary<ConsoleLogLevel, ConsoleColor> GetConsoleColorScheme(Platform platform, MonitorColorScheme colorScheme)
/// <param name="colorConfig">The colors to use for text written to the SMAPI console.</param>
private IDictionary<ConsoleLogLevel, ConsoleColor> GetConsoleColorScheme(Platform platform, ColorSchemeConfig colorConfig)
{
// auto detect color scheme
if (colorScheme == MonitorColorScheme.AutoDetect)
// get color scheme ID
MonitorColorScheme schemeID = colorConfig.UseScheme;
if (schemeID == MonitorColorScheme.AutoDetect)
{
colorScheme = platform == Platform.Mac
? MonitorColorScheme.LightBackground // MacOS doesn't provide console background color info, but it's usually white.
schemeID = platform == Platform.Mac
? MonitorColorScheme.LightBackground // macOS doesn't provide console background color info, but it's usually white.
: ColorfulConsoleWriter.IsDark(Console.BackgroundColor) ? MonitorColorScheme.DarkBackground : MonitorColorScheme.LightBackground;
}
// get colors for scheme
switch (colorScheme)
{
case MonitorColorScheme.DarkBackground:
return new Dictionary<ConsoleLogLevel, ConsoleColor>
{
[ConsoleLogLevel.Trace] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Debug] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Info] = ConsoleColor.White,
[ConsoleLogLevel.Warn] = ConsoleColor.Yellow,
[ConsoleLogLevel.Error] = ConsoleColor.Red,
[ConsoleLogLevel.Alert] = ConsoleColor.Magenta,
[ConsoleLogLevel.Success] = ConsoleColor.DarkGreen
};
case MonitorColorScheme.LightBackground:
return new Dictionary<ConsoleLogLevel, ConsoleColor>
{
[ConsoleLogLevel.Trace] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Debug] = ConsoleColor.DarkGray,
[ConsoleLogLevel.Info] = ConsoleColor.Black,
[ConsoleLogLevel.Warn] = ConsoleColor.DarkYellow,
[ConsoleLogLevel.Error] = ConsoleColor.Red,
[ConsoleLogLevel.Alert] = ConsoleColor.DarkMagenta,
[ConsoleLogLevel.Success] = ConsoleColor.DarkGreen
};
default:
throw new NotSupportedException($"Unknown color scheme '{colorScheme}'.");
}
return colorConfig.Schemes.TryGetValue(schemeID, out IDictionary<ConsoleLogLevel, ConsoleColor>? scheme)
? scheme
: throw new NotSupportedException($"Unknown color scheme '{schemeID}'.");
}
/// <summary>Get whether a console color should be considered dark, which is subjectively defined as 'white looks better than black on this text'.</summary>
@ -125,7 +151,7 @@ namespace StardewModdingAPI.Internal.ConsoleWriting
case ConsoleColor.Black:
case ConsoleColor.Blue:
case ConsoleColor.DarkBlue:
case ConsoleColor.DarkMagenta: // Powershell
case ConsoleColor.DarkMagenta: // PowerShell
case ConsoleColor.DarkRed:
case ConsoleColor.Red:
return true;

View File

@ -0,0 +1,11 @@
namespace StardewModdingAPI.Internal.ConsoleWriting
{
/// <summary>Writes text to the console.</summary>
internal interface IConsoleWriter
{
/// <summary>Write a message line to the log.</summary>
/// <param name="message">The message to log.</param>
/// <param name="level">The log level.</param>
void WriteLine(string message, ConsoleLogLevel level);
}
}

Some files were not shown because too many files have changed in this diff Show More