summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/ContentManagers/ModContentManager.cs
AgeCommit message (Collapse)Author
2022-07-05fix PyTK compatibility mode not handling some edge casesJesse Plamondon-Willard
2022-06-10add image compatibility mode for PyTKJesse Plamondon-Willard
2022-06-10fix accidental case-sensitivity changeJesse Plamondon-Willard
2022-06-10use IRawTextureData instead of intermediate tupleJesse Plamondon-Willard
2022-06-10simplify asset type validaitonJesse Plamondon-Willard
2022-06-10apply style conventionsJesse Plamondon-Willard
2022-06-10Refactored ModContentManager.cs so it actually fit on my 1440p screens.Ameisen
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-10simplify pixel conversion loopJesse Plamondon-Willard
2022-06-10encapsulate loading the raw image data for mod patchingJesse Plamondon-Willard
2022-06-10add validation error when loading XNB file as IRawTextureDataJesse Plamondon-Willard
2022-06-10enable raw image loading by default, rename settingJesse Plamondon-Willard
2022-06-10add IRawTextureData asset typeJesse Plamondon-Willard
2022-06-10add experimental image load rewriteJesse Plamondon-Willard
2022-05-27fix typoJesse Plamondon-Willard
2022-05-15fix typoJesse Plamondon-Willard
2022-05-11add error code to SContentLoadExceptionJesse Plamondon-Willard
2022-05-07simplify and rewrite case-insensitive file path featureJesse Plamondon-Willard
2022-05-04remove aggressive memory optimizations optionJesse Plamondon-Willard
2022-05-04disable case-insensitive paths by default pending performance reworkJesse Plamondon-Willard
2022-04-16move case-insensitive path lookup into toolkit for reuseJesse Plamondon-Willard
2022-04-13enable nullable annotations in the rest of SMAPI core (#837)Jesse Plamondon-Willard
2022-04-06enable nullable annotations by default (#837)Jesse Plamondon-Willard
This adds `#nullable disable` to all existing code (except where null is impossible like enum files), so it can be migrated incrementally.
2022-04-06remove some unused/redundant codeJesse Plamondon-Willard
2022-04-06fix asset name truncation when loading XNB mod file without file extensionJesse Plamondon-Willard
2022-04-03split mod content load method, make error-handling more consistentJesse Plamondon-Willard
2022-04-01make mod file paths case-insensitive in all SMAPI APIsJesse Plamondon-Willard
2022-04-01fix local file path asset name parsing locale codes in rare cases (#766)Jesse Plamondon-Willard
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-01keep old XNB file extension behavior for backwards compatibility (#766)Jesse Plamondon-Willard
2022-03-27add asset type to AssetRequested event (#766)Jesse Plamondon-Willard
2022-03-26rewrite content loading to allow handling locale variants (#766, #786, #812)Jesse Plamondon-Willard
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-05add DoesAssetExist to support the upcoming Stardew Valley 1.6 (#766)Jesse Plamondon-Willard
2022-03-05migrate more internal code to IAssetName (#766)Jesse Plamondon-Willard
2022-03-05fix regression with mod XNB files in the content pipeline (#766)Jesse Plamondon-Willard
2022-02-22avoid SetData when premultiplying texture with no semi-transparencyJesse Plamondon-Willard
2022-02-18add AssetName to encapsulate asset name handling (#766)Jesse Plamondon-Willard
2021-11-28add support for loading BmFont files for custom languagesJesse Plamondon-Willard
2021-11-28remove libgdiplus workaround on macOSJesse Plamondon-Willard
This is no longer needed after the .NET 5 migration.
2021-07-30migrate to the new Harmony patch pattern used in my modsJesse Plamondon-Willard
That improves validation and error-handling.
2021-07-20fix error loading .xnb files from the local mod folder since SMAPI 3.0Jesse Plamondon-Willard
2021-05-02add verbose logs for map tilesheet changesJesse Plamondon-Willard
2021-05-02add support for dot-ignoring local map tilesheet files (#732)Jesse Plamondon-Willard
2021-05-01match tilesheets without extension to .png files automatically if possibleJesse Plamondon-Willard
2021-02-21use inheritdoc, minor cleanupJesse Plamondon-Willard
2021-01-31add experimental 'aggressive memory optimization' flag (#757)Jesse Plamondon-Willard
2021-01-20fix SDV 1.5 compatibility with content packs that still load XNB mapsJesse Plamondon-Willard
2020-12-26fix SMAPI using a cached translation when the game asks for an untranslated ↵Jesse Plamondon-Willard
asset This mainly affects community center bundles in Stardew Valley 1.5,
2020-12-20update for map tilesheet changesJesse Plamondon-Willard
2020-08-29format codeJesse Plamondon-Willard
2020-07-26use ordinal comparison/sorting instead of invariantJesse Plamondon-Willard
2020-06-07improve premultiplication performanceJesse Plamondon-Willard