Eliminated some problems resulting from last merge
[openstranded.git] / src / item.hh
blobaf3cc69317dfa8d8bac3a094abcb744c8bd3278b
1 /*
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
26 #include "kingdom.hh"
27 #include "type.hh"
28 #include "entity.hh"
30 #define S2_ITEM 3
33 * This is the class of all entities which belong to the kingdom
34 * "item".
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
41 public:
42 ItemEntity (ID type);
47 * This is the class of all item types derived from the Item base class.
49 class ItemType: public Type
51 public:
52 ItemType (const char* name);
57 * The Item Kingdom class
59 class ItemKingdom: public Kingdom
61 public:
62 // Constructor
63 ItemKingdom ();
65 // Virtual methods
66 Entity*
67 createEntity (ID type);
69 Type*
70 createType (const char* name);
73 #endif /* STRANDED_ITEM_HH */