projects
/
supertux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simplify physic formula a bit
[supertux.git]
/
src
/
level.cpp
diff --git
a/src/level.cpp
b/src/level.cpp
index
8aaba20
..
4b222bb
100644
(file)
--- a/
src/level.cpp
+++ b/
src/level.cpp
@@
-71,6
+71,9
@@
Level::load(const std::string& filepath)
return;
}
return;
}
+ contact = "";
+ license = "";
+
lisp::ListIterator iter(level);
while(iter.next()) {
const std::string& token = iter.item();
lisp::ListIterator iter(level);
while(iter.next()) {
const std::string& token = iter.item();
@@
-83,6
+86,10
@@
Level::load(const std::string& filepath)
iter.value()->get(name);
} else if(token == "author") {
iter.value()->get(author);
iter.value()->get(name);
} else if(token == "author") {
iter.value()->get(author);
+ } else if(token == "contact") {
+ iter.value()->get(contact);
+ } else if(token == "license") {
+ iter.value()->get(license);
} else if(token == "on-menukey-script") {
iter.value()->get(on_menukey_script);
} else if(token == "sector") {
} else if(token == "on-menukey-script") {
iter.value()->get(on_menukey_script);
} else if(token == "sector") {
@@
-94,6
+101,8
@@
Level::load(const std::string& filepath)
}
}
}
}
+ if (license == "") log_warning << "The level author did not specify a license for this level. You might not be allowed to share it." << std::endl;
+
} catch(std::exception& e) {
std::stringstream msg;
msg << "Problem when reading level '" << filepath << "': " << e.what();
} catch(std::exception& e) {
std::stringstream msg;
msg << "Problem when reading level '" << filepath << "': " << e.what();