1 // Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
2 // Copyright (C) 2010 Winch Gate Property Limited
4 // This program is free software: you can redistribute it and/or modify
5 // it under the terms of the GNU Affero General Public License as
6 // published by the Free Software Foundation, either version 3 of the
7 // License, or (at your option) any later version.
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU Affero General Public License for more details.
14 // You should have received a copy of the GNU Affero General Public License
15 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 //////////////////////////////////
23 //////////////////////////////////
24 #include <nel/misc/types_nl.h>
25 #include <nel/misc/sstring.h>
26 #include "nel/misc/path.h"
27 #include <nel/misc/file.h>
29 //////////////////////////////////
31 //////////////////////////////////
32 using namespace NLMISC
;
36 //////////////////////////////////
38 //////////////////////////////////
43 NumMPCraftParts
= 26, // Warning: changing this value won't be sufficient.
44 // You'll have to look deeper into code
47 // Contains Craft Part description and different stats related
51 bool Carac
[NumMPStats
];
54 // Raw mats stats for craft
58 bool UsedAsCraftRequirement
;
69 UsedAsCraftRequirement
= false;
73 // Allows to sort strings
74 struct ItemSort
: public std::less
<NLMISC::CSString
>
76 bool operator()( const NLMISC::CSString
& x
, const NLMISC::CSString
& y
) const
78 return x
.icompare( y
);
81 typedef set
<CSString
, ItemSort
> CSortedStringSet
;
83 // Describe a item generated for a creature raw mat
89 CSString codeCreature
;
90 CSortedStringSet generatedItems
;
91 CSString creatureFileName
;
93 typedef list
<CreatureMPItem
*> ListeCreatureMP
;
95 // Misc Info on a MP family
107 //////////////////////////////////
108 // GLOBAL VARIABLES //
109 //////////////////////////////////
112 CraftPart craftParts
[NumMPCraftParts
];
114 // .creature files list
115 map
<string
, string
> creatureFiles
;
117 // generated names for each item
118 CSortedStringSet itemNames
;
120 // Items list to generate for each creature code
121 map
<CSString
, ListeCreatureMP
> itemsAGenerer
;
127 // Name of the family
132 std::vector
<CMPFamily
> MPFamilies
;
135 // directories pathes
136 CSString LEVEL_DESIGN_PATH
;
137 CSString TRANSLATION_PATH
;
139 CSString ITEM_MP_FAMILY_TYP
;
140 CSString ITEM_MP_GROUPE_TYP
;
141 CSString ITEM_MP_PARAM_DFN
;
142 CSString MP_DIRECTORY
;
143 CSString DEPOSIT_MPS
;
144 CSString RAW_MATERIAL_ASSIGN
;
145 CSString IC_FAMILIES_FORAGE_SOURCE
;
148 CSString ITEM_WORDS_WK
;