Closed marouen-lamiri closed 9 years ago
Diagram behind the idea of equipment system, same for issues: #69 #71 and related to full item system from issues #64 and #65
Refactoring / Restructuring complete, old issues are more fluid, less buggy and more efficient (less code smells). Affects issue #69 #71
Shared breakdown with issue #69 #71
Mockup of the inventory system, note: the inventory system works on a GUI level with classes tied to items so it doesn't interact with GameObject like the rest of the game (though, a later feature will be to drop items as loot using GameObjects on the terrain to be picked up). This being said the inventory system interacts as it would in other GUI applications.
same goes for issues: #69 #71
Test Name | Input | Expected Output | Status |
---|---|---|---|
Test Drag and Drop Item in a Valid Slot | Click an item in the inventory panel, and drag it to a new slot where it can fit, then release the mouse button. | Observe the item clamp to the new slot. | Pass |
Test Drag and Drop Item in an Invalid Slot | Click an item in the inventory panel, and drag it to a new slot where it cannot fit, then release the mouse button. | Observe the item move back to its original slot. | Pass |
Test Drag and Drop Item Outside the Inventory Panel | Click an item in the inventory panel, and drag it outside of the inventory panel, then release the mouse button. | Observe the item move back to its original slot. | Pass |
Test Equip Item By Right-Click | Right-click any item in the inventory panel. | Observe the item being equipped on the correct slot on the player silhouette, on top of the grid in the inventory panel. | Pass, TODO: adjust for any screen size, (currently items can be out of place on certain screen sizes). |
Test Equip Item By Click-and-Drag | Click-and-Drag any item in the inventory panel onto a valid slot on the player silhouette. | Observe the item being equipped on the correct slot on the player silhouette, on top of the grid in the inventory panel. | Pass |
Test Unsuccessful Equip Item By Click-and-Drag to Invalid Slot | Click-and-Drag any item in the inventory panel onto an invalid slot on the player silhouette (a body that cannot receive the item, e.g. the potion on the chest). | Observe the item being brought back to its original position. | Pass |
Test Unequip Item | Click and Drag any item that was equipped back onto a valid slot where it can fit. | Observe the item being unequipped and clamp to the slot it's given. | Pass |
These issues have been retested: #64 Tests failed: None Last edit: 05/03/2015
Preparation:
Demo:
Equipping items works well. Can drag or right click to equip. Dragging close to the inventory slot will clamp it to the slot. Trying to equip an item in an incorrect slot will cancel the movement. Signing off
As a Fighter, I want to equip armors[SP: 3] [Priority: 2] [Risk: Medium]