ziggr / ESO-LibPrice

ESO Add-on library for fetching price data from other add-ons such as Master Merchant or Arkadius' Trade Tools
3 stars 3 forks source link

LibPrice creates a Circular dependency with MasterMerchant, LibGuildStore, or LibAlchemy #2

Closed Sharlikran closed 2 years ago

Sharlikran commented 2 years ago

I recently added LibAlchemy to MM and upon doing so there is now a Circular dependency. Depending on the mods you have active.

It can not be resolved regardless of whether LibPrice is in LibGuildStore.txt or MasterMerchant.txt. It can not be resolved if you add it to DependsOn or OptionalDependsOn. It can not be resolved if LibPrice is not in any of the manifest files.

Just the addition of LibAlchemy as a requirement to MasterMerchant.txt creates the redundancy.

You no longer override any MasterMerchant functions. I was able to resolve the issue by removing MasterMerchant from the LibPrice manifext file.

## Title: LibPrice 7.1.1
## Version: 7.1.1
## AddOnVersion: 070101
## APIVersion: 101036
## IsLibrary: true
## Description: Return price data from multiple sources: Master Merchant, Arkadius' Trade Tools, Tamriel Trade Centre, and Furniture Catalogue.
## Author: ziggr
## OptionalDependsOn: ArkadiusTradeTools TamrielTradeCentre FurnitureCatalogue

Would you please update LibPrice with that minor alteration?

https://sir.insidi.at/or/logviewer/h2Whm3

Sharlikran commented 2 years ago

@ziggr Also may I be added as a contributor. If not that's okay because you may have strict coding requirements and I'm a bit sloppy.

If not that's okay and I can do a pull request. I want to make LibPrice hold all of the prices in its cache. There are 4 variants default, SHIFT, CTRL, and both SHIFT + CTRL. I will also have a callback to clear the cache by itemId when LibHistorie sends new sales since the sales may effect the average price. Once completed I intend to have LibPrice cache prices, and MM cache the graph. I am hoping that will further reduce lag when opening inventory and banks with multiple mods accessing MM for prices.