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 6f3da0b4a7 - Show all commits

View file

@ -147,6 +147,11 @@ void Mass::refreshValues() {
return; return;
} }
if(frame_styles->items.size() != 4) {
_state = State::Invalid;
return;
}
for(UnsignedInt i = 0; i < 4; i++) { for(UnsignedInt i = 0; i < 4; i++) {
_frame.styles[i] = frame_styles->at<IntProperty>(i)->value; _frame.styles[i] = frame_styles->at<IntProperty>(i)->value;
} }
@ -169,6 +174,11 @@ void Mass::refreshValues() {
return; return;
} }
if(frame_styles->items.size() != 16) {
_state = State::Invalid;
return;
}
for(UnsignedInt i = 0; i < frame_styles->items.size(); i++) { for(UnsignedInt i = 0; i < frame_styles->items.size(); i++) {
auto style_prop = frame_styles->at<GenericStructProperty>(i); auto style_prop = frame_styles->at<GenericStructProperty>(i);
@ -205,6 +215,11 @@ void Mass::refreshValues() {
return; return;
} }
if(armour_styles->items.size() != 16) {
_state = State::Invalid;
return;
}
for(UnsignedInt i = 0; i < armour_styles->items.size(); i++) { for(UnsignedInt i = 0; i < armour_styles->items.size(); i++) {
auto style_prop = armour_styles->at<GenericStructProperty>(i); auto style_prop = armour_styles->at<GenericStructProperty>(i);
@ -241,6 +256,11 @@ void Mass::refreshValues() {
return; return;
} }
if(global_styles->items.size() != 16) {
_state = State::Invalid;
return;
}
for(UnsignedInt i = 0; i < global_styles->items.size(); i++) { for(UnsignedInt i = 0; i < global_styles->items.size(); i++) {
auto style_prop = global_styles->at<GenericStructProperty>(i); auto style_prop = global_styles->at<GenericStructProperty>(i);