X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d3b6a58593b94c9ff41c30a7517086d607f28f10..bfb0e2da8b6fccd3d155cb46bdd3cca21e86c463:/projects/sgconf/corps.cpp 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"); }