2 * This file includes the definitions for the item specific classes
3 * derived from the Kingdom, Type and Entity base classes.
5 * Copyright (C) 2008 David Kolossa
7 * This file is part of OpenStranded
9 * OpenStranded is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation, either version 3 of the License, or
12 * (at your option) any later version.
14 * OpenStranded is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with OpenStranded. If not, see <http://www.gnu.org/licenses/>.
23 #ifndef STRANDED_ITEM_HH
24 #define STRANDED_ITEM_HH
33 * This is the class of all entities which belong to the kingdom
35 * An item is the only entity which can be collected by the player
36 * (without scripts) and which is stored in the inventory afterwards.
37 * An item can't move without the help of scripts.
39 class ItemEntity
: public Entity
44 * @param type The ID of the Type the item should belong to
51 * This is the class of all item types derived from the Item base class.
53 class ItemType
: public Type
58 * @param name The name of the new item type
60 ItemType (const char* name
);
65 * The Item Kingdom class
67 class ItemKingdom
: public Kingdom
82 * Create a new item entity
83 * @param type The ID of the type the new item should belong to
84 * @return A pointer to the new Entity
85 * @see ItemEntity::ItemEntity()
88 createEntity (ID type
);
91 * Create a new item type
92 * @param name The name of the new type (visible in editor)
93 * @return A pointer to the new Type
94 * @see ItemType::ItemType()
97 createType (const char* name
);
100 #endif /* STRANDED_ITEM_HH */