X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d3b6a58593b94c9ff41c30a7517086d607f28f10..090b0586b6561e4b3aa87d8365026aad119150f9:/projects/sgconf/corps.cpp?ds=inline diff --git a/projects/sgconf/corps.cpp b/projects/sgconf/corps.cpp index aee446b2..82673377 100644 --- a/projects/sgconf/corps.cpp +++ b/projects/sgconf/corps.cpp @@ -29,6 +29,13 @@ std::cout << Indent(level, true) << "name: " << info.name << "\n" << Indent(level) << "cash: " << info.cash << "\n"; } +std::vector GetCorpParams() +{ +std::vector params; +params.push_back(SGCONF::API_ACTION::PARAM("cash", "", "\tcorporation's cash")); +return params; +} + void SimpleCallback(bool result, const std::string & reason, void * /*data*/) @@ -124,10 +131,11 @@ return false; void SGCONF::AppendCorpsOptionBlock(COMMANDS & commands, OPTION_BLOCKS & blocks) { +std::vector params(GetCorpParams()); blocks.Add("Corporation management options") .Add("get-corps", SGCONF::MakeAPIAction(commands, GetCorpsFunction), "\tget corporation list") .Add("get-corp", SGCONF::MakeAPIAction(commands, "", GetCorpFunction), "get corporation") - .Add("add-corp", SGCONF::MakeAPIAction(commands, "", AddCorpFunction), "add corporation") + .Add("add-corp", SGCONF::MakeAPIAction(commands, "", params, AddCorpFunction), "add corporation") .Add("del-corp", SGCONF::MakeAPIAction(commands, "", DelCorpFunction), "del corporation") - .Add("chg-corp", SGCONF::MakeAPIAction(commands, "", ChgCorpFunction), "change corporation"); + .Add("chg-corp", SGCONF::MakeAPIAction(commands, "", params, ChgCorpFunction), "change corporation"); }