1 // Translation Manager Plugin - OVQT Plugin <http://dev.ryzom.com/projects/nel/>
2 // Copyright (C) 2011 Emanuel COSTEA <cemycc@gmail.com>
4 // This source file has been modified by the following contributors:
5 // Copyright (C) 2010 Winch Gate Property Limited
6 // Copyright (C) 2011 Dzmitry KAMIAHIN (dnk-88) <dnk-88@tut.by>
8 // This program is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as
10 // published by the Free Software Foundation, either version 3 of the
11 // License, or (at your option) any later version.
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef EXTRACT_BOT_NAMES_H
22 #define EXTRACT_BOT_NAMES_H
24 #include "nel/misc/types_nl.h"
25 #include "nel/misc/config_file.h"
26 #include "nel/misc/sheet_id.h"
27 #include "nel/misc/path.h"
28 #include "nel/misc/diff_tool.h"
29 #include "nel/georges/u_form.h"
30 #include "nel/georges/u_form_elm.h"
31 #include "nel/georges/load_form.h"
32 #include "nel/ligo/ligo_config.h"
33 #include "nel/ligo/primitive.h"
34 #include "nel/ligo/primitive_utils.h"
36 namespace TranslationManager
41 NLMISC::CSheetId SheetId
;
45 void readGeorges(const NLMISC::CSmartPtr
<NLGEORGES::UForm
> &form
, const NLMISC::CSheetId
&sheetId
)
47 const NLGEORGES::UFormElm
&item
=form
->getRootNode();
50 item
.getValueByName(ForceSheetName
, "3d data.ForceDisplayCreatureName");
51 item
.getValueByName(DisplayName
, "3d data.DisplayName");
54 void serial(NLMISC::IStream
&f
)
57 f
.serial(ForceSheetName
);
58 f
.serial(DisplayName
);
61 static uint
getVersion ()
73 std::string SheetName
;
76 struct ExtractBotNames
79 std::vector
<std::string
> Filters
;
80 std::map
<NLMISC::CSheetId
, TCreatureInfo
> Creatures
;
81 std::set
<std::string
> GenericNames
;
82 std::map
<std::string
, TEntryInfo
> SimpleNames
;
83 std::set
<std::string
> Functions
;
85 TCreatureInfo
*getCreature(const std::string
&sheetName
);
86 ucstring
makeGroupName(const ucstring
&translationName
);
87 std::string
removeAndStoreFunction(const std::string
&fullName
);
88 void addGenericName(const std::string
&name
, const std::string
&sheetName
);
89 void addSimpleName(const std::string
&name
, const std::string
&sheetName
);
91 void extractBotNamesFromPrimitives(NLLIGO::CLigoConfig ligoConfig
);
92 void setRequiredSettings(std::list
<std::string
> filters
, std::string level_design_path
);
93 std::set
<std::string
> getGenericNames();
94 std::map
<std::string
, TEntryInfo
> getSimpleNames();
95 std::string
cleanupName(const std::string
&name
);
96 ucstring
cleanupUcName(const ucstring
&name
);
97 void cleanSimpleNames();
98 void cleanGenericNames();
102 #endif /* EXTRACT_BOT_NAMES_H */