From 4d7be89089923e19712d57107d2401af99bbdba1 Mon Sep 17 00:00:00 2001 From: momo5502 Date: Sun, 13 Nov 2016 20:53:44 +0100 Subject: [PATCH] [ZoneBuilder] Add buildall command --- src/Components/Modules/ZoneBuilder.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/Components/Modules/ZoneBuilder.cpp b/src/Components/Modules/ZoneBuilder.cpp index 126653b1..885a3e1b 100644 --- a/src/Components/Modules/ZoneBuilder.cpp +++ b/src/Components/Modules/ZoneBuilder.cpp @@ -581,6 +581,21 @@ namespace Components Zone(zoneName).Build(); }); + Command::Add("buildall", [] (Command::Params) + { + auto zoneSources = FileSystem::GetSysFileList(Dvar::Var("fs_basepath").Get() + "\\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;