Mass: rename a member.
SteamIDs aren't used anymore in 0.8+ save files.
This commit is contained in:
parent
353a71d8ab
commit
afc163f344
2 changed files with 7 additions and 6 deletions
|
@ -193,7 +193,7 @@ void Mass::refreshValues() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
_steamId = account_prop->value;
|
_account = account_prop->value;
|
||||||
|
|
||||||
_state = State::Valid;
|
_state = State::Valid;
|
||||||
}
|
}
|
||||||
|
@ -930,8 +930,8 @@ auto Mass::techs() -> Containers::ArrayView<Int> {
|
||||||
return _tuning.techIds;
|
return _tuning.techIds;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Mass::updateSteamId(const std::string& steam_id) -> bool {
|
auto Mass::updateAccount(const std::string& new_account) -> bool {
|
||||||
_steamId = steam_id;
|
_account = new_account;
|
||||||
|
|
||||||
auto account = _mass->at<StringProperty>("Account");
|
auto account = _mass->at<StringProperty>("Account");
|
||||||
if(!account) {
|
if(!account) {
|
||||||
|
@ -939,7 +939,7 @@ auto Mass::updateSteamId(const std::string& steam_id) -> bool {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
account->value = steam_id;
|
account->value = new_account;
|
||||||
|
|
||||||
return _mass->saveToFile();
|
return _mass->saveToFile();
|
||||||
}
|
}
|
||||||
|
|
|
@ -137,7 +137,8 @@ class Mass {
|
||||||
auto architecture() -> Int&;
|
auto architecture() -> Int&;
|
||||||
auto techs() -> Containers::ArrayView<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:
|
private:
|
||||||
void getCustomStyles(Containers::ArrayView<CustomStyle> styles, ArrayProperty* style_array);
|
void getCustomStyles(Containers::ArrayView<CustomStyle> styles, ArrayProperty* style_array);
|
||||||
|
@ -203,5 +204,5 @@ class Mass {
|
||||||
Containers::StaticArray<7, Int> techIds;
|
Containers::StaticArray<7, Int> techIds;
|
||||||
} _tuning;
|
} _tuning;
|
||||||
|
|
||||||
std::string _steamId;
|
std::string _account;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue