Build viewer/editor #13

Manually merged
williamjcm merged 128 commits from mass-viewer into master 2022-03-02 14:50:10 +01:00
Showing only changes of commit b92c37e4b6 - Show all commits

View file

@ -864,19 +864,13 @@ auto Mass::writeGlobalStyle(UnsignedLong index) -> bool {
auto Mass::updateSteamId(const std::string& steam_id) -> bool {
_steamId = steam_id;
auto unit_data = _mass->at<GenericStructProperty>("UnitData");
if(!unit_data) {
auto account = _mass->at<StringProperty>("Account");
if(!account) {
_state = State::Invalid;
return false;
}
auto account_prop = unit_data->at<StringProperty>("Account");
if(!account_prop) {
_state = State::Invalid;
return false;
}
account_prop->value = steam_id;
account->value = steam_id;
return _mass->saveToFile();
}