Mass: rename a member.

SteamIDs aren't used anymore in 0.8+ save files.
This commit is contained in:
Guillaume Jacquemin 2022-02-09 20:16:14 +01:00
parent 353a71d8ab
commit afc163f344
2 changed files with 7 additions and 6 deletions

View File

@ -193,7 +193,7 @@ void Mass::refreshValues() {
return;
}
_steamId = account_prop->value;
_account = account_prop->value;
_state = State::Valid;
}
@ -930,8 +930,8 @@ auto Mass::techs() -> Containers::ArrayView<Int> {
return _tuning.techIds;
}
auto Mass::updateSteamId(const std::string& steam_id) -> bool {
_steamId = steam_id;
auto Mass::updateAccount(const std::string& new_account) -> bool {
_account = new_account;
auto account = _mass->at<StringProperty>("Account");
if(!account) {
@ -939,7 +939,7 @@ auto Mass::updateSteamId(const std::string& steam_id) -> bool {
return false;
}
account->value = steam_id;
account->value = new_account;
return _mass->saveToFile();
}

View File

@ -137,7 +137,8 @@ class Mass {
auto architecture() -> Int&;
auto techs() -> Containers::ArrayView<Int>;
auto updateSteamId(const std::string& steam_id) -> bool;
auto account() -> std::string const&;
auto updateAccount(const std::string& new_account) -> bool;
private:
void getCustomStyles(Containers::ArrayView<CustomStyle> styles, ArrayProperty* style_array);
@ -203,5 +204,5 @@ class Mass {
Containers::StaticArray<7, Int> techIds;
} _tuning;
std::string _steamId;
std::string _account;
};