X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Flevel.cpp;h=4b222bb8a25214f9d89cd9d5b69d32601333f8b6;hb=69f1f633dec2d8a8f1286cf072b6725c75eaeb6a;hp=8aaba2024a10c8e558bb1e9244f10ba4e0ab7ec8;hpb=82895aabbae07b59a19e09a61ca94cd7b1603702;p=supertux.git diff --git a/src/level.cpp b/src/level.cpp index 8aaba2024..4b222bb8a 100644 --- a/src/level.cpp +++ b/src/level.cpp @@ -71,6 +71,9 @@ Level::load(const std::string& filepath) return; } + contact = ""; + license = ""; + 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); + } 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") { @@ -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();