Commit Graph

528 Commits (6128e2dd7257942339e07f3c855f1b8aca5b81e4)
 

Author SHA1 Message Date
erion 6128e2dd72 Merge branch 'master' of https://github.com/stardew-access/stardew-access 2023-04-07 09:09:26 +02:00
Mohammad Shoaib Khan 0e1f9d0cab
Merge pull request #96 from conundrum9999/main
Text descriptions for character creation; speed optimizations for object search; load NVDA's dll in place.
2023-04-07 12:00:47 +05:30
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
Mohammad Shoaib Khan 7bb4819601
Merge pull request #94 from khanshoaib3/Issue90
Speak year and season on day 1
2023-04-04 16:01:55 +05:30
Mohammad Shoaib Khan ce6f67a0dc
Speak year and season on day 1 2023-04-04 15:59:40 +05:30
erion 8cca880b04 Merge branch 'master' of https://github.com/stardew-access/stardew-access 2023-03-10 15:59:58 +01:00
Mohammad Shoaib Khan b24fe44dd3
Merge pull request #91 from khanshoaib3/refactor
Patches Refactor
2023-03-10 15:37:09 +05:30
Mohammad Shoaib Khan 2b6b60494e
Grouped files 2023-03-10 15:33:39 +05:30
Mohammad Shoaib Khan b8fce68bec
Moved more menus to their own class 2023-03-10 15:24:08 +05:30
Mohammad Shoaib Khan ea03f9a4cb
Moved some menus to their own class 2023-03-10 15:09:56 +05:30
Mohammad Shoaib Khan b0c1d9e173
Moved tailoring menu patch to its own class 2023-03-10 15:00:31 +05:30
Mohammad Shoaib Khan af0ec1ab8d
Moved pond query menu patch to its own class 2023-03-10 14:55:07 +05:30
Mohammad Shoaib Khan 07fcc94296
Moved forge menu patch to its own class 2023-03-10 14:50:40 +05:30
Mohammad Shoaib Khan 64300c58eb
Moved item list menu patch to its own class 2023-03-10 14:41:30 +05:30
Mohammad Shoaib Khan a250cbd98d
Renamed classes 2023-03-10 14:35:46 +05:30
Mohammad Shoaib Khan c553b589ab
Moved patches related to Game1 and InstanceGame to their own class 2023-03-10 14:32:43 +05:30
Mohammad Shoaib Khan 50e8afc78c
Moved and organized quest patches 2023-03-09 14:01:58 +05:30
Mohammad Shoaib Khan 53fe731401
Moved and organized mini game patches 2023-03-09 13:32:45 +05:30
Mohammad Shoaib Khan 2c233f6e6b
Moved InventoryUtils.cs 2023-03-09 13:27:02 +05:30
Mohammad Shoaib Khan 1346e90bf5
Organised code for geode menu patch 2023-03-09 13:21:46 +05:30
Mohammad Shoaib Khan 8970a2c441
Fixed bug for Museum menu patch 2023-03-09 13:12:07 +05:30
Mohammad Shoaib Khan 2ddebd3615
Organised code for donation menu patches 2023-03-09 13:06:13 +05:30
Mohammad Shoaib Khan 5195313a5b
Organised code for item grab menu patch 2023-03-08 12:44:07 +05:30
Mohammad Shoaib Khan 6822bd4840
Organised code for purchase animal menu patch 2023-03-08 12:29:19 +05:30
Mohammad Shoaib Khan 80963c4dc6
Improved and organised code in shop menu patch 2023-03-08 12:21:50 +05:30
Mohammad Shoaib Khan 8523026ed0
Improved and organised code for dialogue box patch
Moved letter viewer menu patch to its own class
moved npc patch to its own clas
moved draw hover text patch to IClickableMenuPatch.cs
2023-03-08 12:06:46 +05:30
Mohammad Shoaib Khan 2ba41822c9
Improved and organised code in title menu patches 2023-03-07 23:34:07 +05:30
Mohammad Shoaib Khan 9096ce59b9
bug fix in snapping mouse to primary and secondary inventory slots 2023-03-07 22:57:15 +05:30
Mohammad Shoaib Khan 6141447c13
Improved and organised code in carpenter menu patch 2023-03-07 22:45:00 +05:30
Mohammad Shoaib Khan baede57965
Improved and organised code in bundle menu patches 2023-03-07 19:44:58 +05:30
Mohammad Shoaib Khan b0ef71cd4a
bug fix 2023-03-07 12:16:39 +05:30
Mohammad Shoaib Khan 403a97b633
Improved and organised code in AnimalQueryMenuPatch.cs 2023-03-07 12:03:08 +05:30