1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

Client: server port and testing options cleanup

Now we only pass port as ui16 instead of std::string
This commit is contained in:
Arseniy Shestakov
2017-06-04 08:49:23 +03:00
parent 4a302d4fe5
commit 6642816b1e
9 changed files with 45 additions and 57 deletions

View File

@ -171,12 +171,7 @@ void CPlayerInterface::yourTurn()
GH.curInt = this;
adventureInt->selection = nullptr;
std::string prefix = "";
if (settings["testing"]["enabled"].Bool())
{
prefix = settings["testing"]["prefix"].String();
}
std::string prefix = settings["session"]["saveprefix"].String();
if (firstCall)
{
if (howManyPeople == 1)
@ -192,7 +187,7 @@ void CPlayerInterface::yourTurn()
}
firstCall = 0;
}
else if (settings["testing"].isNull() || cb->getDate() % static_cast<int>(settings["testing"]["savefrequency"].Float()) == 0)
else if (cb->getDate() % static_cast<int>(settings["session"]["savefrequency"].Integer()) == 0)
{
LOCPLINT->cb->save("Saves/" + prefix + "Autosave_" + boost::lexical_cast<std::string>(autosaveCount++ + 1));
autosaveCount %= 5;