1 /************************************************************************
2  *                                                                      *
3  *  FreeSynd - a remake of the classic Bullfrog game "Syndicate".       *
4  *                                                                      *
5  *   Copyright (C) 2005  Stuart Binge  <skbinge@gmail.com>              *
6  *   Copyright (C) 2005  Joost Peters  <joostp@users.sourceforge.net>   *
7  *   Copyright (C) 2006  Trent Waddington <qg@biodome.org>              *
8  *   Copyright (C) 2006  Tarjei Knapstad <tarjei.knapstad@gmail.com>    *
9  *                                                                      *
10  *    This program is free software;  you can redistribute it and / or  *
11  *  modify it  under the  terms of the  GNU General  Public License as  *
12  *  published by the Free Software Foundation; either version 2 of the  *
13  *  License, or (at your option) any later version.                     *
14  *                                                                      *
15  *    This program is  distributed in the hope that it will be useful,  *
16  *  but WITHOUT  ANY WARRANTY;  without even  the implied  warranty of  *
17  *  MERCHANTABILITY  or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU  *
18  *  General Public License for more details.                            *
19  *                                                                      *
20  *    You can view the GNU  General Public License, online, at the GNU  *
21  *  project's  web  site;  see <http://www.gnu.org/licenses/gpl.html>.  *
22  *  The full text of the license is also included in the file COPYING.  *
23  *                                                                      *
24  ************************************************************************/
25 
26 #ifndef MOD_H
27 #define MOD_H
28 
29 #include <string>
30 
31 /*!
32  * Mod class.
33  */
34 class Mod {
35 public:
36     /*!
37      * Different types of Mod.
38      */
39     enum EModType {
40         MOD_LEGS = 0,
41         MOD_ARMS = 1,
42         MOD_CHEST = 2,
43         MOD_HEART = 3,
44         MOD_EYES = 4,
45         MOD_BRAIN = 5,
46         Unknown = 6
47     } ;
48 
49     enum EModVersion {
50         MOD_V1 = 0,
51         MOD_V2 = 1,
52         MOD_V3 = 2
53     };
54 
55     Mod(const std::string& mod_name, EModType type, EModVersion version, int mod_cost, const std::string& mod_desc,
56             int mod_icon, int mod_iconF = 0);
57 
getName()58     const char *getName() { return name_.c_str(); }
59     //! Return modification type
getType()60     EModType getType() { return type_; }
61     //! Return modification version
getVersion()62     EModVersion getVersion() { return ver_; }
cost()63     int cost() { return cost_; }
desc()64     const char *desc() { return desc_.c_str(); }
icon(bool isMale)65     int icon(bool isMale) { return isMale ? icon_ : icon_f_; }
66 
67 protected:
68     std::string name_, desc_;
69     /*! Type of modification.*/
70     EModType type_;
71     /*! Version of modification.*/
72     EModVersion ver_;
73     int cost_, icon_, icon_f_;
74 };
75 
76 #endif
77