Compare commits

...

2 commits

Author SHA1 Message Date
afc163f344 Mass: rename a member.
SteamIDs aren't used anymore in 0.8+ save files.
2022-02-09 20:16:14 +01:00
353a71d8ab Weapon: remove an unneeded blank line. 2022-02-09 18:28:23 +01:00
3 changed files with 7 additions and 7 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;
};

View file

@ -49,7 +49,6 @@ enum class DamageType {
};
struct Weapon {
Weapon() = default;
Weapon(const Weapon& other);