[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-devel] items & inventory
From: |
Thorsten Riess |
Subject: |
[Adonthell-devel] items & inventory |
Date: |
Sun, 24 Mar 2002 20:48:35 +0100 |
Hi everybody,
I looked into the preliminary code for the items and combat system from
the road_to_0-4 CVS branch and I think I understood how the stuff
basically works. And I have to say, I like the approach of combining
Python and C++ :-)
The item_base class looks fine for me (so far), and I thought about
creating a inventory class where item_base objects are stored. Each
character_base then has an associated inventory object. Therefore it is
reasonable to store the amount of money that a character posseses in
that inventory class as well.
The inventory class has member functions that allow to add/remove
items, add/subtract money, iterate through the inventory and move items
from one inventory to another.
Of course the character_base has to hold a pointer of the character's
inventory.
So we have the dependencies
character_base --> inventory_base --> item_base
I think there should also be pointers to the respective parents in the
item_base/inventory_base classes.
Well, tell me what you think :-)
PS: some general note on the CVS code: the _only_ versions of
autoconf/automake/libtool that worked for me were autoconf
2.13/automake 1.4 and libtool 1.3.4... especially newer libtool
versions seem to be a problem. Just to let you know, maybe there should
be some hint on the webpage...
Thorsten.
- [Adonthell-devel] items & inventory,
Thorsten Riess <=