I would use this myself all the time. Heads up, though: I’m modifying the workshop menu as part of an optimization pass, so if you’re relying on its current inventory tracker, that won’t be there anymore in the next release.
Is that specific to the talismans? Are item.canonical_uri and item.uri simply strings that don’t have a .__self property so that ends up being a null comparison?
If you create your own like that it’s fine. The change is only that StonehearthTeamCrafterView no longer uses one itself so you can’t share the one it used to have.
I use this check to see if it is “iconic” form of the item
“Iconic” is not always a synonym for “item”. You probably want App.catalog.getCatalogData(uri).is_item.
App.catalog.getCatalogData(uri) did help. Thanks you.
If I have a uri and/or the CatalogData for a talisman like stonehearth:trapper:talisman, is there a good way to match it to the item version that the trapper equips?
For example, if I have the trapper talisman, stonehearth:trapper:talisman, the result I want is stonehearth:trapper:knife.
The two are not really related at the technical level. The latter is just the default weapon of the Trapper class (and that class has no other weapons). If you really want to count them, I’d just count citizens with that job.
Talismans have a unique one-to-one relationship with professions, so I’d just look at the number of each job to determine how many of that talisman is equipped. You don’t need to look at individual hearthling entities and their equipment.