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 af71806e13 - Show all commits

View file

@ -1032,5 +1032,25 @@ void Mass::getWeaponType(const char* prop_name, Containers::ArrayView<Weapon> we
getAccessories(part.accessories, part_accs);
}
}
auto custom_styles = weapon_prop->at<ArrayProperty>("Styles_10_8C3C82444B986AD7A99595AD4985912D");
if(!custom_styles) {
_state = State::Invalid;
return;
}
if(custom_styles->items.size() != weapon.customStyles.size()) {
_state = State::Invalid;
return;
}
getCustomStyles(weapon.customStyles, custom_styles);
weapon.attached = weapon_prop->at<BoolProperty>("Attach_15_D00AABBD4AD6A04778D56D81E51927B3")->value;
weapon.damageType = weapon_prop->at<ByteProperty>("DamageType_18_E1FFA53540591A9087EC698117A65C83")->enumValue;
weapon.dualWield = weapon_prop->at<BoolProperty>("DualWield_20_B2EB2CEA4A6A233DC7575996B6DD1222")->value;
weapon.effectColourMode = weapon_prop->at<ByteProperty>("ColorEfxMode_24_D254BCF943E852BF9ADB8AAA8FD80014")->enumValue;
auto effect_colour = weapon_prop->at<ColourStructProperty>("ColorEfx_26_D921B62946C493E487455A831F4520AC");
weapon.effectColour = Color4{effect_colour->r, effect_colour->g, effect_colour->b, effect_colour->a};
}
}