浏览代码

Get autosave day without leading 0, delete ancient saveprefix stuff

Dydzio 2 年之前
父节点
当前提交
404ab23bc6
共有 2 个文件被更改,包括 1 次插入5 次删除
  1. 0 2
      client/CMT.cpp
  2. 1 3
      client/CPlayerInterface.cpp

+ 0 - 2
client/CMT.cpp

@@ -137,7 +137,6 @@ int main(int argc, char * argv[])
 		("nointro,i", "skips intro movies")
 		("donotstartserver,d","do not attempt to start server and just connect to it instead server")
 		("serverport", po::value<si64>(), "override port specified in config file")
-		("saveprefix", po::value<std::string>(), "prefix for auto save files")
 		("savefrequency", po::value<si64>(), "limit auto save creation to each N days")
 		("lobby", "parameters address, port, uuid to connect ro remote lobby session")
 		("lobby-address", po::value<std::string>(), "address to remote lobby")
@@ -256,7 +255,6 @@ int main(int argc, char * argv[])
 
 	// Init special testing settings
 	setSettingInteger("session/serverport", "serverport", 0);
-	setSettingString("session/saveprefix", "saveprefix", "");
 	setSettingInteger("general/saveFrequency", "savefrequency", 1);
 
 	// Initialize logging based on settings

+ 1 - 3
client/CPlayerInterface.cpp

@@ -218,9 +218,7 @@ void CPlayerInterface::performAutosave()
 		}
 		else
 		{
-			std::string stringifiedDate = (cb->getDate(Date::MONTH) < 10
-				? std::string("0") + std::to_string(cb->getDate(Date::MONTH))
-				: std::to_string(cb->getDate(Date::MONTH)))
+			std::string stringifiedDate = std::to_string(cb->getDate(Date::MONTH))
 					+ std::to_string(cb->getDate(Date::WEEK))
 					+ std::to_string(cb->getDate(Date::DAY_OF_WEEK));