Fix drag-and-drop equipping and inventory UI lag#2
Fix drag-and-drop equipping and inventory UI lag#2google-labs-jules[bot] wants to merge 2 commits into
Conversation
- Implemented drag-and-drop support for equipment slots by adding a `Receiver` handler to the slot panels. - Optimized `OpenInventory` to reuse the existing `DFrame` and `DModelPanel` instead of rebuilding them on every update, eliminating lag spikes when equipping items. - Fixed a memory leak where `ClientsideModel` (backpack visual) was not being removed when the player model panel was destroyed.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
- **Fix Lag:** Optimized `OpenInventory` to reuse the main `DFrame` and the expensive 3D player model panel instead of destroying/recreating them on every update. Fixed a memory leak with the backpack visual.
- **Drag-and-Drop:**
- Enabled dragging items *to* equipment slots to equip them.
- Enabled dragging items *from* equipment slots *to* inventory containers to unequip them to a specific slot (added `unequip_to` server action).
- **Shortcuts:**
- Added `Ctrl+Left-Click` support for quick actions:
- Auto-looting items from cache to inventory.
- Auto-equipping gear from inventory to slots.
- Unequipping items from slots to inventory.
This PR addresses two issues in the Tarkov Inventory system:
OpenInventoryto reuse the main frame and the expensive Player Model panel, only refreshing the item slots. This also fixes a memory leak involving the backpack preview model.PR created automatically by Jules for task 4834565500949481724 started by @Cautioncrazy