I've just done data side soldier stats (it's on SVN), and now I want to make the inventory. In my opinion it should hold :
- List of containers (l\r shoulder,hands,backpack, belt)
- It's weight
Basic draft :
Inventory - class
Inventory::parts - containers
Container - class
map - map of the container, so we can make irregular shapes (like X-COM's belt) and for easy checking is field X,Y free
name - container name (for example Backpack)
movetimes - how much TUs takes a move from container X (Need for battlescape)
Field - class
Container's map is made of fields
pos - field's position in container
item - item which is located on this field (also used for marking free space)
Item - class
start - position of first Field of item
name - item name (for example Assault Rifle)
It surely needs some modifications, so I ask you to take a look at this draft.
Found there is existing inventory , and if it exists, it means that somebody is\was working on that, so if he does other things, I can take the inventory. Are you OK with that ?
Edited by M4st3r, 15 February 2006 - 02:07 PM.