The pull request adds a private concurrent dictionary field to AppearanceManager named Attachments, serves a complementary purpose to the Wearables field and can be used to obtain currently worn attachments by attachment point.
Several public methods are added: GetAttachments, GetAttachmentsByItemId, GetAttachmentsByAttachmentPoint and GetAttachmentsByInventoryItem as convenience methods (complementary to the GetWear* set of methods).
The addition should speed up programming since it will no longer be necessary to perform the entire process of obtaining inventory items and the attachment point from primitives manually. Furthermore, the changes are at the lowest level within the library and only accessed via public methods such that along with encapsulation, there should be some consistency guaranteed since the dictionary is updated upon every Attach / Detach and the corresponding derivative methods.
Apparently, it was all in the plan, just never got implemented, citing from comments in Attach (now removed):
// TODO: At some point it might be beneficial to have AppearanceManager track what we
// are currently wearing for attachments to make enumeration and detachment easier
Please apply if useful!
TL;DR: allows access to attached inventory items and the attachment point that the items attach directly without extra calls
Hello!
The pull request adds a private concurrent dictionary field to AppearanceManager named
Attachments
, serves a complementary purpose to theWearables
field and can be used to obtain currently worn attachments by attachment point.Several public methods are added:
GetAttachments
,GetAttachmentsByItemId
,GetAttachmentsByAttachmentPoint
andGetAttachmentsByInventoryItem
as convenience methods (complementary to theGetWear*
set of methods).The addition should speed up programming since it will no longer be necessary to perform the entire process of obtaining inventory items and the attachment point from primitives manually. Furthermore, the changes are at the lowest level within the library and only accessed via public methods such that along with encapsulation, there should be some consistency guaranteed since the dictionary is updated upon every Attach / Detach and the corresponding derivative methods.
Apparently, it was all in the plan, just never got implemented, citing from comments in
Attach
(now removed):Please apply if useful!
TL;DR: allows access to attached inventory items and the attachment point that the items attach directly without extra calls