add generator layers
This commit is contained in:
@@ -88,5 +88,9 @@ std::unique_ptr<Content> ContentBuilder::build() {
|
||||
def->rt.placingBlock = content->blocks.require(def->placingBlock).rt.id;
|
||||
}
|
||||
|
||||
for (auto& [name, def] : content->generators.getDefs()) {
|
||||
def->script->prepare(content.get());
|
||||
}
|
||||
|
||||
return content;
|
||||
}
|
||||
|
||||
@@ -473,7 +473,11 @@ void ContentLoader::load() {
|
||||
|
||||
auto& def = builder.generators.create(full);
|
||||
|
||||
loadGenerator(def, full, name);
|
||||
try {
|
||||
loadGenerator(def, full, name);
|
||||
} catch (const std::runtime_error& err) {
|
||||
throw std::runtime_error("generator '"+full+"': "+err.what());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user