| 4741 | } |
| 4742 | |
| 4743 | void RiggedObject::AvailableItemSlots(const ItemRef& item_ref, AttachmentSlotList* list) const { |
| 4744 | if (item_ref->HasAttachment(_at_grip)) { |
| 4745 | DrawAvailableAttachmentSlots(item_ref, _at_grip, skeleton_, list); |
| 4746 | } |
| 4747 | if (item_ref->HasAttachment(_at_sheathe)) { |
| 4748 | DrawAvailableAttachmentSlots(item_ref, _at_sheathe, skeleton_, list); |
| 4749 | } |
| 4750 | const std::list<std::string>& attachment_list = item_ref->GetAttachmentList(); |
| 4751 | for (const auto& iter : attachment_list) { |
| 4752 | // AttachmentRef attachment_ref = Attachments::Instance()->ReturnRef((*iter)); |
| 4753 | AttachmentRef attachment_ref = Engine::Instance()->GetAssetManager()->LoadSync<Attachment>(iter); |
| 4754 | DrawAvailableAttachment(attachment_ref, skeleton_, false, list); |
| 4755 | if (attachment_ref->mirror_allowed) { |
| 4756 | DrawAvailableAttachment(attachment_ref, skeleton_, true, list); |
| 4757 | } |
| 4758 | } |
| 4759 | } |
| 4760 | |
| 4761 | void RiggedObject::AttachItemToSlot(ItemObject* item_object, AttachmentType type, bool mirrored, const AttachmentRef* attachment_ref) { |
| 4762 | // Detach item if it is already attached |
no test coverage detected