summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
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;