This commit is contained in:
Ylva Selling
2023-04-12 18:27:35 -04:00
parent e998df55b0
commit 150c1457c0
2 changed files with 10 additions and 10 deletions

View File

@@ -99,16 +99,17 @@ namespace {
using namespace openspace::scripting;
nlohmann::json function;
function["Name"] = f.name;
function["Arguments"] = nlohmann::json::array();
nlohmann::json arguments = nlohmann::json::array();
for (const LuaLibrary::Function::Argument& arg : f.arguments) {
nlohmann::json argument;
argument["Name"] = arg.name;
argument["Type"] = arg.type;
argument["Default Value"] = arg.defaultValue.value_or("");
function["Arguments"].push_back(argument);
arguments.push_back(argument);
}
function["Arguments"] = arguments;
function["Return Type"] = f.returnType;
function["Help"] = f.helpText;