mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-13 23:11:49 +00:00
reserve "project", "pack", "packid", "root" entry-point names
This commit is contained in:
parent
57330a4235
commit
d1fb68eeac
1 changed files with 4 additions and 2 deletions
|
|
@ -20,7 +20,8 @@ ContentPack ContentPack::createCore(const EnginePaths& paths) {
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::string> ContentPack::RESERVED_NAMES = {
|
const std::vector<std::string> ContentPack::RESERVED_NAMES = {
|
||||||
"res", "abs", "local", "core", "user", "world", "none", "null"
|
"res", "abs", "local", "core", "user", "world", "none", "null", "project",
|
||||||
|
"pack", "packid", "root"
|
||||||
};
|
};
|
||||||
|
|
||||||
contentpack_error::contentpack_error(
|
contentpack_error::contentpack_error(
|
||||||
|
|
@ -114,10 +115,11 @@ ContentPack ContentPack::read(const io::path& folder) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pack.id == "none")
|
if (pack.id == "none") {
|
||||||
throw contentpack_error(
|
throw contentpack_error(
|
||||||
pack.id, folder, "content-pack id is not specified"
|
pack.id, folder, "content-pack id is not specified"
|
||||||
);
|
);
|
||||||
|
}
|
||||||
checkContentPackId(pack.id, folder);
|
checkContentPackId(pack.id, folder);
|
||||||
|
|
||||||
return pack;
|
return pack;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue