[ZoneBuilder] Add buildall command

This commit is contained in:
momo5502 2016-11-13 20:53:44 +01:00
parent aa9da9012e
commit 4d7be89089

View File

@ -581,6 +581,21 @@ namespace Components
Zone(zoneName).Build();
});
Command::Add("buildall", [] (Command::Params)
{
auto zoneSources = FileSystem::GetSysFileList(Dvar::Var("fs_basepath").Get<std::string>() + "\\zone_source", "csv", false);
for (auto source : zoneSources)
{
if (Utils::String::EndsWith(source, ".csv"))
{
source = source.substr(0, source.find(".csv"));
}
Command::Execute(fmt::sprintf("buildzone %s", source.data()), true);
}
});
Command::Add("listassets", [] (Command::Params params)
{
if (params.Length() < 2) return;