Commit Graph
23 Commits
Author SHA1 Message Date
Katie Durden 803bc64868 Bump manifest version to 1.3.5-beta2. Fix error in json loading and missing static tiles. 2023-04-06 15:02:08 -07:00
Katie Durden dacbff92ea CharacterCustomizationMenuPatches now reads descriptions of appearance options (thanks @JJpanSai for writing the descriptions!)
Descriptions are stored in assets/new-character-appearance-descriptions.json.
If file can't be found or is corrupted, fallback on old behavior of just reading numbers.
Functions support a `lessInfo` variable that also turns off the descriptions, though the config option is not yet implemented.
2023-04-05 19:43:36 -07:00
Katie Durden 529a110617 Refactor functions that obtain current attribute values to share code. 2023-04-05 19:41:47 -07:00
Katie Durden ed405a139e Remove dependency on Newtonsoft.Json since we're now relying on System.Text.Json.
Some optimization and refactoring in ModEntry.cs
Other minor fixes
2023-04-05 18:37:15 -07:00
Katie Durden ad0cb687b7 Readded lessInfo to many tiles related functions and other code cleanup (making argument ordering consist. 2023-04-05 18:37:15 -07:00
Katie Durden 91643e184f Finish adding documentation (with Chat GPT's help) and refactoring TileInfo.cs.
Reduced code duplication with helper functions where possible.
Optimized and simplified `getNameWithCategoryAtTile`.
2023-04-05 18:37:15 -07:00
Katie Durden 8509cbfc0b Refactored getDynamicTilesInfo from TileInfo.cs by moving most of it's functionality to new file DynamicTiles.cs.
Refactored handling of dynamic tiles for events; tile coords now loaded from json file.
Moved LoadJsonFile function to utils.cs.
2023-04-05 18:37:15 -07:00
Katie Durden 35115223d3 Update .gitattributes to ensure .cs and .json files keep crlf line endings. 2023-04-05 18:37:15 -07:00
Katie Durden a7dfeb5526 Optimization and refactoring of TileInfo.cs
Reduced number of calls to `isCollidingAtTile` as it calls a StardewValley function that takes ~30 ms to complete.
Optimize `getFarmAnimalAt` in `TileInfo`.
Refactor `getResourceClumpAtTile` and `getStumpsInWoods`.
2023-04-05 18:37:15 -07:00
Katie Durden 34c182ddc6 Cache the value of Game1.currentLocation 2023-04-05 18:37:15 -07:00
Katie Durden 245959366c Refactor StaticTiles and CATEGORY classes for enhanced functionality
`StaticTiles` now uses `System.Text.Json` and supports conditional and mod-based maps with efficient dictionary lookups. Dictionary can be reloaded as needed, typically once per game day.
`CATEGORY` allows runtime addition of new categories, with an indexer function for retrieval, and retains static properties for compiled categories.
2023-04-05 18:37:15 -07:00
Katie Durden 5d8f85fa5b Separated tile file loading from StaticTiles constructor 2023-04-05 18:37:15 -07:00
Katie Durden dd812851b4 Add base for improved tile coordinate lookup functionality; typo fixes.
* Build tile dictionary at game launch to speed up tile lookups during gameplay.
* Add GameLaunched event to setup new dictionary after other mods loaded.
* Change `StaticTiles.getStaticTileInfoAtWithCategory` to use new dictionary for lookup.
* Various typo fixes and other code cleanup
2023-04-05 18:37:15 -07:00
Katie Durden 4b2e31fadc Change comparisons relying on string.ToLower() to use StringComparison.OrdinalIgnoreCase. 2023-04-05 18:37:15 -07:00
Katie Durden 541fd42133 Static tiles uses HashSet to lookup entries. More nullchecks changed to use is. 2023-04-05 18:37:15 -07:00
Katie Durden a88172c0cf Replaced some foreach loops with for loops and nullchecks to use is instead of ==. 2023-04-05 18:37:15 -07:00
Katie Durden e9ba7c96b9 Changes searched from List to HashSet; saves ~43ms in `SearchLocation 2023-04-05 18:37:15 -07:00
Katie Durden 32db14b329 add <modpath>/libraries/windows to the dll search path before loading Tolk. This enables nvdaControllerClient64.dll to be loaded in place. 2023-04-05 18:37:15 -07:00
Katie Durden 1c61580d6b Fix inventory not speaking extra info; not respecting config option. Reduce excess commas. Bump version to 1.3.5-alpha2. 2023-04-05 18:37:15 -07:00
Katie Durden baedf69d80 Character creation text boxes announce content if set.
Causes text boxes to report their content instead of " text box" when text was already entered.
E.G. after entering a name, "Farmer's Name Text Box" becomes "Farmer's Name: <name>"
2023-02-09 20:50:36 -08:00
Katie Durden 4c336c36ed Enable access to the character appearance controls.
Added accessible buttons to rotate the farmer, change skin tone, hair style, shirt, pants style, and accessory choice.
Added new accessible slider controls to adjust hue, saturation and value for eye, hair and pants color.
    Up/Down to adjust 1%; PageUp/PageDown to adjust by 10%.
Changed spoken modifiable fields (such as current pet, current shirt) to only announce when relevant controls have focus.
    This includes Random Skin Button for appearance controls.
Added toggle key (LeftControl + Space) to show / hide the appearance controls; hidden by default.
Added announcement when entering customization menu to inform of toggle key.
2023-02-09 07:50:54 -08:00
Katie Durden fcf81004d3 Typo: isCustomizingChrachter should be isCustomizingCharacter. Updated all occurrences. 2023-02-09 07:42:27 -08:00
Katie Durden 5996fa09f2 Update harmony and Stardew.ModConfig; add newtonsoft.json as dependency. 2023-02-09 07:41:32 -08:00