summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorGeequlim <geequlim@gmail.com>2016-12-16 19:12:22 +0800
committerRĂ©mi Verschelde <rverschelde@gmail.com>2017-03-04 17:20:36 +0100
commit886f646cbacdbf0fe87cdda4ddb145dc72919194 (patch)
treed105e91828dfafa263c4ae4615f29689a132daad /main
parent81a393a2b445c78f4f1bfc21a9e8cc2784ca39c9 (diff)
Implements modules documents
Editor can generate documents for modules in thier own xml files
Diffstat (limited to 'main')
-rw-r--r--main/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/main/main.cpp b/main/main.cpp
index 9be77c31b6..fb7f2ebceb 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1063,6 +1063,7 @@ bool Main::start() {
bool editor=false;
String doc_tool;
+ List<String> removal_docs;
bool doc_base=true;
String game_path;
String script;
@@ -1093,6 +1094,8 @@ bool Main::start() {
bool parsed_pair=true;
if (args[i]=="-doctool") {
doc_tool=args[i+1];
+ for(int j=i+2; j<args.size();j++)
+ removal_docs.push_back(args[j]);
} else if (args[i]=="-script" || args[i]=="-s") {
script=args[i+1];
} else if (args[i]=="-level" || args[i]=="-l") {
@@ -1141,6 +1144,14 @@ bool Main::start() {
}
+ for(List<String>::Element* E= removal_docs.front(); E; E=E->next()) {
+ DocData rmdoc;
+ if (rmdoc.load(E->get()) == OK) {
+ print_line(String("Removing classes in ") + E->get());
+ doc.remove_from(rmdoc);
+ }
+ }
+
doc.save(doc_tool);
return false;